/* ==============================================================================
   KAPTAIN PROFILE STUDIO — LUXURY OVERHAUL STYLES
   Modern, spatial, glassmorphism UI with weightless cards & zero button collisions
   ============================================================================== */

:root {
  --ps-mint-primary: #00f5a0;
  --ps-mint-emerald: #10b981;
  --ps-mint-deep: #059669;
  --ps-obsidian-base: #08090d;
  --ps-obsidian-surface: #0e1118;
  --ps-obsidian-card: #151923;
  --ps-obsidian-app: #12151e;

  --ps-glass-bg: rgba(14, 17, 24, 0.88);
  --ps-glass-border: rgba(255, 255, 255, 0.08);
  --ps-glass-border-hover: rgba(0, 245, 160, 0.25);
  --ps-glass-border-active: rgba(0, 245, 160, 0.4);

  --ps-elevation-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.7);
  --ps-elevation-card: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
  --ps-elevation-hover: 0 12px 32px -4px rgba(0, 0, 0, 0.85);

  --ps-surface-card: rgba(21, 25, 35, 0.75);
  --ps-surface-card-hover: rgba(28, 33, 46, 0.9);
}

/* High-contrast keyboard focus */
:focus-visible {
  outline: 2px solid #00f5a0 !important;
  outline-offset: 2px !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--ps-obsidian-base, #08090d);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base Fullpage Overlay */
#profile-studio-overlay.ps-fullpage {
  background: radial-gradient(circle at 50% 0%, #151923 0%, #08090d 80%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  padding: 0 !important;
}

#profile-studio-panel {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-width: 100vw !important;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#ps-content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==============================================================================
   PROFILE STUDIO BASE STYLESHEET (Full Component Ecosystem)
   ============================================================================== */
/* ==========================================================================
   PROFILE STUDIO (Cinematic Collection Organizer & Vault Cherry-Picker)
   Palette rides the site's own tokens (--accent/--bg-elevated/--text-*)
   instead of a bolted-on hex set, so the modal reads as part of Kaptain.
   ========================================================================== */
.ps-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000 !important;
  background: rgba(3, 5, 11, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.ps-panel {
  width: min(96vw, 1380px);
  height: min(92vh, 900px);
  background: var(--bg-drawer);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
}
.ps-panel:focus {
  outline: none;
}

.ps-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
}

.ps-toast {
  position: absolute;
  top: 64px;
  right: 24px;
  background: var(--success);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-toast.active {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.ps-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-elevated);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.ps-header-center {
  text-align: center;
  align-items: center;
  padding: 30px 24px 16px;
}
.ps-header-compact {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 13px 22px;
}
.ps-header-left,
.ps-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-header-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.84rem;
  color: #f1f5f9;
}
.ps-avatar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: none;
}
.ps-profile-label {
  color: #8fa0b5;
  font-size: 0.78rem;
}
.ps-profile-name-text {
  color: #fff;
  font-weight: 700;
}

.ps-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-subtitle {
  font-size: 0.86rem;
  color: #8fa0b5;
  margin: 0;
}
.ps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ps-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 14px;
}
.ps-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.ps-privacy-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.ps-privacy-box svg {
  color: var(--accent-light);
  margin-top: 1px;
}

.ps-form-actions {
  margin-top: 4px;
}
.ps-footer-actions {
  margin-top: 18px;
  text-align: center;
}

.ps-close-btn {
  font-size: 1.5rem;
  line-height: 1;
  color: #8fa0b5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.ps-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ps-header:not(.ps-header-compact) .ps-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
}

.ps-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ps-login-body {
  max-width: 440px;
  margin: 20px auto;
  width: 100%;
}
.ps-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b0bec5;
}
.ps-input {
  width: 100%;
  padding: 11px 14px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ps-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

/* Button System */
.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ps-btn-block {
  width: 100%;
}
.ps-btn-lg {
  padding: 13px 26px;
  font-size: 0.96rem;
  border-radius: 11px;
}
.ps-btn-primary {
  background: var(--accent-gradient);
  color: var(--on-accent, #04130d);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ps-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.ps-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ps-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ps-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.ps-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ps-btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 4px;
}
.ps-btn-link:hover {
  color: var(--accent-light);
}
.ps-btn-chip {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-btn-chip.is-pinned {
  background: var(--warning-glow, rgba(245, 158, 11, 0.15));
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 600;
}
.ps-btn-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.ps-btn-icon svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ps-btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-icon:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.ps-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Artwork button: No additional art available indicator */
.ps-btn-wardrobe.is-no-alt-art {
  position: relative;
  opacity: 0.38;
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.04);
}

.ps-btn-wardrobe.is-no-alt-art:hover,
.ps-btn-wardrobe.is-no-alt-art.is-hovered,
.ps-btn-wardrobe.is-no-alt-art:focus-visible {
  opacity: 0.95;
  color: #94a3b8;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Minimal diagonal strike line through the palette icon */
.ps-btn-wardrobe.is-no-alt-art::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1.5px;
  background: #ef4444;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  box-shadow: none;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ps-btn-wardrobe.is-no-alt-art:hover::before,
.ps-btn-wardrobe.is-no-alt-art.is-hovered::before,
.ps-btn-wardrobe.is-no-alt-art:focus-visible::before {
  background: #f87171;
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(-45deg) scale(1.1);
}

/* Tooltip on hover */
.ps-btn-wardrobe.is-no-alt-art[data-tooltip]:hover::after,
.ps-btn-wardrobe.is-no-alt-art[data-tooltip].is-hovered::after,
.ps-btn-wardrobe.is-no-alt-art[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d111d;
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 10000;
  animation: psTooltipFadeIn 0.15s ease-out;
}

@keyframes psTooltipFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.ps-shelf-empty-hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.45;
}

.ps-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Keyboard focus — the only :focus rule used to be the login inputs */
.ps-btn:focus-visible,
.ps-btn-icon:focus-visible,
.ps-close-btn:focus-visible,
.ps-vault-tab:focus-visible,
.ps-actions-item:focus-visible,
.ps-profile-card:focus-visible,
.ps-vault-card:focus-visible,
.ps-cat-header:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* Step 2: Profiles Grid */
.ps-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 10px 0 20px;
}
.ps-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-profile-card:hover,
.ps-profile-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #171f30;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.ps-profile-pick-btn {
  flex-shrink: 0;
  pointer-events: none;
}
.ps-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.ps-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ps-profile-info {
  flex: 1;
  min-width: 0;
}
.ps-profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-profile-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==========================================================================
   STEP 3: STUDIO CANVAS (3-Tab Modular Architecture)
   ========================================================================== */
.ps-mode-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px 10px;
  background: rgba(10, 14, 24, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.ps-mode-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.ps-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps-mode-tab svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  color: inherit;
}
.ps-mode-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.ps-mode-tab.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}
.ps-mode-tab.active .ps-mode-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.ps-canvas-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 20px;
  overflow: hidden;
}

.ps-mode-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #111623;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.ps-mode-view.ps-art-studio-view {
  overflow-y: auto;
}

/* Art & Themes Studio */
.ps-art-carousels-container {
  overflow: visible;
  padding: 4px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ps-art-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-art-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.ps-art-row-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-art-row-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.ps-art-row-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-light, #10b981);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-art-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.ps-art-card {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.ps-art-card.is-poster {
  flex: 0 0 170px;
}
.ps-art-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}
.ps-art-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #080c16;
  overflow: hidden;
}
.ps-art-card.is-poster .ps-art-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-art-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-art-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ps-art-card:hover .ps-art-hover-img {
  opacity: 1;
}
.ps-art-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 5;
}
.ps-art-card-meta {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ps-art-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-art-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}

/* -------------------------------------------------------------
   Art & Themes Mode: Theme Deck & In-Card Quick Flippers
   ------------------------------------------------------------- */
.ps-theme-deck {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 20px 18px;
  backdrop-filter: blur(12px);
}
.ps-theme-deck-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-theme-deck-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-theme-deck-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent, #00f5a0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ps-theme-deck-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-theme-deck-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-theme-deck-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ps-theme-deck-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  color: #fff;
}
.ps-theme-deck-chip:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent, #00f5a0);
  transform: translateY(-2px);
  box-shadow: none;
}
.ps-deck-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: none;
}
.ps-deck-chip-text {
  display: flex;
  flex-direction: column;
}
.ps-deck-chip-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}
.ps-deck-chip-count {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* In-Card Quick Flippers */
.ps-card-quick-flippers {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-art-card:hover .ps-card-quick-flippers {
  opacity: 1;
  pointer-events: auto;
}
.ps-card-flip-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.ps-card-flip-btn:hover {
  background: var(--accent, #00f5a0);
  border-color: #10b981;
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-card-style-indicator {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.ps-card-just-flipped {
  animation: cardFlipGlow 0.45s ease;
}
@keyframes cardFlipGlow {
  0% {
    box-shadow: none;
    transform: scale(0.98);
  }
  50% {
    box-shadow: none;
    transform: scale(1.02);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

/* -------------------------------------------------------------
   Docked Visual Wardrobe Drawer
   ------------------------------------------------------------- */
.ps-art-card.is-inspecting {
  border-color: #10b981 !important;
  box-shadow: none;
  transform: translateY(-2px);
}

.ps-docked-drawer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.98) 0%, rgba(9, 13, 22, 0.99) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-radius: 16px 16px 0 0;
  padding: 12px 20px 16px;
  z-index: 50;
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: slideUpDrawer 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpDrawer {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ps-docked-drawer.is-open {
  display: flex;
}

.ps-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ps-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-drawer-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent, #00f5a0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ps-drawer-meta {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}

.ps-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-drawer-shelf {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ps-drawer-shelf::-webkit-scrollbar {
  height: 6px;
}

.ps-drawer-shelf::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.ps-drawer-card {
  flex: 0 0 170px;
  display: flex;
  flex-direction: column;
  background: rgba(22, 28, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ps-drawer-card.is-poster {
  flex: 0 0 120px;
}

.ps-drawer-card:hover {
  border-color: var(--accent, #00f5a0);
  transform: translateY(-2px);
  box-shadow: none;
}

.ps-drawer-card.is-active {
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
  background: rgba(30, 38, 60, 0.95);
}

.ps-drawer-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #080c16;
  overflow: hidden;
}

.ps-drawer-card.is-poster .ps-drawer-card-thumb {
  aspect-ratio: 2 / 3;
}

.ps-drawer-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-drawer-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ps-drawer-card:hover .ps-drawer-hover-img {
  opacity: 1;
}

.ps-drawer-badge-inuse {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent, #00f5a0);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.ps-drawer-badge-style {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  z-index: 5;
}

.ps-drawer-card-meta {
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-drawer-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-drawer-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}

.ps-drawer-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  font-style: italic;
}

/* Smart Row Target Popover */
.ps-row-target-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #182033;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  padding: 8px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: popoverFadeIn 0.18s ease;
}
@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ps-row-target-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 6px;
}
.ps-row-target-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-row-target-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
  font-family: inherit;
}
.ps-row-target-option:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.ps-row-target-option.is-new-row {
  color: var(--accent-light, #10b981);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3px;
  padding-top: 8px;
}
.ps-row-target-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.ps-column {
  display: flex;
  flex-direction: column;
  background: #111623;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.ps-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
.ps-col-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-col-subtitle {
  font-size: 0.78rem;
  color: #8fa0b5;
  margin-top: 2px;
  display: block;
}

/* Left Column: Categories List */
.ps-categories-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.ps-cat-card {
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 52px;
  transition: all 0.18s ease;
}
.ps-cat-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #182032;
}
.ps-cat-card.is-expanded {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: #141928;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.ps-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  min-height: 50px;
  box-sizing: border-box;
}
.ps-cat-drag-handle {
  display: flex;
  gap: 4px;
}
.ps-cat-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ps-cat-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-cat-count {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent-light);
  background: var(--accent-subtle);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-cat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Actions kebab — collapses the pin/delete/jump-to-position controls out of
   the always-visible row so titles keep their space at narrow widths, and
   gives reordering a top/bottom shortcut instead of only single-step ▲▼. */
.ps-actions-menu {
  position: relative;
  display: inline-flex;
}
.ps-actions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  background: #1a2033;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
.ps-actions-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ps-actions-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.ps-actions-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #94a3b8;
}
.ps-actions-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.ps-actions-item.ps-actions-item-danger {
  color: #f87171;
}
.ps-actions-item.ps-actions-item-danger svg {
  color: #f87171;
}
.ps-actions-item.ps-actions-item-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}
.ps-actions-item.is-active svg {
  color: #fbbf24;
}
.ps-cat-body {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(0, 0, 0, 0.28);
}
.ps-folder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #192033;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  flex-shrink: 0;
  min-height: 54px;
  box-sizing: border-box;
  transition: background 0.15s ease;
}
.ps-folder-row:hover {
  background: #1e263d;
  border-color: rgba(255, 255, 255, 0.12);
}
.ps-folder-thumb {
  width: 58px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.ps-folder-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-folder-info {
  flex: 1;
  min-width: 0;
}
.ps-folder-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-folder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}
.ps-badge-shape {
  font-size: 0.72rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-weight: 600;
  color: #cbd5e1;
}
.ps-badge-sources {
  font-size: 0.72rem;
  color: #64748b;
}
.ps-folder-reorder {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Right Column: Kaptain's Vault */
.ps-vault-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.015);
}
.ps-vault-search {
  padding: 10px 14px;
  font-size: 0.88rem;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
}
.ps-vault-tabs-scroller {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ps-vault-tabs-scroller::-webkit-scrollbar {
  display: none;
}
.ps-vault-tabs-wrap {
  position: relative;
}
.ps-vault-tabs-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 28px;
  background: linear-gradient(to right, transparent, #111623);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.ps-vault-tabs-wrap.at-end::after {
  opacity: 0;
}
.ps-vault-tab {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.ps-vault-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.ps-vault-tab.active {
  background: var(--accent);
  color: var(--on-secondary);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.ps-vault-grid {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 0;
}
.ps-vault-card {
  display: flex;
  flex-direction: column;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
  min-height: 220px;
  height: auto;
  box-sizing: border-box;
}
.ps-vault-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: #192033;
}
.ps-vault-card.is-added {
  border-color: rgba(34, 197, 94, 0.4);
}
.ps-vault-added-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-vault-added-badge svg {
  width: 12px;
  height: 12px;
}
.ps-vault-cover {
  width: 100%;
  height: 105px;
  min-height: 105px;
  flex-shrink: 0;
  position: relative;
  background: #000;
  overflow: hidden;
}
.ps-vault-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-vault-cat-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-vault-info {
  padding: 10px 10px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.ps-vault-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ps-vault-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}
.ps-btn-vault-add {
  margin: 0 8px 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-btn-vault-add:hover {
  background: var(--accent);
  color: var(--on-secondary);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* Bottom Bar */
.ps-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #101522;
  flex-shrink: 0;
}
.ps-diff-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-diff-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.ps-diff-added {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.ps-diff-removed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.ps-diff-reordered {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Custom Scrollbars */
.ps-categories-scroller::-webkit-scrollbar,
.ps-vault-grid::-webkit-scrollbar {
  width: 6px;
}
.ps-categories-scroller::-webkit-scrollbar-track,
.ps-vault-grid::-webkit-scrollbar-track {
  background: transparent;
}
.ps-categories-scroller::-webkit-scrollbar-thumb,
.ps-vault-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.ps-categories-scroller::-webkit-scrollbar-thumb:hover,
.ps-vault-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Loading & Empty States */
.ps-empty-state,
.ps-empty-category,
.ps-empty-vault {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.84rem;
}
.ps-loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  padding: 60px 20px;
}
.ps-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}
@keyframes ps-spin {
  to {
    transform: rotate(360deg);
  }
}
.ps-loading-text {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
}

/* ==========================================================================
   STEP 4: CONFIRM & PUSH — the highest-stakes screen (irreversible write to
   a real TV) had zero CSS beyond the shared button system; it rendered as a
   bare stacked text list. This is the screen that should feel MOST
   reassuring, not least.
   ========================================================================== */
.ps-confirm-body {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  gap: 18px;
}
.ps-summary-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 10px;
}
.ps-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.ps-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.ps-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-stat-added .ps-stat-value {
  color: #4ade80;
}
.ps-stat-removed .ps-stat-value {
  color: #f87171;
}

.ps-backup-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent-subtle);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}
.ps-backup-notice svg {
  color: var(--accent-light);
  margin-top: 1px;
}

.ps-confirm-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.ps-diff-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-diff-detail h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-diffchip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ps-diffchip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 220px;
}
.ps-diffchip-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}
.ps-diffchip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-diffchip-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-diffchip.is-added {
  border-color: rgba(34, 197, 94, 0.35);
}
.ps-diffchip.is-added .ps-diffchip-title {
  color: #86efac;
}
.ps-diffchip.is-removed {
  border-color: rgba(239, 68, 68, 0.3);
}
.ps-diffchip.is-removed .ps-diffchip-title {
  color: #fca5a5;
  text-decoration: line-through;
  text-decoration-color: rgba(252, 165, 165, 0.5);
}
.ps-diffchip-more {
  align-self: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 5px 4px;
}

.ps-categories-preview h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-order-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  font-size: 0.86rem;
}
.ps-order-list li strong {
  color: #fff;
}

.ps-confirm-actions,
.ps-confirm-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   STEP 5: SUCCESS
   ========================================================================== */
.ps-success-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 16px var(--accent-glow));
}
.ps-success-body {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  gap: 18px;
  align-items: stretch;
}
.ps-success-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.5;
}
.ps-success-tip svg {
  color: var(--accent-light);
  margin-top: 2px;
  flex-shrink: 0;
}
.ps-success-tip strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}
.ps-success-tip p {
  margin: 0;
}
.ps-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .ps-mode-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
    gap: 6px;
  }
  .ps-mode-tab svg {
    width: 15px;
    height: 15px;
  }
  .ps-art-card {
    flex: 0 0 200px;
  }
  .ps-canvas-layout {
    padding: 10px 12px;
  }
  .ps-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-height: none;
  }
  .ps-overlay {
    padding: 0;
  }
  .ps-summary-card {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 16px;
  }
}

@media (max-width: 520px) {
  .ps-mode-nav-bar {
    padding: 6px 10px 8px;
  }
  .ps-mode-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .ps-mode-tab {
    padding: 6px 8px;
    font-size: 0.72rem;
    gap: 4px;
    flex: 1;
    justify-content: center;
  }
  .ps-art-card {
    flex: 0 0 170px;
  }
  /* Icon clusters were eating almost all the horizontal room, truncating
     "Continue Watching" down to "Co…". The kebab menu already moved the
     rarer actions out of the row; here the two that remain visible (▲▼)
     get tighter, and titles are allowed to wrap instead of vanishing. */
  .ps-cat-title,
  .ps-folder-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ps-cat-header {
    align-items: flex-start;
    flex-wrap: nowrap;
  }
  .ps-btn-icon {
    width: 30px;
    height: 30px;
  }
  .ps-folder-thumb {
    width: 46px;
    height: 32px;
  }
  .ps-vault-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ==========================================================================
   Profile Studio Marketplace: Curated Shelves, Artwork Wardrobe & Drops
   ========================================================================== */

/* Marketplace Navigation Bar */
.ps-market-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  background: rgba(10, 14, 24, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ps-market-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.ps-market-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}
.ps-market-tab.active {
  color: #fff;
  background: var(--accent, #00f5a0);
  border-color: var(--accent, #00f5a0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Creator Filter Pills */
.ps-creator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 6px;
}
.ps-creator-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ps-creator-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-creator-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.ps-creator-pill.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}
.ps-creator-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ps-creator-tag-kaptain {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.ps-creator-tag-community {
  background: rgba(0, 245, 160, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

/* Curated Shelves Grid */
.ps-shelves-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 24px;
  overflow-y: auto;
  flex: 1;
}
.ps-shelf-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-shelf-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.ps-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ps-shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-shelf-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-shelf-count {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-shelf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ps-shelf-chip {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-shelf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Community Drops (Recipes) Grid */
.ps-drops-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 18px 24px;
  overflow-y: auto;
  flex: 1;
}
.ps-drops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-drop-card {
  background: linear-gradient(135deg, rgba(30, 38, 58, 0.5) 0%, rgba(15, 20, 32, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
}
.ps-drop-card:hover {
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}
.ps-drop-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ps-drop-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-drop-creator {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-drop-tagline {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}
.ps-drop-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.ps-drop-row-pill {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #00f5a0;
  border: 1px solid rgba(0, 0, 0, 0.5);
  font-weight: 500;
}
.ps-drop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  justify-content: flex-end;
}

/* Artwork Wardrobe Modal */
.ps-wardrobe-overlay {
  position: absolute;
  inset: 0;
  z-index: 100020;
  background: rgba(4, 7, 16, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.ps-wardrobe-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-wardrobe-panel {
  width: min(94vw, 860px);
  max-height: min(92vh, 800px);
  background: var(--bg-elevated, #0f1422);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.ps-wardrobe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-wardrobe-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-wardrobe-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-wardrobe-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-wardrobe-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero Comparison Stage (Large, Beautiful Side-by-Side) */
.ps-hero-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.ps-hero-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #94a3b8);
}
.ps-hero-card-header .is-accent {
  color: var(--accent-light, #00f5a0);
}
.ps-hero-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #090d18;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.ps-hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}
.ps-hero-card.is-candidate {
  border-color: #00f5a0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-hero-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070e;
}
.ps-hero-card.is-poster .ps-hero-thumb {
  aspect-ratio: 2 / 3;
}
.ps-hero-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-hero-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.ps-hero-card:hover .ps-hero-hover-img {
  opacity: 1;
}
.ps-hero-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.ps-hero-card-meta {
  padding: 10px 14px;
  background: rgba(13, 18, 30, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ps-hero-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.ps-hero-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* Style Selector Shelf */
.ps-shelf-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-shelf-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-shelf-section-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.ps-shelf-tab-bar {
  display: flex;
  gap: 6px;
}
.ps-shelf-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-shelf-tab.active {
  background: rgba(0, 245, 160, 0.15);
  border-color: #00f5a0;
  color: #00f5a0;
}
.ps-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.ps-shelf-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
  position: relative;
}
.ps-shelf-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.ps-shelf-item.is-selected {
  background: rgba(0, 245, 160, 0.12);
  border-color: #00f5a0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.ps-shelf-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-shelf-item-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-shelf-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}
.ps-current-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
  padding: 2px 7px;
  border-radius: 4px;
}
.ps-tag-kaptain {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.ps-tag-kaptain-v1 {
  background: rgba(234, 88, 12, 0.18) !important;
  color: #fdba74 !important;
  border: 1px solid rgba(234, 88, 12, 0.35) !important;
}
.ps-tag-studio {
  background: rgba(0, 245, 160, 0.18) !important;
  color: var(--accent-light) !important;
  border: 1px solid rgba(0, 245, 160, 0.35) !important;
}

/* Wardrobe Footer */
.ps-wardrobe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.6);
}
.ps-wardrobe-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom Art Form */
.ps-custom-art-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

/* Mobile Segmented Toggle (hidden on desktop, visible on <= 640px) */
.ps-mobile-stage-toggle {
  display: none;
}

@media (max-width: 640px) {
  .ps-wardrobe-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .ps-wardrobe-header {
    padding: 12px 16px;
  }
  .ps-wardrobe-body {
    padding: 14px 16px;
    gap: 14px;
  }
  .ps-mobile-stage-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 2px;
  }
  .ps-mobile-toggle-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
  }
  .ps-mobile-toggle-btn.active {
    background: var(--accent, #00f5a0);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  }
  .ps-hero-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ps-hero-card-wrap.ps-mobile-hidden {
    display: none !important;
  }
  .ps-shelf-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .ps-wardrobe-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 10px;
  }
  .ps-wardrobe-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
  .ps-wardrobe-footer-right button {
    flex: 1;
  }
  #ps-btn-wardrobe-apply-row {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   FULLSCREEN HIGH-RES LIGHTBOX MODAL
   ========================================================================== */
.ps-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(2, 4, 10, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ps-lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-lightbox-panel {
  width: min(94vw, 1180px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.ps-lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-lightbox-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-lightbox-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}
.ps-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-lightbox-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  max-height: 68vh;
  background: radial-gradient(circle at center, rgba(30, 41, 69, 0.4) 0%, rgba(8, 12, 22, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}
.ps-lightbox-display-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}
.ps-lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
}

/* ==========================================================================
   BATCH ARTWORK STYLE SWAPPER MODAL
   ========================================================================== */
.ps-batch-art-overlay {
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: rgba(3, 6, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ps-batch-art-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-batch-art-panel {
  width: min(94vw, 760px);
  max-height: min(90vh, 740px);
  background: var(--bg-elevated, #101626);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95);
}
.ps-batch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-batch-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ps-batch-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.ps-batch-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ps-batch-style-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.18s ease;
}
.ps-batch-style-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.ps-batch-style-card.is-active {
  background: rgba(0, 245, 160, 0.12);
  border-color: #00f5a0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.ps-batch-style-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.ps-batch-style-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}
.ps-batch-impact-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-batch-stat-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ps-batch-stat-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
}
.ps-batch-stat-pill.is-update {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.ps-batch-stat-pill.is-unchanged {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
}
.ps-batch-stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: inherit;
}
.ps-batch-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: inherit;
}
.ps-batch-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
}
.ps-batch-chip {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.ps-batch-chip.is-updated {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.ps-batch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.6);
}

/* ==========================================================================
   Art Studio Sub-View Toggle & Universal Art Vault Lookbook
   ========================================================================== */
.ps-subview-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3px;
  gap: 3px;
}

.ps-subview-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.ps-subview-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-subview-toggle-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-subview-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.ps-subview-toggle-btn.active .ps-subview-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ps-vault-count-badge {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
}

.ps-subview-toggle-btn.active .ps-vault-count-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

/* ==========================================================================
   ART VAULT: CLEAN HYBRID GALLERY (Option C)
   Compact 2-Row Toolbar (~75px), Unified Aesthetics, My TV Filter, Shape Toggles
   ========================================================================== */

/* Art Vault Container */
.ps-art-vault-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 0 18px 24px;
  gap: 14px;
}

/* Compact 2-Row Sticky Toolbar */
.ps-vault-compact-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Row 1: Aesthetics Tabs + Actions (My TV, Shape, Total Count) */
.ps-vault-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Aesthetic Filter Tabs (Segmented Control) */
.ps-vault-style-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.ps-vault-style-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-vault-style-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.ps-vault-style-tab.active {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-vault-style-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ps-vault-style-count {
  font-size: 0.72rem;
  color: #64748b;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 10px;
}

.ps-vault-style-tab.active .ps-vault-style-count {
  color: #6dfac4;
  background: rgba(0, 0, 0, 0.5);
}

/* Top Right Actions Group */
.ps-vault-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* "My TV Folders Only" Toggle Button */
.ps-btn-vault-mytv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-btn-vault-mytv:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.ps-btn-vault-mytv.is-active {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.55);
  color: #4ade80;
  box-shadow: none;
}

.ps-mytv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.ps-btn-vault-mytv.is-active .ps-mytv-dot {
  background: #4ade80;
  box-shadow: none;
}

/* Aspect Ratio Selector (All / Landscape / Poster) */
.ps-vault-shape-selector {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-vault-shape-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
}

.ps-vault-shape-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-vault-shape-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

/* Results Count Badge */
.ps-vault-results-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

/* Row 2: Search Input + Category Chips */
.ps-vault-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-vault-search-box {
  position: relative;
  flex: 0 0 260px;
  max-width: 320px;
}

.ps-vault-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.ps-art-col-header {
  padding: 10px 20px 10px 20px !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-art-tools-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-btn-toggle-motion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.ps-btn-toggle-motion:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ps-btn-toggle-motion.is-disabled-active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.ps-btn-toggle-motion.is-disabled-active:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef3c7;
}

.ps-motion-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.ps-motion-dot.is-motion {
  background: #00f5a0;
  box-shadow: none;
}

.ps-motion-dot.is-disabled {
  background: #f59e0b;
  box-shadow: none;
}

.ps-btn-batch-swapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.77rem;
  padding: 5px 12px;
  border-radius: 8px;
}

.ps-btn-row-toggle-gifs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}

.ps-btn-row-toggle-gifs.is-disabled-active {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.ps-btn-row-toggle-gifs.is-disabled-active:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fef3c7 !important;
}

.ps-vault-search-compact {
  width: 100%;
  height: 30px;
  padding: 5px 28px 5px 34px !important;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #fff;
  font-size: 0.77rem;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.16s ease;
}

.ps-vault-search-compact:focus {
  outline: none;
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}

.ps-vault-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 1px 5px;
  line-height: 1;
}

.ps-vault-category-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.ps-vault-category-chips::-webkit-scrollbar {
  display: none;
}

.ps-vault-cat-chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  font-family: inherit;
}

.ps-vault-cat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ps-vault-cat-chip.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
  font-weight: 600;
}

/* Compact Dropdown Selector for Discover Vault & Art Lookbook */
.ps-select-compact {
  height: 30px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #e2e8f0;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 4px 28px 4px 10px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  flex-shrink: 0;
}

.ps-select-compact:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.ps-select-compact:focus {
  outline: none;
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}

.ps-select-compact option {
  background: #0f172a;
  color: #fff;
  padding: 6px;
}

/* Streamlined Folders & Art Vault Bars */
.ps-folders-unified-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.ps-folders-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-vault-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Art Vault Grid */
.ps-art-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 13px;
}

.ps-vault-card {
  background: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.ps-vault-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.ps-vault-card.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: none;
}

.ps-vault-card.in-profile {
  border-color: rgba(0, 0, 0, 0.5);
}

.ps-vault-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.ps-vault-card.is-poster .ps-vault-card-thumb {
  aspect-ratio: 2 / 3;
}

.ps-vault-base-img,
.ps-vault-hover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-vault-hover-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.ps-vault-card:hover .ps-vault-hover-img {
  opacity: 1;
}

.ps-vault-badge-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(7, 10, 19, 0.86);
  backdrop-filter: blur(6px);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ps-vault-badge-active {
  position: absolute;
  top: 7px;
  right: 32px;
  background: rgba(22, 163, 74, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-vault-badge-inprofile {
  position: absolute;
  top: 7px;
  right: 32px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-vault-zoom-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.ps-vault-zoom-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
}

.ps-vault-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}

.ps-vault-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ps-vault-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ps-vault-card-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* In-Card Style Variant Dots */
.ps-vault-variants-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px 5px;
  flex-shrink: 0;
}

.ps-vault-variant-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.6;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ps-vault-variant-dot.is-current {
  opacity: 1;
  transform: scale(1.25);
}

.ps-vault-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.ps-vault-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-vault-status-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4ade80;
}

.ps-btn-vault-swap {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #00f5a0 !important;
  border: 1px solid rgba(0, 0, 0, 0.5) !important;
  font-weight: 700 !important;
  width: 100%;
}

.ps-btn-vault-swap:hover {
  background: var(--accent, #00f5a0) !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-btn-vault-add {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
  width: 100%;
}

.ps-btn-vault-add:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

.ps-vault-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.ps-vault-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ps-vault-empty h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.ps-vault-empty p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  max-width: 400px;
}

/* ==========================================================================
   PROFILE STUDIO: UNIFIED HEADER, DRAG & DROP, COMPACT MARKETPLACE & COLLECTIONS
   ========================================================================== */

/* Unified Compact Header: Centered Mode Tabs (Eliminates extra nav bar) */
.ps-header-unified {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding: 10px 20px !important;
  position: relative;
  min-height: 52px;
  background: var(--bg-elevated, #141926);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}
.ps-header-unified .ps-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ps-header-unified .ps-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.ps-header-unified .ps-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ps-header-unified .ps-btn-unified-close {
  position: static !important;
  flex-shrink: 0;
}
@media (max-width: 980px) {
  .ps-header-unified {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "left actions close"
      "center center center" !important;
    gap: 8px 10px !important;
    padding: 10px 16px !important;
  }
  .ps-header-unified .ps-header-left {
    grid-area: left;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .ps-header-unified .ps-header-left #ps-btn-back-profiles {
    font-size: 0.76rem !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }
  .ps-header-unified .ps-header-profile-badge {
    padding: 3px 8px !important;
    font-size: 0.74rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 220px !important;
  }
  .ps-header-unified .ps-header-right {
    grid-area: actions;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .ps-header-unified .ps-header-right .ps-btn {
    font-size: 0.76rem !important;
    padding: 4px 10px !important;
    white-space: nowrap !important;
  }
  .ps-header-unified .ps-btn-unified-close {
    grid-area: close;
    position: static !important;
    align-self: center !important;
    justify-self: end !important;
  }
  .ps-header-unified .ps-header-center {
    grid-area: center;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 2px 0 0 !important;
  }
  .ps-header-unified .ps-mode-tabs {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 3px !important;
  }
  .ps-header-unified .ps-mode-tab {
    flex: 1 !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    font-size: 0.76rem !important;
    gap: 5px !important;
  }
  .ps-header-unified .ps-mode-tab svg {
    width: 14px !important;
    height: 14px !important;
  }
}

.ps-back-text-short,
.ps-mode-text-short {
  display: none;
}

@media (max-width: 600px) {
  .ps-back-text-full,
  .ps-mode-text-full {
    display: none !important;
  }
  .ps-back-text-short,
  .ps-mode-text-short {
    display: inline !important;
  }
  .ps-header-profile-badge .ps-profile-label {
    display: none !important;
  }
  .ps-header-unified .ps-header-left #ps-btn-back-profiles {
    font-size: 0.72rem !important;
    padding: 3px 6px !important;
  }
  .ps-header-unified .ps-header-profile-badge {
    padding: 2px 6px !important;
    font-size: 0.72rem !important;
    max-width: 120px !important;
  }
  .ps-header-unified .ps-mode-tab {
    padding: 5px 3px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
  }
  .ps-header-unified .ps-mode-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
  .ps-header-unified .ps-mode-badge {
    font-size: 0.72rem !important;
    padding: 1px 4px !important;
  }
}

/* Drag and Drop Indicators & Grips */
.ps-drag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 24px;
  color: #64748b;
  cursor: grab;
  flex-shrink: 0;
  transition: color 0.15s ease;
  user-select: none;
  margin-right: 2px;
}
.ps-drag-grip svg {
  width: 15px;
  height: 15px;
}
.ps-cat-card:hover .ps-drag-grip,
.ps-folder-row:hover .ps-drag-grip {
  color: #cbd5e1;
}
.ps-drag-grip:active {
  cursor: grabbing;
}
.ps-cat-card[draggable="true"],
.ps-folder-row[draggable="true"] {
  cursor: default;
}
.ps-cat-card.is-dragging,
.ps-folder-row.is-dragging {
  opacity: 0.45;
  border-style: dashed;
  border-color: var(--accent, #00f5a0);
  transform: scale(0.99);
}
.ps-drop-above {
  position: relative;
}
.ps-drop-above::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: #00f5a0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 20;
}
.ps-drop-below {
  position: relative;
}
.ps-drop-below::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: #00f5a0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 20;
}

/* Marketplace Consolidated Navigation Bar */
.ps-market-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
  flex-shrink: 0;
  min-height: 42px;
}
.ps-market-subnav {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}
.ps-market-subtab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps-market-subtab svg {
  width: 13px;
  height: 13px;
}
.ps-market-subtab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.ps-market-subtab.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-creator-pills-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ps-creator-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-creator-pill {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-creator-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.ps-creator-pill.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.ps-market-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hide Installed Toggle Switch */
.ps-btn-hide-installed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
  white-space: nowrap;
}
.ps-btn-hide-installed:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.ps-btn-hide-installed.is-hiding {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 0, 0, 0.5);
  color: #6dfac4;
}
.ps-hide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.15s ease;
}
.ps-btn-hide-installed.is-hiding .ps-hide-dot {
  background: #4ade80;
  box-shadow: none;
}

