.library-heading{padding:42px 0 24px;display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.library-heading h1{font-size:clamp(36px,4vw,58px);margin:12px 0}.library-heading p:not(.eyebrow){font-size:15px}.library-news-link{white-space:nowrap;font-size:12px;color:var(--brand);padding-bottom:6px}.library-search{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:8px 10px 8px 20px;max-width:760px;margin-bottom:26px}.library-search>span{font-size:26px;color:var(--brand)}.library-search input{border:0;background:transparent;color:var(--text);min-width:0;flex:1;outline-offset:2px;padding:12px 0}.library-search button{border:0;border-radius:10px;background:var(--brand);color:var(--surface);padding:12px 17px;font-size:12px;font-weight:650}.library-tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--border);padding-bottom:14px}.library-tab{white-space:nowrap;padding:9px 14px;border:1px solid transparent;border-radius:30px;font-size:13px;font-weight:650}.library-tab>span{font-size:10px;margin-left:5px;opacity:.6}.library-tab.active{background:var(--text);color:var(--bg)}.library-tab:hover{border-color:var(--border)}.library-subtypes{display:flex;gap:9px;flex-wrap:wrap;padding:14px 0 0}.library-subtypes a{font-size:11px;border:1px solid var(--border);border-radius:7px;padding:5px 10px;color:var(--muted)}.library-subtypes a[aria-current]{background:var(--brand-soft);color:var(--brand);border-color:var(--brand)}.library-results{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:22px 0 16px;font-size:12px}.library-favorites{background:transparent;border:1px solid var(--border);padding:7px 13px;border-radius:20px;font-size:11px}.library-favorites[aria-pressed=true]{color:var(--brand);border-color:var(--brand)}.library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:22px 18px;align-items:stretch}.library-card{min-width:0;display:flex;flex-direction:column;height:100%}.library-card[hidden]{display:none}.library-visual{aspect-ratio:16/11;position:relative;overflow:hidden;border:1px solid rgba(255,255,255,0.08);border-radius:18px;background:linear-gradient(180deg,#181a26 0%,#0d0f18 100%);display:flex;align-items:center;justify-content:center}.library-frame{border:0;width:100%;height:100%;pointer-events:none;display:block}.library-media{width:100%;height:100%;object-fit:cover;object-position:center 25%;display:block}.library-open{position:absolute;inset:0;z-index:2;border-radius:16px}.library-open:hover{box-shadow:inset 0 0 0 2px var(--brand)}.library-format{position:absolute;bottom:12px;left:12px;font-size:9px;font-weight:700;letter-spacing:.7px;border-radius:6px;background:#ffffffed;color:#292537;padding:5px 8px;pointer-events:none;z-index:3}.library-play{position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:28px;text-shadow:0 2px 12px #000;pointer-events:none}.library-card-body{padding:10px 2px 4px;display:flex;flex-direction:column;flex:1;justify-content:space-between;gap:6px}.library-card-meta{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted)}.library-save{border:0;background:transparent;font-size:22px;padding:0 5px;color:var(--muted);min-width:32px;min-height:32px}.library-save[aria-pressed=true]{color:var(--brand)}.library-card h2{font-size:14px;letter-spacing:-.2px;line-height:1.4;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.library-card-body>p{font-size:10px;margin:0}.library-card-body>p:empty{display:none !important;margin:0 !important;padding:0 !important}.library-empty{padding:64px 20px;text-align:center;border:1px dashed var(--border);border-radius:20px}.library-empty h2{font-size:30px}.library-empty p{margin:16px auto 24px;max-width:540px}.library-footnote{font-size:11px;margin:30px 0 50px}.library-notice{padding:12px 0;font-size:12px;color:var(--brand)}.resource-heading{padding:40px 0 26px}.resource-heading>a{font-size:12px;color:var(--brand)}.resource-heading .eyebrow{margin:24px 0 10px}.resource-heading h1{font-size:clamp(30px,4vw,50px);margin-bottom:12px}.resource-workspace{display:grid;grid-template-columns:1fr 1fr;gap:24px}.resource-preview{width:100%;height:440px;border:1px solid var(--border);border-radius:16px;background:#e9e9ef}.resource-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;font-size:12px}.resource-toolbar button,.resource-toolbar select{border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);padding:7px 12px}.resource-toolbar label{display:flex;align-items:center;gap:8px}.resource-code pre{margin:0 0 14px;background:#17151f;color:#ece8fa;padding:22px;border-radius:16px;height:440px;overflow:auto;font-size:12px;line-height:1.65;white-space:pre}.resource-code>[role=status]{font-size:12px}.resource-provenance{margin:46px 0;max-width:800px;display:grid;gap:16px}.resource-provenance h2{font-size:26px}.resource-provenance pre{white-space:pre-wrap;font-size:12px;overflow-wrap:anywhere;padding:18px;border:1px solid var(--border);border-radius:12px}.resource-provenance summary{cursor:pointer;font-size:13px;color:var(--brand)}
@media(min-width:1450px){.container:has(.library-heading){max-width:1520px}}
@media(max-width:900px){.resource-workspace{grid-template-columns:1fr}.library-heading{align-items:flex-start}.library-news-link{display:none}}
@media(max-width:560px){.header-subscribe{display:none}.header-actions{gap:6px}.container{padding:0 16px}.header-inner{padding:0 16px}.library-tabs{max-width:100%}.library-heading{padding-top:26px}.library-heading h1{font-size:36px}.library-search{gap:8px;padding-left:12px}.library-search button{font-size:10px;padding:12px 10px}.library-search input{font-size:12px}.library-grid{grid-template-columns:1fr}.library-results{align-items:flex-start}.library-favorites{max-width:155px}.resource-preview{height:340px}}

.library-code-thumbnail{object-fit:contain}.library-frame{position:absolute;width:400px;height:300px;left:50%;top:50%;transform:translate(-50%,-50%) scale(.85)}


/* WOW Hero & Header Styles */
.library-hero-content { max-width: 820px; }
.library-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 10px #a855f7;
  animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.gradient-glow {
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 800;
}
.library-hero-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 680px;
  margin: 10px 0 16px;
}
.library-hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.stat-badge strong { color: var(--brand); font-weight: 700; }

/* Enhanced Search Bar */
.search-kbd {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

/* Card Visuals & Badges */
.library-card {
  contain: content;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.library-card:hover {
  transform: translateY(-4px);
}
.library-visual {
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.library-card:hover .library-visual {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.55);
}
.library-media {
  transition: filter 0.2s;
}
.library-card:hover .library-media {
  filter: brightness(1.04);
}
.library-badge-row {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.library-format {
  position: static !important;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  border-radius: 6px;
  padding: 4px 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fmt-video {
  background: rgba(14, 165, 233, 0.85);
  color: #ffffff;
}
.fmt-image {
  background: rgba(236, 72, 153, 0.85);
  color: #ffffff;
}
.fmt-code {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}
.fmt-motion {
  background: rgba(168, 85, 247, 0.88);
  color: #ffffff;
}
.fmt-web {
  background: rgba(245, 158, 11, 0.88);
  color: #ffffff;
}
.fmt-ui {
  background: rgba(20, 184, 166, 0.88);
  color: #ffffff;
}
.fmt-moodboard {
  background: rgba(139, 92, 246, 0.9);
  color: #ffffff;
}
.library-model-tag {
  font-size: 9px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 17, 26, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Superdesign-Inspired Live Interactive Stage */
.live-stage {
  margin: 28px 0 36px;
  border-radius: 20px;
  background: #090a10;
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.live-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(14, 16, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap;
  gap: 12px;
}
.live-stage-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGlow 2s infinite;
}
.live-stage-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}
.live-stage-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}
.live-stage-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stage-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stage-device-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}
.stage-device-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.22));
  border-color: rgba(168, 85, 247, 0.6);
  color: #ffffff;
  box-shadow: 0 0 16px -4px rgba(168, 85, 247, 0.5);
}
.stage-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.stage-external-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}
.live-stage-viewport-wrap {
  position: relative;
  width: 100%;
  min-height: 720px;
  background: #040508;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  overflow: hidden;
  transition: background 0.3s;
}
.live-stage-frame-container {
  width: 100%;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.live-stage-frame-container.is-mobile {
  width: 390px;
  max-width: 95%;
  height: 780px;
  margin: 28px auto 36px;
  border-radius: 40px;
  border: 12px solid #1a1e2b;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: #000;
}
.live-stage-iframe {
  width: 100%;
  height: 750px;
  border: 0;
  display: block;
  background: #ffffff;
}
.ui-component-stage .live-stage-viewport-wrap {
  min-height: 520px;
  background: #090a10;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.ui-component-stage .live-stage-iframe {
  height: 540px;
  background: #090a10;
}
.ui-component-stage .live-stage-frame-container.is-mobile {
  height: 720px;
}
.live-stage.is-expanded {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-radius: 0;
  z-index: 50;
}
.live-stage.is-expanded .live-stage-viewport-wrap {
  min-height: 85vh;
}
.live-stage.is-expanded .live-stage-iframe {
  height: 85vh;
}
.stage-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.stage-expand-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.library-card[data-resource-id^="yl-"] .library-media,
.library-card[data-resource-id^="lex-"] .library-media,
.library-visual:has(.fmt-image) .library-media {
  object-fit: cover;
  object-position: center 25%;
}
.media-fallback-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #181628 0%, #0d0f18 100%);
  color: var(--muted);
  font-size: 11px;
}
.media-fallback-box .fallback-icon {
  font-size: 24px;
  color: var(--brand);
  opacity: 0.85;
}
.live-stage-iframe, .modal-live-iframe {
  opacity: 1;
  background: #0f111a;
}
.preview-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 17, 26, 0.88);
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 5;
  animation: previewSpinnerFade 0.25s ease 0.35s forwards;
}
@keyframes previewSpinnerFade {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
.preview-spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand, #a855f7);
  box-shadow: 0 0 10px var(--brand, #a855f7);
  animation: pulseGlow 1.2s infinite;
}
.live-stage-frame-container.is-mobile .live-stage-iframe {
  height: 100%;
}
.live-stage-hint {
  padding: 12px 20px;
  background: rgba(14, 16, 24, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.live-stage-hint strong {
  color: #38bdf8;
}

/* Modal Live Stage */
.modal-live-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #090a10;
  border-radius: 12px;
  overflow: hidden;
}
.modal-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(18, 21, 31, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stage-tag {
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
}
.modal-device-toggles {
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-dev-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-dev-btn.active {
  background: rgba(168, 85, 247, 0.3);
  border-color: #a855f7;
  color: #ffffff;
}
.modal-fs-btn {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}
.modal-fs-btn:hover {
  color: #fff;
  border-color: #a855f7;
}
.modal-iframe-box {
  flex: 1;
  min-height: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  transition: all 0.3s;
}
.modal-iframe-box.mobile-box {
  width: 375px;
  max-width: 90%;
  margin: 16px auto;
  border-radius: 30px;
  border: 8px solid #1a1e2b;
  overflow: hidden;
  height: 520px;
}
.modal-live-iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
}
.modal-stage-caption {
  margin: 0;
  padding: 8px 14px;
  font-size: 11px;
  color: #94a3b8;
  background: rgba(18, 21, 31, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Live pill on cards */
.library-live-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px -2px rgba(16, 185, 129, 0.6);
  text-transform: uppercase;
}

/* Stage controls in resource-workspace */
.stage-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.resource-preview {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.resource-preview.mobile-frame {
  max-width: 390px;
  height: 640px;
  margin: 16px auto;
  display: block;
  border-radius: 36px;
  border: 10px solid #1a1e2b;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
}

/* Unified card alignment, compact meta and headings */
.library-grid { align-items: stretch; }
.library-card:not(.is-image-card):not(.is-moodboard-card) .library-visual:has(.fmt-image), .library-card:not(.is-image-card):not(.is-moodboard-card) .library-visual:has(.fmt-moodboard) { aspect-ratio: 16/11; height: auto; background: linear-gradient(180deg, #181a26 0%, #0d0f18 100%); }
.library-card:not(.is-image-card):not(.is-moodboard-card) .library-visual:has(.fmt-image) img.library-media, .library-card:not(.is-image-card):not(.is-moodboard-card) .library-visual:has(.fmt-moodboard) img.library-media { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.library-card-meta > span { overflow-wrap: anywhere; min-width: 0; }
.library-card-body > p:empty { display: none !important; margin: 0 !important; padding: 0 !important; }
.library-heading { padding-top: 28px; padding-bottom: 20px; }

.krea-badge-icon {
  display: inline-block;
  vertical-align: -1px;
  margin-right: 4px;
  filter: invert(1);
}

/* Moodboard view - Exact replica of Krea.ai moodboard gallery */
.library-grid.is-moodboard-view {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px 20px !important;
  align-items: start !important;
}
@media (max-width: 1100px) {
  .library-grid.is-moodboard-view {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 768px) {
  .library-grid.is-moodboard-view {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}
@media (max-width: 480px) {
  .library-grid.is-moodboard-view {
    grid-template-columns: 1fr !important;
  }
}
.library-grid.is-moodboard-view .library-card {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.library-grid.is-moodboard-view .library-card:hover {
  transform: translateY(-3px);
}
.library-grid.is-moodboard-view .library-card .library-visual {
  aspect-ratio: 240 / 135 !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #0f1015 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.library-grid.is-moodboard-view .library-card .library-visual img.library-media {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 14px !important;
  display: block !important;
}
.library-grid.is-moodboard-view .library-card .library-card-body {
  padding: 10px 2px 0 !important;
}
.library-grid.is-moodboard-view .library-card .library-card-meta {
  display: none !important;
}
.library-grid.is-moodboard-view .library-card h2 {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: #f0f0f5 !important;
  margin: 0 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.library-grid.is-moodboard-view .library-card h2 a {
  color: inherit !important;
  text-decoration: none !important;
}
.library-grid.is-moodboard-view .library-card h2 a:hover {
  color: #a78bfa !important;
}

/* Images view - Fluid Adaptive Masonry (Matching Krea image explore) */
.library-grid.is-images-view {
  display: block !important;
  columns: 4 230px !important;
  column-gap: 16px !important;
}
@media (max-width: 1100px) {
  .library-grid.is-images-view {
    columns: 3 210px !important;
  }
}
@media (max-width: 768px) {
  .library-grid.is-images-view {
    columns: 2 160px !important;
    column-gap: 12px !important;
  }
}
@media (max-width: 440px) {
  .library-grid.is-images-view {
    columns: 1 100% !important;
  }
}
.library-grid.is-images-view .library-card {
  break-inside: avoid !important;
  margin-bottom: 16px !important;
  display: inline-block !important;
  width: 100% !important;
  border-radius: 12px !important;
  background: var(--surface-1, #13141f) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08)) !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.library-grid.is-images-view .library-visual {
  aspect-ratio: auto !important;
  height: auto !important;
  background: #0d0f18 !important;
}
.library-grid.is-images-view .library-media,
.library-grid.is-images-view .library-visual img.library-media {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 12px 12px 0 0 !important;
}
.library-grid.is-images-view .library-card-meta {
  padding-bottom: 2px !important;
}
.library-grid.is-images-view .library-card-meta > span:empty {
  display: none !important;
}

/* Harmonious, balanced card sizing for default Tout grid (no empty voids) */
.library-grid:not(.is-images-view) .library-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-width: 0 !important;
}
.library-grid:not(.is-images-view) .library-visual {
  aspect-ratio: 16 / 10.5 !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #0e1018 !important;
}
.library-grid:not(.is-images-view) .library-media {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 25% !important;
  display: block !important;
}

/* Rotating Declic Word */
.rotating-declic {
  display: inline-block;
  font-style: normal;
  font-weight: 800;
  color: #3b33ff;
  letter-spacing: -0.02em;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.rotating-declic.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

/* Keep the genuine preview visible until the isolated demo renders. */
.live-stage-frame-container,.modal-iframe-box{position:relative}
.stage-placeholder{position:relative;min-height:340px;width:100%;background:var(--surface);color:var(--text)}
.stage-placeholder>img,.stage-placeholder>video{display:block;width:100%;max-height:540px;object-fit:contain}
.stage-launch{padding:22px;text-align:center;background:var(--surface);color:var(--text)}
.stage-launch p{font-size:13px;margin:12px 0}.stage-launch a{font-size:12px;color:var(--brand)}
iframe[data-preview-src]:not(.ready){position:absolute;inset:0;opacity:0;pointer-events:none}
iframe[data-preview-src][hidden],.stage-placeholder[hidden]{display:none!important}
iframe[data-preview-src].ready{position:relative;opacity:1}
@media(max-width:600px){.stage-placeholder{min-height:220px}.stage-launch{padding:16px}}