.ps-market-count-badge {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  white-space: nowrap;
}

/* Compact Search & Category Chips Row */
.ps-market-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(17, 22, 35, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.ps-market-search-box {
  flex: 0 0 240px;
}
.ps-vault-search-compact {
  width: 100%;
  padding: 6px 12px;
  font-size: 0.78rem;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
}
.ps-vault-tabs-scroller-compact {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ps-vault-tabs-scroller-compact::-webkit-scrollbar {
  display: none;
}

/* Collections Showcase View */
.ps-collections-view {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-collections-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-collections-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-collections-subheading {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin: 3px 0 0;
  max-width: 720px;
}
.ps-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
}
.ps-collection-card {
  background: #141928;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ps-collection-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.ps-collection-card-hero {
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-collection-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ps-collection-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ps-collection-author-pill {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-collection-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-collection-tagline {
  font-size: 0.74rem;
  color: #00f5a0;
  margin: 4px 0 0;
  font-weight: 500;
}
.ps-collection-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.ps-collection-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}
.ps-collection-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 8px 10px;
}
.ps-spec-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ps-spec-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-spec-value {
  font-size: 0.76rem;
  color: #fff;
  font-weight: 700;
}
.ps-collection-preview-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-preview-strip-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-preview-strip-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ps-preview-strip-track::-webkit-scrollbar {
  display: none;
}
.ps-preview-thumb {
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-thumb.is-landscape {
  width: 90px;
  height: 50px;
}
.ps-preview-thumb.is-poster {
  width: 42px;
  height: 60px;
}
.ps-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-collection-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.ps-collection-card-actions .ps-btn {
  flex: 1;
}

/* Full Collection Cinematic Preview Modal */
.ps-collection-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.88);
  backdrop-filter: blur(14px);
  z-index: 21500; /* title screen rule: >20000 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 24px;
  box-sizing: border-box;
}
.ps-collection-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ps-col-modal-dialog {
  width: min(94vw, 1100px);
  max-height: 90vh;
  background: #0f1422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.95);
  animation: colModalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes colModalScale {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.ps-col-modal-header {
  padding: 16px 22px;
  background: #141a2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-col-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.ps-col-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ps-col-author-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  gap: 16px;
}
.ps-col-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.ps-col-author-bio {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 560px;
  margin: 2px 0 0;
}
.ps-col-author-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.ps-author-link-pill {
  font-size: 0.72rem;
  color: #cbd5e1;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}
.ps-author-link-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-donate-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff5e5b;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.ps-btn-donate-author:hover {
  background: #ff4744;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.ps-col-preview-rows-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-preview-row-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-preview-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-preview-row-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.ps-preview-row-badge {
  font-size: 0.72rem;
  color: var(--accent-light, #10b981);
  background: var(--accent-subtle, rgba(0, 0, 0, 0.5));
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}
.ps-preview-row-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.ps-preview-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ps-preview-card.is-landscape {
  width: 170px;
}
.ps-preview-card.is-poster {
  width: 105px;
}
.ps-preview-card-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-card.is-landscape .ps-preview-card-thumb {
  aspect-ratio: 16 / 9;
}
.ps-preview-card.is-poster .ps-preview-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-preview-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-preview-shape-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.75);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.ps-preview-card-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-col-modal-footer {
  padding: 14px 22px;
  background: #141a2a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ps-col-modal-footer-note {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}
.ps-col-modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Split Grid & Content Layout */
.ps-col-modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-modal-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ps-col-modal-author {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-col-modal-subtitle {
  font-size: 0.78rem;
  color: #00f5a0;
  margin: 3px 0 0;
  font-weight: 500;
}

.ps-col-modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 820px) {
  .ps-col-modal-split {
    grid-template-columns: 1fr;
  }
}

.ps-col-modal-pane {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-col-pane-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-col-pane-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.ps-col-spec-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.ps-col-spec-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-spec-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

/* Author Profile Box inside Modal */
.ps-author-profile-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-author-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ps-author-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.ps-author-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.ps-author-role {
  font-size: 0.72rem;
  color: #00f5a0;
  font-weight: 600;
}
.ps-author-bio {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}
.ps-author-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ps-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ps-contact-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ps-author-donate-wrap {
  margin-top: 4px;
}
.ps-btn-donate-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff5e5b;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.18s ease;
}
.ps-btn-donate-author:hover {
  background: #ff4744;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.ps-donate-pill {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Modal Bottom Preview Section */
.ps-col-modal-preview-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-col-preview-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-preview-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
}
.ps-preview-row-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-preview-row-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}
.ps-preview-row-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #00f5a0;
  border: 1px solid rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}
.ps-preview-row-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.ps-preview-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ps-preview-card.is-landscape {
  width: 140px;
}
.ps-preview-card.is-poster {
  width: 90px;
}
.ps-preview-card-thumb {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-card.is-landscape .ps-preview-card-thumb {
  aspect-ratio: 16 / 9;
}
.ps-preview-card.is-poster .ps-preview-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-preview-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-preview-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   UNIFIED TV MIRROR (WYSIWYG ARCHITECTURE)
   ========================================================================== */

/* Top Header Pill */
.ps-tv-mirror-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 5px 14px;
  border-radius: 20px;
}

.ps-live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f5a0;
}

.ps-tv-mirror-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.ps-tv-mirror-count {
  font-size: 0.72rem;
  color: #00f5a0;
  font-weight: 500;
}

.ps-btn-header-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  background: linear-gradient(135deg, #00f5a0, #059669);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Row Left Header Elements (Drag grip & arrows) */
.ps-art-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ps-row-drag-handle {
  cursor: grab;
  color: #64748b;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.ps-row-drag-handle:hover {
  color: #fff;
}

.ps-art-row.is-dragging {
  opacity: 0.4;
}

.ps-art-row.ps-drop-above {
  border-top: 2px solid #00f5a0;
}

.ps-art-row.ps-drop-below {
  border-bottom: 2px solid #00f5a0;
}

.ps-row-arrows {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ps-row-arrows .ps-btn-icon {
  width: 22px;
  height: 22px;
  padding: 2px;
}

/* Floating Action Button (+ Add Row) */
.ps-fab-add-row {
  position: fixed;
  bottom: 84px;
  right: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00f5a0, #059669);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 10px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 20050;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.ps-fab-add-row:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #059669, #3730a3);
}

@media (max-width: 768px) {
  .ps-fab-add-row {
    display: none !important;
  }
  .ps-art-row-header {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .ps-art-row-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .ps-art-row-title-wrap {
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .ps-art-row-title {
    font-size: 0.95rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .ps-art-row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}

.ps-mirror-bottom-add {
  display: flex;
  justify-content: center;
  padding: 24px 0 60px;
}

/* Wardrobe Drawer Folder Operations */
.ps-drawer-folder-ops {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   SETTINGS MODAL OVERLAY (Z-Index > 20000)
   ========================================================================== */
.ps-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 21200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ps-settings-overlay.active {
  display: flex;
}

.ps-settings-card {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: psSettingsPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes psSettingsPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ps-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.ps-settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.ps-settings-title-wrap h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.ps-settings-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ps-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.ps-settings-item-info {
  flex: 1;
  min-width: 0;
}

.ps-settings-item-title {
  display: block;
  font-size: 0.86rem;
  color: #fff;
  margin-bottom: 4px;
}

.ps-settings-item-desc {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ==========================================================================
   DISCOVER OVERLAY SHEET (Unified Store & Art Lookbook, Z-Index > 20000)
   ========================================================================== */
.ps-discover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 21100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.ps-discover-overlay.active {
  display: flex;
}

.ps-discover-panel {
  width: 95vw;
  max-width: 1440px;
  height: 92vh;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  animation: psSheetSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes psSheetSlideUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ps-discover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.ps-discover-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.ps-discover-title-wrap {
  display: flex;
  flex-direction: column;
}

.ps-discover-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.ps-discover-subtitle {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 2px;
}

.ps-discover-tab-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3px;
  gap: 3px;
}

.ps-discover-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.ps-discover-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-discover-tab-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-discover-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.ps-discover-tab-btn.active .ps-discover-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ps-discover-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

.ps-art-vault-wrapper {
  height: 100%;
  overflow-y: auto;
}

/* ==========================================================================
   3-Tab Architecture Views: Layout & Art Studio Toolbars
   ========================================================================== */
.ps-layout-studio-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ps-layout-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-shrink: 0;
}

.ps-layout-title-wrap {
  display: flex;
  flex-direction: column;
}

.ps-layout-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-categories-bottom-add {
  padding: 12px 0 24px;
}
.ps-categories-bottom-add .ps-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ps-categories-bottom-add .ps-btn svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}

.ps-art-studio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-shrink: 0;
  min-height: 44px;
}

.ps-art-subview-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.ps-subview-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-subview-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.ps-subview-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.ps-subview-toggle-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-art-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .ps-layout-top-bar,
  .ps-art-studio-top-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ps-art-top-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}


/* ==========================================================================
   Avatar picker ("Change picture") — avatar-picker.js
   Sits above every overlay, including Profile Studio (.ps-overlay: 100000).
   ========================================================================== */
.kap-av-overlay {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 11, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.kap-av-overlay.is-open { opacity: 1; }
.kap-av-sheet {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  background: #10141f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.kap-av-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.kap-av-close:hover { background: rgba(255, 255, 255, 0.14); }
.kap-av-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 56px 16px 22px;
}
.kap-av-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.kap-av-preview-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.kap-av-preview-circle img { width: 100%; height: 100%; object-fit: cover; }
.kap-av-preview-name {
  max-width: 110px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kap-av-title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; }
.kap-av-sub { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.kap-av-tabs {
  display: flex;
  gap: 6px;
  padding: 0 22px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}
.kap-av-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.kap-av-tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #04130d); }
.kap-av-head,
.kap-av-tabs,
.kap-av-foot { flex-shrink: 0; }
.kap-av-body { padding: 16px 22px; overflow-y: auto; flex: 1; min-height: 180px; }
.kap-av-group + .kap-av-group { margin-top: 16px; }
.kap-av-group-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kap-av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; }
.kap-av-tile {
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.kap-av-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kap-av-tile:hover,
.kap-av-tile:focus-visible { transform: scale(1.06); }
.kap-av-tile.is-on { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.kap-av-field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; font-weight: 600; }
.kap-av-input {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #0b0e16;
  color: #fff;
  font-size: 0.92rem;
}
.kap-av-input:focus { outline: none; border-color: var(--accent); }
.kap-av-status { display: block; margin-top: 8px; font-size: 0.84rem; color: var(--text-muted); }
.kap-av-status.is-ok { color: var(--success); }
.kap-av-status.is-bad { color: #fca5a5; }
.kap-av-note { margin: 10px 0 0; font-size: 0.84rem; color: var(--text-muted); }
.kap-av-link { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.kap-av-colors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-top: 12px; }
.kap-av-swatch {
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.kap-av-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.kap-av-error { margin: 0 22px; font-size: 0.86rem; color: #fca5a5; }
.kap-av-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.kap-av-btn-primary,
.kap-av-btn-secondary {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.kap-av-btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--accent-gradient, var(--accent));
  color: #fff;
}
.kap-av-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.kap-av-btn-secondary { border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: #fff; }
@media (max-width: 520px) {
  .kap-av-head { flex-direction: column; text-align: center; padding-right: 22px; }
  .kap-av-tabs { flex-wrap: wrap; justify-content: center; }
  .kap-av-colors { grid-template-columns: repeat(4, 1fr); }
}
/* Short screens: shrink the header so Save always stays on screen. */
@media (max-height: 620px) {
  .kap-av-sheet { max-height: calc(100vh - 16px); }
  .kap-av-head { padding-top: 12px; padding-bottom: 8px; gap: 12px; }
  .kap-av-preview-circle { width: 52px; height: 52px; font-size: 1.3rem; }
  .kap-av-sub { display: none; }
  .kap-av-body { min-height: 0; }
}

/* Profile Studio profile cards: "change picture" badge on the avatar */
.ps-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.ps-profile-avatar-edit {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #141926;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent, #04130d);
  font-size: 0.72rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ps-profile-avatar-edit:hover,
.ps-profile-avatar-edit:focus-visible { transform: scale(1.12); }
.ps-toast-undo {
  margin-left: 12px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}
.ps-toast.active:has(.ps-toast-undo) { pointer-events: auto; }

/* ==========================================================================
   Profile Hub (Profile Studio v2) — "what do you want to do with this profile?"
   ========================================================================== */
.ps-hub-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.ps-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.ps-hub-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  text-align: left;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ps-hub-tile:hover,
.ps-hub-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.ps-hub-icon { font-size: 1.6rem; line-height: 1; }
.ps-hub-title { font-size: 1.02rem; font-weight: 700; }
.ps-hub-line { font-size: 0.84rem; color: var(--text-muted); }
.ps-hub-changes {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-hub-changes-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ps-hub-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.88rem;
}
.ps-hub-change em { color: var(--text-muted); font-style: normal; }

/* ==========================================================================
   My Add-ons (Profile Studio v2) — add-on URLs are never shown, they can
   contain private keys.
   ========================================================================== */
.ps-addons-hint { margin: 0 0 12px; font-size: 0.86rem; color: var(--text-muted); }
.ps-addons-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.08);
  font-size: 0.88rem;
}
.ps-addon-list { display: flex; flex-direction: column; gap: 10px; }
.ps-addon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.ps-addon-row.is-off { opacity: 0.55; }
.ps-addon-move { display: flex; flex-direction: column; gap: 2px; }
.ps-addon-arrow {
  width: 22px; height: 18px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: transparent; color: #cbd5e1;
  font-size: 0.72rem; cursor: pointer;
}
.ps-addon-arrow:disabled { opacity: 0.3; cursor: default; }
.ps-addon-logo {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0b0e16; border-radius: 9px; overflow: hidden;
  font-weight: 700; color: #94a3b8;
}
.ps-addon-logo img { width: 100%; height: 100%; object-fit: contain; }
.ps-addon-info { flex: 1; min-width: 0; }
.ps-addon-name { font-weight: 700; font-size: 0.96rem; }
.ps-addon-line { font-size: 0.82rem; color: var(--text-muted); }
.ps-addon-status { font-size: 0.78rem; white-space: nowrap; color: var(--text-muted); }
.ps-addon-status::before { content: '● '; }
.ps-addon-status.is-ok { color: var(--success); }
.ps-addon-status.is-slow { color: #fbbf24; }
.ps-addon-status.is-down { color: #f87171; }
.ps-addon-toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.ps-addon-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ps-addon-toggle span {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); transition: background 0.18s ease;
}
.ps-addon-toggle span::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.18s ease;
}
.ps-addon-toggle input:checked + span { background: var(--accent); }
.ps-addon-toggle input:checked + span::after { transform: translateX(18px); }
.ps-addon-menu-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  background: transparent; color: #cbd5e1; cursor: pointer;
}
.ps-addon-menu-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ps-addon-suggest { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ps-addon-suggest-row {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; text-align: left;
  background: #0b0e16; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
  color: #fff; cursor: pointer;
}
.ps-addon-suggest-row:hover { border-color: var(--accent); }
.ps-addon-suggest-row span { font-size: 0.82rem; color: var(--text-muted); }
.ps-addon-target {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  font-size: 0.92rem; cursor: pointer;
}
.ps-profile-name-sm { font-weight: 700; }

/* ---- Profile Studio: Home screen (PS-5) ---- */
.ps-home-list { display: flex; flex-direction: column; gap: 10px; }
.ps-home-list.is-hidden-list { opacity: 0.7; margin-top: 8px; }
.ps-home-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.ps-home-row.is-hidden-row { opacity: 0.55; }
.ps-home-row.is-dragging { opacity: 0.4; }
.ps-home-row.is-drop-target { border-color: var(--accent, #00f5a0); }
.ps-home-row[draggable="true"] { cursor: grab; }
.ps-home-move { display: flex; flex-direction: column; gap: 2px; width: 22px; flex-shrink: 0; }
.ps-home-main { flex: 1; min-width: 0; }
.ps-home-titleline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ps-home-title { font-weight: 700; font-size: 0.95rem; }
.ps-home-source { font-size: 0.76rem; color: var(--text-muted); }
.ps-home-rename {
  flex: 1; min-width: 140px;
  padding: 4px 8px;
  background: #0b0e16; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 7px;
  font-size: 0.9rem;
}
.ps-home-strip { display: flex; gap: 4px; margin-top: 6px; min-height: 34px; }
.ps-home-strip img {
  height: 34px; width: 58px; object-fit: cover;
  border-radius: 4px; background: #0b0e16;
}
.ps-home-strip img.is-logo { width: 34px; object-fit: contain; }
.ps-home-hidden-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 18px;
  font-size: 0.85rem; color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px;
}
.ps-home-options { margin-top: 20px; }
.ps-home-option { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.ps-home-tidy-counts { list-style: none; margin: 12px 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.ps-home-tidy-counts strong { font-size: 1.2rem; }
.ps-home-tidy-preview {
  background: #0b0e16; border-radius: 10px; padding: 10px 12px;
  font-size: 0.85rem; display: flex; flex-direction: column; gap: 4px;
}
.ps-home-tidy-line em { color: var(--text-muted); font-style: normal; font-size: 0.78rem; }
@media (max-width: 640px) {
  .ps-home-strip img { width: 44px; height: 26px; }
  .ps-home-source { width: 100%; }
}

/* A Save button with nothing to save reads as unavailable. */
.ps-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* ---- Profile Studio: Quick Setup (PS-3) ---- */
.ps-setup-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.ps-setup-card {
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.ps-setup-card.is-on { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-setup-pick {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0;
}
.ps-setup-icon { font-size: 1.5rem; }
.ps-setup-name { font-weight: 700; font-size: 1rem; }
.ps-setup-name em { font-style: normal; font-size: 0.72rem; color: var(--accent, #00f5a0); }
.ps-setup-blurb { font-size: 0.83rem; color: var(--text-muted); line-height: 1.35; }
.ps-setup-more { align-self: flex-start; font-size: 0.78rem; }
.ps-setup-details {
  margin: 4px 0 0; padding-left: 18px; font-size: 0.8rem;
  color: var(--text-muted); display: flex; flex-direction: column; gap: 3px;
}
.ps-setup-customize-toggle { display: inline-block; margin-top: 16px; }
.ps-setup-custom {
  margin-top: 10px; background: #0b0e16; border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ps-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.ps-setup-row select {
  background: #141926; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px; padding: 5px 8px; font-size: 0.85rem; max-width: 60%;
}
.ps-setup-badge-mock {
  display: flex; flex-direction: column; gap: 6px;
  background: #141926; border-radius: 10px; padding: 10px;
}
.ps-setup-mock-title { font-size: 0.8rem; color: var(--text-muted); }
.ps-setup-mock-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-setup-mock-badges em {
  font-style: normal; font-size: 0.72rem; font-weight: 700; color: #fff;
  padding: 2px 7px; border-radius: 999px;
}
.ps-setup-preview-title { margin: 6px 0 12px; font-size: 1.1rem; }
.ps-setup-changes {
  margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px;
  font-size: 0.92rem;
}

/* ---- Profile Studio: All Settings (Workstream 3) — theme picker ---- */
.ps-theme-grid {
  display: grid; gap: 10px; margin: 10px 0 14px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.ps-theme-swatch {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px; background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; color: #fff; cursor: pointer; font-size: 0.8rem;
}
.ps-theme-swatch:hover { border-color: rgba(255, 255, 255, 0.25); }
.ps-theme-swatch.is-selected { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-theme-swatch.is-locked { opacity: 0.6; cursor: pointer; }
.ps-theme-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--swatch-color, #888); border: 1px solid rgba(255, 255, 255, 0.25);
}
.ps-theme-name { font-size: 0.78rem; text-align: center; }
.ps-theme-lock { position: absolute; top: 6px; right: 8px; font-size: 0.78rem; }

/* ---- Profile Studio: Make a copy (PS-1) ---- */
.ps-copy-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.ps-copy-tile {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 12px; color: inherit; cursor: pointer; text-align: left;
}
.ps-copy-tile.is-on { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-copy-tile.is-disabled { opacity: 0.6; cursor: default; }
.ps-copy-tile-title { font-weight: 700; font-size: 0.95rem; }
.ps-copy-tile-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-copy-avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ps-copy-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-copy-name, .ps-copy-merge { margin-top: 16px; }
.ps-copy-external { margin-top: 18px; }
.ps-copy-preview {
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.ps-copy-preview-title { margin: 0 0 10px; font-size: 1rem; }
.ps-copy-part { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.ps-copy-part input { margin-top: 3px; }
.ps-copy-part-main { display: flex; flex-direction: column; }
.ps-copy-part-title { font-weight: 600; font-size: 0.92rem; }
.ps-copy-part-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-copy-part.is-risky .ps-copy-part-title { color: #fbbf24; }
.ps-copy-keywarn { margin-top: 6px; }
.ps-copy-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-copy-steps li { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; color: var(--text-muted); }
.ps-copy-steps li.is-ok { color: inherit; }
.ps-copy-steps li.is-fail { color: #f87171; }
.ps-copy-step-mark { width: 18px; text-align: center; }
.ps-copy-steps li.is-ok .ps-copy-step-mark { color: var(--success, #10b981); }

/* ---- Profile Studio: Share (PS-4) ---- */
.ps-share-choice {
  display: flex; gap: 14px; align-items: flex-start; width: 100%;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 16px; margin-top: 12px;
  color: inherit; text-align: left; cursor: pointer;
}
.ps-share-choice.is-lead { border-color: var(--accent, #00f5a0); }
.ps-share-choice:hover { background: #18202f; }
.ps-share-choice-icon { font-size: 1.7rem; line-height: 1; }
.ps-share-choice-main { display: flex; flex-direction: column; gap: 5px; }
.ps-share-choice-title { font-weight: 700; font-size: 1rem; }
.ps-share-choice-title em { font-style: normal; font-size: 0.72rem; color: var(--accent, #00f5a0); margin-left: 6px; }
.ps-share-choice-line { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.ps-share-result { margin-top: 20px; }
.ps-share-result-title { margin: 0 0 10px; font-size: 1rem; }
.ps-share-linkbox { display: flex; gap: 8px; align-items: center; }
.ps-share-linkbox input { flex: 1; min-width: 0; }
.ps-share-contents { margin-top: 16px; font-size: 0.88rem; }
.ps-share-contents h5 { margin: 14px 0 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.ps-share-contents ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.ps-share-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---- Profile Studio: My TV, inside a row ---- */
.ps-canvas-title { font-weight: 700; font-size: 1rem; }
.ps-rowfolder-list { display: flex; flex-direction: column; gap: 8px; }
.ps-rowfolder {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
}
.ps-rowfolder-art {
  width: 70px; height: 40px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  background: #0b0e16; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #94a3b8;
}
.ps-rowfolder-art img { width: 100%; height: 100%; object-fit: cover; }
.ps-rowfolder-main { flex: 1; min-width: 0; }
.ps-rowfolder-foot { margin-top: 20px; }
.ps-rowfolder-danger { color: #f87171; }

/* ---- Profile Studio: Artwork workbench ---- */
.ps-art-workbench-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ps-art-search {
  min-width: 180px; padding: 6px 10px; border-radius: 8px;
  background: #0b0e16; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
}
.ps-art-rowfilter {
  padding: 6px 8px; border-radius: 8px; font-size: 0.85rem;
  background: #0b0e16; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 180px;
}
.ps-art-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 10px; border-radius: 999px; font-size: 0.8rem;
  background: #0b0e16; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text-muted);
}
.ps-art-chip.is-on { border-color: var(--accent, #00f5a0); color: #fff; }
.ps-art-chip input { margin: 0; }
.ps-art-grid {
  display: grid; gap: 12px; padding: 4px 12px 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.ps-art-workbench .ps-art-card { width: auto; }
.ps-art-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.ps-art-workbench .ps-art-row-header { position: sticky; top: 0; z-index: 2; background: #0b0e16; }
.ps-art-workbench .ps-art-card-sub { text-transform: none; letter-spacing: 0; }

/* ---- "Put my picks back" bar (selection saved before a pack update) ---- */
.kap-restore-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 10050; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: min(680px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px;
  background: #141926; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
}
.kap-restore-bar button {
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #cbd5e1;
}
.kap-restore-bar .kap-restore-yes {
  background: var(--accent, #00f5a0); border-color: transparent; color: #fff;
}

/* Beta polish (2026-09): real-numbers pill, SVG hero icons, mobile title spacing */
.title-live-metrics-pill[hidden] { display: none; }
.hero-btn-icon svg,
.sub-btn-icon svg { display: block; }
@media (max-width: 600px) {
  /* Keep the eyebrow clear of the fixed theme / account buttons */
  .title-hero-stage { padding-top: 72px; }
}

/* ── Poster Stack & Preset Picture Cards (Unified Wizard & Bounty) ── */
.provider-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.provider-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.provider-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 12px;
}
.provider-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.provider-drag-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.btn-reorder {
  width: 22px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.btn-reorder:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-reorder:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: none;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.status-dot.amber,
.status-dot.needs-key {
  background: #f59e0b;
  box-shadow: none;
}
.status-dot.down {
  background: #ef4444;
  box-shadow: none;
}
.provider-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.provider-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.provider-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}
.provider-badge-primary {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  color: var(--accent-light);
}
.provider-badge-amber {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}
.provider-badge-locked {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}
.provider-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 1px;
}
.provider-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-toggle-options {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-toggle-options:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-remove-provider {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 5px 7px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn-remove-provider:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.provider-options-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.provider-options-panel .wiz-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.wiz-add-provider-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 2px;
}
.wiz-add-provider-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wiz-add-provider-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wiz-btn-add-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.5);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wiz-btn-add-provider:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #00f5a0;
  color: #ffffff;
  box-shadow: none;
}
.add-provider-wrap {
  display: flex;
  justify-content: flex-start;
  position: relative;
  margin-top: 4px;
  margin-bottom: 12px;
}
.btn-add-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-add-provider:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #00f5a0;
  color: #fff;
}
.add-provider-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #131422;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  padding: 4px 0;
  z-index: 100;
  min-width: 170px;
}
.add-provider-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.add-provider-item:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* Preset Picture Cards */
.preset-picture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .preset-picture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.preset-picture-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.preset-picture-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.preset-picture-card.active {
  border-color: #00f5a0;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}
.preset-thumbnail {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #11131c;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.preset-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
}
.preset-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
}

/* ==========================================================================
   Profile Studio: Poster Look, Backups & Updates, update preview
   ========================================================================== */
.ps-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ps-poster-card {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
}
.ps-poster-card-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ps-poster-card-title { margin-top: 4px; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.ps-poster-card-detail { margin-top: 2px; font-size: 0.86rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.ps-poster-modes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ps-poster-url-label { display: block; margin: 6px 0 4px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.ps-backups-message { margin: 0 0 10px; font-size: 0.88rem; color: #34d399; }
.ps-backups-actions { margin: 0 0 16px; }
.ps-backups-list { display: flex; flex-direction: column; gap: 8px; }
.ps-backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.ps-backup-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-backup-label { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); overflow-wrap: anywhere; }
.ps-backup-meta { font-size: 0.78rem; color: var(--text-muted); }
.ps-backup-buttons { display: flex; gap: 6px; flex: none; }
.ps-diff-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 3, 6, 0.72);
}
.ps-diff-modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.ps-diff-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.ps-diff-head h3 { margin: 0; font-size: 1.1rem; }
.ps-diff-head .ps-close-btn { position: static; }
.ps-diff-body { padding: 6px 16px; overflow-y: auto; }
.ps-diff-actions { padding: 10px 16px 16px; margin-top: 0; justify-content: flex-end; }
.ps-diff-group { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid; }
.ps-diff-added { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.ps-diff-updated { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.07); }
.ps-diff-custom { border-color: rgba(0, 245, 160, 0.4); background: rgba(0, 245, 160, 0.07); }
.ps-diff-group-title { font-weight: 700; font-size: 0.9rem; }
.ps-diff-count { margin-left: 4px; font-weight: 600; color: var(--text-muted); }
.ps-diff-list { margin: 6px 0 0; padding-left: 18px; font-size: 0.84rem; color: var(--text-secondary); }
.ps-diff-more { list-style: none; margin-left: -18px; color: var(--text-muted); }
.ps-diff-uptodate { font-size: 0.95rem; color: #34d399; }
@media (max-width: 580px) {
  .ps-poster-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-backup-row { flex-direction: column; align-items: stretch; }
  .ps-backup-buttons { justify-content: flex-end; }
}

/* Studio line icons (replacing emoji) */
.ps-hub-icon, .ps-setup-icon, .ps-share-choice-icon { display: inline-flex; color: var(--accent, #6dfac4); }
.ps-hub-icon svg { width: 26px; height: 26px; }
.ps-setup-icon svg, .ps-share-choice-icon svg { width: 22px; height: 22px; }

/* Hover / focus explanation bubble */
.ps-tip-wrap { position: relative; display: inline-flex; }
.ps-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b0e16;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
.ps-tip-wrap:hover .ps-tip, .ps-tip-wrap:focus-within .ps-tip { opacity: 1; visibility: visible; transform: none; }

.ps-home-tidy-sub { margin: 14px 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.ps-home-tidy-line.is-hiding { opacity: 0.75; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* Update preview group markers */
.ps-diff-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.ps-diff-added .ps-diff-dot { background: #34d399; }
.ps-diff-updated .ps-diff-dot { background: #fbbf24; }
.ps-diff-custom .ps-diff-dot { background: #00f5a0; }

/* ==========================================================================
   Profile Studio: poster editor
   ========================================================================== */
.ps-pe { display: flex; flex-direction: column; gap: 16px; }
.ps-pe-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.ps-pe-now {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  min-width: 0;
}
.ps-pe-now-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ps-pe-now-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.ps-pe-now-detail { font-size: 0.86rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.ps-pe-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-pe-save-state { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }
.ps-pe-save-state.is-dirty { color: #fbbf24; }
.ps-pe-problems { margin: 0; font-size: 0.86rem; color: #fbbf24; }
.ps-pe-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.ps-pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ps-pe-controls { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ps-pe-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.ps-pe-section { display: flex; flex-direction: column; gap: 10px; }
.ps-pe-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.ps-pe-sub { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-muted); }
.ps-pe-note { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--text-secondary); }
.ps-pe-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ps-pe-provider { border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border-hover); }
.ps-pe-provider.is-first { border-color: var(--accent); }
.ps-pe-provider.is-net { background: transparent; border-style: dashed; }
.ps-pe-provider-main { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.ps-pe-rank { font-family: ui-monospace, monospace; font-size: 0.8rem; color: var(--text-muted); width: 20px; flex: none; }
.ps-pe-provider.is-first .ps-pe-rank { color: var(--accent-light); }
.ps-pe-provider-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ps-pe-provider-name { font-weight: 700; font-size: 0.93rem; color: var(--text-primary); }
.ps-pe-provider-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-pe-status { font-size: 0.75rem; font-weight: 700; flex: none; }
.ps-pe-status.is-ok { color: #34d399; }
.ps-pe-status.is-warn { color: #fbbf24; }
.ps-pe-provider-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.ps-pe-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border-hover); background: transparent;
  color: var(--text-secondary); font-size: 1rem; cursor: pointer;
}
.ps-pe-icon-btn:hover:not(:disabled) { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.25); }
.ps-pe-icon-btn:disabled { opacity: 0.3; cursor: default; }
.ps-pe-provider-options { padding: 0 12px 12px 44px; }
.ps-pe-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pe-chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.22); background: transparent;
  color: var(--text-secondary); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.ps-pe-chip:hover { color: var(--text-primary); border-color: var(--accent); }
.ps-pe-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ps-pe-preset {
  display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--border-hover); background: var(--bg-elevated);
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.ps-pe-preset.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ps-pe-preset-name { font-weight: 700; font-size: 0.88rem; }
.ps-pe-preset-line { font-size: 0.76rem; color: var(--text-muted); line-height: 1.35; }
.ps-pe-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pe-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border-hover); background: var(--bg-elevated);
  font-size: 0.85rem; color: var(--text-secondary); cursor: pointer;
}
.ps-pe-toggle:has(input:checked) { color: var(--text-primary); border-color: var(--accent); background: var(--accent-subtle); }
.ps-pe-toggle input { accent-color: var(--accent); }
.ps-pe-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); }
.ps-pe-field span { font-weight: 400; color: var(--text-muted); }
.ps-pe-field-inline { flex-direction: row; align-items: center; gap: 10px; }
.ps-pe-field-inline .ps-input { width: auto; }
.ps-pe-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ps-pe-poster { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ps-pe-poster img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px;
  background: var(--bg-elevated); border: 1px solid var(--border-hover); display: block;
}
.ps-pe-poster figcaption { font-size: 0.72rem; color: var(--text-muted); text-align: center; line-height: 1.3; }
.ps-pe-poster.is-broken img { opacity: 0.25; }
.ps-pe-poster.is-broken figcaption::after { content: ' (no poster)'; color: #fbbf24; }
@media (max-width: 900px) {
  .ps-pe-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-pe-side { position: static; order: -1; }
  .ps-pe-provider-main { flex-wrap: wrap; row-gap: 8px; }
  .ps-pe-provider-text { flex-basis: calc(100% - 100px); }
  .ps-pe-provider-actions { width: 100%; justify-content: flex-end; }
  .ps-pe-provider-options { padding-left: 12px; }
}

/* Poster chain: the Bounty editor embedded in the Studio. */
.ps-pe-frame { display: block; flex-shrink: 0; width: 100%; border: 0; border-radius: 14px; background: #0a0a12; }
.ps-pe-custom { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ps-pe-problems:empty { display: none; }
@media (max-width: 900px) { .ps-pe-custom { grid-template-columns: minmax(0, 1fr); } }
/* Keep "Save poster look" in reach while scrolling through the editor. */
.ps-pe-top { position: sticky; top: 0; z-index: 5; padding: 10px 0; margin-top: -10px; background: var(--bg-drawer); }



/* ==============================================================================
   OBSIDIAN & MINT BASE ENHANCEMENTS (Login, Inputs, Modals & Fullpage)
   ============================================================================== */
.ps-overlay.ps-fullpage {
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--ps-obsidian-base, #08090d) !important;
}

.ps-fullpage #profile-studio-panel,
.ps-fullpage .ps-panel {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--ps-obsidian-base, #08090d) !important;
}

.ps-login-body {
  max-width: 460px !important;
  margin: 40px auto !important;
  width: 100% !important;
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 16px !important;
  padding: 32px !important;
  box-shadow: var(--ps-elevation-shadow, 0 8px 30px -4px rgba(0, 0, 0, 0.7)) !important;
}

.ps-header {
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border-bottom: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
}

.ps-badge {
  background: rgba(0, 245, 160, 0.12) !important;
  color: #00f5a0 !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
}

.ps-title {
  color: #f8fafc !important;
}

.ps-subtitle {
  color: #94a3b8 !important;
}

.ps-input {
  background: #08090d !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
}

.ps-input:focus {
  border-color: #00f5a0 !important;
  box-shadow: none;
}

.ps-btn-primary {
  background: linear-gradient(135deg, #00f5a0 0%, #10b981 100%) !important;
  color: #08090d !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

.ps-btn-primary:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-1px) !important;
}

.ps-privacy-box {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
}

.ps-privacy-box svg {
  color: #00f5a0 !important;
}

.ps-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.ps-profile-card {
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-profile-card:hover,
.ps-profile-card:focus-visible {
  border-color: #00f5a0 !important;
  background: var(--ps-obsidian-card, #151923) !important;
  box-shadow: var(--ps-elevation-hover, 0 12px 32px -4px rgba(0, 0, 0, 0.85)) !important;
}

.ps-loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  gap: 16px;
}

.ps-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 245, 160, 0.15);
  border-top-color: #00f5a0;
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}

@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

.ps-loading-text {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ==============================================================================
   PROFILE STUDIO BASE STYLESHEET (Full Component Ecosystem)
   ============================================================================== */
/* ==========================================================================
   PROFILE STUDIO (Cinematic Collection Organizer & Vault Cherry-Picker)
   Palette rides the site's own tokens (--accent/--bg-elevated/--text-*)
   instead of a bolted-on hex set, so the modal reads as part of Kaptain.
   ========================================================================== */
.ps-overlay,
.ps-overlay.ps-fullpage {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 100000 !important;
  background: var(--ps-obsidian-base, #08090d) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.ps-panel,
#profile-studio-panel,
.ps-fullpage #profile-studio-panel,
.ps-fullpage .ps-panel {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  background: var(--ps-obsidian-base, #08090d) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.ps-panel:focus {
  outline: none;
}

.ps-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
}

.ps-toast {
  position: absolute;
  top: 64px;
  right: 24px;
  background: var(--success);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-toast.active {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.ps-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-elevated);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.ps-header-center {
  text-align: center;
  align-items: center;
  padding: 30px 24px 16px;
}
.ps-header-compact {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 13px 22px;
}
.ps-header-left,
.ps-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-header-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.84rem;
  color: #f1f5f9;
}
.ps-avatar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: none;
}
.ps-profile-label {
  color: #8fa0b5;
  font-size: 0.78rem;
}
.ps-profile-name-text {
  color: #fff;
  font-weight: 700;
}

.ps-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-subtitle {
  font-size: 0.86rem;
  color: #8fa0b5;
  margin: 0;
}
.ps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ps-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 14px;
}
.ps-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.ps-privacy-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.ps-privacy-box svg {
  color: var(--accent-light);
  margin-top: 1px;
}

.ps-form-actions {
  margin-top: 4px;
}
.ps-footer-actions {
  margin-top: 18px;
  text-align: center;
}

.ps-close-btn {
  font-size: 1.5rem;
  line-height: 1;
  color: #8fa0b5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.ps-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ps-header:not(.ps-header-compact) .ps-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
}

.ps-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ps-login-body {
  max-width: 440px;
  margin: 20px auto;
  width: 100%;
}
.ps-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b0bec5;
}
.ps-input {
  width: 100%;
  padding: 11px 14px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ps-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

/* Button System */
.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ps-btn-block {
  width: 100%;
}
.ps-btn-lg {
  padding: 13px 26px;
  font-size: 0.96rem;
  border-radius: 11px;
}
.ps-btn-primary {
  background: var(--accent-gradient);
  color: var(--on-accent, #04130d);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ps-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.ps-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ps-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ps-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.ps-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ps-btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 4px;
}
.ps-btn-link:hover {
  color: var(--accent-light);
}
.ps-btn-chip {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-btn-chip.is-pinned {
  background: var(--warning-glow, rgba(245, 158, 11, 0.15));
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 600;
}
.ps-btn-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.ps-btn-icon svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ps-btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-icon:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.ps-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Artwork button: No additional art available indicator */
.ps-btn-wardrobe.is-no-alt-art {
  position: relative;
  opacity: 0.38;
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.04);
}

.ps-btn-wardrobe.is-no-alt-art:hover,
.ps-btn-wardrobe.is-no-alt-art.is-hovered,
.ps-btn-wardrobe.is-no-alt-art:focus-visible {
  opacity: 0.95;
  color: #94a3b8;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Minimal diagonal strike line through the palette icon */
.ps-btn-wardrobe.is-no-alt-art::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1.5px;
  background: #ef4444;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  box-shadow: none;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ps-btn-wardrobe.is-no-alt-art:hover::before,
.ps-btn-wardrobe.is-no-alt-art.is-hovered::before,
.ps-btn-wardrobe.is-no-alt-art:focus-visible::before {
  background: #f87171;
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(-45deg) scale(1.1);
}

/* Tooltip on hover */
.ps-btn-wardrobe.is-no-alt-art[data-tooltip]:hover::after,
.ps-btn-wardrobe.is-no-alt-art[data-tooltip].is-hovered::after,
.ps-btn-wardrobe.is-no-alt-art[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d111d;
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8));
  pointer-events: none;
  z-index: 10000;
  animation: psTooltipFadeIn 0.15s ease-out;
}

@keyframes psTooltipFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.ps-shelf-empty-hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.45;
}

.ps-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Keyboard focus — the only :focus rule used to be the login inputs */
.ps-btn:focus-visible,
.ps-btn-icon:focus-visible,
.ps-close-btn:focus-visible,
.ps-vault-tab:focus-visible,
.ps-actions-item:focus-visible,
.ps-profile-card:focus-visible,
.ps-vault-card:focus-visible,
.ps-cat-header:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* Step 2: Profiles Grid */
.ps-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 10px 0 20px;
}
.ps-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-profile-card:hover,
.ps-profile-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #171f30;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.ps-profile-pick-btn {
  flex-shrink: 0;
  pointer-events: none;
}
.ps-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.ps-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ps-profile-info {
  flex: 1;
  min-width: 0;
}
.ps-profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-profile-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==========================================================================
   STEP 3: STUDIO CANVAS (3-Tab Modular Architecture)
   ========================================================================== */
.ps-mode-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px 10px;
  background: rgba(10, 14, 24, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.ps-mode-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.ps-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps-mode-tab svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  color: inherit;
}
.ps-mode-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.ps-mode-tab.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}
.ps-mode-tab.active .ps-mode-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.ps-canvas-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 20px;
  overflow: hidden;
}

.ps-mode-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #111623;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.ps-mode-view.ps-art-studio-view {
  overflow-y: auto;
}

/* Art & Themes Studio */
.ps-art-carousels-container {
  overflow: visible;
  padding: 4px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ps-art-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-art-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.ps-art-row-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-art-row-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.ps-art-row-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-light, #10b981);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-art-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.ps-art-card {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.ps-art-card.is-poster {
  flex: 0 0 170px;
}
.ps-art-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}
.ps-art-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #080c16;
  overflow: hidden;
}
.ps-art-card.is-poster .ps-art-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-art-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-art-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ps-art-card:hover .ps-art-hover-img {
  opacity: 1;
}
.ps-art-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 5;
}
.ps-art-card-meta {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ps-art-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-art-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}

/* -------------------------------------------------------------
   Art & Themes Mode: Theme Deck & In-Card Quick Flippers
   ------------------------------------------------------------- */
.ps-theme-deck {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 20px 18px;
  backdrop-filter: blur(12px);
}
.ps-theme-deck-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-theme-deck-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-theme-deck-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent, #00f5a0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ps-theme-deck-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-theme-deck-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-theme-deck-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ps-theme-deck-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  color: #fff;
}
.ps-theme-deck-chip:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent, #00f5a0);
  transform: translateY(-2px);
  box-shadow: none;
}
.ps-deck-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: none;
}
.ps-deck-chip-text {
  display: flex;
  flex-direction: column;
}
.ps-deck-chip-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}
.ps-deck-chip-count {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* In-Card Quick Flippers */
.ps-card-quick-flippers {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-art-card:hover .ps-card-quick-flippers {
  opacity: 1;
  pointer-events: auto;
}
.ps-card-flip-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.ps-card-flip-btn:hover {
  background: var(--accent, #00f5a0);
  border-color: #10b981;
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-card-style-indicator {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.ps-card-just-flipped {
  animation: cardFlipGlow 0.45s ease;
}
@keyframes cardFlipGlow {
  0% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transform: scale(0.98);
  }
  50% {
    box-shadow: none;
    transform: scale(1.02);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

/* -------------------------------------------------------------
   Docked Visual Wardrobe Drawer
   ------------------------------------------------------------- */
.ps-art-card.is-inspecting {
  border-color: #10b981 !important;
  box-shadow: none;
  transform: translateY(-2px);
}

.ps-docked-drawer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.98) 0%, rgba(9, 13, 22, 0.99) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-radius: 16px 16px 0 0;
  padding: 12px 20px 16px;
  z-index: 50;
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: slideUpDrawer 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpDrawer {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ps-docked-drawer.is-open {
  display: flex;
}

.ps-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ps-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-drawer-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent, #00f5a0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ps-drawer-meta {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}

.ps-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-drawer-shelf {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ps-drawer-shelf::-webkit-scrollbar {
  height: 6px;
}

.ps-drawer-shelf::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.ps-drawer-card {
  flex: 0 0 170px;
  display: flex;
  flex-direction: column;
  background: rgba(22, 28, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ps-drawer-card.is-poster {
  flex: 0 0 120px;
}

.ps-drawer-card:hover {
  border-color: var(--accent, #00f5a0);
  transform: translateY(-2px);
  box-shadow: none;
}

.ps-drawer-card.is-active {
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
  background: rgba(30, 38, 60, 0.95);
}

.ps-drawer-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #080c16;
  overflow: hidden;
}

.ps-drawer-card.is-poster .ps-drawer-card-thumb {
  aspect-ratio: 2 / 3;
}

.ps-drawer-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-drawer-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ps-drawer-card:hover .ps-drawer-hover-img {
  opacity: 1;
}

.ps-drawer-badge-inuse {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent, #00f5a0);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.ps-drawer-badge-style {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  z-index: 5;
}

.ps-drawer-card-meta {
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-drawer-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-drawer-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}

.ps-drawer-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  font-style: italic;
}

/* Smart Row Target Popover */
.ps-row-target-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #182033;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  padding: 8px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: popoverFadeIn 0.18s ease;
}
@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ps-row-target-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 6px;
}
.ps-row-target-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-row-target-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
  font-family: inherit;
}
.ps-row-target-option:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.ps-row-target-option.is-new-row {
  color: var(--accent-light, #10b981);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3px;
  padding-top: 8px;
}
.ps-row-target-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.ps-column {
  display: flex;
  flex-direction: column;
  background: #111623;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.ps-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
.ps-col-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-col-subtitle {
  font-size: 0.78rem;
  color: #8fa0b5;
  margin-top: 2px;
  display: block;
}

/* Left Column: Categories List */
.ps-categories-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.ps-cat-card {
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 52px;
  transition: all 0.18s ease;
}
.ps-cat-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #182032;
}
.ps-cat-card.is-expanded {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: #141928;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.ps-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  min-height: 50px;
  box-sizing: border-box;
}
.ps-cat-drag-handle {
  display: flex;
  gap: 4px;
}
.ps-cat-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ps-cat-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-cat-count {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent-light);
  background: var(--accent-subtle);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-cat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Actions kebab — collapses the pin/delete/jump-to-position controls out of
   the always-visible row so titles keep their space at narrow widths, and
   gives reordering a top/bottom shortcut instead of only single-step ▲▼. */
.ps-actions-menu {
  position: relative;
  display: inline-flex;
}
.ps-actions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  background: #1a2033;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
.ps-actions-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ps-actions-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.ps-actions-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #94a3b8;
}
.ps-actions-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.ps-actions-item.ps-actions-item-danger {
  color: #f87171;
}
.ps-actions-item.ps-actions-item-danger svg {
  color: #f87171;
}
.ps-actions-item.ps-actions-item-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}
.ps-actions-item.is-active svg {
  color: #fbbf24;
}
.ps-cat-body {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(0, 0, 0, 0.28);
}
.ps-folder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #192033;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  flex-shrink: 0;
  min-height: 54px;
  box-sizing: border-box;
  transition: background 0.15s ease;
}
.ps-folder-row:hover {
  background: #1e263d;
  border-color: rgba(255, 255, 255, 0.12);
}
.ps-folder-thumb {
  width: 58px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.ps-folder-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-folder-info {
  flex: 1;
  min-width: 0;
}
.ps-folder-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-folder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}
.ps-badge-shape {
  font-size: 0.72rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-weight: 600;
  color: #cbd5e1;
}
.ps-badge-sources {
  font-size: 0.72rem;
  color: #64748b;
}
.ps-folder-reorder {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Right Column: Kaptain's Vault */
.ps-vault-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.015);
}
.ps-vault-search {
  padding: 10px 14px;
  font-size: 0.88rem;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
}
.ps-vault-tabs-scroller {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ps-vault-tabs-scroller::-webkit-scrollbar {
  display: none;
}
.ps-vault-tabs-wrap {
  position: relative;
}
.ps-vault-tabs-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 28px;
  background: linear-gradient(to right, transparent, #111623);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.ps-vault-tabs-wrap.at-end::after {
  opacity: 0;
}
.ps-vault-tab {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.ps-vault-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.ps-vault-tab.active {
  background: var(--accent);
  color: var(--on-secondary);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.ps-vault-grid {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 0;
}
.ps-vault-card {
  display: flex;
  flex-direction: column;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
  min-height: 220px;
  height: auto;
  box-sizing: border-box;
}
.ps-vault-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: #192033;
}
.ps-vault-card.is-added {
  border-color: rgba(34, 197, 94, 0.4);
}
.ps-vault-added-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-vault-added-badge svg {
  width: 12px;
  height: 12px;
}
.ps-vault-cover {
  width: 100%;
  height: 105px;
  min-height: 105px;
  flex-shrink: 0;
  position: relative;
  background: #000;
  overflow: hidden;
}
.ps-vault-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-vault-cat-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-vault-info {
  padding: 10px 10px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.ps-vault-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ps-vault-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}
.ps-btn-vault-add {
  margin: 0 8px 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-btn-vault-add:hover {
  background: var(--accent);
  color: var(--on-secondary);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* Bottom Bar */
.ps-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #101522;
  flex-shrink: 0;
}
.ps-diff-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-diff-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.ps-diff-added {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.ps-diff-removed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.ps-diff-reordered {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Custom Scrollbars */
.ps-categories-scroller::-webkit-scrollbar,
.ps-vault-grid::-webkit-scrollbar {
  width: 6px;
}
.ps-categories-scroller::-webkit-scrollbar-track,
.ps-vault-grid::-webkit-scrollbar-track {
  background: transparent;
}
.ps-categories-scroller::-webkit-scrollbar-thumb,
.ps-vault-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.ps-categories-scroller::-webkit-scrollbar-thumb:hover,
.ps-vault-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Loading & Empty States */
.ps-empty-state,
.ps-empty-category,
.ps-empty-vault {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.84rem;
}
.ps-loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  padding: 60px 20px;
}
.ps-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}
@keyframes ps-spin {
  to {
    transform: rotate(360deg);
  }
}
.ps-loading-text {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
}

/* ==========================================================================
   STEP 4: CONFIRM & PUSH — the highest-stakes screen (irreversible write to
   a real TV) had zero CSS beyond the shared button system; it rendered as a
   bare stacked text list. This is the screen that should feel MOST
   reassuring, not least.
   ========================================================================== */
.ps-confirm-body {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  gap: 18px;
}
.ps-summary-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 10px;
}
.ps-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.ps-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.ps-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-stat-added .ps-stat-value {
  color: #4ade80;
}
.ps-stat-removed .ps-stat-value {
  color: #f87171;
}

.ps-backup-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent-subtle);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}
.ps-backup-notice svg {
  color: var(--accent-light);
  margin-top: 1px;
}

.ps-confirm-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.ps-diff-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-diff-detail h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-diffchip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ps-diffchip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  background: #161c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  max-width: 220px;
}
.ps-diffchip-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}
.ps-diffchip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-diffchip-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-diffchip.is-added {
  border-color: rgba(34, 197, 94, 0.35);
}
.ps-diffchip.is-added .ps-diffchip-title {
  color: #86efac;
}
.ps-diffchip.is-removed {
  border-color: rgba(239, 68, 68, 0.3);
}
.ps-diffchip.is-removed .ps-diffchip-title {
  color: #fca5a5;
  text-decoration: line-through;
  text-decoration-color: rgba(252, 165, 165, 0.5);
}
.ps-diffchip-more {
  align-self: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 5px 4px;
}

.ps-categories-preview h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-order-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  font-size: 0.86rem;
}
.ps-order-list li strong {
  color: #fff;
}

.ps-confirm-actions,
.ps-confirm-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   STEP 5: SUCCESS
   ========================================================================== */
.ps-success-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 16px var(--accent-glow));
}
.ps-success-body {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  gap: 18px;
  align-items: stretch;
}
.ps-success-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.5;
}
.ps-success-tip svg {
  color: var(--accent-light);
  margin-top: 2px;
  flex-shrink: 0;
}
.ps-success-tip strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}
.ps-success-tip p {
  margin: 0;
}
.ps-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .ps-mode-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
    gap: 6px;
  }
  .ps-mode-tab svg {
    width: 15px;
    height: 15px;
  }
  .ps-art-card {
    flex: 0 0 200px;
  }
  .ps-canvas-layout {
    padding: 10px 12px;
  }
  .ps-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-height: none;
  }
  .ps-overlay {
    padding: 0;
  }
  .ps-summary-card {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 16px;
  }
}

@media (max-width: 520px) {
  .ps-mode-nav-bar {
    padding: 6px 10px 8px;
  }
  .ps-mode-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .ps-mode-tab {
    padding: 6px 8px;
    font-size: 0.72rem;
    gap: 4px;
    flex: 1;
    justify-content: center;
  }
  .ps-art-card {
    flex: 0 0 170px;
  }
  /* Icon clusters were eating almost all the horizontal room, truncating
     "Continue Watching" down to "Co…". The kebab menu already moved the
     rarer actions out of the row; here the two that remain visible (▲▼)
     get tighter, and titles are allowed to wrap instead of vanishing. */
  .ps-cat-title,
  .ps-folder-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ps-cat-header {
    align-items: flex-start;
    flex-wrap: nowrap;
  }
  .ps-btn-icon {
    width: 30px;
    height: 30px;
  }
  .ps-folder-thumb {
    width: 46px;
    height: 32px;
  }
  .ps-vault-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ==========================================================================
   Profile Studio Marketplace: Curated Shelves, Artwork Wardrobe & Drops
   ========================================================================== */

/* Marketplace Navigation Bar */
.ps-market-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  background: rgba(10, 14, 24, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ps-market-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.ps-market-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}
.ps-market-tab.active {
  color: #fff;
  background: var(--accent, #00f5a0);
  border-color: var(--accent, #00f5a0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Creator Filter Pills */
.ps-creator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 6px;
}
.ps-creator-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ps-creator-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-creator-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.ps-creator-pill.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}
.ps-creator-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ps-creator-tag-kaptain {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.ps-creator-tag-community {
  background: rgba(0, 245, 160, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

/* Curated Shelves Grid */
.ps-shelves-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 24px;
  overflow-y: auto;
  flex: 1;
}
.ps-shelf-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-shelf-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.ps-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ps-shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-shelf-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-shelf-count {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 10px;
}
.ps-shelf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ps-shelf-chip {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-shelf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Community Drops (Recipes) Grid */
.ps-drops-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 18px 24px;
  overflow-y: auto;
  flex: 1;
}
.ps-drops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-drop-card {
  background: linear-gradient(135deg, rgba(30, 38, 58, 0.5) 0%, rgba(15, 20, 32, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
}
.ps-drop-card:hover {
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}
.ps-drop-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ps-drop-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-drop-creator {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-drop-tagline {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}
.ps-drop-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.ps-drop-row-pill {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #00f5a0;
  border: 1px solid rgba(0, 0, 0, 0.5);
  font-weight: 500;
}
.ps-drop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  justify-content: flex-end;
}

/* Artwork Wardrobe Modal */
.ps-wardrobe-overlay {
  position: absolute;
  inset: 0;
  z-index: 100020;
  background: rgba(4, 7, 16, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.ps-wardrobe-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-wardrobe-panel {
  width: min(94vw, 860px);
  max-height: min(92vh, 800px);
  background: var(--bg-elevated, #0f1422);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.ps-wardrobe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-wardrobe-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-wardrobe-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-wardrobe-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.ps-wardrobe-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero Comparison Stage (Large, Beautiful Side-by-Side) */
.ps-hero-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.ps-hero-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #94a3b8);
}
.ps-hero-card-header .is-accent {
  color: var(--accent-light, #00f5a0);
}
.ps-hero-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #090d18;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.ps-hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}
.ps-hero-card.is-candidate {
  border-color: #00f5a0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-hero-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070e;
}
.ps-hero-card.is-poster .ps-hero-thumb {
  aspect-ratio: 2 / 3;
}
.ps-hero-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-hero-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.ps-hero-card:hover .ps-hero-hover-img {
  opacity: 1;
}
.ps-hero-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.ps-hero-card-meta {
  padding: 10px 14px;
  background: rgba(13, 18, 30, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ps-hero-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.ps-hero-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* Style Selector Shelf */
.ps-shelf-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-shelf-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-shelf-section-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.ps-shelf-tab-bar {
  display: flex;
  gap: 6px;
}
.ps-shelf-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-shelf-tab.active {
  background: rgba(0, 245, 160, 0.15);
  border-color: #00f5a0;
  color: #00f5a0;
}
.ps-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.ps-shelf-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
  position: relative;
}
.ps-shelf-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.ps-shelf-item.is-selected {
  background: rgba(0, 245, 160, 0.12);
  border-color: #00f5a0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.ps-shelf-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-shelf-item-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-shelf-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}
.ps-current-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
  padding: 2px 7px;
  border-radius: 4px;
}
.ps-tag-kaptain {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.ps-tag-kaptain-v1 {
  background: rgba(234, 88, 12, 0.18) !important;
  color: #fdba74 !important;
  border: 1px solid rgba(234, 88, 12, 0.35) !important;
}
.ps-tag-studio {
  background: rgba(0, 245, 160, 0.18) !important;
  color: var(--accent-light) !important;
  border: 1px solid rgba(0, 245, 160, 0.35) !important;
}

/* Wardrobe Footer */
.ps-wardrobe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.6);
}
.ps-wardrobe-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom Art Form */
.ps-custom-art-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

/* Mobile Segmented Toggle (hidden on desktop, visible on <= 640px) */
.ps-mobile-stage-toggle {
  display: none;
}

@media (max-width: 640px) {
  .ps-wardrobe-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .ps-wardrobe-header {
    padding: 12px 16px;
  }
  .ps-wardrobe-body {
    padding: 14px 16px;
    gap: 14px;
  }
  .ps-mobile-stage-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 2px;
  }
  .ps-mobile-toggle-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
  }
  .ps-mobile-toggle-btn.active {
    background: var(--accent, #00f5a0);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  }
  .ps-hero-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ps-hero-card-wrap.ps-mobile-hidden {
    display: none !important;
  }
  .ps-shelf-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .ps-wardrobe-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 10px;
  }
  .ps-wardrobe-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
  .ps-wardrobe-footer-right button {
    flex: 1;
  }
  #ps-btn-wardrobe-apply-row {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   FULLSCREEN HIGH-RES LIGHTBOX MODAL
   ========================================================================== */
.ps-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(2, 4, 10, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ps-lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-lightbox-panel {
  width: min(94vw, 1180px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.ps-lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-lightbox-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ps-lightbox-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}
.ps-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-lightbox-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  max-height: 68vh;
  background: radial-gradient(circle at center, rgba(30, 41, 69, 0.4) 0%, rgba(8, 12, 22, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}
.ps-lightbox-display-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}
.ps-lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
}

/* ==========================================================================
   BATCH ARTWORK STYLE SWAPPER MODAL
   ========================================================================== */
.ps-batch-art-overlay {
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: rgba(3, 6, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ps-batch-art-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ps-batch-art-panel {
  width: min(94vw, 760px);
  max-height: min(90vh, 740px);
  background: var(--bg-elevated, #101626);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95);
}
.ps-batch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-batch-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ps-batch-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.ps-batch-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ps-batch-style-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.18s ease;
}
.ps-batch-style-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.ps-batch-style-card.is-active {
  background: rgba(0, 245, 160, 0.12);
  border-color: #00f5a0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.ps-batch-style-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.ps-batch-style-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}
.ps-batch-impact-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-batch-stat-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ps-batch-stat-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
}
.ps-batch-stat-pill.is-update {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.ps-batch-stat-pill.is-unchanged {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
}
.ps-batch-stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: inherit;
}
.ps-batch-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: inherit;
}
.ps-batch-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
}
.ps-batch-chip {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.ps-batch-chip.is-updated {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.ps-batch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 24, 0.6);
}

/* ==========================================================================
   Art Studio Sub-View Toggle & Universal Art Vault Lookbook
   ========================================================================== */
.ps-subview-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3px;
  gap: 3px;
}

.ps-subview-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.ps-subview-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-subview-toggle-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-subview-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.ps-subview-toggle-btn.active .ps-subview-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ps-vault-count-badge {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
}

.ps-subview-toggle-btn.active .ps-vault-count-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

/* ==========================================================================
   ART VAULT: CLEAN HYBRID GALLERY (Option C)
   Compact 2-Row Toolbar (~75px), Unified Aesthetics, My TV Filter, Shape Toggles
   ========================================================================== */

/* Art Vault Container */
.ps-art-vault-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 0 18px 24px;
  gap: 14px;
}

/* Compact 2-Row Sticky Toolbar */
.ps-vault-compact-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Row 1: Aesthetics Tabs + Actions (My TV, Shape, Total Count) */
.ps-vault-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Aesthetic Filter Tabs (Segmented Control) */
.ps-vault-style-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.ps-vault-style-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-vault-style-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.ps-vault-style-tab.active {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-vault-style-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ps-vault-style-count {
  font-size: 0.72rem;
  color: #64748b;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 10px;
}

.ps-vault-style-tab.active .ps-vault-style-count {
  color: #6dfac4;
  background: rgba(0, 0, 0, 0.5);
}

/* Top Right Actions Group */
.ps-vault-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* "My TV Folders Only" Toggle Button */
.ps-btn-vault-mytv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-btn-vault-mytv:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.ps-btn-vault-mytv.is-active {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.55);
  color: #4ade80;
  box-shadow: none;
}

.ps-mytv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.ps-btn-vault-mytv.is-active .ps-mytv-dot {
  background: #4ade80;
  box-shadow: none;
}

/* Aspect Ratio Selector (All / Landscape / Poster) */
.ps-vault-shape-selector {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-vault-shape-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
}

.ps-vault-shape-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-vault-shape-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

/* Results Count Badge */
.ps-vault-results-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

/* Row 2: Search Input + Category Chips */
.ps-vault-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-vault-search-box {
  position: relative;
  flex: 0 0 260px;
  max-width: 320px;
}

.ps-vault-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.ps-art-col-header {
  padding: 10px 20px 10px 20px !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-art-tools-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-btn-toggle-motion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.ps-btn-toggle-motion:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ps-btn-toggle-motion.is-disabled-active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.ps-btn-toggle-motion.is-disabled-active:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef3c7;
}

.ps-motion-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.ps-motion-dot.is-motion {
  background: #00f5a0;
  box-shadow: none;
}

.ps-motion-dot.is-disabled {
  background: #f59e0b;
  box-shadow: none;
}

.ps-btn-batch-swapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.77rem;
  padding: 5px 12px;
  border-radius: 8px;
}

.ps-btn-row-toggle-gifs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}

.ps-btn-row-toggle-gifs.is-disabled-active {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.ps-btn-row-toggle-gifs.is-disabled-active:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fef3c7 !important;
}

.ps-vault-search-compact {
  width: 100%;
  height: 30px;
  padding: 5px 28px 5px 34px !important;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #fff;
  font-size: 0.77rem;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.16s ease;
}

.ps-vault-search-compact:focus {
  outline: none;
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}

.ps-vault-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 1px 5px;
  line-height: 1;
}

.ps-vault-category-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.ps-vault-category-chips::-webkit-scrollbar {
  display: none;
}

.ps-vault-cat-chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  font-family: inherit;
}

.ps-vault-cat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ps-vault-cat-chip.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
  font-weight: 600;
}

/* Compact Dropdown Selector for Discover Vault & Art Lookbook */
.ps-select-compact {
  height: 30px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #e2e8f0;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 4px 28px 4px 10px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  flex-shrink: 0;
}

.ps-select-compact:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.ps-select-compact:focus {
  outline: none;
  border-color: var(--accent, #00f5a0);
  box-shadow: none;
}

.ps-select-compact option {
  background: #0f172a;
  color: #fff;
  padding: 6px;
}

/* Streamlined Folders & Art Vault Bars */
.ps-folders-unified-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.ps-folders-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-vault-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Art Vault Grid */
.ps-art-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 13px;
}

.ps-vault-card {
  background: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.ps-vault-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.ps-vault-card.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: none;
}

.ps-vault-card.in-profile {
  border-color: rgba(0, 0, 0, 0.5);
}

.ps-vault-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.ps-vault-card.is-poster .ps-vault-card-thumb {
  aspect-ratio: 2 / 3;
}

.ps-vault-base-img,
.ps-vault-hover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-vault-hover-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.ps-vault-card:hover .ps-vault-hover-img {
  opacity: 1;
}

.ps-vault-badge-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(7, 10, 19, 0.86);
  backdrop-filter: blur(6px);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ps-vault-badge-active {
  position: absolute;
  top: 7px;
  right: 32px;
  background: rgba(22, 163, 74, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-vault-badge-inprofile {
  position: absolute;
  top: 7px;
  right: 32px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ps-vault-zoom-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.ps-vault-zoom-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
}

.ps-vault-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}

.ps-vault-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ps-vault-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ps-vault-card-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* In-Card Style Variant Dots */
.ps-vault-variants-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px 5px;
  flex-shrink: 0;
}

.ps-vault-variant-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.6;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ps-vault-variant-dot.is-current {
  opacity: 1;
  transform: scale(1.25);
}

.ps-vault-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.ps-vault-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-vault-status-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4ade80;
}

.ps-btn-vault-swap {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #00f5a0 !important;
  border: 1px solid rgba(0, 0, 0, 0.5) !important;
  font-weight: 700 !important;
  width: 100%;
}

.ps-btn-vault-swap:hover {
  background: var(--accent, #00f5a0) !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-btn-vault-add {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
  width: 100%;
}

.ps-btn-vault-add:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

.ps-vault-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.ps-vault-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ps-vault-empty h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.ps-vault-empty p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  max-width: 400px;
}

/* ==========================================================================
   PROFILE STUDIO: UNIFIED HEADER, DRAG & DROP, COMPACT MARKETPLACE & COLLECTIONS
   ========================================================================== */

/* Unified Compact Header: Centered Mode Tabs (Eliminates extra nav bar) */
.ps-header-unified {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding: 10px 20px !important;
  position: relative;
  min-height: 52px;
  background: var(--bg-elevated, #141926);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}
.ps-header-unified .ps-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ps-header-unified .ps-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.ps-header-unified .ps-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ps-header-unified .ps-btn-unified-close {
  position: static !important;
  flex-shrink: 0;
}
@media (max-width: 980px) {
  .ps-header-unified {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "left actions close"
      "center center center" !important;
    gap: 8px 10px !important;
    padding: 10px 16px !important;
  }
  .ps-header-unified .ps-header-left {
    grid-area: left;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .ps-header-unified .ps-header-left #ps-btn-back-profiles {
    font-size: 0.76rem !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }
  .ps-header-unified .ps-header-profile-badge {
    padding: 3px 8px !important;
    font-size: 0.74rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 220px !important;
  }
  .ps-header-unified .ps-header-right {
    grid-area: actions;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .ps-header-unified .ps-header-right .ps-btn {
    font-size: 0.76rem !important;
    padding: 4px 10px !important;
    white-space: nowrap !important;
  }
  .ps-header-unified .ps-btn-unified-close {
    grid-area: close;
    position: static !important;
    align-self: center !important;
    justify-self: end !important;
  }
  .ps-header-unified .ps-header-center {
    grid-area: center;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 2px 0 0 !important;
  }
  .ps-header-unified .ps-mode-tabs {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 3px !important;
  }
  .ps-header-unified .ps-mode-tab {
    flex: 1 !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    font-size: 0.76rem !important;
    gap: 5px !important;
  }
  .ps-header-unified .ps-mode-tab svg {
    width: 14px !important;
    height: 14px !important;
  }
}

.ps-back-text-short,
.ps-mode-text-short {
  display: none;
}

@media (max-width: 600px) {
  .ps-back-text-full,
  .ps-mode-text-full {
    display: none !important;
  }
  .ps-back-text-short,
  .ps-mode-text-short {
    display: inline !important;
  }
  .ps-header-profile-badge .ps-profile-label {
    display: none !important;
  }
  .ps-header-unified .ps-header-left #ps-btn-back-profiles {
    font-size: 0.72rem !important;
    padding: 3px 6px !important;
  }
  .ps-header-unified .ps-header-profile-badge {
    padding: 2px 6px !important;
    font-size: 0.72rem !important;
    max-width: 120px !important;
  }
  .ps-header-unified .ps-mode-tab {
    padding: 5px 3px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
  }
  .ps-header-unified .ps-mode-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
  .ps-header-unified .ps-mode-badge {
    font-size: 0.72rem !important;
    padding: 1px 4px !important;
  }
}

/* Drag and Drop Indicators & Grips */
.ps-drag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 24px;
  color: #64748b;
  cursor: grab;
  flex-shrink: 0;
  transition: color 0.15s ease;
  user-select: none;
  margin-right: 2px;
}
.ps-drag-grip svg {
  width: 15px;
  height: 15px;
}
.ps-cat-card:hover .ps-drag-grip,
.ps-folder-row:hover .ps-drag-grip {
  color: #cbd5e1;
}
.ps-drag-grip:active {
  cursor: grabbing;
}
.ps-cat-card[draggable="true"],
.ps-folder-row[draggable="true"] {
  cursor: default;
}
.ps-cat-card.is-dragging,
.ps-folder-row.is-dragging {
  opacity: 0.45;
  border-style: dashed;
  border-color: var(--accent, #00f5a0);
  transform: scale(0.99);
}
.ps-drop-above {
  position: relative;
}
.ps-drop-above::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: #00f5a0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 20;
}
.ps-drop-below {
  position: relative;
}
.ps-drop-below::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: #00f5a0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 20;
}

/* Marketplace Consolidated Navigation Bar */
.ps-market-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
  flex-shrink: 0;
  min-height: 42px;
}
.ps-market-subnav {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}
.ps-market-subtab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps-market-subtab svg {
  width: 13px;
  height: 13px;
}
.ps-market-subtab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.ps-market-subtab.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-creator-pills-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ps-creator-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-creator-pill {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-creator-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.ps-creator-pill.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.ps-market-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hide Installed Toggle Switch */
.ps-btn-hide-installed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
  white-space: nowrap;
}
.ps-btn-hide-installed:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.ps-btn-hide-installed.is-hiding {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 0, 0, 0.5);
  color: #6dfac4;
}
.ps-hide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.15s ease;
}
.ps-btn-hide-installed.is-hiding .ps-hide-dot {
  background: #4ade80;
  box-shadow: none;
}

.ps-market-count-badge {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  white-space: nowrap;
}

/* Compact Search & Category Chips Row */
.ps-market-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(17, 22, 35, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.ps-market-search-box {
  flex: 0 0 240px;
}
.ps-vault-search-compact {
  width: 100%;
  padding: 6px 12px;
  font-size: 0.78rem;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
}
.ps-vault-tabs-scroller-compact {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ps-vault-tabs-scroller-compact::-webkit-scrollbar {
  display: none;
}

/* Collections Showcase View */
.ps-collections-view {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-collections-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-collections-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-collections-subheading {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin: 3px 0 0;
  max-width: 720px;
}
.ps-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 18px;
}
.ps-collection-card {
  background: #141928;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ps-collection-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.ps-collection-card-hero {
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ps-collection-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ps-collection-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ps-collection-author-pill {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-collection-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-collection-tagline {
  font-size: 0.74rem;
  color: #00f5a0;
  margin: 4px 0 0;
  font-weight: 500;
}
.ps-collection-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.ps-collection-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}
.ps-collection-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 8px 10px;
}
.ps-spec-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ps-spec-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ps-spec-value {
  font-size: 0.76rem;
  color: #fff;
  font-weight: 700;
}
.ps-collection-preview-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-preview-strip-label {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ps-preview-strip-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ps-preview-strip-track::-webkit-scrollbar {
  display: none;
}
.ps-preview-thumb {
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-thumb.is-landscape {
  width: 90px;
  height: 50px;
}
.ps-preview-thumb.is-poster {
  width: 42px;
  height: 60px;
}
.ps-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-collection-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.ps-collection-card-actions .ps-btn {
  flex: 1;
}

/* Full Collection Cinematic Preview Modal */
.ps-collection-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.88);
  backdrop-filter: blur(14px);
  z-index: 21500; /* title screen rule: >20000 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 24px;
  box-sizing: border-box;
}
.ps-collection-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ps-col-modal-dialog {
  width: min(94vw, 1100px);
  max-height: 90vh;
  background: #0f1422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.95);
  animation: colModalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes colModalScale {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.ps-col-modal-header {
  padding: 16px 22px;
  background: #141a2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-col-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.ps-col-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ps-col-author-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  gap: 16px;
}
.ps-col-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.ps-col-author-bio {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 560px;
  margin: 2px 0 0;
}
.ps-col-author-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.ps-author-link-pill {
  font-size: 0.72rem;
  color: #cbd5e1;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}
.ps-author-link-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ps-btn-donate-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff5e5b;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.ps-btn-donate-author:hover {
  background: #ff4744;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.ps-col-preview-rows-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ps-preview-row-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-preview-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-preview-row-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.ps-preview-row-badge {
  font-size: 0.72rem;
  color: var(--accent-light, #10b981);
  background: var(--accent-subtle, rgba(0, 0, 0, 0.5));
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}
.ps-preview-row-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.ps-preview-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ps-preview-card.is-landscape {
  width: 170px;
}
.ps-preview-card.is-poster {
  width: 105px;
}
.ps-preview-card-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-card.is-landscape .ps-preview-card-thumb {
  aspect-ratio: 16 / 9;
}
.ps-preview-card.is-poster .ps-preview-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-preview-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-preview-shape-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.75);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.ps-preview-card-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-col-modal-footer {
  padding: 14px 22px;
  background: #141a2a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ps-col-modal-footer-note {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}
.ps-col-modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Split Grid & Content Layout */
.ps-col-modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-modal-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ps-col-modal-author {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.ps-col-modal-subtitle {
  font-size: 0.78rem;
  color: #00f5a0;
  margin: 3px 0 0;
  font-weight: 500;
}

.ps-col-modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 820px) {
  .ps-col-modal-split {
    grid-template-columns: 1fr;
  }
}

.ps-col-modal-pane {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-col-pane-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ps-col-pane-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.ps-col-spec-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.ps-col-spec-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-spec-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

/* Author Profile Box inside Modal */
.ps-author-profile-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-author-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ps-author-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.ps-author-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.ps-author-role {
  font-size: 0.72rem;
  color: #00f5a0;
  font-weight: 600;
}
.ps-author-bio {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}
.ps-author-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ps-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ps-contact-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ps-author-donate-wrap {
  margin-top: 4px;
}
.ps-btn-donate-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff5e5b;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.18s ease;
}
.ps-btn-donate-author:hover {
  background: #ff4744;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.ps-donate-pill {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Modal Bottom Preview Section */
.ps-col-modal-preview-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-col-preview-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-col-preview-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
}
.ps-preview-row-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-preview-row-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}
.ps-preview-row-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #00f5a0;
  border: 1px solid rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}
.ps-preview-row-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.ps-preview-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ps-preview-card.is-landscape {
  width: 140px;
}
.ps-preview-card.is-poster {
  width: 90px;
}
.ps-preview-card-thumb {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-preview-card.is-landscape .ps-preview-card-thumb {
  aspect-ratio: 16 / 9;
}
.ps-preview-card.is-poster .ps-preview-card-thumb {
  aspect-ratio: 2 / 3;
}
.ps-preview-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-preview-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   UNIFIED TV MIRROR (WYSIWYG ARCHITECTURE)
   ========================================================================== */

/* Top Header Pill */
.ps-tv-mirror-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 5px 14px;
  border-radius: 20px;
}

.ps-live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f5a0;
}

.ps-tv-mirror-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.ps-tv-mirror-count {
  font-size: 0.72rem;
  color: #00f5a0;
  font-weight: 500;
}

.ps-btn-header-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  background: linear-gradient(135deg, #00f5a0, #059669);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Row Left Header Elements (Drag grip & arrows) */
.ps-art-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ps-row-drag-handle {
  cursor: grab;
  color: #64748b;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.ps-row-drag-handle:hover {
  color: #fff;
}

.ps-art-row.is-dragging {
  opacity: 0.4;
}

.ps-art-row.ps-drop-above {
  border-top: 2px solid #00f5a0;
}

.ps-art-row.ps-drop-below {
  border-bottom: 2px solid #00f5a0;
}

.ps-row-arrows {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ps-row-arrows .ps-btn-icon {
  width: 22px;
  height: 22px;
  padding: 2px;
}

/* Floating Action Button (+ Add Row) */
.ps-fab-add-row {
  position: fixed;
  bottom: 84px;
  right: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00f5a0, #059669);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 10px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 20050;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.ps-fab-add-row:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #059669, #3730a3);
}

@media (max-width: 768px) {
  .ps-fab-add-row {
    display: none !important;
  }
  .ps-art-row-header {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .ps-art-row-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .ps-art-row-title-wrap {
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .ps-art-row-title {
    font-size: 0.95rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .ps-art-row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}

.ps-mirror-bottom-add {
  display: flex;
  justify-content: center;
  padding: 24px 0 60px;
}

/* Wardrobe Drawer Folder Operations */
.ps-drawer-folder-ops {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   SETTINGS MODAL OVERLAY (Z-Index > 20000)
   ========================================================================== */
.ps-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 21200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ps-settings-overlay.active {
  display: flex;
}

.ps-settings-card {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: psSettingsPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes psSettingsPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ps-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.ps-settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.ps-settings-title-wrap h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.ps-settings-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ps-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.ps-settings-item-info {
  flex: 1;
  min-width: 0;
}

.ps-settings-item-title {
  display: block;
  font-size: 0.86rem;
  color: #fff;
  margin-bottom: 4px;
}

.ps-settings-item-desc {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ==========================================================================
   DISCOVER OVERLAY SHEET (Unified Store & Art Lookbook, Z-Index > 20000)
   ========================================================================== */
.ps-discover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 21100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.ps-discover-overlay.active {
  display: flex;
}

.ps-discover-panel {
  width: 95vw;
  max-width: 1440px;
  height: 92vh;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  animation: psSheetSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes psSheetSlideUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ps-discover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.ps-discover-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.ps-discover-title-wrap {
  display: flex;
  flex-direction: column;
}

.ps-discover-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.ps-discover-subtitle {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 2px;
}

.ps-discover-tab-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3px;
  gap: 3px;
}

.ps-discover-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.ps-discover-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ps-discover-tab-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-discover-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.ps-discover-tab-btn.active .ps-discover-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ps-discover-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

.ps-art-vault-wrapper {
  height: 100%;
  overflow-y: auto;
}

/* ==========================================================================
   3-Tab Architecture Views: Layout & Art Studio Toolbars
   ========================================================================== */
.ps-layout-studio-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ps-layout-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-shrink: 0;
}

.ps-layout-title-wrap {
  display: flex;
  flex-direction: column;
}

.ps-layout-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-categories-bottom-add {
  padding: 12px 0 24px;
}
.ps-categories-bottom-add .ps-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ps-categories-bottom-add .ps-btn svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}

.ps-art-studio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(13, 17, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-shrink: 0;
  min-height: 44px;
}

.ps-art-subview-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.ps-subview-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ps-subview-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.ps-subview-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.ps-subview-toggle-btn.active {
  background: var(--accent, #00f5a0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-art-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .ps-layout-top-bar,
  .ps-art-studio-top-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ps-art-top-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}


/* ==========================================================================
   Avatar picker ("Change picture") — avatar-picker.js
   Sits above every overlay, including Profile Studio (.ps-overlay: 100000).
   ========================================================================== */
.kap-av-overlay {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 11, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.kap-av-overlay.is-open { opacity: 1; }
.kap-av-sheet {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  background: #10141f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.kap-av-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.kap-av-close:hover { background: rgba(255, 255, 255, 0.14); }
.kap-av-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 56px 16px 22px;
}
.kap-av-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.kap-av-preview-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.kap-av-preview-circle img { width: 100%; height: 100%; object-fit: cover; }
.kap-av-preview-name {
  max-width: 110px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kap-av-title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; }
.kap-av-sub { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.kap-av-tabs {
  display: flex;
  gap: 6px;
  padding: 0 22px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}
.kap-av-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.kap-av-tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #04130d); }
.kap-av-head,
.kap-av-tabs,
.kap-av-foot { flex-shrink: 0; }
.kap-av-body { padding: 16px 22px; overflow-y: auto; flex: 1; min-height: 180px; }
.kap-av-group + .kap-av-group { margin-top: 16px; }
.kap-av-group-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kap-av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; }
.kap-av-tile {
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.kap-av-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kap-av-tile:hover,
.kap-av-tile:focus-visible { transform: scale(1.06); }
.kap-av-tile.is-on { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.kap-av-field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; font-weight: 600; }
.kap-av-input {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #0b0e16;
  color: #fff;
  font-size: 0.92rem;
}
.kap-av-input:focus { outline: none; border-color: var(--accent); }
.kap-av-status { display: block; margin-top: 8px; font-size: 0.84rem; color: var(--text-muted); }
.kap-av-status.is-ok { color: var(--success); }
.kap-av-status.is-bad { color: #fca5a5; }
.kap-av-note { margin: 10px 0 0; font-size: 0.84rem; color: var(--text-muted); }
.kap-av-link { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.kap-av-colors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-top: 12px; }
.kap-av-swatch {
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.kap-av-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.kap-av-error { margin: 0 22px; font-size: 0.86rem; color: #fca5a5; }
.kap-av-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.kap-av-btn-primary,
.kap-av-btn-secondary {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.kap-av-btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--accent-gradient, var(--accent));
  color: #fff;
}
.kap-av-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.kap-av-btn-secondary { border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: #fff; }
@media (max-width: 520px) {
  .kap-av-head { flex-direction: column; text-align: center; padding-right: 22px; }
  .kap-av-tabs { flex-wrap: wrap; justify-content: center; }
  .kap-av-colors { grid-template-columns: repeat(4, 1fr); }
}
/* Short screens: shrink the header so Save always stays on screen. */
@media (max-height: 620px) {
  .kap-av-sheet { max-height: calc(100vh - 16px); }
  .kap-av-head { padding-top: 12px; padding-bottom: 8px; gap: 12px; }
  .kap-av-preview-circle { width: 52px; height: 52px; font-size: 1.3rem; }
  .kap-av-sub { display: none; }
  .kap-av-body { min-height: 0; }
}

/* Profile Studio profile cards: "change picture" badge on the avatar */
.ps-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.ps-profile-avatar-edit {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #141926;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent, #04130d);
  font-size: 0.72rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ps-profile-avatar-edit:hover,
.ps-profile-avatar-edit:focus-visible { transform: scale(1.12); }
.ps-toast-undo {
  margin-left: 12px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}
.ps-toast.active:has(.ps-toast-undo) { pointer-events: auto; }

/* ==========================================================================
   Profile Hub (Profile Studio v2) — "what do you want to do with this profile?"
   ========================================================================== */
.ps-hub-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.ps-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.ps-hub-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  text-align: left;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ps-hub-tile:hover,
.ps-hub-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.ps-hub-icon { font-size: 1.6rem; line-height: 1; }
.ps-hub-title { font-size: 1.02rem; font-weight: 700; }
.ps-hub-line { font-size: 0.84rem; color: var(--text-muted); }
.ps-hub-changes {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ps-hub-changes-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ps-hub-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.88rem;
}
.ps-hub-change em { color: var(--text-muted); font-style: normal; }

/* ==========================================================================
   My Add-ons (Profile Studio v2) — add-on URLs are never shown, they can
   contain private keys.
   ========================================================================== */
.ps-addons-hint { margin: 0 0 12px; font-size: 0.86rem; color: var(--text-muted); }
.ps-addons-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.08);
  font-size: 0.88rem;
}
.ps-addon-list { display: flex; flex-direction: column; gap: 10px; }
.ps-addon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.ps-addon-row.is-off { opacity: 0.55; }
.ps-addon-move { display: flex; flex-direction: column; gap: 2px; }
.ps-addon-arrow {
  width: 22px; height: 18px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: transparent; color: #cbd5e1;
  font-size: 0.72rem; cursor: pointer;
}
.ps-addon-arrow:disabled { opacity: 0.3; cursor: default; }
.ps-addon-logo {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0b0e16; border-radius: 9px; overflow: hidden;
  font-weight: 700; color: #94a3b8;
}
.ps-addon-logo img { width: 100%; height: 100%; object-fit: contain; }
.ps-addon-info { flex: 1; min-width: 0; }
.ps-addon-name { font-weight: 700; font-size: 0.96rem; }
.ps-addon-line { font-size: 0.82rem; color: var(--text-muted); }
.ps-addon-status { font-size: 0.78rem; white-space: nowrap; color: var(--text-muted); }
.ps-addon-status::before { content: '● '; }
.ps-addon-status.is-ok { color: var(--success); }
.ps-addon-status.is-slow { color: #fbbf24; }
.ps-addon-status.is-down { color: #f87171; }
.ps-addon-toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.ps-addon-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ps-addon-toggle span {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); transition: background 0.18s ease;
}
.ps-addon-toggle span::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.18s ease;
}
.ps-addon-toggle input:checked + span { background: var(--accent); }
.ps-addon-toggle input:checked + span::after { transform: translateX(18px); }
.ps-addon-menu-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  background: transparent; color: #cbd5e1; cursor: pointer;
}
.ps-addon-menu-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ps-addon-suggest { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ps-addon-suggest-row {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; text-align: left;
  background: #0b0e16; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
  color: #fff; cursor: pointer;
}
.ps-addon-suggest-row:hover { border-color: var(--accent); }
.ps-addon-suggest-row span { font-size: 0.82rem; color: var(--text-muted); }
.ps-addon-target {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  font-size: 0.92rem; cursor: pointer;
}
.ps-profile-name-sm { font-weight: 700; }

/* ---- Profile Studio: Home screen (PS-5) ---- */
.ps-home-list { display: flex; flex-direction: column; gap: 10px; }
.ps-home-list.is-hidden-list { opacity: 0.7; margin-top: 8px; }
.ps-home-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.ps-home-row.is-hidden-row { opacity: 0.55; }
.ps-home-row.is-dragging { opacity: 0.4; }
.ps-home-row.is-drop-target { border-color: var(--accent, #00f5a0); }
.ps-home-row[draggable="true"] { cursor: grab; }
.ps-home-move { display: flex; flex-direction: column; gap: 2px; width: 22px; flex-shrink: 0; }
.ps-home-main { flex: 1; min-width: 0; }
.ps-home-titleline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ps-home-title { font-weight: 700; font-size: 0.95rem; }
.ps-home-source { font-size: 0.76rem; color: var(--text-muted); }
.ps-home-rename {
  flex: 1; min-width: 140px;
  padding: 4px 8px;
  background: #0b0e16; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 7px;
  font-size: 0.9rem;
}
.ps-home-strip { display: flex; gap: 4px; margin-top: 6px; min-height: 34px; }
.ps-home-strip img {
  height: 34px; width: 58px; object-fit: cover;
  border-radius: 4px; background: #0b0e16;
}
.ps-home-strip img.is-logo { width: 34px; object-fit: contain; }
.ps-home-hidden-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 18px;
  font-size: 0.85rem; color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px;
}
.ps-home-options { margin-top: 20px; }
.ps-home-option { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.ps-home-tidy-counts { list-style: none; margin: 12px 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.ps-home-tidy-counts strong { font-size: 1.2rem; }
.ps-home-tidy-preview {
  background: #0b0e16; border-radius: 10px; padding: 10px 12px;
  font-size: 0.85rem; display: flex; flex-direction: column; gap: 4px;
}
.ps-home-tidy-line em { color: var(--text-muted); font-style: normal; font-size: 0.78rem; }
@media (max-width: 640px) {
  .ps-home-strip img { width: 44px; height: 26px; }
  .ps-home-source { width: 100%; }
}

/* A Save button with nothing to save reads as unavailable. */
.ps-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* ---- Profile Studio: Quick Setup (PS-3) ---- */
.ps-setup-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.ps-setup-card {
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.ps-setup-card.is-on { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-setup-pick {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0;
}
.ps-setup-icon { font-size: 1.5rem; }
.ps-setup-name { font-weight: 700; font-size: 1rem; }
.ps-setup-name em { font-style: normal; font-size: 0.72rem; color: var(--accent, #00f5a0); }
.ps-setup-blurb { font-size: 0.83rem; color: var(--text-muted); line-height: 1.35; }
.ps-setup-more { align-self: flex-start; font-size: 0.78rem; }
.ps-setup-details {
  margin: 4px 0 0; padding-left: 18px; font-size: 0.8rem;
  color: var(--text-muted); display: flex; flex-direction: column; gap: 3px;
}
.ps-setup-customize-toggle { display: inline-block; margin-top: 16px; }
.ps-setup-custom {
  margin-top: 10px; background: #0b0e16; border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ps-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.ps-setup-row select {
  background: #141926; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px; padding: 5px 8px; font-size: 0.85rem; max-width: 60%;
}
.ps-setup-badge-mock {
  display: flex; flex-direction: column; gap: 6px;
  background: #141926; border-radius: 10px; padding: 10px;
}
.ps-setup-mock-title { font-size: 0.8rem; color: var(--text-muted); }
.ps-setup-mock-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-setup-mock-badges em {
  font-style: normal; font-size: 0.72rem; font-weight: 700; color: #fff;
  padding: 2px 7px; border-radius: 999px;
}
.ps-setup-preview-title { margin: 6px 0 12px; font-size: 1.1rem; }
.ps-setup-changes {
  margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px;
  font-size: 0.92rem;
}

/* ---- Profile Studio: All Settings (Workstream 3) — theme picker ---- */
.ps-theme-grid {
  display: grid; gap: 10px; margin: 10px 0 14px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.ps-theme-swatch {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px; background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; color: #fff; cursor: pointer; font-size: 0.8rem;
}
.ps-theme-swatch:hover { border-color: rgba(255, 255, 255, 0.25); }
.ps-theme-swatch.is-selected { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-theme-swatch.is-locked { opacity: 0.6; cursor: pointer; }
.ps-theme-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--swatch-color, #888); border: 1px solid rgba(255, 255, 255, 0.25);
}
.ps-theme-name { font-size: 0.78rem; text-align: center; }
.ps-theme-lock { position: absolute; top: 6px; right: 8px; font-size: 0.78rem; }

/* ---- Profile Studio: Make a copy (PS-1) ---- */
.ps-copy-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.ps-copy-tile {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 12px; color: inherit; cursor: pointer; text-align: left;
}
.ps-copy-tile.is-on { border-color: var(--accent, #00f5a0); box-shadow: 0 0 0 1px var(--accent, #00f5a0) inset; }
.ps-copy-tile.is-disabled { opacity: 0.6; cursor: default; }
.ps-copy-tile-title { font-weight: 700; font-size: 0.95rem; }
.ps-copy-tile-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-copy-avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ps-copy-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-copy-name, .ps-copy-merge { margin-top: 16px; }
.ps-copy-external { margin-top: 18px; }
.ps-copy-preview {
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.ps-copy-preview-title { margin: 0 0 10px; font-size: 1rem; }
.ps-copy-part { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.ps-copy-part input { margin-top: 3px; }
.ps-copy-part-main { display: flex; flex-direction: column; }
.ps-copy-part-title { font-weight: 600; font-size: 0.92rem; }
.ps-copy-part-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-copy-part.is-risky .ps-copy-part-title { color: #fbbf24; }
.ps-copy-keywarn { margin-top: 6px; }
.ps-copy-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-copy-steps li { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; color: var(--text-muted); }
.ps-copy-steps li.is-ok { color: inherit; }
.ps-copy-steps li.is-fail { color: #f87171; }
.ps-copy-step-mark { width: 18px; text-align: center; }
.ps-copy-steps li.is-ok .ps-copy-step-mark { color: var(--success, #10b981); }

/* ---- Profile Studio: Share (PS-4) ---- */
.ps-share-choice {
  display: flex; gap: 14px; align-items: flex-start; width: 100%;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 16px; margin-top: 12px;
  color: inherit; text-align: left; cursor: pointer;
}
.ps-share-choice.is-lead { border-color: var(--accent, #00f5a0); }
.ps-share-choice:hover { background: #18202f; }
.ps-share-choice-icon { font-size: 1.7rem; line-height: 1; }
.ps-share-choice-main { display: flex; flex-direction: column; gap: 5px; }
.ps-share-choice-title { font-weight: 700; font-size: 1rem; }
.ps-share-choice-title em { font-style: normal; font-size: 0.72rem; color: var(--accent, #00f5a0); margin-left: 6px; }
.ps-share-choice-line { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.ps-share-result { margin-top: 20px; }
.ps-share-result-title { margin: 0 0 10px; font-size: 1rem; }
.ps-share-linkbox { display: flex; gap: 8px; align-items: center; }
.ps-share-linkbox input { flex: 1; min-width: 0; }
.ps-share-contents { margin-top: 16px; font-size: 0.88rem; }
.ps-share-contents h5 { margin: 14px 0 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.ps-share-contents ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.ps-share-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---- Profile Studio: My TV, inside a row ---- */
.ps-canvas-title { font-weight: 700; font-size: 1rem; }
.ps-rowfolder-list { display: flex; flex-direction: column; gap: 8px; }
.ps-rowfolder {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: #141926; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
}
.ps-rowfolder-art {
  width: 70px; height: 40px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  background: #0b0e16; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #94a3b8;
}
.ps-rowfolder-art img { width: 100%; height: 100%; object-fit: cover; }
.ps-rowfolder-main { flex: 1; min-width: 0; }
.ps-rowfolder-foot { margin-top: 20px; }
.ps-rowfolder-danger { color: #f87171; }

/* ---- Profile Studio: Artwork workbench ---- */
.ps-art-workbench-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ps-art-search {
  min-width: 180px; padding: 6px 10px; border-radius: 8px;
  background: #0b0e16; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
}
.ps-art-rowfilter {
  padding: 6px 8px; border-radius: 8px; font-size: 0.85rem;
  background: #0b0e16; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 180px;
}
.ps-art-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 10px; border-radius: 999px; font-size: 0.8rem;
  background: #0b0e16; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text-muted);
}
.ps-art-chip.is-on { border-color: var(--accent, #00f5a0); color: #fff; }
.ps-art-chip input { margin: 0; }
.ps-art-grid {
  display: grid; gap: 12px; padding: 4px 12px 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.ps-art-workbench .ps-art-card { width: auto; }
.ps-art-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.ps-art-workbench .ps-art-row-header { position: sticky; top: 0; z-index: 2; background: #0b0e16; }
.ps-art-workbench .ps-art-card-sub { text-transform: none; letter-spacing: 0; }

/* ---- "Put my picks back" bar (selection saved before a pack update) ---- */
.kap-restore-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 10050; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: min(680px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px;
  background: #141926; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
}
.kap-restore-bar button {
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #cbd5e1;
}
.kap-restore-bar .kap-restore-yes {
  background: var(--accent, #00f5a0); border-color: transparent; color: #fff;
}

/* Beta polish (2026-09): real-numbers pill, SVG hero icons, mobile title spacing */
.title-live-metrics-pill[hidden] { display: none; }
.hero-btn-icon svg,
.sub-btn-icon svg { display: block; }
@media (max-width: 600px) {
  /* Keep the eyebrow clear of the fixed theme / account buttons */
  .title-hero-stage { padding-top: 72px; }
}

/* ── Poster Stack & Preset Picture Cards (Unified Wizard & Bounty) ── */
.provider-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.provider-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.provider-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 12px;
}
.provider-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.provider-drag-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.btn-reorder {
  width: 22px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.btn-reorder:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-reorder:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: none;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.status-dot.amber,
.status-dot.needs-key {
  background: #f59e0b;
  box-shadow: none;
}
.status-dot.down {
  background: #ef4444;
  box-shadow: none;
}
.provider-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.provider-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.provider-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}
.provider-badge-primary {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.5);
  color: var(--accent-light);
}
.provider-badge-amber {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}
.provider-badge-locked {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}
.provider-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 1px;
}
.provider-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-toggle-options {
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-toggle-options:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-remove-provider {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 5px 7px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn-remove-provider:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.provider-options-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.provider-options-panel .wiz-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.wiz-add-provider-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 2px;
}
.wiz-add-provider-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wiz-add-provider-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wiz-btn-add-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.5);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wiz-btn-add-provider:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #00f5a0;
  color: #ffffff;
  box-shadow: none;
}
.add-provider-wrap {
  display: flex;
  justify-content: flex-start;
  position: relative;
  margin-top: 4px;
  margin-bottom: 12px;
}
.btn-add-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-add-provider:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #00f5a0;
  color: #fff;
}
.add-provider-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #131422;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  padding: 4px 0;
  z-index: 100;
  min-width: 170px;
}
.add-provider-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.add-provider-item:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* Preset Picture Cards */
.preset-picture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .preset-picture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.preset-picture-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.preset-picture-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.preset-picture-card.active {
  border-color: #00f5a0;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}
.preset-thumbnail {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #11131c;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.preset-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
}
.preset-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
}

/* ==========================================================================
   Profile Studio: Poster Look, Backups & Updates, update preview
   ========================================================================== */
.ps-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ps-poster-card {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
}
.ps-poster-card-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ps-poster-card-title { margin-top: 4px; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.ps-poster-card-detail { margin-top: 2px; font-size: 0.86rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.ps-poster-modes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ps-poster-url-label { display: block; margin: 6px 0 4px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.ps-backups-message { margin: 0 0 10px; font-size: 0.88rem; color: #34d399; }
.ps-backups-actions { margin: 0 0 16px; }
.ps-backups-list { display: flex; flex-direction: column; gap: 8px; }
.ps-backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.ps-backup-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-backup-label { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); overflow-wrap: anywhere; }
.ps-backup-meta { font-size: 0.78rem; color: var(--text-muted); }
.ps-backup-buttons { display: flex; gap: 6px; flex: none; }
.ps-diff-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 3, 6, 0.72);
}
.ps-diff-modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.ps-diff-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.ps-diff-head h3 { margin: 0; font-size: 1.1rem; }
.ps-diff-head .ps-close-btn { position: static; }
.ps-diff-body { padding: 6px 16px; overflow-y: auto; }
.ps-diff-actions { padding: 10px 16px 16px; margin-top: 0; justify-content: flex-end; }
.ps-diff-group { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid; }
.ps-diff-added { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.ps-diff-updated { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.07); }
.ps-diff-custom { border-color: rgba(0, 245, 160, 0.4); background: rgba(0, 245, 160, 0.07); }
.ps-diff-group-title { font-weight: 700; font-size: 0.9rem; }
.ps-diff-count { margin-left: 4px; font-weight: 600; color: var(--text-muted); }
.ps-diff-list { margin: 6px 0 0; padding-left: 18px; font-size: 0.84rem; color: var(--text-secondary); }
.ps-diff-more { list-style: none; margin-left: -18px; color: var(--text-muted); }
.ps-diff-uptodate { font-size: 0.95rem; color: #34d399; }
@media (max-width: 580px) {
  .ps-poster-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-backup-row { flex-direction: column; align-items: stretch; }
  .ps-backup-buttons { justify-content: flex-end; }
}

/* Studio line icons (replacing emoji) */
.ps-hub-icon, .ps-setup-icon, .ps-share-choice-icon { display: inline-flex; color: var(--accent, #6dfac4); }
.ps-hub-icon svg { width: 26px; height: 26px; }
.ps-setup-icon svg, .ps-share-choice-icon svg { width: 22px; height: 22px; }

/* Hover / focus explanation bubble */
.ps-tip-wrap { position: relative; display: inline-flex; }
.ps-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b0e16;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
.ps-tip-wrap:hover .ps-tip, .ps-tip-wrap:focus-within .ps-tip { opacity: 1; visibility: visible; transform: none; }

.ps-home-tidy-sub { margin: 14px 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.ps-home-tidy-line.is-hiding { opacity: 0.75; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* Update preview group markers */
.ps-diff-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.ps-diff-added .ps-diff-dot { background: #34d399; }
.ps-diff-updated .ps-diff-dot { background: #fbbf24; }
.ps-diff-custom .ps-diff-dot { background: #00f5a0; }

/* ==========================================================================
   Profile Studio: poster editor
   ========================================================================== */
.ps-pe { display: flex; flex-direction: column; gap: 16px; }
.ps-pe-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.ps-pe-now {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  min-width: 0;
}
.ps-pe-now-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ps-pe-now-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.ps-pe-now-detail { font-size: 0.86rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.ps-pe-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-pe-save-state { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }
.ps-pe-save-state.is-dirty { color: #fbbf24; }
.ps-pe-problems { margin: 0; font-size: 0.86rem; color: #fbbf24; }
.ps-pe-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.ps-pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ps-pe-controls { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ps-pe-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.ps-pe-section { display: flex; flex-direction: column; gap: 10px; }
.ps-pe-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.ps-pe-sub { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-muted); }
.ps-pe-note { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--text-secondary); }
.ps-pe-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ps-pe-provider { border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border-hover); }
.ps-pe-provider.is-first { border-color: var(--accent); }
.ps-pe-provider.is-net { background: transparent; border-style: dashed; }
.ps-pe-provider-main { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.ps-pe-rank { font-family: ui-monospace, monospace; font-size: 0.8rem; color: var(--text-muted); width: 20px; flex: none; }
.ps-pe-provider.is-first .ps-pe-rank { color: var(--accent-light); }
.ps-pe-provider-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ps-pe-provider-name { font-weight: 700; font-size: 0.93rem; color: var(--text-primary); }
.ps-pe-provider-line { font-size: 0.8rem; color: var(--text-muted); }
.ps-pe-status { font-size: 0.75rem; font-weight: 700; flex: none; }
.ps-pe-status.is-ok { color: #34d399; }
.ps-pe-status.is-warn { color: #fbbf24; }
.ps-pe-provider-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.ps-pe-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border-hover); background: transparent;
  color: var(--text-secondary); font-size: 1rem; cursor: pointer;
}
.ps-pe-icon-btn:hover:not(:disabled) { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.25); }
.ps-pe-icon-btn:disabled { opacity: 0.3; cursor: default; }
.ps-pe-provider-options { padding: 0 12px 12px 44px; }
.ps-pe-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pe-chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.22); background: transparent;
  color: var(--text-secondary); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.ps-pe-chip:hover { color: var(--text-primary); border-color: var(--accent); }
.ps-pe-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ps-pe-preset {
  display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--border-hover); background: var(--bg-elevated);
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.ps-pe-preset.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ps-pe-preset-name { font-weight: 700; font-size: 0.88rem; }
.ps-pe-preset-line { font-size: 0.76rem; color: var(--text-muted); line-height: 1.35; }
.ps-pe-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pe-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border-hover); background: var(--bg-elevated);
  font-size: 0.85rem; color: var(--text-secondary); cursor: pointer;
}
.ps-pe-toggle:has(input:checked) { color: var(--text-primary); border-color: var(--accent); background: var(--accent-subtle); }
.ps-pe-toggle input { accent-color: var(--accent); }
.ps-pe-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); }
.ps-pe-field span { font-weight: 400; color: var(--text-muted); }
.ps-pe-field-inline { flex-direction: row; align-items: center; gap: 10px; }
.ps-pe-field-inline .ps-input { width: auto; }
.ps-pe-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ps-pe-poster { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ps-pe-poster img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px;
  background: var(--bg-elevated); border: 1px solid var(--border-hover); display: block;
}
.ps-pe-poster figcaption { font-size: 0.72rem; color: var(--text-muted); text-align: center; line-height: 1.3; }
.ps-pe-poster.is-broken img { opacity: 0.25; }
.ps-pe-poster.is-broken figcaption::after { content: ' (no poster)'; color: #fbbf24; }
@media (max-width: 900px) {
  .ps-pe-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-pe-side { position: static; order: -1; }
  .ps-pe-provider-main { flex-wrap: wrap; row-gap: 8px; }
  .ps-pe-provider-text { flex-basis: calc(100% - 100px); }
  .ps-pe-provider-actions { width: 100%; justify-content: flex-end; }
  .ps-pe-provider-options { padding-left: 12px; }
}

/* Poster chain: the Bounty editor embedded in the Studio. */
.ps-pe-frame { display: block; flex-shrink: 0; width: 100%; border: 0; border-radius: 14px; background: #0a0a12; }
.ps-pe-custom { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ps-pe-problems:empty { display: none; }
@media (max-width: 900px) { .ps-pe-custom { grid-template-columns: minmax(0, 1fr); } }
/* Keep "Save poster look" in reach while scrolling through the editor. */
.ps-pe-top { position: sticky; top: 0; z-index: 5; padding: 10px 0; margin-top: -10px; background: var(--bg-drawer); }



/* ==============================================================================
   OBSIDIAN & MINT BASE ENHANCEMENTS (Login, Inputs, Modals & Fullpage)
   ============================================================================== */
.ps-overlay.ps-fullpage {
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--ps-obsidian-base, #08090d) !important;
}

.ps-fullpage #profile-studio-panel,
.ps-fullpage .ps-panel {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--ps-obsidian-base, #08090d) !important;
}

.ps-login-body {
  max-width: 460px !important;
  margin: 40px auto !important;
  width: 100% !important;
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 16px !important;
  padding: 32px !important;
  box-shadow: var(--ps-elevation-shadow, 0 8px 30px -4px rgba(0, 0, 0, 0.7)) !important;
}

.ps-header {
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border-bottom: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
}

.ps-badge {
  background: rgba(0, 245, 160, 0.12) !important;
  color: #00f5a0 !important;
  border: 1px solid rgba(0, 245, 160, 0.3) !important;
}

.ps-title {
  color: #f8fafc !important;
}

.ps-subtitle {
  color: #94a3b8 !important;
}

.ps-input {
  background: #08090d !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
}

.ps-input:focus {
  border-color: #00f5a0 !important;
  outline: 2px solid #00f5a0 !important;
  outline-offset: 1px !important;
  box-shadow: none !important;
}

.ps-btn-primary {
  background: linear-gradient(135deg, #00f5a0 0%, #10b981 100%) !important;
  color: #08090d !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-btn-primary:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
  transform: translateY(-1px) !important;
}

.ps-privacy-box {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
}

.ps-privacy-box svg {
  color: #00f5a0 !important;
}

.ps-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.ps-profile-card {
  background: var(--ps-obsidian-surface, #0e1118) !important;
  border: 1px solid var(--ps-glass-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-profile-card:hover,
.ps-profile-card:focus-visible {
  border-color: #00f5a0 !important;
  background: var(--ps-obsidian-card, #151923) !important;
  box-shadow: var(--ps-elevation-hover, 0 12px 32px -4px rgba(0, 0, 0, 0.85)) !important;
}

.ps-loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  gap: 16px;
}

.ps-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 245, 160, 0.15);
  border-top-color: #00f5a0;
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}

@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

.ps-loading-text {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}


/* ==============================================================================
   1. LUXURY GLASS HEADER & NAVIGATION
   ============================================================================== */
.ps-luxury-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 24px !important;
  background: var(--ps-glass-bg) !important;
  border-bottom: 1px solid var(--ps-glass-border) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 100 !important;
  position: relative !important;
  gap: 16px !important;
}

.ps-header-left-col {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.ps-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #00f5a0;
  text-transform: uppercase;
}

.ps-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-profile-chip:hover {
  background: var(--ps-surface-card-hover);
  border-color: var(--ps-glass-border-hover);
}

.ps-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}
.ps-chip-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ps-chip-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
}

/* 4 Core Workspace Tabs */
.ps-nav-workspaces {
  display: flex !important;
  align-items: center !important;
  background: rgba(8, 9, 13, 0.7) !important;
  border: 1px solid var(--ps-glass-border) !important;
  border-radius: 14px !important;
  padding: 4px !important;
  gap: 4px !important;
}

.ps-ws-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  white-space: nowrap !important;
}

.ps-ws-tab:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.ps-ws-tab.active {
  background: rgba(0, 245, 160, 0.15) !important;
  color: #00f5a0 !important;
  border: 1px solid rgba(0, 245, 160, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.ps-ws-tab svg {
  width: 16px;
  height: 16px;
}

/* Header Right - Clean spacing so close button NEVER collides */
.ps-header-right-col {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.ps-header-action-btn {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ps-header-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  border: 1px solid var(--ps-glass-border) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #94a3b8 !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: static !important; /* Fix overlapping bug */
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.ps-header-close:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

/* ==============================================================================
   2. WORKSPACE 1: TV CONTENT STUDIO (LIVE MOCKUP & LIST ORGANIZER)
   ============================================================================== */
.ps-content-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Top Sub-Bar: Update Banner & View Toggles */
.ps-content-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(12, 14, 22, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 16px;
  flex-wrap: wrap;
}

.ps-update-banner-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  font-size: 0.8rem;
  color: #fde68a;
}

.ps-update-btn-action {
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ps-update-btn-action:hover {
  background: #fbbf24;
}

.ps-view-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ps-glass-border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.ps-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-view-toggle-btn.active {
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.35);
}

/* ==============================================================================
   LIVE TV MOCKUP STAGE
   ============================================================================== */
.ps-tv-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 32px 0;
  position: relative;
}

/* Hero Showcase */
.ps-tv-hero {
  position: relative;
  min-height: 260px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 40px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ps-tv-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  transition: background-image 0.5s ease-in-out;
  opacity: 0.45;
  filter: blur(2px);
}

.ps-tv-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #08090d 0%, rgba(8, 9, 13, 0.7) 50%, rgba(8, 9, 13, 0.2) 100%);
}

.ps-tv-hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-tv-hero-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #00f5a0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ps-tv-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
}
.ps-tv-hero-logo {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.8));
}

.ps-tv-hero-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TV Rows & Horizontal Rail */
.ps-tv-rows-rail {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 32px;
}

.ps-tv-row-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-tv-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 12px;
}

.ps-tv-row-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-tv-row-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  margin: 0;
}

.ps-tv-row-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-weight: 600;
}

.ps-tv-cards-scroll {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.ps-tv-folder-card {
  position: relative;
  flex: 0 0 220px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps-tv-folder-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 160, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
}

.ps-tv-folder-card.is-active-focus {
  border-color: #00f5a0;
  box-shadow: none;
}

.ps-tv-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.ps-tv-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 11, 18, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
}

.ps-tv-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.ps-tv-card-restyle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 17, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(8px);
}
.ps-tv-folder-card:hover .ps-tv-card-restyle-btn {
  opacity: 1;
}

/* ==============================================================================
   3. WORKSPACE 2: VISUALS & POSTERS
   ============================================================================== */
.ps-visual-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 48px;
  gap: 28px;
}

.ps-visual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ==============================================================================
   4. WORKSPACE 3: ENGINE, SCRAPERS & CLOUD
   ============================================================================== */
.ps-engine-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 48px;
  gap: 24px;
}

.ps-engine-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ps-glass-border);
  padding-bottom: 12px;
}

.ps-engine-subtab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-engine-subtab.active {
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.35);
  color: #00f5a0;
}

/* Scraper Quick Setup Card */
.ps-scraper-banner-box {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ps-scraper-banner-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}
.ps-scraper-banner-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.ps-btn-scraper-launch {
  background: linear-gradient(135deg, #00f5a0 0%, #059669 100%);
  color: #08090d;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
  white-space: nowrap;
}
.ps-btn-scraper-launch:hover {
  transform: translateY(-2px);
}

/* ==============================================================================
   5. UNIFIED BOTTOM STAGING BAR & REVIEW MODAL
   ============================================================================== */
.ps-luxury-bottom-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 28px !important;
  background: var(--ps-glass-bg) !important;
  border-top: 1px solid var(--ps-glass-border) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 90 !important;
}

.ps-staged-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ps-stage-pill-add {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}
.ps-stage-pill-art {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: #00f5a0;
}
.ps-stage-pill-set {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}
.ps-stage-pill-clean {
  color: #64748b;
  font-size: 0.8rem;
}

.ps-bottom-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-btn-discard {
  background: transparent;
  border: 1px solid var(--ps-glass-border);
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-btn-discard:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.ps-btn-push-primary {
  background: linear-gradient(135deg, #00f5a0 0%, #059669 100%);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: #08090d;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-btn-push-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.ps-btn-push-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==============================================================================
   6. RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================================================== */
@media (max-width: 768px) {
  .ps-luxury-header {
    padding: 10px 14px !important;
    flex-wrap: wrap;
    gap: 10px !important;
  }
  .ps-header-left-col {
    order: 1;
  }
  .ps-header-right-col {
    order: 2;
  }
  .ps-nav-workspaces {
    order: 3;
    width: 100% !important;
    justify-content: space-around !important;
  }
  .ps-ws-tab {
    padding: 7px 10px !important;
    font-size: 0.76rem !important;
  }
  .ps-content-subbar {
    padding: 8px 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .ps-tv-hero {
    padding: 20px 16px;
    min-height: 200px;
  }
  .ps-tv-hero-title {
    font-size: 1.35rem;
  }
  .ps-tv-rows-rail {
    padding: 16px 14px;
    gap: 20px;
  }
  .ps-tv-folder-card {
    flex: 0 0 160px;
  }
}

/* Overlap Prevention for all legacy and unified headers */
.ps-header {
  position: relative !important;
  padding-right: 64px !important;
}

.ps-header .ps-close-btn {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--ps-glass-border) !important;
  color: #94a3b8 !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

.ps-header .ps-close-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.ps-header-unified .ps-header-right {
  margin-right: 16px !important;
}

@media (max-width: 640px) {
  .ps-header {
    padding-right: 52px !important;
  }
  .ps-header .ps-close-btn {
    top: 12px !important;
    right: 12px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 1.1rem !important;
  }
}

/* ==============================================================================
   7. SCRAPER QUICK-SETUP & THEME PRESETS MODAL STYLES
   ============================================================================== */
.ps-scraper-modal {
  max-width: 680px !important;
  width: 95vw !important;
  border-radius: 18px !important;
  background: rgba(14, 17, 24, 0.96) !important;
  backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85) !important;
}

.ps-scraper-modal-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.35);
  color: #00f5a0;
  flex-shrink: 0;
}

.ps-scraper-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ps-provider-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ps-provider-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 245, 160, 0.35);
}

.ps-provider-card.is-active,
.ps-provider-card:has(input[type="radio"]:checked) {
  background: rgba(0, 245, 160, 0.1);
  border-color: rgba(0, 245, 160, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ps-provider-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: #00f5a0;
}

.ps-provider-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ps-provider-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.ps-provider-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  font-weight: 700;
  text-transform: uppercase;
}

.ps-provider-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

.ps-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ps-link-ext {
  color: #00f5a0;
  font-size: 0.76rem;
  text-decoration: none;
  font-weight: 600;
}
.ps-link-ext:hover {
  text-decoration: underline;
  color: #10b981;
}

.ps-scraper-inclusions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.ps-inclusions-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.ps-inclusion-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease;
}
.ps-inclusion-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ps-inclusion-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #00f5a0;
}

.ps-inclusion-item strong {
  display: block;
  font-size: 0.86rem;
  color: #ffffff;
}

.ps-inclusion-item span {
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Theme Presets Grid */
.ps-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ps-theme-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 14px;
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-theme-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 160, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.ps-theme-preview {
  height: 90px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ps-theme-glow .ps-theme-preview {
  background: radial-gradient(circle at 50% 50%, #00f5a0 0%, #08090d 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 245, 160, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.ps-theme-minimal .ps-theme-preview {
  background: #0f172a;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.ps-theme-obsidian .ps-theme-preview {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(12px);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ps-theme-gold .ps-theme-preview {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, #1c1917 100%);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ps-theme-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.ps-theme-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0 0 16px 0;
  flex: 1;
}

.ps-btn-theme-apply {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ps-glass-border);
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-btn-theme-apply:hover {
  background: rgba(0, 245, 160, 0.2);
  border-color: rgba(0, 245, 160, 0.5);
  color: #ffffff;
}

/* Staging Review Modal */
.ps-review-modal {
  max-width: 620px !important;
  width: 95vw !important;
  border-radius: 18px !important;
  background: rgba(14, 17, 24, 0.96) !important;
  backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85) !important;
}

.ps-review-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.ps-review-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00f5a0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ps-review-card {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-review-card-text strong {
  display: block;
  font-size: 0.88rem;
  color: #f8fafc;
}
.ps-review-card-text span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ps-review-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
}
.ps-review-badge-staged {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* ==============================================================================
   7. UNIVERSAL ECOSYSTEM HEADER & PERMANENT BRAND NAVIGATION
   ============================================================================== */
.title-screen-overlay {
  padding-top: 64px !important;
  box-sizing: border-box !important;
}

.title-theme-toggle {
  display: none !important;
}

.kap-global-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 25000 !important;
  width: 100% !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  background: rgba(7, 10, 19, 0.95) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55) !important;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.kap-global-header.is-scrolled {
  background: rgba(5, 7, 14, 0.98) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.8) !important;
}

/* Also apply unified header specs to Studio internal header */
.ps-header.ps-header-unified {
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  background: rgba(7, 10, 19, 0.95) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 25000 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55) !important;
}

.kap-header-left,
.ps-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  z-index: 2 !important;
}

/* Mathematically absolute-centered horizontally and vertically on the page */
.kap-header-center,
.ps-header-center {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

.kap-header-right,
.ps-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  z-index: 2 !important;
}

/* Authored Left Hamburger Menu Button */
.kap-hamburger-btn,
.ps-header-hamburger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  user-select: none !important;
  line-height: 1 !important;
}
.kap-hamburger-btn:hover,
.ps-header-hamburger:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.kap-hamburger-btn:active,
.ps-header-hamburger:active {
  transform: scale(0.96) !important;
}

/* Symmetrical Brand Cockpit & Magnification Dock Container */
.kap-header-center-cockpit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  height: 100% !important;
  position: relative !important;
  padding: 0 !important;
}

.kap-tool-branch {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  height: 100% !important;
}

/* Interactive Magnification Dock Physics Item */
.kap-dock-item {
  transform-origin: center center !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease !important;
  will-change: transform !important;
}

/* Clean, Low-Profile Text Navigation Links (No bulky pill containers) */
.kap-nav-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  height: 100% !important;
  padding: 0 10px !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  user-select: none !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  transition: color 0.18s ease, text-shadow 0.18s ease !important;
}

.kap-nav-text {
  display: inline-block !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.kap-nav-link:hover,
.kap-nav-link.is-magnified {
  color: #ffffff !important;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.45) !important;
}

.kap-nav-link.is-active {
  color: #ffffff !important;
  font-weight: 750 !important;
}

/* Modern, Professional Underline Indicator */
.kap-nav-underline {
  position: absolute !important;
  bottom: 0 !important;
  left: 6px !important;
  right: 6px !important;
  height: 2.5px !important;
  background: #00f5a0 !important;
  border-radius: 999px !important;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.8), 0 0 18px rgba(0, 245, 160, 0.4) !important;
  pointer-events: none !important;
  animation: kap-underline-fade 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes kap-underline-fade {
  from { opacity: 0; transform: scaleX(0.5); }
  to { opacity: 1; transform: scaleX(1); }
}

.kap-nav-link:not(.is-active):hover::after {
  content: "" !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 10px !important;
  right: 10px !important;
  height: 2px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 999px !important;
}

/* Center Crown Hub: Kaptain Galleon Ship + "Kaptain's Tools" Anchor */
.kap-center-brand-hub {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
}

.kap-center-hub-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 34px !important;
  padding: 0 14px 0 9px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  color: #f8fafc !important;
  font-family: inherit !important;
  user-select: none !important;
  line-height: 1 !important;
}
.kap-center-hub-btn:hover,
.kap-center-hub-btn.is-open {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(0, 245, 160, 0.6) !important;
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.3), 0 0 8px rgba(0, 245, 160, 0.15) !important;
  color: #ffffff !important;
}

.kap-logo-crest {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.kap-center-ship-logo {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 0 8px rgba(0, 245, 160, 0.75)) drop-shadow(0 0 3px rgba(0, 245, 160, 0.5)) !important;
  transition: transform 0.2s ease, filter 0.2s ease !important;
}
.kap-center-hub-btn:hover .kap-center-ship-logo,
.kap-center-hub-btn.is-open .kap-center-ship-logo {
  transform: scale(1.08) !important;
  filter: drop-shadow(0 0 12px rgba(0, 245, 160, 0.95)) drop-shadow(0 0 6px rgba(0, 245, 160, 0.7)) !important;
}

.kap-center-tools-label {
  font-size: 0.8rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.04em !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  display: inline-block !important;
}

/* ==============================================================================
   SUBHEADER BAR (Dedicated Workflow Strip for Profile Studio & Sub-Navigation)
   Layered behind the top universal header with drop shadows & centered controls
   ============================================================================== */
.ps-subheader {
  position: sticky !important;
  top: 56px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
  background: rgba(8, 12, 22, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  z-index: 24000 !important;
  transition: background 0.2s ease, border-color 0.2s ease !important;
}

.ps-subheader-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
}

.ps-subheader-center {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  z-index: 5 !important;
  pointer-events: auto !important;
}

.ps-subheader-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

/* Subheader Centered Controls Typography & Clusters */
.ps-subnav-center-cluster {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  user-select: none !important;
}

.ps-subnav-badge {
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #00f5a0 !important;
}

.ps-subnav-sub {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #e2e8f0 !important;
}

.ps-close-btn.ps-subheader-close {
  position: relative !important;
  transform: none !important;
  margin-left: 4px !important;
}

/* Center Dropdown Menu */
.ps-ecosystem-menu.kap-center-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 330px !important;
  background: rgba(11, 15, 24, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 245, 160, 0.15) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  padding: 10px !important;
  z-index: 26000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  animation: ps-menu-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.ps-ecosystem-menu.kap-center-dropdown[hidden] {
  display: none !important;
}

.ps-ecosystem-menu-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 6px 10px 8px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 4px !important;
}
.ps-menu-eyebrow {
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
}
.ps-menu-version {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #00f5a0 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

.ps-ecosystem-items {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ps-ecosystem-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
}
.ps-ecosystem-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.ps-ecosystem-item.active {
  background: rgba(0, 245, 160, 0.08) !important;
  border-color: rgba(0, 245, 160, 0.25) !important;
}

.ps-eco-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #00f5a0 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}
.ps-ecosystem-item.active .ps-eco-icon {
  background: rgba(0, 245, 160, 0.18) !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.25) !important;
}

.ps-eco-info {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}
.ps-eco-info-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.ps-eco-info strong {
  font-size: 0.84rem !important;
  color: #f8fafc !important;
  font-weight: 700 !important;
}
.ps-eco-info span {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
  margin-top: 2px !important;
}
.ps-eco-current {
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
  color: #00f5a0 !important;
  background: rgba(0, 245, 160, 0.15) !important;
  border: 1px solid rgba(0, 245, 160, 0.3) !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
}
.ps-eco-tag {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
}

/* User Profile & Auth Zone (Far Right) */
.kap-header-auth-zone {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.kap-auth-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  font-family: inherit !important;
  line-height: 1 !important;
}
.kap-auth-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  color: #00f5a0 !important;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.18) !important;
}
.kap-auth-btn.is-logged-in {
  padding: 0 10px 0 5px !important;
  gap: 7px !important;
}

.kap-auth-avatar-pip {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #00f5a0, #00f5a0) !important;
  color: #050b14 !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 8px rgba(0, 245, 160, 0.4) !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.kap-auth-username {
  max-width: 90px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  color: #e2e8f0 !important;
  line-height: 1 !important;
}

.kap-auth-chevron {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  line-height: 1 !important;
  margin-top: -1px !important;
}

.kap-auth-profile-icon {
  color: #cbd5e1 !important;
  stroke: currentColor !important;
  flex-shrink: 0 !important;
}

/* Profile card (account menu): ringed avatar, identity, 3 stats, tags, two
   actions, then the menu list. Obsidian glass; bottom sheet on phones. */
.kap-auth-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 360px !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 90px) !important;
  overflow-y: auto !important;
  background: rgba(11, 15, 24, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  padding: 20px 16px 12px !important;
  z-index: 26000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  animation: ps-menu-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.kap-auth-menu[hidden] { display: none !important; }

.kpc-identity { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.kpc-avatar {
  position: relative;
  width: 64px; height: 64px;
  margin-bottom: 8px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent, #00f5a0);
  color: var(--on-accent, #04130d);
  font: 800 1.5rem/1 Outfit, Inter, sans-serif;
  box-shadow: 0 0 0 3px #0b0f18, 0 0 0 5px var(--accent, #00f5a0);
}
.kpc-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.kpc-verified, .kpc-supporter {
  position: absolute; bottom: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #0b0f18;
}
.kpc-verified { right: -4px; background: var(--accent, #00f5a0); color: var(--on-accent, #04130d); }
.kpc-supporter { left: -4px; background: #d4af37; color: #1a1400; }
.kpc-verified svg, .kpc-supporter svg { width: 12px; height: 12px; stroke-width: 3; }
.kpc-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 700; color: #f8fafc; }
.kpc-role { font-size: 0.8rem; color: #94a3b8; }

.kpc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.kpc-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kpc-stats > div + div { border-left: 1px solid rgba(255, 255, 255, 0.08); }
.kpc-stats dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.kpc-stats dd { margin: 0; font-size: 1.15rem; font-weight: 700; color: #f8fafc; font-variant-numeric: tabular-nums; }

.kpc-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kpc-tag { padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; color: #cbd5e1; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }

.kpc-actions { display: flex; flex-direction: column; gap: 8px; }
.kpc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  font: 600 0.9rem Inter, sans-serif; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.kpc-btn[hidden] { display: none; }
.kpc-btn-primary { background: var(--accent, #00f5a0); color: var(--on-accent, #04130d); border-color: transparent; }
.kpc-btn-primary:hover { background: #33f7b4; }
.kpc-btn-secondary { background: transparent; color: #f8fafc; }
.kpc-btn-secondary:hover { border-color: rgba(0, 245, 160, 0.4); }
.kpc-btn:focus-visible, .kap-auth-menu-item:focus-visible { outline: 2px solid var(--accent, #00f5a0); outline-offset: 2px; }

.kpc-menu { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.kap-auth-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 44px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #cbd5e1 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  font-family: inherit !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}
.kap-auth-menu-item:hover { background: rgba(255, 255, 255, 0.06) !important; color: #ffffff !important; }
.kap-auth-menu-item svg { stroke: currentColor !important; flex-shrink: 0 !important; }

@media (max-width: 480px) {
  .kap-auth-menu {
    position: fixed !important;
    top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; max-width: none !important;
    max-height: 85vh !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 20px 16px calc(12px + env(safe-area-inset-bottom)) !important;
  }
}
@media (prefers-reduced-motion: reduce) { .kap-auth-menu { animation: none !important; } }
.kap-auth-action-logout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

/* Sliding Navigation Sidebar Drawer & Backdrop */
.kap-sidebar-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 29999 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.kap-sidebar-backdrop.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.kap-sidebar-backdrop[hidden] {
  display: none !important;
}

.kap-sidebar-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: min(88vw, 360px) !important;
  background: rgba(10, 14, 24, 0.98) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 24px 0 80px rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  z-index: 30000 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.kap-sidebar-drawer.is-open {
  transform: translateX(0) !important;
}
.kap-sidebar-drawer[hidden] {
  display: none !important;
}

.kap-sidebar-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.kap-sidebar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.kap-sidebar-logo {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 14px rgba(0, 245, 160, 0.6)) !important;
}

.kap-sidebar-brand-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.2 !important;
}

.kap-sidebar-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

.kap-sidebar-sub {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

.kap-sidebar-close-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  font-size: 1.3rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.kap-sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.kap-sidebar-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.kap-sidebar-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.kap-sidebar-section-title {
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  margin-bottom: 4px !important;
}

.kap-sidebar-nav-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.kap-sidebar-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  text-decoration: none !important;
  color: #f8fafc !important;
  transition: all 0.2s ease !important;
}
.kap-sidebar-item:hover {
  background: rgba(0, 245, 160, 0.08) !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
  color: #00f5a0 !important;
  transform: translateX(3px) !important;
}

.kap-sidebar-item-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #00f5a0 !important;
  flex-shrink: 0 !important;
}

.kap-sidebar-item-info {
  display: flex !important;
  flex-direction: column !important;
}
.kap-sidebar-item-info strong {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}
.kap-sidebar-item-info span {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
}

.kap-sidebar-action-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-family: inherit !important;
}
.kap-sidebar-action-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
  color: #00f5a0 !important;
}

.kap-theme-switcher {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 6px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  padding: 4px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.kap-theme-btn {
  padding: 7px 4px !important;
  border-radius: 7px !important;
  background: transparent !important;
  border: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
}
.kap-theme-btn:hover {
  color: #ffffff !important;
}
.kap-theme-btn.is-active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #00f5a0 !important;
  font-weight: 700 !important;
}

.kap-sidebar-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.kap-sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}
.kap-sidebar-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.kap-sidebar-link-kofi:hover {
  color: #f59e0b !important;
}

.kap-sidebar-footer {
  padding: 14px 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 0.72rem !important;
  color: #64748b !important;
  text-align: center !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

/* Ensure close button in unified headers flows inline without overlapping right buttons */
.ps-header-unified .ps-close-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .kap-branch-pill .kap-pill-title {
    display: none !important;
  }
  .kap-branch-pill {
    padding: 0 9px !important;
    width: 32px !important;
    height: 32px !important;
    justify-content: center !important;
  }
}

@media (max-width: 720px) {
  .kap-tool-branch {
    display: none !important;
  }
  .kap-global-header {
    padding: 0 14px !important;
    height: 56px !important;
  }
  .ps-subheader {
    padding: 0 12px !important;
    height: 46px !important;
  }
  .ps-subheader-center {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .ps-header.ps-header-unified {
    padding: 0 12px !important;
    height: 56px !important;
    gap: 8px !important;
  }
  .ps-subheader-left {
    gap: 6px !important;
  }
  .ps-subheader-right {
    gap: 6px !important;
  }
  .ps-subheader .ps-header-profile-badge .ps-profile-label {
    display: none !important;
  }
  .kap-center-hub-btn {
    height: 34px !important;
    padding: 0 10px 0 6px !important;
    gap: 6px !important;
  }
  .kap-center-tools-label {
    display: none !important;
  }
  .kap-center-ship-logo {
    width: 24px !important;
    height: 24px !important;
  }
  .kap-auth-email,
  .kap-auth-label,
  .kap-auth-username,
  .kap-auth-chevron {
    display: none !important;
  }
  .kap-auth-btn {
    padding: 0 !important;
    width: 34px !important;
    height: 34px !important;
    justify-content: center !important;
  }
  .kap-auth-btn span:last-child {
    display: none !important;
  }
  .ps-btn-ghost.ps-btn-sm {
    padding: 0 8px !important;
    font-size: 0.78rem !important;
  }
  .ps-btn-primary.ps-btn-sm {
    padding: 0 10px !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 480px) {
  .kap-global-header {
    padding: 0 10px !important;
    height: 54px !important;
  }
  .kap-auth-email {
    display: none !important;
  }
  .kap-auth-btn {
    padding: 0 8px !important;
  }
}

/* ==============================================================================
   8. EXPANDED VISUALS & POSTERS WORKSPACE
   ============================================================================== */
.ps-visual-workspace {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px;
  box-sizing: border-box;
}

.ps-vis-section {
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  border-radius: 16px;
  padding: 24px;
}

.ps-vis-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.ps-vis-sec-title {
  margin: 0 0 4px 0;
  font-size: 1.18rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ps-vis-sec-sub {
  margin: 0;
  font-size: 0.84rem;
  color: #94a3b8;
  max-width: 680px;
  line-height: 1.45;
}

.ps-pe-frame-wrap {
  width: 100%;
  max-width: 960px;
  margin: 16px auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ps-glass-border);
  background: #090a10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-pe-default-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  margin: 16px 0;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
}

.ps-pe-default-icon {
  font-size: 2rem;
  color: #10b981;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.ps-pe-default-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.ps-pe-default-info p {
  margin: 0 0 8px 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.ps-pe-default-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6ee7b7;
  letter-spacing: 0.04em;
}

/* Nuvio Visual Settings Grid */
.ps-vis-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ps-vis-card {
  background: rgba(10, 11, 18, 0.55);
  border: 1px solid var(--ps-glass-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ps-vis-card:hover {
  background: rgba(20, 23, 36, 0.7);
  border-color: var(--ps-glass-border-hover);
}

.ps-vis-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ps-vis-card-icon {
  font-size: 1.35rem;
}

.ps-vis-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  background: rgba(0, 245, 160, 0.12);
  color: #00f5a0;
  border-radius: 6px;
  border: 1px solid rgba(0, 245, 160, 0.25);
}

.ps-vis-card-title {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 700;
}

.ps-vis-card-desc {
  margin: 0 0 12px 0;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  flex: 1;
}

.ps-vis-select {
  width: 100%;
  padding: 8px 12px;
  background: #111422;
  color: #ffffff;
  border: 1px solid var(--ps-glass-border);
  border-radius: 8px;
  font-size: 0.82rem;
  margin-top: auto;
}

.ps-vis-theme-bar {
  background: rgba(10, 11, 18, 0.4);
  border: 1px solid var(--ps-glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-vis-theme-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==============================================================================
   9. PHASE 3: DUAL-MODE TV WORKSPACE & SLIDE-OUT DRAWER
   ============================================================================== */
/* Simple Non-Visual List Editor */
.ps-simple-list-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 32px 48px;
}

.ps-simple-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.ps-simple-list-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.ps-simple-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ps-simple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 16px;
}
.ps-simple-row:hover {
  background: var(--ps-surface-card-hover);
  border-color: var(--ps-glass-border-hover);
}
.ps-simple-row.is-hidden-row {
  opacity: 0.6;
  background: rgba(14, 17, 24, 0.4);
}

.ps-simple-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.ps-simple-drag-handle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  cursor: grab;
  color: #64748b;
  padding: 4px;
  user-select: none;
}
.ps-simple-drag-handle:hover {
  color: #00f5a0;
}
.ps-simple-drag-handle span {
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.ps-simple-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ps-simple-row-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-simple-row-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-simple-row-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(0, 245, 160, 0.12);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.25);
  white-space: nowrap;
}

.ps-simple-row-source {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.ps-simple-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ps-simple-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--ps-glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-simple-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ps-glass-border-hover);
}
.ps-simple-action-btn.btn-delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Slide-out Drawer (.ps-drawer-modal) */
.ps-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  animation: ps-drawer-fade 0.2s ease;
}

.ps-drawer-panel {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: #0e1118;
  border-left: 1px solid var(--ps-glass-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  animation: ps-drawer-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes ps-drawer-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ps-drawer-slide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.ps-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ps-glass-border);
  background: rgba(14, 17, 24, 0.95);
}

.ps-drawer-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.ps-drawer-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ps-glass-border);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ps-drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.ps-drawer-search-wrap {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ps-drawer-search-input {
  width: 100%;
  padding: 10px 14px;
  background: #151923;
  border: 1px solid var(--ps-glass-border);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.ps-drawer-search-input:focus {
  border-color: #00f5a0;
}

.ps-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-drawer-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(21, 25, 35, 0.6);
  border: 1px solid var(--ps-glass-border);
  border-radius: 12px;
  gap: 12px;
  transition: all 0.2s ease;
}
.ps-drawer-item-card:hover {
  background: rgba(28, 33, 46, 0.85);
  border-color: var(--ps-glass-border-hover);
}

.ps-drawer-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #151923;
  flex-shrink: 0;
}

.ps-drawer-item-info {
  flex: 1;
  min-width: 0;
}

.ps-drawer-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-drawer-item-meta {
  font-size: 0.76rem;
  color: #94a3b8;
  margin: 0;
}

.ps-drawer-add-btn {
  padding: 6px 14px;
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.35);
  color: #00f5a0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ps-drawer-add-btn:hover {
  background: #00f5a0;
  color: #08090d;
}

/* ==============================================================================
   10. PHASE 4: 3-TIER STREAMING PROFILES & POWER USER ENGINE
   ============================================================================== */
.ps-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ps-tier-card {
  position: relative;
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.ps-tier-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 160, 0.35);
  box-shadow: var(--ps-elevation-shadow);
}
.ps-tier-card.is-active-tier {
  border-color: #00f5a0;
  background: rgba(0, 245, 160, 0.06);
  border-color: #00f5a0;
}

.ps-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ps-tier-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.ps-tier-active-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #00f5a0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ps-tier-title {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.ps-tier-desc {
  margin: 0 0 16px 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  flex: 1;
}

.ps-tier-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: rgba(8, 9, 13, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ps-tier-spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
}
.ps-tier-spec-item svg {
  width: 14px;
  height: 14px;
  color: #00f5a0;
  flex-shrink: 0;
}

.ps-tier-select-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid var(--ps-glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ps-tier-card.is-active-tier .ps-tier-select-btn {
  background: #00f5a0;
  border-color: #00f5a0;
  color: #08090d;
}
.ps-tier-card:hover:not(.is-active-tier) .ps-tier-select-btn {
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.4);
  color: #00f5a0;
}

/* Power User Engine Accordion */
.ps-power-engine-details {
  background: var(--ps-surface-card);
  border: 1px solid var(--ps-glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.ps-power-engine-details[open] {
  border-color: rgba(0, 245, 160, 0.35);
}

.ps-power-engine-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(21, 25, 35, 0.5);
  transition: background 0.15s ease;
}
.ps-power-engine-summary:hover {
  background: rgba(28, 33, 46, 0.7);
}

.ps-power-engine-summary::-webkit-details-marker {
  display: none;
}

.ps-power-engine-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--ps-glass-border);
}

.ps-buffer-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-buffer-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-buffer-slider-head label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
}

.ps-buffer-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #00f5a0;
}

.ps-range-slider {
  width: 100%;
  accent-color: #00f5a0;
  cursor: pointer;
}

.ps-regex-box {
  width: 100%;
  padding: 10px 14px;
  background: #0e1118;
  border: 1px solid var(--ps-glass-border);
  border-radius: 10px;
  color: #00f5a0;
  font-family: monospace;
  font-size: 0.85rem;
  box-sizing: border-box;
}
.ps-regex-box:focus {
  border-color: #00f5a0;
  outline: none;
}

/* Accessible Error Alert Banner */
.ps-error-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  margin: 16px 24px 0;
  gap: 16px;
  animation: ps-alert-drop 0.25s ease;
}

@keyframes ps-alert-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ps-error-alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fca5a5;
  font-size: 0.88rem;
  font-weight: 600;
}

.ps-error-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-error-retry-btn {
  padding: 6px 14px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ps-error-retry-btn:hover {
  background: #dc2626;
}

.ps-error-dismiss-btn {
  background: transparent;
  border: none;
  color: #fca5a5;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

/* ==============================================================================
   10. ADAPTIVE WIDE-SCREEN LAYOUT & SIMPLIFIED VISUALS STAGE
   Intelligently expands to 1840px+ with 2-panel TV Cinema Stage & Look Deck
   ============================================================================== */

/* Fluid Workspace Containers (Zero Under-utilized Gutters) */
.ps-visual-workspace.ps-fluid-workspace,
.ps-visual-workspace {
  width: 100% !important;
  max-width: min(98vw, 1840px) !important;
  margin: 0 auto !important;
  padding: 24px 32px 64px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow-y: auto !important;
}

.ps-content-workspace,
.ps-engine-workspace,
.ps-sharing-workspace {
  width: 100% !important;
  max-width: min(98vw, 1840px) !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* Header Quick Links Simplification */
.ps-header-quick-links {
  display: none !important;
}

/* Adaptive 2-Column Split Grid */
.ps-visual-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(440px, 0.82fr);
  gap: 28px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1199px) {
  .ps-visual-stage-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* ==============================================================================
   DYNAMIC INTERACTIVE LIVING ROOM TV CINEMA STAGE
   ============================================================================== */
.ps-cinema-tv-frame {
  background: #08090d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.ps-cinema-tv-frame.is-amoled {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.ps-tv-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(14, 17, 24, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-tv-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
}

.ps-tv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f5a0;
}

.ps-tv-spec-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.ps-tv-hero-display {
  padding: 32px 28px 24px;
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.4) 0%, rgba(8, 9, 13, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.ps-tv-hero-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ps-rating-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.ps-rating-rt {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ps-rating-imdb {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ps-rating-quality,
.ps-rating-audio {
  background: rgba(0, 245, 160, 0.12);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.25);
}

.ps-tv-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.ps-tv-hero-synopsis {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
  max-width: 600px;
}

.ps-tv-shelf-rail {
  padding: 20px 28px 24px;
  background: rgba(14, 17, 24, 0.35);
}

.ps-tv-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ps-tv-shelf-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ps-tv-shelf-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #00f5a0;
}

.ps-tv-shelf-posters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ps-tv-stage-poster {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-tv-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #111422;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-tv-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-tv-poster-overlay-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 9, 13, 0.85);
  color: #00f5a0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 245, 160, 0.3);
  backdrop-filter: blur(4px);
}

.ps-tv-stage-poster figcaption {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-stage-bounty-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.ps-bounty-embed-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #0e1118;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
}

.ps-bounty-embed-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 400;
}

/* ==============================================================================
   CURATED LIVING ROOM LOOK PRESETS (3 TIERS)
   ============================================================================== */
.ps-look-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1440px) {
  .ps-look-tiers-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}

.ps-look-tier-card {
  background: rgba(14, 17, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps-look-tier-card:hover {
  background: rgba(21, 25, 35, 0.85);
  border-color: rgba(0, 245, 160, 0.25);
  transform: translateY(-2px);
}

.ps-look-tier-card.is-active {
  background: rgba(0, 245, 160, 0.06);
  border-color: #00f5a0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ps-look-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ps-look-tier-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ps-look-tier-card.is-active .ps-look-tier-badge {
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
}

.ps-look-tier-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.ps-look-tier-card.is-active .ps-look-tier-status {
  color: #00f5a0;
}

.ps-look-tier-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.ps-look-tier-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0 0 12px 0;
  flex: 1;
}

.ps-look-tier-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ps-look-tier-chip {
  font-size: 0.72rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  color: #cbd5e1;
}

.ps-look-tier-card.is-active .ps-look-tier-chip {
  background: rgba(0, 245, 160, 0.1);
  color: #00f5a0;
}


/* ==============================================================================
   KAPTAIN PROFILE STUDIO — WIZARD-MINDSET HUB & WALKTHROUGHS (LUXURY EDITION)
   Crafted with Obsidian & Mint palette, fluid responsive grid, and zero AI slop
   ============================================================================== */

/* App Fullscreen Container & Scrollbars */
.ps-overlay.ps-fullpage {
  background: #08090d !important;
}

#profile-studio-panel {
  background: #08090d !important;
  color: #f8fafc !important;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

#profile-studio-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#profile-studio-panel::-webkit-scrollbar-track {
  background: transparent;
}

#profile-studio-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

#profile-studio-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 160, 0.35);
}

/* Fluid Desktop Header */
.ps-header {
  background: rgba(8, 9, 13, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 16px 28px !important;
  position: relative !important;
  z-index: 10 !important;
}

.ps-header .ps-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  background: rgba(0, 245, 160, 0.08) !important;
  border: 1px solid rgba(0, 245, 160, 0.22) !important;
  border-radius: 999px !important;
  color: #00f5a0 !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
}

.ps-header .ps-title {
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: -0.025em !important;
  margin: 0 0 4px !important;
}

.ps-header .ps-subtitle {
  font-size: 0.92rem !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.ps-close-btn {
  position: relative !important;
  top: auto !important;
  transform: none !important;
  right: auto !important;
  margin-left: 4px !important;
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.3rem !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-close-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Fluid Desktop Body Container */
.ps-body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 24px 32px 64px !important;
  box-sizing: border-box !important;
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Ensure panel is always full-viewport on all display widths */
@media (min-width: 1440px) {
  #profile-studio-overlay .ps-panel,
  #profile-studio-overlay:not(.ps-fullpage) .ps-panel {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
  }
}

@media (max-width: 768px) {
  .ps-header {
    padding: 14px 16px !important;
  }
  .ps-close-btn {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 14px !important;
  }
  .ps-body {
    padding: 16px 14px 40px !important;
  }
}

/* Luxury Profile Banner */
.ps-hub-profile {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 20px 28px !important;
  margin-bottom: 28px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.6) !important;
}

.ps-profile-avatar-wrap {
  position: relative !important;
  display: inline-flex !important;
}

.ps-profile-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(0, 245, 160, 0.3) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  color: #fff !important;
}

.ps-profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.ps-profile-avatar-edit {
  position: absolute !important;
  bottom: -2px !important;
  right: -2px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #08090d !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #00f5a0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 11px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-profile-avatar-edit:hover {
  background: #00f5a0 !important;
  color: #08090d !important;
  border-color: #00f5a0 !important;
  transform: scale(1.1) !important;
}

.ps-profile-info {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ps-profile-name {
  font-size: 1.22rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
}

.ps-profile-meta {
  font-size: 0.88rem !important;
  color: #94a3b8 !important;
}

#ps-hub-switch {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#ps-hub-switch:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Fluid Auto-Fill Hub Grid (Intelligently adapts from 390px to 2560px) */
.ps-hub-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

@media (max-width: 680px) {
  .ps-hub-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* Luxury Hub Intent Tiles */
.ps-hub-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 24px 22px 20px !important;
  min-height: 165px !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

.ps-hub-tile:hover {
  background: #131722 !important;
  border-color: rgba(0, 245, 160, 0.35) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 245, 160, 0.15) !important;
}

.ps-hub-tile:focus-visible {
  outline: 2px solid #00f5a0 !important;
  outline-offset: 3px !important;
}

.ps-hub-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: rgba(0, 245, 160, 0.08) !important;
  border: 1px solid rgba(0, 245, 160, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #00f5a0 !important;
  margin-bottom: 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-hub-icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #00f5a0 !important;
}

.ps-hub-tile:hover .ps-hub-icon {
  background: rgba(0, 245, 160, 0.15) !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  transform: scale(1.05) !important;
}

.ps-hub-title {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 6px !important;
}

.ps-hub-line {
  font-size: 0.88rem !important;
  line-height: 1.48 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
  flex: 1 !important;
}

.ps-hub-tile::after {
  content: 'Open walkthrough →' !important;
  display: block !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #00f5a0 !important;
  margin-top: 14px !important;
  opacity: 0.7 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-hub-tile:hover::after {
  opacity: 1 !important;
  transform: translateX(4px) !important;
}

/* Recent Snapshots & 1-Click Rollback */
.ps-hub-changes {
  margin-top: 36px !important;
  padding: 24px 28px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

.ps-hub-changes-title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin: 0 0 14px !important;
}

.ps-hub-change {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-size: 0.9rem !important;
  color: #e2e8f0 !important;
}

.ps-hub-change:last-child {
  border-bottom: none !important;
}

.ps-hub-change em {
  color: #64748b !important;
  font-style: normal !important;
  margin-left: 8px !important;
  font-size: 0.82rem !important;
}

.ps-hub-change .ps-btn-link {
  color: #00f5a0 !important;
  font-weight: 600 !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}

.ps-hub-change .ps-btn-link:hover {
  background: rgba(0, 245, 160, 0.1) !important;
}

/* ==============================================================================
   WALKTHROUGH 1: POSTER ENGINE STEP-BY-STEP
   ============================================================================== */
.ps-pe {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.ps-pe-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 22px 28px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 768px) {
  .ps-pe-top {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

.ps-pe-now {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ps-pe-now-label {
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
}

.ps-pe-now-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}

.ps-pe-now-detail {
  font-size: 0.88rem !important;
  color: #00f5a0 !important;
}

.ps-pe-save {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.ps-pe-save-state {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

/* Mode Selection Pills / Cards */
.wiz-poster-mode {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .wiz-poster-mode {
    grid-template-columns: 1fr !important;
  }
}

.wiz-poster-mode-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px 22px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  color: #cbd5e1 !important;
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
}

.wiz-poster-mode-btn:hover {
  background: #141926 !important;
  border-color: rgba(0, 245, 160, 0.25) !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

.wiz-poster-mode-btn.is-active {
  background: rgba(0, 245, 160, 0.08) !important;
  border-color: #00f5a0 !important;
  color: #00f5a0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

/* Bounty Iframe Container */
#ps-bounty-frame {
  width: 100% !important;
  min-height: 850px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  background: #08090d !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

/* Custom Link Split View on Desktop */
.ps-pe-custom {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 28px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 28px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 900px) {
  .ps-pe-custom {
    grid-template-columns: 1fr !important;
  }
}

.ps-pe-previews {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}

.ps-pe-poster {
  margin: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: #08090d !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.ps-pe-poster img {
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  object-fit: cover !important;
  display: block !important;
}

.ps-pe-poster figcaption {
  padding: 8px 10px !important;
  font-size: 0.78rem !important;
  color: #cbd5e1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Screen Selection Toggles */
.ps-pe-section {
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 24px 28px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

.ps-pe-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  margin: 0 0 6px !important;
}

.ps-pe-sub {
  font-size: 0.88rem !important;
  color: #94a3b8 !important;
  margin: 0 0 18px !important;
}

.ps-pe-toggles {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
  gap: 14px !important;
}

.ps-pe-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 18px !important;
  background: #141926 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-pe-toggle:hover {
  background: #1a2233 !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
}

.ps-pe-toggle input[type="checkbox"] {
  accent-color: #00f5a0 !important;
  width: 17px !important;
  height: 17px !important;
}

/* ==============================================================================
   WALKTHROUGH 2: BACKUPS & VERSION VAULT
   ============================================================================== */
.ps-backups-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  margin: 20px 0 28px !important;
}

.ps-backups-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.ps-backup-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 18px 24px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-backup-row:hover {
  background: #131722 !important;
  border-color: rgba(0, 245, 160, 0.25) !important;
}

.ps-backup-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ps-backup-label {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}

.ps-backup-meta {
  font-size: 0.84rem !important;
  color: #94a3b8 !important;
}

.ps-backup-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ==============================================================================
   WALKTHROUGH 3: QUICK SETUP PRESETS
   ============================================================================== */
.ps-setup-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin: 20px 0 28px !important;
}

.ps-setup-card {
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 24px 22px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
}

.ps-setup-card:hover {
  background: #131722 !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
  transform: translateY(-2px) !important;
}

.ps-setup-card.is-on {
  background: rgba(0, 245, 160, 0.06) !important;
  border-color: #00f5a0 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6) !important;
}

.ps-setup-pick {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  text-align: left !important;
  cursor: pointer !important;
  color: inherit !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}

.ps-setup-name {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  margin-top: 12px !important;
  margin-bottom: 6px !important;
}

.ps-setup-blurb {
  font-size: 0.88rem !important;
  color: #94a3b8 !important;
  line-height: 1.48 !important;
}

/* Primary Action Buttons across all Walkthroughs */
.ps-btn-primary {
  background: #00f5a0 !important;
  color: #08090d !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-btn-primary:hover:not(:disabled) {
  background: #10b981 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

.ps-btn-primary:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.ps-btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.ps-btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ==============================================================================
   WALKTHROUGHS: ADDONS & HOME ROWS LUXURY STYLING
   ============================================================================== */
.ps-addon-list,
.ps-home-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 20px !important;
}

.ps-addon-row {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 16px 22px !important;
  background: #0e1118 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-addon-row:hover {
  background: #131722 !important;
  border-color: rgba(0, 245, 160, 0.25) !important;
}

.ps-addon-row.is-off {
  opacity: 0.55 !important;
}

.ps-addon-arrow {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  border-radius: 6px !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ps-addon-arrow:hover:not(:disabled) {
  background: rgba(0, 245, 160, 0.15) !important;
  color: #00f5a0 !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
}

.ps-addon-logo {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  font-weight: 700 !important;
  color: #00f5a0 !important;
}

.ps-addon-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.ps-addon-name {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}

.ps-addon-line {
  font-size: 0.84rem !important;
  color: #94a3b8 !important;
}

/* ==========================================================================
   Profile Studio: "My TV" Luxury Surface Overhaul
   ========================================================================== */

/* Hero Guide Banner */
.ps-home-hero-guide {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(20, 26, 38, 0.6) 0%, rgba(13, 17, 26, 0.8) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.35);
}

.ps-home-hero-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.25);
  color: #00f5a0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ps-home-hero-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.ps-home-hero-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.45;
}

.ps-home-hero-desc strong {
  color: #e2e8f0;
}

/* Unsaved edits pulse pill in header */
.ps-home-dirty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  margin-left: 10px;
  animation: psPulseGlow 2.5s infinite ease-in-out;
}

.ps-home-dirty-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

@keyframes psPulseGlow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ==============================================================================
   NUVIO HOME SCREEN & COLLECTION WORKBENCH
   ============================================================================== */
.ps-home-stage-hero {
  position: relative !important;
  width: 100% !important;
  max-width: 1360px !important;
  margin: 0 auto 20px auto !important;
  padding: 18px 26px !important;
  background: radial-gradient(120% 140% at 0% 0%, rgba(16, 24, 40, 0.95) 0%, rgba(9, 13, 22, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
  height: auto !important;
}

.ps-workbench-hero {
  margin-bottom: 20px !important;
  background: radial-gradient(120% 140% at 0% 0%, rgba(13, 27, 36, 0.95) 0%, rgba(8, 14, 22, 0.98) 100%) !important;
  border-color: rgba(0, 245, 160, 0.22) !important;
}

.ps-home-stage-hero-glow {
  position: absolute !important;
  top: -60px !important;
  left: 15% !important;
  width: 440px !important;
  height: 200px !important;
  background: radial-gradient(ellipse at center, rgba(0, 245, 160, 0.14) 0%, rgba(0, 245, 160, 0.08) 50%, transparent 75%) !important;
  filter: blur(48px) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.ps-workbench-hero .ps-home-stage-hero-glow {
  left: 25% !important;
  background: radial-gradient(ellipse at center, rgba(0, 245, 160, 0.18) 0%, rgba(0, 245, 160, 0.1) 50%, transparent 75%) !important;
}

.ps-home-stage-hero-main {
  position: relative !important;
  z-index: 1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.ps-home-hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  align-self: flex-start !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

.ps-home-hero-dot {
  display: none !important;
}

.ps-home-hero-main-title {
  margin: 0 !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

.ps-home-hero-subtitle {
  margin: 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.45 !important;
  color: #94a3b8 !important;
  max-width: 660px !important;
}

.ps-home-stage-hero-stats {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.ps-home-stat-pill {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  min-width: 96px !important;
  background: rgba(14, 20, 32, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
}

.ps-home-stat-val {
  font-size: 1.25rem !important;
  font-weight: 850 !important;
  color: #00f5a0 !important;
  line-height: 1.1 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  letter-spacing: -0.02em !important;
}

.ps-home-stat-lbl {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
}

/* Tidy Up for Me - Sleek Studio Luxury Magic Action Button */
.ps-btn-sparkle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  height: 34px !important;
  padding: 0 14px !important;
  font-size: 0.82rem !important;
  font-weight: 650 !important;
  color: #e2e8f0 !important;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.12) 0%, rgba(0, 245, 160, 0.06) 100%) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(0, 245, 160, 0.32) !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.ps-btn-sparkle .ps-sparkle-svg {
  color: var(--accent-light) !important;
  filter: drop-shadow(0 0 5px rgba(0, 245, 160, 0.6)) !important;
  transition: transform 0.25s ease, filter 0.25s ease !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.ps-btn-sparkle:hover {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.22) 0%, rgba(0, 245, 160, 0.12) 100%) !important;
  border-color: rgba(0, 245, 160, 0.55) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 18px rgba(0, 245, 160, 0.3), 0 0 12px rgba(0, 245, 160, 0.18) !important;
}

.ps-btn-sparkle:hover .ps-sparkle-svg {
  transform: scale(1.15) rotate(15deg) !important;
  filter: drop-shadow(0 0 8px rgba(0, 245, 160, 0.9)) !important;
}

.ps-btn-sparkle:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Staged Row Deletion: In-place Undo Banner */
.ps-home-undo-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 20px !important;
  max-width: 1360px !important;
  margin: 0 auto 16px auto !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(0, 245, 160, 0.35) !important;
  border-radius: 14px !important;
  animation: psFadeIn 0.25s ease forwards !important;
  box-shadow: 0 4px 18px rgba(0, 245, 160, 0.15) !important;
}

.ps-home-undo-content {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #f1f5f9 !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
}

.ps-home-undo-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #00f5a0 !important;
  box-shadow: 0 0 10px #00f5a0 !important;
  flex-shrink: 0 !important;
}

.ps-home-undo-btn {
  background: #00f5a0 !important;
  color: #080b12 !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 8px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
}

.ps-home-undo-btn:hover {
  background: #10b981 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.45) !important;
}

/* Signature Neon Emerald Primary Save Buttons */
#ps-home-save:not(:disabled),
#ps-row-save:not(:disabled) {
  background: linear-gradient(135deg, #00f5a0 0%, #059669 100%) !important;
  color: #050810 !important;
  font-weight: 750 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 18px rgba(0, 245, 160, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#ps-home-save:not(:disabled):hover,
#ps-row-save:not(:disabled):hover {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  box-shadow: 0 6px 24px rgba(0, 245, 160, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* Luxury Row Container */
.ps-home-row {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 18px 24px !important;
  background: linear-gradient(135deg, rgba(19, 25, 38, 0.8) 0%, rgba(12, 16, 26, 0.95) 100%) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-home-row:hover {
  background: linear-gradient(135deg, rgba(25, 33, 49, 0.9) 0%, rgba(15, 20, 32, 0.98) 100%) !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
  box-shadow: 0 10px 32px -4px rgba(0, 245, 160, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px) !important;
}

.ps-home-row.is-hidden-row {
  opacity: 0.55 !important;
  background: rgba(14, 18, 28, 0.5) !important;
  border-style: dashed !important;
}

/* Header Spacing Protection for Close Button */
.ps-home-header {
  padding-right: 20px !important;
}
.ps-home-header .ps-header-right {
  margin-right: 0 !important;
}
.ps-home-header .ps-close-btn {
  position: relative !important;
  top: auto !important;
  transform: none !important;
  right: auto !important;
}
@media (max-width: 640px) {
  .ps-home-header {
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 8px !important;
  }
  .ps-home-header .ps-btn-sm {
    padding: 6px 9px !important;
    font-size: 0.76rem !important;
    letter-spacing: 0 !important;
  }
  .ps-home-header .ps-header-profile-badge {
    display: none !important;
  }
  .ps-home-header .ps-header-left,
  .ps-home-header .ps-header-right {
    gap: 6px !important;
  }
  .ps-home-header .ps-close-btn {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    right: auto !important;
    width: 28px !important;
    height: 28px !important;
  }
}

/* Drag and Drop Grip Handle & States for Rows & Folders */
.ps-home-drag-handle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  color: #475569 !important;
  cursor: grab !important;
  transition: color 0.15s ease, transform 0.15s ease !important;
  margin-bottom: 2px !important;
}

.ps-home-row:hover .ps-home-drag-handle,
.ps-rowfolder:hover .ps-home-drag-handle {
  color: #00f5a0 !important;
}

.ps-home-drag-handle:active {
  cursor: grabbing !important;
}

.ps-home-row[draggable="true"],
.ps-rowfolder[draggable="true"] {
  cursor: grab !important;
}

.ps-home-row.is-dragging,
.ps-rowfolder.is-dragging {
  opacity: 0.35 !important;
  transform: scale(0.98) !important;
  border: 1px dashed #00f5a0 !important;
  cursor: grabbing !important;
}

.ps-home-row.is-drop-target,
.ps-rowfolder.is-drop-target {
  border-color: #00f5a0 !important;
  box-shadow: 0 0 24px rgba(0, 245, 160, 0.4) !important;
  transform: scale(1.015) !important;
}

/* Left Stepper & Order Column */
.ps-home-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ps-home-move {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 32px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 3px 2px !important;
  box-sizing: border-box !important;
}

.ps-home-stepper-btn {
  width: 26px !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  border-radius: 5px !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.ps-home-stepper-btn svg {
  display: block !important;
  margin: auto !important;
  pointer-events: none !important;
}

.ps-home-stepper-btn:hover:not(:disabled) {
  background: rgba(0, 245, 160, 0.18) !important;
  color: #00f5a0 !important;
}

.ps-home-stepper-btn:disabled {
  opacity: 0.25 !important;
  cursor: default !important;
}

.ps-home-order-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.ps-home-order-badge.is-hidden-badge {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Main Body, Shelf Header Hierarchy & Titleline */
.ps-home-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-home-shelf-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.ps-home-shelf-rank {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  align-self: flex-start !important;
}

.ps-home-shelf-pip {
  display: none !important;
}

.ps-home-shelf-rank-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  color: #64748b !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

.ps-home-row:hover .ps-home-shelf-rank-text {
  color: #94a3b8 !important;
}

.ps-home-titleline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ps-home-title {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.015em !important;
}

.ps-home-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.ps-home-badge.is-col-badge {
  background: rgba(0, 245, 160, 0.1);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.25);
}

.ps-home-badge.is-addon-badge {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ps-home-rename {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 4px 10px;
  background: #090c13;
  border: 1px solid #00f5a0;
  border-radius: 8px;
  color: #fff;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.3);
}

/* Carousel Wrap & Interactive Navigation */
.ps-home-carousel-wrap {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

.ps-home-strip {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 8px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 6px 4px !important;
  scroll-behavior: smooth;
  cursor: grab;
  width: 100%;
}

.ps-home-strip.is-panning {
  cursor: grabbing !important;
  user-select: none !important;
  scroll-behavior: auto !important;
}

.ps-home-strip.is-panning * {
  user-select: none !important;
  pointer-events: none !important;
}

.ps-home-strip::-webkit-scrollbar {
  display: none !important;
}

.ps-home-strip-empty {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.ps-home-strip-empty-hint {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
}

/* Glass Floating Carousel Navigation Arrows */
.ps-home-carousel-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(10, 14, 24, 0.88) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 10 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65) !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ps-home-carousel-wrap:hover .ps-home-carousel-arrow:not(.is-hidden) {
  opacity: 0.95 !important;
  pointer-events: auto !important;
}

.ps-home-carousel-arrow:hover:not(:disabled) {
  opacity: 1 !important;
  background: rgba(0, 245, 160, 0.22) !important;
  border-color: #00f5a0 !important;
  color: #00f5a0 !important;
  transform: translateY(-50%) scale(1.12) !important;
}

.ps-home-carousel-arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96) !important;
}

.ps-home-carousel-arrow.is-left {
  left: 2px !important;
}

.ps-home-carousel-arrow.is-right {
  right: 2px !important;
}

.ps-home-carousel-arrow.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.ps-home-thumb {
  position: relative !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #080b12 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  flex-shrink: 0 !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

.ps-home-thumb::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%, rgba(0, 0, 0, 0.45) 100%) !important;
  pointer-events: none !important;
  border-radius: inherit !important;
}

.ps-home-thumb:hover {
  transform: translateY(-4px) scale(1.04) !important;
  border-color: rgba(0, 245, 160, 0.5) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 16px rgba(0, 245, 160, 0.25) !important;
  z-index: 3 !important;
}

.ps-home-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

/* Expanded Cinema Aspect Ratios: Large Poster (2:3) vs Cinematic Landscape (16:9) */
.ps-home-thumb.is-poster {
  width: 96px !important;
  height: 144px !important;
}

.ps-home-thumb.is-landscape {
  width: 196px !important;
  height: 110px !important;
}

.ps-home-thumb.is-auto {
  min-width: 96px !important;
  height: 144px !important;
}

.ps-home-thumb.is-logo-thumb {
  width: 110px !important;
  height: 110px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.ps-home-thumb.is-logo-thumb img {
  max-width: 72% !important;
  max-height: 72% !important;
  object-fit: contain !important;
}

/* Communicative Luxury Action Cluster */
.ps-home-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.ps-home-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  padding: 0 13px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

.ps-home-action-btn:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.ps-home-action-btn.is-hidden-state {
  color: #00f5a0 !important;
  border-color: rgba(0, 245, 160, 0.25) !important;
  background: rgba(0, 245, 160, 0.06) !important;
}

.ps-home-action-btn.is-hidden-state:hover {
  background: rgba(0, 245, 160, 0.16) !important;
  border-color: #00f5a0 !important;
  color: #ffffff !important;
}

.ps-home-action-btn.ps-home-btn-open {
  background: rgba(0, 245, 160, 0.1) !important;
  border-color: rgba(0, 245, 160, 0.32) !important;
  color: #00f5a0 !important;
  padding: 0 15px !important;
}

.ps-home-action-btn.ps-home-btn-open:hover {
  background: #00f5a0 !important;
  border-color: #00f5a0 !important;
  color: #090c13 !important;
  box-shadow: 0 0 16px rgba(0, 245, 160, 0.4) !important;
}

.ps-home-action-btn.ps-home-btn-danger {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  background: rgba(239, 68, 68, 0.06) !important;
}

.ps-home-action-btn.ps-home-btn-danger:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}

/* Folder Art Action Buttons in Row Editor */
.ps-home-action-btn.ps-home-btn-art {
  background: rgba(0, 245, 160, 0.08) !important;
  border-color: rgba(0, 245, 160, 0.28) !important;
  color: #00f5a0 !important;
  gap: 5px !important;
}

.ps-home-action-btn.ps-home-btn-art:hover {
  background: rgba(0, 245, 160, 0.18) !important;
  border-color: #00f5a0 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.3) !important;
}

.ps-home-art-count {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: rgba(0, 245, 160, 0.22) !important;
  color: #00f5a0 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  line-height: 1.2 !important;
}

.ps-home-action-btn.is-art-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #64748b !important;
  pointer-events: auto !important;
}

.ps-home-action-btn.is-art-disabled:hover {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #64748b !important;
  transform: none !important;
}

/* ==============================================================================
   SPATIAL 3D ARTWORK THEATER (BORDERLESS HERO EXPERIENCE)
   ============================================================================== */
.ps-spatial-theater {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100200 !important;
  background: radial-gradient(ellipse 95% 85% at 50% 35%, rgba(13, 20, 36, 0.92) 0%, rgba(3, 6, 12, 0.98) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 24px 28px 32px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  animation: psTheaterFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  user-select: none !important;
}

@keyframes psTheaterFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(28px) saturate(190%);
  }
}

/* Atmospheric Ambient Lighting / Bloom */
.ps-spatial-ambient-bloom {
  position: absolute !important;
  inset: -80px !important;
  background-size: cover !important;
  background-position: center !important;
  filter: blur(90px) saturate(220%) brightness(0.24) !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: opacity 0.5s ease, background-image 0.5s ease !important;
}

/* Floating Vignette */
.ps-spatial-vignette {
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 35%, rgba(2, 4, 8, 0.88) 100%) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Floating Minimalist Header */
.ps-spatial-topbar {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 1200px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
}

.ps-spatial-title-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 18px !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

.ps-spatial-tag {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #00f5a0 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.ps-spatial-folder-name {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  letter-spacing: -0.01em !important;
}

.ps-spatial-close-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.ps-spatial-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

/* 3D Spatial Theater Stage */
.ps-spatial-stage {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  perspective: 1600px !important;
  transform-style: preserve-3d !important;
  overflow: visible !important;
  min-height: 320px !important;
}

/* Nav Chevrons flanking the stage */
.ps-spatial-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 40 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: rgba(15, 22, 35, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  padding: 0 !important;
}

.ps-spatial-arrow.is-prev {
  left: clamp(14px, 4vw, 56px) !important;
}

.ps-spatial-arrow.is-next {
  right: clamp(14px, 4vw, 56px) !important;
}

.ps-spatial-arrow:hover:not(:disabled) {
  background: rgba(0, 245, 160, 0.2) !important;
  border-color: #00f5a0 !important;
  color: #00f5a0 !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 10px 30px rgba(0, 245, 160, 0.25) !important;
}

.ps-spatial-arrow:disabled {
  opacity: 0.15 !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* 3D Deck Container */
.ps-spatial-deck {
  position: relative !important;
  transform-style: preserve-3d !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
}

/* Dynamic Aspect Ratio Classes */
.ps-spatial-deck.is-landscape-stage {
  width: min(560px, 80vw) !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 48vh !important;
}

.ps-spatial-deck.is-poster-stage {
  width: min(330px, 68vw) !important;
  aspect-ratio: 2 / 3 !important;
  max-height: 52vh !important;
}

/* Individual 3D Card */
.ps-spatial-card {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #090c14 !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.72) !important;
  cursor: pointer !important;
  user-select: none !important;
  will-change: transform, opacity, filter !important;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.45s ease,
              box-shadow 0.45s ease,
              border-color 0.35s ease !important;
}

.ps-spatial-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.3) 100%) !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

.ps-spatial-card-inner {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

.ps-spatial-card-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  user-drag: none !important;
  -webkit-user-drag: none !important;
  pointer-events: none !important;
}

/* Card Micro Badge */
.ps-spatial-card-badge {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 5 !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
  background: rgba(10, 14, 24, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
}

.ps-spatial-card-badge.is-cur-badge {
  color: #00f5a0 !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  background: rgba(0, 245, 160, 0.16) !important;
}

/* Active Center Card */
.ps-spatial-card.is-active {
  transform: translate3d(0, 0, 120px) scale(1.04) rotateY(0deg) !important;
  z-index: 25 !important;
  opacity: 1 !important;
  filter: brightness(1) !important;
  border-color: rgba(0, 245, 160, 0.75) !important;
  box-shadow: 0 32px 85px rgba(0, 0, 0, 0.94), 0 0 55px rgba(0, 245, 160, 0.3) !important;
  cursor: default !important;
}

/* Hover on non-active flanking cards */
.ps-spatial-card:hover:not(.is-active) {
  filter: brightness(0.96) !important;
  border-color: rgba(0, 245, 160, 0.45) !important;
}

/* LANDSCAPE 16:9 3D SPREAD */
.is-landscape-stage .ps-spatial-card.is-left-1 {
  transform: translate3d(-275px, 14px, 30px) scale(0.86) rotateY(16deg) rotateZ(-2deg) !important;
  z-index: 18 !important;
  opacity: 0.82 !important;
  filter: brightness(0.78) contrast(0.95) !important;
}

.is-landscape-stage .ps-spatial-card.is-right-1 {
  transform: translate3d(275px, 14px, 30px) scale(0.86) rotateY(-16deg) rotateZ(2deg) !important;
  z-index: 18 !important;
  opacity: 0.82 !important;
  filter: brightness(0.78) contrast(0.95) !important;
}

.is-landscape-stage .ps-spatial-card.is-left-2 {
  transform: translate3d(-490px, 30px, -50px) scale(0.72) rotateY(26deg) rotateZ(-3.5deg) !important;
  z-index: 12 !important;
  opacity: 0.48 !important;
  filter: brightness(0.58) contrast(0.9) !important;
}

.is-landscape-stage .ps-spatial-card.is-right-2 {
  transform: translate3d(490px, 30px, -50px) scale(0.72) rotateY(-26deg) rotateZ(3.5deg) !important;
  z-index: 12 !important;
  opacity: 0.48 !important;
  filter: brightness(0.58) contrast(0.9) !important;
}

.is-landscape-stage .ps-spatial-card.is-far-left {
  transform: translate3d(-640px, 46px, -140px) scale(0.58) rotateY(34deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.is-landscape-stage .ps-spatial-card.is-far-right {
  transform: translate3d(640px, 46px, -140px) scale(0.58) rotateY(-34deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* POSTER 2:3 3D SPREAD */
.is-poster-stage .ps-spatial-card.is-left-1 {
  transform: translate3d(-190px, 12px, 30px) scale(0.87) rotateY(18deg) rotateZ(-2.5deg) !important;
  z-index: 18 !important;
  opacity: 0.82 !important;
  filter: brightness(0.78) contrast(0.95) !important;
}

.is-poster-stage .ps-spatial-card.is-right-1 {
  transform: translate3d(190px, 12px, 30px) scale(0.87) rotateY(-18deg) rotateZ(2.5deg) !important;
  z-index: 18 !important;
  opacity: 0.82 !important;
  filter: brightness(0.78) contrast(0.95) !important;
}

.is-poster-stage .ps-spatial-card.is-left-2 {
  transform: translate3d(-345px, 26px, -50px) scale(0.73) rotateY(28deg) rotateZ(-4.5deg) !important;
  z-index: 12 !important;
  opacity: 0.48 !important;
  filter: brightness(0.58) contrast(0.9) !important;
}

.is-poster-stage .ps-spatial-card.is-right-2 {
  transform: translate3d(345px, 26px, -50px) scale(0.73) rotateY(-28deg) rotateZ(4.5deg) !important;
  z-index: 12 !important;
  opacity: 0.48 !important;
  filter: brightness(0.58) contrast(0.9) !important;
}

.is-poster-stage .ps-spatial-card.is-far-left {
  transform: translate3d(-470px, 40px, -140px) scale(0.58) rotateY(34deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.is-poster-stage .ps-spatial-card.is-far-right {
  transform: translate3d(470px, 40px, -140px) scale(0.58) rotateY(-34deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.ps-spatial-card.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Floating Minimalist Control Dock */
.ps-spatial-dock {
  position: relative !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 18px !important;
}

.ps-spatial-btn {
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  padding: 13px 26px !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  user-select: none !important;
}

.ps-spatial-row-btn {
  background: rgba(13, 20, 35, 0.78) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(0, 245, 160, 0.35) !important;
  color: #00f5a0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.ps-spatial-row-btn:hover {
  background: rgba(0, 245, 160, 0.16) !important;
  border-color: #00f5a0 !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 14px 34px rgba(0, 245, 160, 0.22) !important;
}

.ps-spatial-pill-count {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  background: rgba(0, 245, 160, 0.2) !important;
  color: #00f5a0 !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
}

.ps-spatial-lock-btn {
  background: linear-gradient(135deg, #00f5a0 0%, #00d287 100%) !important;
  color: #041018 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 12px 32px rgba(0, 245, 160, 0.45), 0 0 16px rgba(0, 245, 160, 0.25) !important;
}

.ps-spatial-lock-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 16px 40px rgba(0, 245, 160, 0.6), 0 0 24px rgba(0, 245, 160, 0.35) !important;
}

.ps-spatial-lock-btn.is-current-btn {
  background: rgba(13, 20, 35, 0.78) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(0, 245, 160, 0.45) !important;
  color: #00f5a0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.ps-spatial-lock-btn.is-current-btn:hover {
  background: rgba(0, 245, 160, 0.16) !important;
  border-color: #00f5a0 !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 14px 34px rgba(0, 245, 160, 0.22) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ps-spatial-theater {
    padding: 16px 14px 20px !important;
  }
  .ps-spatial-arrow {
    width: 38px !important;
    height: 38px !important;
  }
  .ps-spatial-arrow.is-prev { left: 8px !important; }
  .ps-spatial-arrow.is-next { right: 8px !important; }

  .ps-spatial-deck.is-landscape-stage {
    width: min(340px, 86vw) !important;
  }
  .ps-spatial-deck.is-poster-stage {
    width: min(230px, 66vw) !important;
  }

  .is-landscape-stage .ps-spatial-card.is-left-1 {
    transform: translate3d(-150px, 12px, 20px) scale(0.85) rotateY(14deg) !important;
  }
  .is-landscape-stage .ps-spatial-card.is-right-1 {
    transform: translate3d(150px, 12px, 20px) scale(0.85) rotateY(-14deg) !important;
  }
  .is-landscape-stage .ps-spatial-card.is-left-2 {
    transform: translate3d(-260px, 22px, -40px) scale(0.68) rotateY(22deg) !important;
    opacity: 0.25 !important;
  }
  .is-landscape-stage .ps-spatial-card.is-right-2 {
    transform: translate3d(260px, 22px, -40px) scale(0.68) rotateY(-22deg) !important;
    opacity: 0.25 !important;
  }

  .is-poster-stage .ps-spatial-card.is-left-1 {
    transform: translate3d(-115px, 10px, 20px) scale(0.85) rotateY(16deg) !important;
  }
  .is-poster-stage .ps-spatial-card.is-right-1 {
    transform: translate3d(115px, 10px, 20px) scale(0.85) rotateY(-16deg) !important;
  }
  .is-poster-stage .ps-spatial-card.is-left-2 {
    transform: translate3d(-200px, 20px, -40px) scale(0.68) rotateY(24deg) !important;
    opacity: 0.25 !important;
  }
  .is-poster-stage .ps-spatial-card.is-right-2 {
    transform: translate3d(200px, 20px, -40px) scale(0.68) rotateY(-24deg) !important;
    opacity: 0.25 !important;
  }

  .ps-spatial-dock {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 320px !important;
    margin-top: 12px !important;
  }
  .ps-spatial-btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    padding: 12px 20px !important;
  }
}

.ps-home-addon-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Hidden Rows Accordion Header */
.ps-home-hidden-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  margin-top: 24px !important;
  background: rgba(14, 18, 28, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
}

.ps-home-hidden-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #94a3b8;
}

.ps-home-hidden-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

/* Row Folders Screen (Inside a Row Workbench) */
.ps-rowfolder-container {
  width: 100% !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Panoramic 16:9 Shelf Simulation Preview */
.ps-row-live-preview {
  position: relative !important;
  width: 100% !important;
  margin-bottom: 24px !important;
  padding: 18px 24px !important;
  background: linear-gradient(180deg, rgba(12, 17, 28, 0.95) 0%, rgba(7, 10, 18, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  box-sizing: border-box !important;
}

.ps-row-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.ps-row-preview-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  color: #00f5a0 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.ps-row-preview-pulse {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #00f5a0 !important;
  box-shadow: 0 0 8px #00f5a0 !important;
  animation: psPulseGlow 2s infinite ease-in-out !important;
}

.ps-row-preview-hint {
  font-size: 0.75rem !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

.ps-row-preview-track {
  display: flex !important;
  align-items: flex-end !important;
  gap: 12px !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent !important;
  padding: 4px 2px 10px 2px !important;
  scroll-behavior: smooth !important;
}

.ps-row-preview-track::-webkit-scrollbar {
  height: 6px !important;
}

.ps-row-preview-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12) !important;
  border-radius: 999px !important;
}

.ps-row-preview-slot {
  position: relative !important;
  flex-shrink: 0 !important;
  border-radius: 9px !important;
  overflow: hidden !important;
  background: #090c14 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  user-select: none !important;
}

.ps-row-preview-slot:hover {
  transform: translateY(-2px) scale(1.03) !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 245, 160, 0.2) !important;
}

.ps-row-preview-slot.is-poster {
  width: 58px !important;
  height: 87px !important;
}

.ps-row-preview-slot.is-landscape {
  width: 120px !important;
  height: 68px !important;
}

.ps-row-preview-slot img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  pointer-events: none !important;
}

.ps-row-preview-num {
  position: absolute !important;
  top: 4px !important;
  left: 4px !important;
  z-index: 2 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(4px) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  line-height: 1.2 !important;
}

.ps-row-preview-label {
  position: relative !important;
  z-index: 2 !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%) !important;
  padding: 12px 5px 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ps-row-preview-fallback {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #475569 !important;
  background: #0f172a !important;
}

.ps-row-preview-empty {
  font-size: 0.85rem !important;
  color: #64748b !important;
  font-style: italic !important;
  padding: 12px 0 !important;
}

.ps-rowfolder-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-top: 18px !important;
}

.ps-rowfolder {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 16px 22px !important;
  background: linear-gradient(135deg, rgba(19, 25, 38, 0.85) 0%, rgba(12, 16, 26, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-rowfolder:hover {
  border-color: rgba(0, 245, 160, 0.35) !important;
  background: linear-gradient(135deg, rgba(24, 32, 48, 0.92) 0%, rgba(15, 21, 34, 0.98) 100%) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 245, 160, 0.12) !important;
  transform: translateY(-1px) !important;
}

.ps-rowfolder-art {
  position: relative !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #080b12 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.2s ease !important;
}

.ps-rowfolder:hover .ps-rowfolder-art {
  transform: scale(1.02) !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
}

.ps-rowfolder-art.is-poster {
  width: 80px !important;
  height: 120px !important;
}

.ps-rowfolder-art.is-landscape {
  width: 180px !important;
  height: 102px !important;
}

.ps-rowfolder-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.ps-rowfolder-aspect-pill {
  position: absolute !important;
  bottom: 4px !important;
  right: 4px !important;
  z-index: 2 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  color: #f1f5f9 !important;
  background: rgba(0, 0, 0, 0.76) !important;
  backdrop-filter: blur(4px) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  line-height: 1.2 !important;
  pointer-events: none !important;
}

.ps-rowfolder-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.ps-rowfolder-titleline {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.ps-rowfolder-title {
  font-size: 1.08rem !important;
  font-weight: 750 !important;
  color: #ffffff !important;
  letter-spacing: -0.015em !important;
}

.ps-rowfolder-slot-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  color: #00f5a0 !important;
  background: rgba(0, 245, 160, 0.08) !important;
  border: 1px solid rgba(0, 245, 160, 0.22) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
}

.ps-rowfolder-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
}

.ps-rowfolder-meta-sep {
  color: #475569 !important;
}

.ps-rowfolder-shape-tag {
  color: #cbd5e1 !important;
  font-weight: 500 !important;
}

.ps-rowfolder .ps-home-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

/* Vibrant 3D Art Theater Launcher Button */
.ps-btn-art-theater {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.14) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
  border: 1px solid rgba(0, 245, 160, 0.4) !important;
  color: #00f5a0 !important;
  font-weight: 700 !important;
  padding: 0 16px !important;
  height: 36px !important;
  box-shadow: 0 2px 10px rgba(0, 245, 160, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-btn-art-theater:hover {
  background: linear-gradient(135deg, #00f5a0 0%, #059669 100%) !important;
  border-color: #00f5a0 !important;
  color: #050810 !important;
  box-shadow: 0 4px 20px rgba(0, 245, 160, 0.45) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.ps-btn-art-theater:hover .ps-home-art-count {
  background: rgba(0, 0, 0, 0.25) !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .ps-home-stage-hero {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 20px 20px !important;
    gap: 16px !important;
  }
  .ps-home-stage-hero-stats {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  .ps-home-stat-pill {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .ps-home-thumb.is-poster {
    width: 76px !important;
    height: 114px !important;
  }
  .ps-home-thumb.is-landscape {
    width: 148px !important;
    height: 84px !important;
  }
  .ps-home-strip {
    min-height: 120px !important;
  }
}

@media (max-width: 640px) {
  .ps-home-row {
    flex-wrap: wrap !important;
    padding: 14px 16px !important;
    gap: 14px !important;
  }
  .ps-home-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .ps-rowfolder {
    flex-wrap: wrap !important;
    padding: 14px 16px !important;
    gap: 14px !important;
  }
  .ps-rowfolder-art.is-landscape {
    width: 120px !important;
    height: 68px !important;
  }
  .ps-rowfolder-art.is-poster {
    width: 56px !important;
    height: 84px !important;
  }
  .ps-rowfolder .ps-home-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin-left: 0 !important;
  }
}

/* Tidy Up Sheet Luxury Overhaul */
.ps-tidy-sheet {
  max-width: 660px !important;
  background: rgba(14, 18, 28, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85) !important;
}

.ps-tidy-head-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-tidy-sparkle-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.22) 0%, rgba(0, 245, 160, 0.12) 100%);
  border: 1px solid rgba(0, 245, 160, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  box-shadow: 0 0 18px rgba(0, 245, 160, 0.3);
  flex-shrink: 0;
}

.ps-tidy-sparkle-icon svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 6px rgba(0, 245, 160, 0.7));
}

.ps-tidy-head-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.ps-tidy-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.ps-tidy-stat-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ps-tidy-stat-card.is-success {
  border-color: rgba(0, 245, 160, 0.3);
  background: rgba(0, 245, 160, 0.05);
}

.ps-tidy-stat-card.is-warning {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
}

.ps-tidy-stat-card.is-info {
  border-color: rgba(0, 245, 160, 0.3);
  background: rgba(0, 245, 160, 0.05);
}

.ps-tidy-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.ps-tidy-stat-card.is-success .ps-tidy-stat-num { color: #00f5a0; }
.ps-tidy-stat-card.is-warning .ps-tidy-stat-num { color: #fbbf24; }
.ps-tidy-stat-card.is-info .ps-tidy-stat-num { color: #00f5a0; }

.ps-tidy-stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}

.ps-tidy-stat-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ps-tidy-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.ps-tidy-section-head h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}

.ps-tidy-pill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.ps-tidy-pill-tag.is-accent {
  background: rgba(0, 245, 160, 0.12);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.25);
}

.ps-tidy-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.ps-tidy-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.ps-tidy-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ps-tidy-action-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  text-transform: uppercase;
}

.ps-tidy-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-tidy-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ps-tidy-source-chip {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ps-tidy-reason-chip {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.ps-tidy-order-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.ps-tidy-order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.ps-tidy-order-num {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #00f5a0;
  width: 26px;
}

.ps-tidy-order-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fafc;
  flex: 1;
}

.ps-tidy-order-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.ps-tidy-order-badge.is-col {
  background: rgba(0, 245, 160, 0.12);
  color: #00f5a0;
}

.ps-tidy-order-badge.is-addon {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.ps-btn-emerald {
  background: linear-gradient(135deg, #00f5a0 0%, #00d287 100%) !important;
  color: #090c13 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.35) !important;
}

.ps-btn-emerald:hover {
  box-shadow: 0 6px 22px rgba(0, 245, 160, 0.5) !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 768px) {
  .ps-home-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }
  .ps-home-actions {
    justify-content: flex-end !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .ps-tidy-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   STEP 2: LUXURY PROFILE SELECTION LANDING PAGE (RESPONSIVE ALL BREAKPOINTS)
   ============================================================================== */
.ps-profiles-container {
  width: 100%;
  max-width: 1180px;
  margin: 12px auto 0;
  display: flex;
  flex-direction: column;
}

.ps-profiles-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
  margin: 12px 0 32px !important;
}

.ps-profile-card {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 18px 20px !important;
  background: linear-gradient(135deg, rgba(18, 22, 32, 0.92) 0%, rgba(12, 15, 23, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.55) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  min-height: 84px !important;
  box-sizing: border-box !important;
}

.ps-profile-card:hover,
.ps-profile-card:focus-visible {
  border-color: rgba(0, 245, 160, 0.45) !important;
  background: linear-gradient(135deg, rgba(24, 30, 44, 0.96) 0%, rgba(15, 19, 30, 0.99) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.75), 0 0 24px -4px rgba(0, 245, 160, 0.2) !important;
}

.ps-profile-card:focus-visible {
  outline: 2px solid #00f5a0 !important;
  outline-offset: 2px !important;
}

/* Avatar Wrap */
.ps-profile-avatar-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 52px !important;
  height: 52px !important;
}

.ps-profile-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  color: #fff !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  border: 2px solid rgba(255, 255, 255, 0.18) !important;
  transition: border-color 0.2s ease, transform 0.2s ease !important;
}

.ps-profile-card:hover .ps-profile-avatar {
  border-color: rgba(0, 245, 160, 0.6) !important;
}

.ps-profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Floating Avatar Edit Pencil */
.ps-profile-avatar-edit {
  position: absolute !important;
  bottom: -2px !important;
  right: -2px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #090c13 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #00f5a0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 11px !important;
  line-height: 1 !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 2 !important;
}

.ps-profile-avatar-edit:hover,
.ps-profile-avatar-edit:focus-visible {
  background: #00f5a0 !important;
  color: #090c13 !important;
  border-color: #00f5a0 !important;
  transform: scale(1.15) !important;
}

/* Profile Info (Full text width, never squished) */
.ps-profile-info {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.ps-profile-name {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  letter-spacing: -0.015em !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ps-profile-card:hover .ps-profile-name {
  color: #fff !important;
}

/* Meta Stats Line */
.ps-profile-meta {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

.ps-profile-stat-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
}

.ps-profile-stat-badge strong {
  font-weight: 700 !important;
  color: #cbd5e1 !important;
}

.ps-profile-card:hover .ps-profile-stat-badge strong {
  color: #00f5a0 !important;
}

.ps-profile-stat-dot {
  font-size: 0.72rem !important;
  color: #475569 !important;
  line-height: 1 !important;
}

/* Right Side Interactive Select Pill */
.ps-profile-action {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.02em !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ps-profile-action-arrow {
  stroke: currentColor !important;
  transition: transform 0.2s ease !important;
}

.ps-profile-card:hover .ps-profile-action {
  background: rgba(0, 245, 160, 0.15) !important;
  border-color: rgba(0, 245, 160, 0.4) !important;
  color: #00f5a0 !important;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.2) !important;
}

.ps-profile-card:hover .ps-profile-action-arrow {
  transform: translateX(3px) !important;
}

/* Footer / Switch Account Link */
.ps-footer-actions {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.ps-btn-switch-account {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #94a3b8 !important;
  font-size: 0.86rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.ps-btn-switch-account:hover {
  color: #00f5a0 !important;
  background: rgba(0, 245, 160, 0.06) !important;
  border-color: rgba(0, 245, 160, 0.2) !important;
}

/* ==============================================================================
   RESPONSIVE BREAKPOINTS (Mobile to Ultrawide)
   ============================================================================== */

/* Tablet & Moderate Screens */
@media (max-width: 900px) {
  .ps-profiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
    gap: 16px !important;
  }
  .ps-profile-card {
    padding: 16px 16px !important;
    gap: 14px !important;
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .ps-profiles-container {
    margin-top: 6px !important;
  }
  .ps-profiles-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 4px 0 20px !important;
  }
  .ps-profile-card {
    padding: 14px 16px !important;
    border-radius: 14px !important;
    min-height: 72px !important;
  }
  .ps-profile-avatar-wrap,
  .ps-profile-avatar {
    width: 46px !important;
    height: 46px !important;
  }
  .ps-profile-name {
    font-size: 1.05rem !important;
  }
  .ps-profile-meta {
    font-size: 0.76rem !important;
  }
  .ps-profile-action {
    padding: 6px 10px !important;
    font-size: 0.74rem !important;
  }
  .ps-btn-switch-account {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
  }
  /* Mobile My TV Touch Ergonomics */
  .ps-home-stepper-btn {
    width: 32px !important;
    height: 28px !important;
  }
  .ps-home-carousel-arrow:not(.is-hidden) {
    opacity: 0.92 !important;
    pointer-events: auto !important;
  }
}

/* Small / Narrow Mobile Screens (<= 400px) */
@media (max-width: 400px) {
  .ps-profile-action-label {
    display: none !important;
  }
  .ps-profile-action {
    padding: 6px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  .ps-profile-card {
    padding: 12px 12px !important;
    gap: 10px !important;
  }
  .ps-profile-avatar-wrap,
  .ps-profile-avatar {
    width: 42px !important;
    height: 42px !important;
  }
}

/* Header dock: both branches share one width so the Kaptain's Tools hub sits on the exact centre line */
@media (min-width: 721px) {
  .kap-header-center-cockpit .kap-tool-branch { min-width: 190px !important; }
  .kap-header-center-cockpit .kap-branch-left { justify-content: flex-end !important; }
  .kap-header-center-cockpit .kap-branch-right { justify-content: flex-start !important; }
}

/* ==============================================================================
   CUSTOM IMAGE LINK PANEL (Art Theater + Artwork screening room)
   ============================================================================== */
.ps-spatial-custom {
  position: relative !important;
  z-index: 12 !important;
  flex: 1 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
}
.ps-spatial-custom[hidden] { display: none !important; }
.ps-spatial-theater.has-custom-open .ps-spatial-stage { display: none !important; }
.ps-spatial-theater.has-custom-open [data-stack-apply-row],
.ps-spatial-theater.has-custom-open [data-stack-apply],
.ps-spatial-theater.has-custom-open [data-stack-custom] { display: none !important; }

.ps-customart {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(280px, 1fr);
  gap: 28px;
  align-items: center;
  width: min(760px, 100%);
  padding: 26px;
  border-radius: 18px;
  background: rgba(10, 14, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.ps-customart-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: #070a11;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-customart-preview:not(.is-empty) { border-style: solid; border-color: rgba(0, 245, 160, 0.4); }
.ps-customart-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ps-customart-hint { padding: 0 16px; text-align: center; font-size: 0.85rem; color: hsl(240, 5%, 65%); }
.ps-customart-preview:not(.is-empty) .ps-customart-hint { display: none; }
.ps-customart-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ps-customart-label { font-family: var(--ps-display, Outfit, Inter, sans-serif); font-size: 1.15rem; font-weight: 700; color: #f8fafc; }
.ps-customart-input { width: 100%; }
.ps-customart-more summary { cursor: pointer; font-size: 0.85rem; color: hsl(240, 5%, 70%); padding: 4px 0; }
.ps-customart-more summary:hover { color: #00f5a0; }
.ps-customart-more[open] .ps-customart-input { margin-top: 6px; }
.ps-customart-msg { min-height: 1.2em; margin: 0; font-size: 0.82rem; line-height: 1.4; color: #fbbf24; }
.ps-customart-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ps-customart-actions .ps-spatial-btn:disabled { opacity: 0.4 !important; cursor: not-allowed !important; box-shadow: none !important; transform: none !important; }
.ps-customart-input:focus-visible,
.ps-customart-more summary:focus-visible { outline: 2px solid #00f5a0; outline-offset: 2px; }
.ps-spatial-lock-btn:disabled { opacity: 0.45 !important; cursor: default !important; box-shadow: none !important; transform: none !important; }
@media (max-width: 768px) {
  .ps-customart { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .ps-customart-preview { max-height: 180px; }
  .ps-spatial-custom { align-items: flex-start; overflow-y: auto; }
}

/* ==============================================================================
   ARTWORK SCREENING ROOM
   One stage for the selected folder, a filmstrip of every folder below it.
   Sizes follow the width of the room (container queries), not the window,
   so it holds together on a narrow desktop as well as a wide one.
   ============================================================================== */
.ps-screen {
  --scr-ease: cubic-bezier(0.16, 1, 0.3, 1);
  container: scr / inline-size;
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3cqw, 38px);
  width: 100%;
}

/* Toolbar above the room: one tidy row that wraps instead of stretching. */
#profile-studio-overlay .ps-art-studio-view .ps-art-studio-top-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px 20px !important;
  padding: 12px 16px !important;
}
#profile-studio-overlay .ps-art-studio-view .ps-art-workbench-filters {
  flex: 1 1 480px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 10px !important;
  min-width: 0 !important;
}
#profile-studio-overlay .ps-art-studio-view .ps-art-search {
  flex: 1 1 200px !important;
  width: auto !important;
  min-width: 180px !important;
  max-width: 320px !important;
  height: 38px !important;
}
#profile-studio-overlay .ps-art-studio-view .ps-art-top-controls {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

/* ---- The stage ---- */
.ps-screen-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(560px, 64vh);
  padding: clamp(22px, 3.2cqw, 44px) clamp(20px, 3.6cqw, 52px) clamp(22px, 2.8cqw, 36px);
  border-radius: 24px;
  background: #05070b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(0, 245, 160, 0.1), 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2cqw, 14px);
}
.ps-screen-stage.is-empty { align-items: center; justify-content: center; }
.ps-screen-empty p { margin: 0; color: hsl(240, 5%, 65%); }
.ps-screen-bloom {
  position: absolute;
  inset: -80px;
  z-index: -3;
  background-size: cover;
  background-position: center;
  filter: blur(90px) saturate(220%) brightness(0.3);
  opacity: 0.65;
}
/* fine film grain over the glow */
.ps-screen-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.ps-screen-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 48%, rgba(0, 0, 0, 0) 28%, rgba(3, 5, 9, 0.88) 100%);
}

.ps-screen-head { position: relative; z-index: 3; max-width: 100%; }
.ps-screen-title {
  margin: 0;
  font-family: var(--ps-display, Outfit, Inter, sans-serif);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6cqw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: #f8fafc;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.ps-screen-sub {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 0.9rem;
  color: hsl(240, 5%, 74%);
  font-variant-numeric: tabular-nums;
}
.ps-screen-sub > span:first-child { color: #e2e8f0; font-weight: 600; }
.ps-screen-dot { width: 3px; height: 3px; border-radius: 50%; background: hsl(240, 5%, 45%); }

/* ---- The deck ---- */
.ps-screen-deckwrap {
  --w: clamp(260px, min(46cqw, calc((100vh - 470px) * 1.78)), 620px);
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: calc(var(--w) * 0.62 + 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1700px;
  transform-style: preserve-3d;
}
/* a soft floor under the deck so it sits in the room */
.ps-screen-deckwrap::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: calc(var(--w) * 0.86);
  height: 46px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 245, 160, 0.16) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 70%);
  filter: blur(14px);
  pointer-events: none;
  z-index: -1;
}
.ps-screen .ps-spatial-deck.is-landscape-stage { --dw: var(--w); width: var(--dw) !important; max-height: none !important; }
.ps-screen .ps-spatial-deck.is-poster-stage { --dw: calc(var(--w) * 0.4); width: var(--dw) !important; max-height: none !important; }

/* neighbours spread in proportion to the deck, so nothing crowds or clips */
.ps-screen .is-landscape-stage .ps-spatial-card.is-left-1 { transform: translate3d(calc(var(--dw) * -0.5), 14px, 30px) scale(0.86) rotateY(16deg) rotateZ(-2deg) !important; }
.ps-screen .is-landscape-stage .ps-spatial-card.is-right-1 { transform: translate3d(calc(var(--dw) * 0.5), 14px, 30px) scale(0.86) rotateY(-16deg) rotateZ(2deg) !important; }
.ps-screen .is-landscape-stage .ps-spatial-card.is-left-2 { transform: translate3d(calc(var(--dw) * -0.88), 30px, -50px) scale(0.72) rotateY(26deg) rotateZ(-3.5deg) !important; }
.ps-screen .is-landscape-stage .ps-spatial-card.is-right-2 { transform: translate3d(calc(var(--dw) * 0.88), 30px, -50px) scale(0.72) rotateY(-26deg) rotateZ(3.5deg) !important; }
.ps-screen .is-landscape-stage .ps-spatial-card.is-far-left { transform: translate3d(calc(var(--dw) * -1.14), 46px, -140px) scale(0.58) rotateY(34deg) !important; }
.ps-screen .is-landscape-stage .ps-spatial-card.is-far-right { transform: translate3d(calc(var(--dw) * 1.14), 46px, -140px) scale(0.58) rotateY(-34deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-left-1 { transform: translate3d(calc(var(--dw) * -0.62), 12px, 30px) scale(0.87) rotateY(18deg) rotateZ(-2.5deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-right-1 { transform: translate3d(calc(var(--dw) * 0.62), 12px, 30px) scale(0.87) rotateY(-18deg) rotateZ(2.5deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-left-2 { transform: translate3d(calc(var(--dw) * -1.1), 26px, -50px) scale(0.73) rotateY(28deg) rotateZ(-4.5deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-right-2 { transform: translate3d(calc(var(--dw) * 1.1), 26px, -50px) scale(0.73) rotateY(-28deg) rotateZ(4.5deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-far-left { transform: translate3d(calc(var(--dw) * -1.4), 40px, -140px) scale(0.58) rotateY(34deg) !important; }
.ps-screen .is-poster-stage .ps-spatial-card.is-far-right { transform: translate3d(calc(var(--dw) * 1.4), 40px, -140px) scale(0.58) rotateY(-34deg) !important; }
.ps-screen .ps-spatial-card.is-pre { opacity: 0 !important; z-index: 1 !important; }
.ps-screen .ps-spatial-card {
  transition: transform 0.9s var(--scr-ease), opacity 0.7s var(--scr-ease), filter 0.5s ease, box-shadow 0.5s ease, border-color 0.35s ease !important;
}

/* arrows sit just inside the room's edge */
.ps-screen-deckwrap .ps-spatial-arrow { width: 46px !important; height: 46px !important; }
.ps-screen-deckwrap .ps-spatial-arrow.is-prev { left: clamp(0px, 1.2cqw, 14px) !important; }
.ps-screen-deckwrap .ps-spatial-arrow.is-next { right: clamp(0px, 1.2cqw, 14px) !important; }
.ps-screen-deckwrap .ps-spatial-arrow svg { width: 20px; height: 20px; }
.ps-screen-deckwrap .ps-spatial-arrow:focus-visible,
.ps-screen-pip:focus-visible,
.ps-screen-dock .ps-spatial-btn:focus-visible { outline: 2px solid #00f5a0 !important; outline-offset: 3px !important; }

/* light and glint on the front card */
.ps-screen .ps-spatial-card-inner {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--scr-ease);
}
.ps-screen .ps-spatial-card-inner::before,
.ps-screen .ps-spatial-card-inner::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ps-screen .ps-spatial-card-inner::before {
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.24) 50%, transparent 66%);
  transform: translateX(-130%);
}
.ps-screen .ps-spatial-card-inner.is-sweep::before { animation: psScrSweep 1.2s var(--scr-ease); }
.ps-screen .ps-spatial-card-inner::after {
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.17), transparent 58%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ps-screen .ps-spatial-card-inner.is-lit::after { opacity: 1; }

/* ---- Pager ---- */
.ps-screen-pager { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; min-height: 18px; }
.ps-screen-pip { width: 18px; height: 18px; padding: 0; background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.ps-screen-pip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.5s var(--scr-ease), background 0.3s ease;
}
.ps-screen-pip:hover::before { background: rgba(255, 255, 255, 0.6); }
.ps-screen-pip.is-on::before { width: 24px; background: #00f5a0; }
.ps-screen-pagernum { font-size: 0.85rem; color: hsl(240, 5%, 72%); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ---- Dock ---- */
.ps-screen-dock {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}
.ps-screen-dock [hidden] { display: none !important; }
.ps-screen-dock .ps-spatial-btn {
  padding: 12px 22px !important;
  font-size: 0.9rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.005em !important;
  white-space: nowrap !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
.ps-screen-dock .ps-spatial-btn:hover:not(:disabled) {
  background: rgba(0, 245, 160, 0.1) !important;
  border-color: rgba(0, 245, 160, 0.55) !important;
  color: #00f5a0 !important;
  transform: translateY(-2px) !important;
}
.ps-screen-dock .ps-spatial-btn:active:not(:disabled) { transform: translateY(0) scale(0.98) !important; }
.ps-screen-dock .ps-spatial-lock-btn {
  background: #00f5a0 !important;
  border-color: #00f5a0 !important;
  color: #04130d !important;
  box-shadow: 0 14px 34px -10px rgba(0, 245, 160, 0.6) !important;
}
.ps-screen-dock .ps-spatial-lock-btn:hover:not(:disabled) { background: #6dfac4 !important; color: #04130d !important; }
.ps-screen-dock .ps-spatial-lock-btn.is-current-btn,
.ps-screen-dock .ps-spatial-lock-btn:disabled {
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(0, 245, 160, 0.3) !important;
  color: #6dfac4 !important;
  box-shadow: none !important;
  cursor: default !important;
}
.ps-screen-dock .ps-spatial-pill-count { font-variant-numeric: tabular-nums; }
.ps-screen-custom { position: relative; z-index: 5; display: flex; justify-content: center; }
.ps-screen-custom[hidden] { display: none; }
.ps-screen-stage.has-custom-open .ps-screen-deckwrap,
.ps-screen-stage.has-custom-open .ps-screen-pager,
.ps-screen-stage.has-custom-open .ps-screen-dock { display: none; }
.ps-screen-stage.has-custom-open .ps-screen-custom { flex: 1; align-items: center; animation: psScrRise 0.6s var(--scr-ease) both; }

/* ---- Filmstrip ---- */
.ps-screen-reel { display: flex; flex-direction: column; gap: clamp(18px, 2.4cqw, 28px); }
.ps-screen-reelhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 0 2px; }
.ps-screen-rowname { margin: 0; font-family: var(--ps-display, Outfit, Inter, sans-serif); font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; color: #f1f5f9; }
.ps-screen-rowcount { font-size: 0.8rem; color: hsl(240, 5%, 64%); margin-right: auto; font-variant-numeric: tabular-nums; }
.ps-screen-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 20px 16px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 245, 160, 0.35) transparent;
  background-color: #070910;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  /* sprocket holes along the top and bottom edge of the film */
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 9px, transparent 9px 21px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 9px, transparent 9px 21px);
  background-size: 100% 5px, 100% 5px;
  background-position: 0 5px, 0 calc(100% - 5px);
  background-repeat: no-repeat;
}
.ps-screen-frame {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}
.ps-screen-frame.is-landscape { width: clamp(138px, 13.5cqw, 188px); }
.ps-screen-frame.is-poster { width: clamp(80px, 8cqw, 100px); }
.ps-screen-frame-img {
  display: block;
  overflow: hidden;
  border-radius: 9px;
  background: #0d1119;
  outline: 2px solid transparent;
  outline-offset: 3px;
  opacity: 0.78;
  filter: saturate(0.82);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.9);
  transition: opacity 0.35s var(--scr-ease), outline-color 0.25s ease, filter 0.35s ease, transform 0.45s var(--scr-ease), box-shadow 0.45s var(--scr-ease);
}
.ps-screen-frame.is-landscape .ps-screen-frame-img { aspect-ratio: 16 / 9; }
.ps-screen-frame.is-poster .ps-screen-frame-img { aspect-ratio: 2 / 3; }
.ps-screen-frame-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--scr-ease); }
.ps-screen-frame:hover .ps-screen-frame-img { opacity: 1; filter: none; transform: translateY(-3px); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, 0.95); }
.ps-screen-frame:hover .ps-screen-frame-img img { transform: scale(1.05); }
.ps-screen-frame.is-picked .ps-screen-frame-img {
  opacity: 1;
  filter: none;
  outline-color: #00f5a0;
  box-shadow: 0 16px 34px -12px rgba(0, 245, 160, 0.5);
  animation: psScrPick 0.9s var(--scr-ease);
}
.ps-screen-frame:focus-visible { outline: none; }
.ps-screen-frame:focus-visible .ps-screen-frame-img { outline-color: #fff; opacity: 1; filter: none; }
.ps-screen-frame-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: hsl(240, 5%, 76%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}
.ps-screen-frame:hover .ps-screen-frame-title { color: #f1f5f9; }
.ps-screen-frame.is-picked .ps-screen-frame-title { color: #00f5a0; }
.ps-screen-frame-flag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(4, 19, 13, 0.85);
  color: #6dfac4;
  border: 1px solid rgba(0, 245, 160, 0.35);
}
.ps-screen-frame-flag.is-fix { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(30, 20, 4, 0.85); }

/* ---- Motion: one authored arrival, quieter when switching, calm on edits ---- */
@keyframes psScrRise { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes psScrStage { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes psScrFrame { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes psScrBloom { from { opacity: 0.15; } to { opacity: 0.65; } }
@keyframes psScrSweep { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
@keyframes psScrPick { 0% { outline-offset: 12px; outline-color: rgba(0, 245, 160, 0); } 100% { outline-offset: 3px; outline-color: #00f5a0; } }

.ps-screen.is-intro .ps-screen-stage { animation: psScrStage 1s var(--scr-ease) both; }
.ps-screen.is-intro .ps-screen-bloom,
.ps-screen.is-swap .ps-screen-bloom,
.ps-screen-bloom.is-swap { animation: psScrBloom 1.1s ease-out both; }
.ps-screen.is-intro .ps-screen-title, .ps-screen.is-swap .ps-screen-title { animation: psScrRise 0.85s var(--scr-ease) both; animation-delay: 0.05s; }
.ps-screen.is-intro .ps-screen-sub, .ps-screen.is-swap .ps-screen-sub { animation: psScrRise 0.85s var(--scr-ease) both; animation-delay: 0.15s; }
.ps-screen.is-intro .ps-screen-pager, .ps-screen.is-swap .ps-screen-pager { animation: psScrRise 0.8s var(--scr-ease) both; animation-delay: 0.45s; }
.ps-screen.is-intro .ps-screen-dock, .ps-screen.is-swap .ps-screen-dock { animation: psScrRise 0.8s var(--scr-ease) both; animation-delay: 0.55s; }
.ps-screen.is-intro .ps-screen-reelrow { animation: psScrRise 0.85s var(--scr-ease) both; animation-delay: calc(0.45s + var(--i, 0) * 90ms); }
.ps-screen.is-intro .ps-screen-frame { animation: psScrFrame 0.7s var(--scr-ease) both; animation-delay: calc(0.6s + var(--i, 0) * 90ms + var(--n, 0) * 45ms); }

/* ---- Narrower rooms ---- */
@container scr (max-width: 820px) {
  .ps-screen .ps-spatial-card.is-left-2,
  .ps-screen .ps-spatial-card.is-right-2 { opacity: 0 !important; }
  .ps-screen-deckwrap { --w: clamp(240px, min(62cqw, calc((100vh - 470px) * 1.78)), 520px); }
  .ps-screen-dock .ps-spatial-btn { padding: 11px 18px !important; }
}
@container scr (max-width: 560px) {
  .ps-screen-deckwrap { --w: min(86cqw, 420px); }
  .ps-screen-deckwrap .ps-spatial-arrow { width: 38px !important; height: 38px !important; }
  .ps-screen-dock { flex-direction: column; align-items: stretch; }
  .ps-screen-dock .ps-spatial-btn { width: 100% !important; justify-content: center !important; }
  .ps-screen-frame.is-landscape { width: 136px; }
}
.ps-customart-input:focus-visible { outline: 2px solid #00f5a0; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ps-screen *,
  .ps-screen *::before,
  .ps-screen *::after { animation: none !important; transition: none !important; }
  .ps-screen .ps-spatial-card.is-pre { opacity: 1 !important; }
}

/* ==========================================================================
   Studio Quick Editor: checklist of rows, folders and sources
   ========================================================================== */
.ps-qe { padding-bottom: 96px; }
.ps-qe-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.ps-qe-search { flex: 1 1 220px; min-height: 44px; }
.ps-qe-tools .ps-btn { min-height: 44px; }
.ps-qe-genres { margin-bottom: 14px; border: 1px solid var(--ps-glass-border); border-radius: 12px; background: var(--ps-surface-card); }
.ps-qe-genres > summary { cursor: pointer; padding: 12px 14px; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 0.9rem; }
.ps-qe-genres > summary:focus-visible { outline: 2px solid var(--ps-mint-primary); outline-offset: -2px; border-radius: 12px; }
.ps-qe-genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; padding: 0 10px 12px; }
.ps-qe-list { display: flex; flex-direction: column; gap: 18px; }
.ps-qe-cat-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ps-qe-count { font-size: 0.78rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ps-qe-folders, .ps-qe-sources { list-style: none; margin: 0; padding: 0; }
.ps-qe-folders { border: 1px solid var(--ps-glass-border); border-radius: 12px; background: var(--ps-surface-card); overflow: hidden; }
.ps-qe-folder + .ps-qe-folder { border-top: 1px solid var(--ps-glass-border); }
.ps-qe-folder-row { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; min-height: 44px; }
.ps-qe-check { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 44px; cursor: pointer; min-width: 0; }
.ps-qe-check input { width: 20px; height: 20px; flex: none; accent-color: var(--ps-mint-primary); }
.ps-qe-check input:focus-visible { outline: 2px solid var(--ps-mint-primary); outline-offset: 2px; }
.ps-qe-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-qe-more { width: 44px; height: 44px; flex: none; background: none; border: 0; color: var(--text-muted); cursor: pointer; border-radius: 10px; }
.ps-qe-more:hover { color: #fff; }
.ps-qe-more:focus-visible { outline: 2px solid var(--ps-mint-primary); outline-offset: -2px; }
.ps-qe-sources { padding: 0 8px 8px 44px; }
.ps-qe-sources .ps-qe-check { min-height: 40px; font-size: 0.9rem; color: var(--text-secondary, #cbd5e1); }
.ps-qe-empty { color: var(--text-muted); padding: 24px 0; }
.ps-qe-footer { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: rgba(8, 9, 13, 0.96); border-top: 1px solid var(--ps-glass-border); }
.ps-qe-staged { font-size: 0.92rem; color: var(--text-secondary, #cbd5e1); }
.ps-qe-staged strong { color: var(--ps-mint-primary); font-variant-numeric: tabular-nums; }
.ps-qe-footer-actions { display: flex; gap: 10px; }
.ps-qe-footer-actions .ps-btn { min-height: 44px; }
@media (max-width: 480px) {
  .ps-qe-footer { padding-left: 14px; padding-right: 14px; }
  .ps-qe-footer-actions { width: 100%; }
  .ps-qe-footer-actions .ps-btn { flex: 1; }
}

/* The header's backdrop blur makes it the containing block for the fixed
   bottom sheet; drop it while the profile card is open on phones. */
@media (max-width: 480px) {
  .kap-global-header:has(#kap-auth-toggle.is-open) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Studio supporter badge */
.ps-supporter-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #f5d76e; background: rgba(212, 175, 55, 0.14); border: 1px solid rgba(212, 175, 55, 0.4); }
.ps-supporter-badge svg { width: 12px; height: 12px; }

/* "View my collection" pill + overlay. Above the wizard (25000) and the full-page Studio (100000). */
.kcv-pill { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom) + var(--kcv-offset, 0px)); z-index: 100050; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(14, 17, 24, 0.94); color: #f8fafc; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); font: 600 0.88rem Inter, sans-serif; cursor: pointer; }
.kcv-pill[hidden] { display: none; }
.kcv-pill svg { color: var(--accent, #00f5a0); }
.kcv-pill:hover { border-color: rgba(0, 245, 160, 0.45); }
.kcv-pill:focus-visible, .kcv-close:focus-visible { outline: 2px solid var(--accent, #00f5a0); outline-offset: 3px; }
.kcv-overlay { position: fixed; inset: 0; z-index: 100500; background: #08090d; }
.kcv-frame { width: 100%; height: 100%; border: 0; display: block; }
.kcv-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 100501; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent, #00f5a0); color: var(--on-accent, #04130d); font: 600 0.92rem Inter, sans-serif; cursor: pointer; }
html.kcv-locked { overflow: hidden; }
html:has(#wizard-overlay.open), html:has(.ps-qe-footer), html:has(.nv-preview-bar) { --kcv-offset: 76px; }
@media (max-width: 400px) { .kcv-pill span { display: none; } .kcv-pill { padding: 0 14px; } }

/* Studio Tune */
.ps-tune-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ps-tune-card { padding: 20px; border: 1px solid var(--ps-glass-border); border-radius: 16px; background: var(--ps-surface-card); }
.ps-tune-h { margin: 0 0 6px; font: 700 1.15rem Outfit, Inter, sans-serif; color: #fff; }
.ps-tune-sub { margin: 0 0 16px; font-size: 0.88rem; color: var(--text-muted); }
.ps-tune-q { display: block; margin: 0 0 10px; font-weight: 600; font-size: 0.95rem; color: #f8fafc; padding: 0; }
.ps-tune-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ps-tune-devices { display: flex; flex-direction: column; gap: 8px; }
.ps-tune-device { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--ps-glass-border); border-radius: 12px; cursor: pointer; }
.ps-tune-device.is-on { border-color: var(--ps-glass-border-active); background: rgba(0, 245, 160, 0.06); }
.ps-tune-device:has(input:focus-visible) { outline: 2px solid var(--ps-mint-primary); outline-offset: 2px; }
.ps-tune-device input { accent-color: var(--ps-mint-primary); width: 18px; height: 18px; flex: none; }
.ps-tune-device-icon { width: 22px; height: 22px; color: var(--ps-mint-primary); flex: none; }
.ps-tune-device-icon svg { width: 100%; height: 100%; }
.ps-tune-device-name { font-size: 0.92rem; }
.ps-tune-range { width: 100%; min-height: 44px; accent-color: var(--ps-mint-primary); }
.ps-tune-ticks { display: flex; justify-content: space-between; gap: 4px; font-size: 0.7rem; color: var(--text-muted); text-align: center; }
.ps-tune-ticks span { flex: 1; }
.ps-tune-value { margin: 10px 0 8px; font-weight: 700; font-size: 1.05rem; color: #fff; }
.ps-tune-hint { margin: 8px 0 0; font-size: 0.82rem; color: var(--text-muted); }
.ps-tune-list { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.ps-tune-speedtest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.ps-tune-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 0.9rem; cursor: pointer; }
.ps-tune-toggle input { width: 18px; height: 18px; accent-color: var(--ps-mint-primary); }
.ps-tune-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ps-tune-actions .ps-btn, .ps-tune-speedtest .ps-btn { min-height: 44px; }
@media (max-width: 480px) { .ps-tune-ticks { font-size: 0.62rem; } .ps-tune-actions .ps-btn { flex: 1; } }

/* Supporter thank-you celebration */
.ks-celebrate { position: fixed; inset: 0; z-index: 100100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 6, 10, 0.88); animation: ks-fade 0.25s ease both; }
.ks-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ks-sweep { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ks-sweep::before { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 40%; background: linear-gradient(100deg, transparent 0%, rgba(0, 245, 160, 0.16) 40%, rgba(212, 175, 55, 0.22) 60%, transparent 100%); transform: translateX(-120%) skewX(-12deg); animation: ks-sweep 2.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ks-card { position: relative; width: 100%; max-width: 440px; padding: 36px 28px 28px; text-align: center; background: #12151e; border: 1px solid rgba(212, 175, 55, 0.35); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7); animation: ks-rise 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ks-star { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: #d4af37; color: #1a1400; margin-bottom: 16px; }
.ks-title { margin: 0 0 10px; font: 800 1.6rem/1.15 Outfit, Inter, sans-serif; color: #fff; }
.ks-copy { margin: 0 0 24px; color: hsl(240, 5%, 75%); line-height: 1.55; }
.ks-continue { min-height: 44px; padding: 0 28px; border: 0; border-radius: 12px; background: var(--accent, #00f5a0); color: var(--on-accent, #04130d); font: 600 0.95rem Inter, sans-serif; cursor: pointer; }
.ks-continue:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ks-celebrate.is-still, .ks-celebrate.is-still .ks-card { animation: ks-fade 0.2s ease both; }
@keyframes ks-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ks-rise { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes ks-sweep { to { transform: translateX(380%) skewX(-12deg); } }
@media (prefers-reduced-motion: reduce) { .ks-celebrate, .ks-card { animation: ks-fade 0.2s ease both; } .ks-sweep::before { animation: none; } }


/* Quick Editor: per-row tools, ordering, options, profile panel */
.ps-qe-cat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ps-qe-cat-head .ps-qe-cat-title { margin: 0; flex: 1 1 200px; }
.ps-qe-cat-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ps-qe-mini { min-width: 44px; min-height: 44px; padding: 0 10px; background: transparent; border: 1px solid var(--ps-glass-border); border-radius: 10px; color: var(--text-secondary, #cbd5e1); font: 600 0.8rem Inter, sans-serif; cursor: pointer; }
.ps-qe-mini:hover:not(:disabled) { border-color: var(--ps-glass-border-hover); color: #fff; }
.ps-qe-mini:disabled { opacity: 0.35; cursor: default; }
.ps-qe-mini:focus-visible, .ps-qe-viewmode:focus-visible { outline: 2px solid var(--ps-mint-primary); outline-offset: 2px; }
.ps-qe-viewmode { min-height: 44px; padding: 0 8px; background: var(--ps-obsidian-card); color: #fff; border: 1px solid var(--ps-glass-border); border-radius: 10px; font: 600 0.8rem Inter, sans-serif; }
.ps-qe-folder-row .ps-qe-mini { min-width: 40px; padding: 0 6px; border-color: transparent; }
.ps-qe-meta { margin-left: auto; padding-left: 10px; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.ps-qe-options { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.ps-qe-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.ps-qe-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-qe-inline .ps-input { flex: 1 1 180px; min-height: 44px; }
.ps-qe-inline .ps-btn, #ps-qe-sort { min-height: 44px; }
.ps-qe-profile { margin-top: 18px; }
@media (max-width: 480px) { .ps-qe-cat-tools { width: 100%; } .ps-qe-viewmode { flex: 1; } }

/* Device performance / Content filters */
.ps-tune-explain { margin: 8px 0 14px; font-size: 0.88rem; line-height: 1.5; color: var(--text-secondary, #cbd5e1); }
.ps-tune-h2 { margin-top: 22px; }
.ps-tune-h3 { margin: 18px 0 8px; font-size: 0.95rem; font-weight: 700; color: #fff; }
.ps-tune-tag { margin-left: 8px; padding: 2px 9px; border-radius: 999px; font: 600 0.7rem Inter, sans-serif; color: var(--text-muted); background: rgba(255, 255, 255, 0.08); vertical-align: middle; }
.ps-tune-adv { margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ps-tune-adv > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 0.9rem; }
.ps-tune-adv[open] > summary { margin-bottom: 4px; }
.ps-tune-adv > :not(summary) { margin-bottom: 12px; }
.ps-tune-adv textarea { width: 100%; font: 0.75rem/1.4 ui-monospace, monospace; }
.ps-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Settings tools (Subtitles and friends) */
.ps-tool-grid { align-items: start; }
.ps-tool-wide { grid-column: 1 / -1; }
.ps-tool-fields { display: flex; flex-direction: column; gap: 14px; }
.ps-tool-toggle { align-items: flex-start; padding: 4px 0; }
.ps-tool-toggle input { margin-top: 3px; flex: none; accent-color: var(--ps-mint-primary); }
.ps-tool-toggle small { display: block; margin-top: 2px; font-size: 0.78rem; line-height: 1.4; color: var(--text-muted, #94a3b8); }
.ps-tool-review .is-empty { color: var(--text-muted, #94a3b8); list-style: none; margin-left: -1em; }
.ps-st-preview { position: sticky; top: 0; z-index: 3; margin: 0 0 16px; padding: 10px 0 8px; background: var(--ps-obsidian-base, #08090d); max-width: 760px; margin-inline: auto; }
.ps-st-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; container-type: size; overflow: hidden; border-radius: 14px; border: 1px solid var(--ps-glass-border); max-height: 38vh; margin-inline: auto; }
.ps-st-scene-dark { background: radial-gradient(120% 90% at 70% 20%, #2a3a52 0%, #0d1220 55%, #05070c 100%); }
.ps-st-scene-bright { background: linear-gradient(180deg, #cfe3f5 0%, #eef2f6 55%, #d8cdb5 100%); }
.ps-st-caption { position: absolute; left: 6%; right: 6%; text-align: center; line-height: 1.35; font-family: Roboto, "Segoe UI", Arial, sans-serif; }
.ps-st-caption span { padding: 0.05em 0.35em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ps-st-frame.is-mini { max-height: none; border-radius: 10px; }
.ps-st-scenes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ps-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ps-glass-border); background: transparent; color: inherit; font: 600 0.8rem Inter, sans-serif; cursor: pointer; }
.ps-chip.is-on { border-color: var(--ps-glass-border-active); background: rgba(0, 245, 160, 0.08); }
.ps-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ps-look { display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: left; border-radius: 14px; border: 1px solid var(--ps-glass-border); background: transparent; color: inherit; cursor: pointer; }
.ps-look.is-on { border-color: var(--ps-glass-border-active); background: rgba(0, 245, 160, 0.06); }
.ps-look-name { font-weight: 700; font-size: 0.9rem; }
.ps-look-blurb { font-size: 0.76rem; line-height: 1.35; color: var(--text-muted, #94a3b8); }
.ps-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ps-seg-btn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ps-glass-border); background: transparent; color: inherit; font-size: 0.85rem; cursor: pointer; }
.ps-seg-btn.is-on { border-color: var(--ps-glass-border-active); background: rgba(0, 245, 160, 0.08); font-weight: 700; }
.ps-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ps-swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ps-glass-border); background: var(--sw); cursor: pointer; padding: 0; overflow: hidden; }
.ps-swatch.is-on { border-color: var(--ps-mint-primary); box-shadow: 0 0 0 2px rgba(0, 245, 160, 0.35); }
.ps-swatch:focus-visible, .ps-swatch-custom:focus-within, .ps-seg-btn:focus-visible, .ps-look:focus-visible, .ps-chip:focus-visible { outline: 2px solid var(--ps-mint-primary); outline-offset: 2px; }
.ps-swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
@media (max-width: 640px) { .ps-st-frame { max-height: 30vh; } .ps-looks { grid-template-columns: repeat(2, 1fr); } }

.ps-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.8rem; }
.ps-sample-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.ps-sample-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--ps-glass-border); }
.ps-sample-list li.is-hit { border-color: var(--ps-glass-border-active); background: rgba(0, 245, 160, 0.06); }
.ps-sample-list li.is-miss { color: var(--text-muted, #94a3b8); }
.ps-sample-list small { margin-left: auto; opacity: 0.8; }
.ps-tool-multi { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; }
.ps-tool-multi legend { padding: 0; margin-bottom: 4px; }

.ps-dev-summary { margin: -6px 0 14px; font-size: 0.82rem; color: var(--text-secondary, #cbd5e1); }
.ps-field { display: flex; flex-direction: column; gap: 4px; }
.ps-dev { margin: 0; font-size: 0.76rem; line-height: 1.4; color: var(--text-muted, #94a3b8); }
.ps-dev-chip { display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 999px; font-weight: 700; font-size: 0.7rem; color: #0b1a14; background: var(--ps-mint-primary); }

.ps-setup-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
