@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&display=swap');

/* ============================================================
 * Grizat — Workspace Dashboard (lista "Your grizats")
 *
 * Reescrito completo. El archivo anterior tenía 46 líneas, todas
 * para un modal (.ps-modal / .ps-modal-box) que ningún JS usa —
 * ninguna clase real del dashboard (.ps-dash-title, .ps-plan-badge,
 * .ps-workspace-card, etc.) tenía una sola regla acá.
 *
 * Esas clases SÍ estaban definidas en el HTML legacy de la página
 * (bloque "Dashboard: control-room dark, unified with the rest of
 * the site"), y ese es el diseño que se portó acá — con una
 * diferencia importante: se agrega la regla de FONDO que faltaba
 * en el original (ver el comentario en workspace.php sobre
 * body.ps-workspace-page). Sin esa regla, todo este bloque asumía
 * un fondo oscuro que en realidad nunca estaba declarado en
 * ningún lado — esa fue la causa real del título invisible.
 * ============================================================ */

:root {
  /* Workspace aliases now consume Grizat Design System v1.
     Kept for backward compatibility during DS1-B screen migration. */
  --grizat-bg: #0B1220;
  --grizat-panel: var(--grizat-surface, #111A2B);
  --grizat-panel-2: var(--grizat-surface-subtle, #0F1826);
  --grizat-border: #26344A;
  --grizat-cyan: var(--grizat-accent, #00F2FE);
  --grizat-cyan-dark: #00CBD5;
  --grizat-text: #fff;
  --grizat-text-dim: var(--grizat-text-secondary, #D7E0ED);
  --grizat-muted: var(--grizat-text-muted, #8FA0BC);
  --grizat-muted-2: var(--grizat-text-disabled, #64748B);
  --grizat-danger: #FF4500; /* legacy alias; semantic remap happens in DS1-B */
  --grizat-font: Sora, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --grizat-font-mono: 'JetBrains Mono', monospace;
  --grizat-radius-xs: 4px;
  --grizat-radius-sm: 6px;
  --grizat-radius-md: 10px;
  --grizat-radius-lg: 14px;
}

/* ------------------------------------------------------------
 * Shell: la pieza que faltaba. Pinta todo el fondo de la página
 * del dashboard, no solo el contenedor de la lista, para que no
 * quede un borde blanco alrededor en pantallas altas o angostas.
 * ------------------------------------------------------------ */
body.ps-workspace-page {
  background: var(--grizat-bg);
}

body.ps-workspace-page .site-content,
body.ps-workspace-page #content,
body.ps-workspace-page .ast-container {
  background: var(--grizat-bg);
}

/* Astra envuelve el contenido en su propio contenedor "boxed" con
 * fondo blanco propio cuando el layout de la página es Boxed/Content
 * Boxed — es una capa DISTINTA de .ast-container (que ya cubríamos
 * arriba) y quedaba fuera, dejando esas dos franjas blancas a los
 * costados que se ven en producción. */
body.ps-workspace-page #page,
body.ps-workspace-page .hfeed,
body.ps-workspace-page .ast-separate-container {
  background: var(--grizat-bg);
}

/* Confirmado con el inspector: existe una fila "Above Header" de
 * Astra (arriba de la barra principal del nav) con fondo blanco
 * propio, que no tenía cubierta. */
body.ps-workspace-page .ast-above-header-wrap,
body.ps-workspace-page .ast-above-header-bar,
body.ps-workspace-page .ast-above-header {
  background: var(--grizat-bg);
}

/* Estas 4 reglas vivían en el HTML legacy de la página (el bloque
 * "Dashboard de workspaces — Grizat v4", ya eliminado de ahí) y
 * nunca se migraron para acá — eran justo la pieza de layout que
 * faltaba, no de color: sin el max-width:none, Astra le sigue
 * aplicando su ancho de contenido "boxed" a esta página aunque el
 * fondo ya esté pintado oscuro alrededor, y ESO es lo que se ve
 * como blanco a los costados. */
body.ps-workspace-page .site-content .ast-container,
body.ps-workspace-page #content .ast-container {
  max-width: none;
  padding-top: 0;
}

body.ps-workspace-page .entry-content {
  margin-top: 0 !important;
}

body.ps-workspace-page .site-main > article {
  padding-top: 0 !important;
}

#ps-grillas-list {
  color: var(--grizat-text-dim);
  font-family: var(--grizat-font);
  padding: 24px 0 40px;
}

/* ------------------------------------------------------------
 * Cabecera: título + badge de plan + copy + botón "New grizat"
 * ------------------------------------------------------------ */
.ps-dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 30px;
}

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

.ps-dash-title {
  margin: 0;
  color: var(--grizat-text);
  font-family: var(--grizat-font);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.ps-plan-badge {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 0;
  padding: 3px 8px;
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-sm);
  background: var(--grizat-panel);
  color: var(--grizat-muted-2);
  font-family: var(--grizat-font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.2;
}

.ps-dash-copy {
  margin: 8px 0 0;
  color: var(--grizat-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

/* Botón "+ New grizat" — blanco sólido: mismo patrón que usan
 * Linear/Vercel/Raycast para la acción primaria sobre fondo oscuro.
 * (Ver el override de .ps-head-primary más abajo — mismo botón,
 * mismo criterio, en la vista abierta de un grizat.) */
.ps-new-grizat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--grizat-radius-md);
  background: #fff;
  color: var(--grizat-bg);
  font-family: var(--grizat-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ps-new-grizat-btn span {
  font-size: 16px;
  line-height: 1;
}

.ps-new-grizat-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, .18);
}

.ps-dash-limit {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-md);
  background: var(--grizat-panel);
  color: var(--grizat-muted);
  font-size: 14px;
}

.ps-dash-limit a {
  color: var(--grizat-text);
  text-decoration: underline;
  text-decoration-color: var(--grizat-cyan);
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------
 * Estado vacío (sin grizats todavía)
 * ------------------------------------------------------------ */
.ps-empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--grizat-border);
  border-radius: var(--grizat-radius-lg);
  background: var(--grizat-panel-2);
  text-align: center;
}

.ps-empty-icon {
  margin: 0 0 10px;
  color: var(--grizat-cyan);
  font-size: 28px;
  line-height: 1;
}

.ps-empty-state h3 {
  margin: 0;
  color: var(--grizat-text);
  font-family: var(--grizat-font);
  font-size: 20px;
  font-weight: 800;
}

.ps-empty-state p {
  max-width: 420px;
  margin: 10px auto 0;
  color: var(--grizat-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ps-empty-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--grizat-radius-md);
  background: var(--grizat-cyan);
  color: var(--grizat-bg);
  font-family: var(--grizat-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ps-empty-create:hover {
  background: var(--grizat-cyan-dark);
}

/* ------------------------------------------------------------
 * Grilla de tarjetas
 * ------------------------------------------------------------ */
.ps-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.ps-workspace-card {
  position: relative;
  min-height: 224px;
  max-width: 340px;
  padding: 0 13px 13px;
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-lg);
  background: var(--grizat-panel);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ps-workspace-card:hover {
  transform: translateY(-2px);
  border-color: var(--grizat-cyan);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}

/* La franja de arriba: no es decoración, es el/los color(es) de marca
 * real de las plataformas que tiene ese grizat adentro (YouTube,
 * Twitch, Kick...). Recortada como una "pestaña" en vez de ocupar
 * todo el ancho — el guiño a carpeta que pediste, sin ir al ícono de
 * carpeta literal (ver la respuesta sobre cards vs. carpetas). */
.ps-card-strip {
  height: 6px;
  margin: 0 22px 0 14px;
  border-radius: 0 0 var(--grizat-radius-sm) var(--grizat-radius-sm);
  background: var(--grizat-border);
}

.ps-card-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 112px;
  margin: 13px 0 14px;
  border-radius: var(--grizat-radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #0d1520;
}

.ps-card-preview span {
  position: relative;
  background: linear-gradient(155deg, #17364a, #0d2638);
}

.ps-card-preview-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 5px;
  border-radius: var(--grizat-radius-xs);
  color: #fff;
  font-family: var(--grizat-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .03em;
  font-style: normal;
}

.ps-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ps-card-main {
  min-width: 0;
  cursor: pointer;
}

.ps-card-name {
  display: block;
  overflow: hidden;
  color: var(--grizat-text);
  font-family: var(--grizat-font);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-card-meta {
  display: block;
  margin-top: 5px;
  color: var(--grizat-muted-2);
  font-family: var(--grizat-font-mono);
  font-size: 12px;
}

.ps-card-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--grizat-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ps-card-menu-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-md);
  background: var(--grizat-panel);
  color: var(--grizat-muted-2);
  font-size: 14px;
  cursor: pointer;
}

.ps-card-menu-btn:hover,
.ps-card-menu-btn[aria-expanded="true"] {
  border-color: var(--grizat-cyan);
  background: #16233A;
  color: var(--grizat-text);
}

/* Menú de acciones de la card (renombrar / descripción / compartir / duplicar / borrar) */
.ps-card-actions {
  display: none;
  position: absolute;
  z-index: 20;
  top: 44px;
  right: 13px;
  left: 13px;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-lg);
  background: var(--grizat-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

.ps-card-actions.open {
  display: flex;
}

.ps-card-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px;
  color: var(--grizat-muted-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ps-card-actions-close {
  border: 0;
  background: transparent;
  color: var(--grizat-muted-2);
  font-size: 16px;
  cursor: pointer;
}

.ps-card-actions-close:hover {
  color: var(--grizat-text);
}

.ps-card-actions button {
  display: block;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: var(--grizat-radius-md);
  background: transparent;
  color: var(--grizat-text-dim);
  font-family: var(--grizat-font);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ps-card-actions button:hover {
  background: rgba(58, 182, 232, .12);
  color: var(--grizat-text);
}

.ps-card-actions button.ps-delete {
  color: var(--grizat-danger);
}

.ps-card-actions button.ps-delete:hover {
  background: rgba(255, 69, 0, .12);
  color: var(--grizat-danger);
}

@media (max-width: 900px) {
  .ps-dash-head {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  #ps-grillas-list {
    padding-top: 16px;
  }

  .ps-dash-title {
    font-size: 26px;
  }

  .ps-dash-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ps-new-grizat-btn {
    justify-content: center;
  }

  .ps-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
 * Override de la vista ABIERTA de un grizat (legacy, no astra-
 * child): la capa "Open Workspace Brand Migration" del CSS viejo
 * pinta el botón principal y el estado activo del "..." de cyan/
 * blanco con verde lima, vía !important. Acá se reclama con más
 * especificidad — la misma solución que el resto del sitio, no
 * un !important suelto más peleando con el anterior.
 * ------------------------------------------------------------ */
body.ps-workspace-page .ps-head-primary {
  border-color: transparent !important;
  background: #fff !important;
  color: var(--grizat-bg) !important;
}

body.ps-workspace-page .ps-head-primary:hover {
  background: #E4ECF7 !important;
}

body.ps-workspace-page .ps-card-menu-btn[aria-expanded="true"] {
  border-color: var(--grizat-cyan) !important;
  background: #16233A !important;
  color: var(--grizat-text) !important;
}


/* ============================================================
 * Grizat /grizat page styles
 * Migrated from WordPress page HTML during consolidation step 1.
 * Intentionally preserves the existing cascade to avoid changing UI.
 * Next cleanup should remove obsolete v7/v10 overrides only after
 * visual regression testing.
 * ============================================================ */
#ps-grilla-view button[onclick="grizatCloseGrizat()"],
  .ps-custom-back-btn {
    background: #000000 !important; color: #ffffff !important;
    border: 2px solid #444444 !important; padding: 8px 18px !important;
    border-radius: 20px !important; font-size: 14px !important;
    font-weight: bold !important; text-transform: uppercase !important;
    letter-spacing: 0.5px !important; cursor: pointer !important;
    display: inline-block !important; margin-bottom: 0 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
  }
  #ps-grilla-view button[onclick="grizatCloseGrizat()"]:hover {
    background: #222222 !important; border-color: var(--grizat-cyan) !important; color: var(--grizat-cyan) !important;
  }
  .ps-share-btn {
    background: #111111 !important; border-color: var(--grizat-cyan) !important; color: var(--grizat-cyan) !important;
  }
  .ps-share-btn:hover { background: var(--grizat-cyan) !important; color: #111111 !important; }
#ps-grilla-view:fullscreen,
#ps-grilla-view:-webkit-full-screen {
  background: #0a0a0a;
  padding: 20px;
  overflow-y: auto;
}
#ps-grilla-view.ps-expand-mode {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0a0a0a;
  padding: 20px;
  overflow-y: auto;
}
  .ps-remove-btn-highlight {
    background: var(--grizat-danger) !important; color: #ffffff !important; border: none !important;
    padding: 8px 16px !important; border-radius: var(--grizat-radius-sm) !important; font-size: 12px !important;
    font-weight: bold !important; text-transform: uppercase !important;
    letter-spacing: 0.5px !important; cursor: pointer !important; transition: background 0.2s !important;
  }
  .ps-remove-btn-highlight:hover { background: #cc3700 !important; }
  .ps-open-page-highlight {
    color: var(--grizat-cyan) !important; font-size: 13px !important; font-weight: 800 !important;
    text-transform: uppercase !important; letter-spacing: 0.5px !important;
    text-decoration: none !important; transition: color 0.2s !important; display: inline-block !important;
  }
  .ps-open-page-highlight:hover { color: #ffffff !important; text-decoration: underline !important; }
  .ps-desk-chat-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; background: #1e1e1e; color: #aaa;
    border: 1px solid #333; border-radius: var(--grizat-radius-xs); font-size: 11px;
    font-weight: 700; cursor: pointer; text-transform: uppercase;
    transition: color .2s, border-color .2s;
  }
  .ps-desk-chat-btn.active { color: var(--grizat-cyan) !important; border-color: var(--grizat-cyan) !important; }
.ps-focus-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1e1e1e;
  color: #aaa;
  border: 1px solid #333;
  border-radius: var(--grizat-radius-xs);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: color .2s, border-color .2s;
}

.ps-focus-card-btn:hover {
  color: var(--grizat-cyan);
  border-color: var(--grizat-cyan);
}

#ps-grilla-channels > div:fullscreen,
#ps-grilla-channels > div:-webkit-full-screen {
  background: #000;
  display: flex;
  flex-direction: column;
}

#ps-grilla-channels > div:fullscreen > div:first-child,
#ps-grilla-channels > div:-webkit-full-screen > div:first-child {
  flex: 1;
  padding-bottom: 0 !important;
  height: auto !important;
}
.ps-spotlight-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #1e1e1e;
  color: #aaa;
  border: 1px solid #333;
  border-radius: var(--grizat-radius-xs);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: color .2s, border-color .2s;
}

.ps-spotlight-card-btn:hover {
  color: #FFD700;
  border-color: #FFD700;
}
#ps-grilla-channels > div {
  position: relative;
}

#ps-grilla-view.ps-expand-mode #ps-grilla-tabs,
#ps-grilla-view.ps-expand-mode #ps-layout-selector,
#ps-grilla-view.ps-expand-mode #ps-add-channel-row,
#ps-grilla-view:fullscreen #ps-grilla-tabs,
#ps-grilla-view:fullscreen #ps-layout-selector,
#ps-grilla-view:fullscreen #ps-add-channel-row {
  display: none !important;
}

#ps-grilla-view.ps-expand-mode #ps-grilla-channels > div > div:last-child,
#ps-grilla-view:fullscreen #ps-grilla-channels > div > div:last-child {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  z-index: 5;
}

#ps-grilla-view.ps-expand-mode #ps-grilla-channels > div:hover > div:last-child,
#ps-hover-zone {
  display: none;
}
#ps-grilla-view.ps-expand-mode #ps-hover-zone,
#ps-grilla-view:fullscreen #ps-hover-zone {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 9;
}

#ps-grilla-view.ps-expand-mode #ps-top-controls,
#ps-grilla-view:fullscreen #ps-top-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0,0,0,0.85);
  padding: 10px 20px;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#ps-grilla-view.ps-expand-mode #ps-grilla-title,
#ps-grilla-view:fullscreen #ps-grilla-title {
  position: absolute;
  top: 56px;
  left: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(0,0,0,0.85);
  padding: 6px 0;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

#ps-grilla-view.ps-expand-mode #ps-hover-zone:hover ~ #ps-top-controls,
#ps-grilla-view.ps-expand-mode #ps-top-controls:hover,
#ps-grilla-view:fullscreen #ps-hover-zone:hover ~ #ps-top-controls,
#ps-grilla-view:fullscreen #ps-top-controls:hover {
  opacity: 1;
  pointer-events: auto;
}
#ps-grilla-view.ps-expand-mode #ps-hover-zone:hover ~ #ps-grilla-title,
#ps-grilla-view.ps-expand-mode #ps-grilla-title:hover,
#ps-grilla-view:fullscreen #ps-hover-zone:hover ~ #ps-grilla-title,
#ps-grilla-view:fullscreen #ps-grilla-title:hover {
  opacity: 1;
  pointer-events: auto;
}
#ps-grilla-view:fullscreen #ps-grilla-channels > div:hover > div:last-child {
  display: block;
}

#ps-grilla-channels.ps-spotlight-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#ps-grilla-channels.ps-spotlight-mode > div.ps-spotlighted {
  order: -1;
  flex: 1 1 100%;
}

#ps-grilla-channels.ps-spotlight-mode > div:not(.ps-spotlighted) {
  flex: 1 1 180px;

}
  .ps-desk-chat-box {
    display: none; width: 100%; height: 380px;
    border-radius: 0 0 var(--grizat-radius-sm) var(--grizat-radius-sm); overflow: hidden; background: #0f0f0f;
  }
  #ps-custom-channel-input:disabled,
  #ps-add-channel-btn:disabled {
    opacity: 0.6 !important; cursor: not-allowed !important;
  }

  /* ---- Pestañas de grillas ---- */
.ps-grilla-tab {
  background: #1a1a1a; color: #ddd; border: 2px solid #333; border-radius: 24px;
  padding: 10px 22px; font-size: 16px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; cursor: pointer; white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.ps-grilla-tab:hover { color: #fff; border-color: #555; transform: translateY(-1px); }
.ps-grilla-tab.active { background: var(--grizat-cyan); color: #111; border-color: var(--grizat-cyan); box-shadow: 0 2px 10px rgba(0,242,254,0.4); }
  .ps-grilla-tab-add {
    background: #111; color: var(--grizat-cyan); border: 1px dashed var(--grizat-cyan); font-size: 14px; padding: 6px 12px;
  }
  .ps-grilla-tab-add:hover { background: var(--grizat-cyan); color: #111; }
.ps-dragging-ghost {
  opacity: 0.4;
  border: 2px dashed var(--grizat-cyan) !important;
}
.ps-more-wrap { position: relative; display: inline-block; }
.ps-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; background: #1e1e1e; color: #aaa;
  border: 1px solid #333; border-radius: var(--grizat-radius-xs); font-size: 13px;
  font-weight: 700; cursor: pointer;
}
.ps-more-btn:hover { color: var(--grizat-cyan); border-color: var(--grizat-cyan); }
.ps-more-menu {
  display: none; position: absolute; bottom: 100%; right: 0; margin-bottom: 6px;
  background: #1a1a1a; border: 1px solid #333; border-radius: var(--grizat-radius-sm);
  min-width: 160px; z-index: 20; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.ps-more-menu.open { display: block; }
.ps-more-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; color: #ddd; font-size: 15px;
  cursor: pointer; border-bottom: 1px solid #262626;
}
.ps-more-menu button:last-child { border-bottom: none; }
.ps-more-menu button:hover { background: #262626; color: var(--grizat-cyan); }
.ps-more-menu button.ps-danger:hover { color: var(--grizat-danger); }
.ps-submenu-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; color: #ddd; font-size: 15px;
  font-weight: 700; cursor: pointer; border-bottom: 1px solid #262626;
}
.ps-submenu-toggle:hover { background: #262626; color: var(--grizat-cyan); }
.ps-submenu-arrow { transition: transform .2s; font-size: 10px; }
.ps-submenu-wrap.open .ps-submenu-arrow { transform: rotate(180deg); }
.ps-submenu-content { display: none; background: #151515; }
.ps-submenu-wrap.open .ps-submenu-content { display: block; }
.ps-more-menu-down {
  top: 100%;
  bottom: auto;
  margin-top: 6px;
  margin-bottom: 0;
}

   Workspace abierto — Grizat v7
   Experiencia app-first, pestañas claras y móvil sin desborde
   ========================================================== */
#ps-grilla-view { color:#fff; font-family:Sora,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#ps-top-controls.ps-open-head { display:grid !important; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:end; margin:2px 0 14px !important; }
.ps-open-identity { min-width:0; }
.ps-open-back { display:inline-flex; align-items:center; min-height:40px; padding:0; border:0; background:transparent; color:#a3a3a3; font-size:14px; font-weight:650; cursor:pointer; }
.ps-open-back:hover { color:var(--grizat-cyan); }
.ps-open-title-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:2px; }
#ps-grilla-title.ps-open-title { margin:0 !important; color:#fff; font-size:clamp(25px,2.5vw,34px); line-height:1.12; letter-spacing:-.65px; }
.ps-open-description { display:none; margin:7px 0 0 !important; color:#8d8d8d !important; font-size:14px !important; line-height:1.5 !important; max-width:680px !important; }
.ps-open-actions { display:flex; align-items:center; gap:9px; padding-top:2px; }
/* #ps-share-home-link ("← Back to Grizat", solo visible en la vista
   pública compartida) es un TERCER elemento adentro de esta misma
   grilla de 2 columnas — sin esta regla, el navegador lo acomoda
   solo (auto-placement), lo que apretaba .ps-open-identity a un
   ancho más angosto del que debería tener y dejaba un hueco vacío
   al lado. Ahora ocupa su propia fila completa, arriba de todo. */
#ps-share-home-link { grid-column:1 / -1; order:-1; justify-self:end; }
.ps-head-btn { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 15px; border:1px solid #333; border-radius:var(--grizat-radius-md); background:#171717; color:#e5e5e5; font-size:14px; font-weight:700; cursor:pointer; }
.ps-head-btn:hover,.ps-head-btn[aria-expanded="true"] { border-color:#666; color:#fff; }
.ps-head-primary { border-color:var(--grizat-danger); background:var(--grizat-danger); color:#fff; }
.ps-head-primary:hover,.ps-head-primary[aria-expanded="true"] { border-color:#ff6a33; background:#ff5722; color:#fff; }
.ps-head-more { width:42px; padding:0; font-size:20px; letter-spacing:1px; }
.ps-head-menu { min-width:280px; padding:8px; border-radius:var(--grizat-radius-lg); background:#171717; }
.ps-menu-label { padding:9px 10px 5px; color:#737373; font-size:10px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; }
.ps-menu-divider { height:1px; margin:7px 4px; background:#303030; }
.ps-head-menu button,.ps-head-menu .ps-submenu-toggle { min-height:44px; border:0; border-radius:var(--grizat-radius-sm); color:#e0e0e0; font-size:14px; font-weight:550; }
.ps-head-menu button:hover,.ps-head-menu .ps-submenu-toggle:hover { background:#242424; color:var(--grizat-cyan); }
.ps-head-menu .ps-menu-danger { color:#ff7a59; }
.ps-head-menu .ps-menu-danger:hover { background:rgba(255,69,0,.1); color:#ff8a6c; }
.ps-head-menu .ps-submenu-content { margin:0 0 5px; border-radius:var(--grizat-radius-md); background:#101010; }
.ps-add-fields { padding:10px; }
.ps-add-fields input { display:block; width:100%; min-height:40px; box-sizing:border-box; margin-bottom:8px; padding:8px 10px; border:1px solid #3a3a3a; border-radius:var(--grizat-radius-sm); background:#202020; color:#fff; font-size:13px; }
.ps-add-fields #ps-add-channel-btn { min-height:40px; background:var(--grizat-cyan); color:#101010; font-weight:800; text-align:center; }
.ps-workspace-switcher { display:flex; align-items:center; gap:12px; min-width:0; margin:0 0 13px; }
.ps-workspace-switcher-label { flex:0 0 auto; color:#686868; font-size:11px; font-weight:750; letter-spacing:.75px; text-transform:uppercase; }
#ps-grilla-tabs.ps-open-tabs { display:flex; flex:1; gap:4px; overflow-x:auto; margin:0; padding:0 0 5px; scrollbar-width:thin; }
#ps-grilla-tabs .ps-grilla-tab { min-height:34px; padding:0 11px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:#888; font-size:13px; font-weight:600; letter-spacing:0; text-transform:none; box-shadow:none; white-space:nowrap; }
#ps-grilla-tabs .ps-grilla-tab:hover { color:#fff; transform:none; }
#ps-grilla-tabs .ps-grilla-tab.active { border-color:var(--grizat-cyan); background:transparent; color:#fff; }
#ps-grilla-tabs .ps-grilla-tab-add { min-width:62px; color:#aaa; }
.ps-featured-track { display:flex; gap:10px; overflow-x:auto; padding-bottom:2px; scroll-snap-type:x proximity; scrollbar-width:thin; }
.ps-featured-card { display:flex; align-items:center; gap:11px; flex:0 0 270px; min-height:64px; padding:10px 12px; border:1px solid #292929; border-radius:var(--grizat-radius-md); background:#191919; color:#fff; text-align:left; cursor:pointer; scroll-snap-align:start; }
.ps-featured-card:hover { border-color:#555; background:#1d1d1d; transform:translateY(-1px); }
.ps-featured-live { flex:0 0 auto; padding:4px 6px; border-radius:var(--grizat-radius-sm); background:var(--grizat-danger); color:#fff; font-size:9px; font-weight:850; letter-spacing:.6px; }
.ps-featured-copy { min-width:0; flex:1; }
.ps-featured-copy strong { display:block; overflow:hidden; color:#fff; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.ps-featured-copy span { display:block; margin-top:4px; color:#828282; font-size:11px; }
.ps-featured-arrow { color:#777; font-size:17px; }
.ps-stream-card { position:relative; overflow:visible !important; border:1px solid var(--grizat-border) !important; border-radius:var(--grizat-radius-lg) !important; background:var(--grizat-panel); box-shadow:0 7px 22px rgba(0,0,0,.16); transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.ps-stream-card:hover { transform:translateY(-2px); border-color:var(--grizat-cyan) !important; box-shadow:0 12px 26px rgba(0,0,0,.28); }
.ps-stream-footer { display:flex; align-items:center; gap:12px; min-height:58px; padding:10px 10px 10px 13px; background:var(--grizat-panel-2); border-radius:0 0 var(--grizat-radius-lg) var(--grizat-radius-lg); }
.ps-stream-name { min-width:0; flex:1; overflow:hidden; color:#fff; font-size:14px; font-weight:650; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.ps-stream-menu-btn { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; padding:0; border:1px solid #333; border-radius:var(--grizat-radius-md); background:#1d1d1d; color:#aaa; font-size:19px; font-weight:800; cursor:pointer; }
.ps-stream-menu-btn:hover,.ps-stream-menu-btn[aria-expanded="true"] { border-color:var(--grizat-cyan); color:var(--grizat-cyan); }
.ps-stream-menu { min-width:210px; padding:7px; border-radius:var(--grizat-radius-md); overflow:visible; }
.ps-stream-menu button { min-height:42px; padding:9px 11px; border:0; border-radius:var(--grizat-radius-sm); font-size:14px; }
.ps-stream-menu .ps-menu-divider { display:block; }
.ps-stream-menu button.ps-danger { margin-top:5px; color:#ff7a59; border-top:1px solid #393939; border-radius:0 0 var(--grizat-radius-sm) var(--grizat-radius-sm); }
.ps-stream-menu button.ps-danger:hover { background:rgba(255,69,0,.1); color:#ff8a6c; }
.ps-card-menu-btn[aria-expanded="true"] { color:var(--grizat-cyan); background:rgba(0,242,254,.08); }

@media (max-width:700px) {
  #ps-top-controls.ps-open-head {
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:start;
  }
  .ps-open-actions {
    width:auto;
    padding:0;
    align-self:start;
  }
  .ps-head-btn { flex:0 0 auto; }
  #ps-grilla-title.ps-open-title { font-size:27px; }
  .ps-open-actions { gap:8px; }
  .ps-head-primary { flex:0 0 auto; }
  .ps-head-more { flex:0 0 42px; width:42px; }
  .ps-workspace-switcher { display:block; margin-bottom:10px; }
  .ps-workspace-switcher-label { display:block; margin:0 0 5px 4px; }
  .ps-featured-card { flex-basis:238px; }
  .ps-head-menu,.ps-stream-menu { position:fixed !important; left:14px !important; right:14px !important; top:auto !important; bottom:14px !important; width:auto !important; max-width:none !important; max-height:75vh !important; z-index:10002 !important; padding:10px; border-radius:var(--grizat-radius-lg); box-shadow:0 0 0 9999px rgba(0,0,0,.66),0 20px 48px rgba(0,0,0,.55); }
  .ps-head-menu button,.ps-head-menu .ps-submenu-toggle,.ps-stream-menu button { min-height:48px; font-size:16px; }
  .ps-stream-footer { min-height:62px; }
  .ps-stream-name { font-size:15px; }
}

/* Grizat v7 — final UI overrides */
#ps-workspace { width:100%; box-sizing:border-box; }
#ps-grilla-view { min-width:0; }
.ps-open-nav { display:flex; align-items:center; gap:8px; margin:0 0 6px; }
.ps-open-nav .ps-open-back,
.ps-open-nav .ps-open-back:hover,
#ps-top-controls.ps-open-head {
  align-items:end;
  gap:20px;
  margin:0 0 12px !important;
}
.ps-open-back {
  min-height:32px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#687085 !important;
  box-shadow:none !important;
  font-size:13px !important;
  font-weight:650 !important;
  text-transform:none !important;
}
.ps-open-back:hover { color:#172033 !important; }
.ps-open-title-row { margin-top:0; }
#ps-grilla-title.ps-open-title {
  display:block !important;
  margin:0 !important;
  color:#fff !important;
  font-size:clamp(24px,2.25vw,31px) !important;
  font-weight:800 !important;
  line-height:1.12 !important;
}
.ps-open-description {
  margin:5px 0 0 !important;
  color:#687085 !important;
  font-size:16px !important;
  line-height:1.4 !important;
}
.ps-head-more[aria-expanded="true"],
.ps-stream-menu-btn[aria-expanded="true"],
.ps-card-menu-btn[aria-expanded="true"] {
  border-color:var(--grizat-cyan) !important;
  background:var(--grizat-cyan) !important;
  color:#102033 !important;
}
.ps-workspace-switcher {
  display:block;
  min-width:0;
  margin:0 0 12px;
  border-bottom:1px solid #dfe3ea;
}
.ps-workspace-switcher-label { display:none; }
#ps-grilla-tabs.ps-open-tabs {
  display:flex;
  gap:3px;
  overflow-x:auto;
  overflow-y:hidden;
  margin:0;
  padding:0 3px;
  scrollbar-width:none;
}
#ps-grilla-tabs.ps-open-tabs::-webkit-scrollbar { display:none; }
#ps-grilla-tabs .ps-grilla-tab {
  position:relative;
  min-height:42px;
  margin-bottom:-1px;
  padding:0 18px;
  border:1px solid #dfe3ea;
  border-bottom-color:#dfe3ea;
  border-radius:var(--grizat-radius-md) var(--grizat-radius-md) 0 0;
  background:#f1f3f6 !important;
  color:#596174 !important;
  font-size:14px;
  font-weight:650;
  text-transform:none;
  box-shadow:none;
  white-space:nowrap;
}
#ps-grilla-tabs .ps-grilla-tab:hover {
  border-color:#c9d0db;
  background:#e7ebf0 !important;
  color:#172033 !important;
  transform:none;
}
#ps-grilla-tabs .ps-grilla-tab.active {
  z-index:1;
  border-color:#cbd2dc;
  border-bottom-color:#fff;
  background:#fff !important;
  color:#172033 !important;
}
#ps-grilla-tabs .ps-grilla-tab.active::after {
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:3px;
  height:2px;
  border-radius:var(--grizat-radius-xs);
  background:var(--grizat-cyan);
}
#ps-grilla-tabs .ps-grilla-tab-add {
  min-width:auto;
  padding:0 16px;
  color:#596174 !important;
}
.ps-add-workspace-short { display:none; }
.ps-featured-track {
  display:flex;
  gap:8px;
  min-width:0;
  overflow-x:auto;
  padding:0;
}
.ps-featured-card {
  flex:0 0 245px;
  min-height:48px;
  padding:7px 10px;
  border:1px solid #dfe3e9;
  border-radius:var(--grizat-radius-md);
  background:#fff !important;
  color:#172033 !important;
}
.ps-featured-card:hover {
  border-color:#bfc7d2;
  background:#fff !important;
  color:#172033 !important;
  transform:none;
}
.ps-featured-copy strong { color:#172033; font-size:12px; }
.ps-featured-copy span { margin-top:2px; color:#7a8292; font-size:10px; }
/* Grizat brand states: no generic blue focus/active residue. */
#ps-grilla-view button:focus-visible,
#ps-grilla-view a:focus-visible { outline:2px solid var(--grizat-cyan) !important; outline-offset:2px; }
#ps-grilla-view button:not(.ps-head-primary):hover { border-color:var(--grizat-cyan); }

/* Hide third-party “Ask AI” launchers inside the WordPress page. */
button[aria-label*="Ask AI" i], button[title*="Ask AI" i],
a[aria-label*="Ask AI" i], a[title*="Ask AI" i],
[data-testid*="ask-ai" i], [id*="ask-ai" i], [class*="ask-ai" i] { display:none !important; }
#ps-grilla-channels {
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
#ps-grilla-channels > * {
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

@media (max-width:700px) {
  #ps-workspace {
    padding:4px 0 12px !important;
    overflow-x:hidden;
  }
  /* El video va borde a borde (como YouTube/Instagram). Todo lo demás
     recupera su margen lateral acá, elemento por elemento. */
  #ps-featured-row,
  #ps-top-controls.ps-open-head,
  #ps-grilla-tabs.ps-open-tabs,
  #ps-addstream-panel-wrap {
    padding-left:6px !important;
    padding-right:6px !important;
    box-sizing:border-box;
  }
  #ps-top-controls.ps-open-head {
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    align-items:start;
    padding-top:22px !important;
    margin-bottom:12px !important;
  }
  #ps-grilla-title.ps-open-title { font-size:24px !important; }
  .ps-open-nav { gap:7px; overflow-x:auto; scrollbar-width:none; }
  .ps-open-nav::-webkit-scrollbar { display:none; }
  .ps-open-nav .ps-open-back { flex:0 0 auto; min-height:40px !important; font-size:12px !important; }
  .ps-open-description { font-size:15px !important; line-height:1.45 !important; }
  .ps-head-primary { flex:0 1 auto; min-width:132px; }
  .ps-workspace-switcher { margin-bottom:9px; }
  #ps-grilla-tabs.ps-open-tabs { padding-left:6px; }
  #ps-grilla-tabs .ps-grilla-tab {
    min-height:39px;
    padding:0 15px;
    font-size:13px;
  }
  #ps-grilla-tabs .ps-grilla-tab-add {
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    padding:0;
  }
  .ps-add-workspace-full { display:none; }
  .ps-add-workspace-short { display:inline; font-size:20px; line-height:1; }
  .ps-featured-card {
    flex-basis:210px;
    min-height:44px;
  }
  #ps-grilla-channels {
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }
  .ps-stream-card {
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    border-radius:0 !important;
  }
  .ps-stream-card > div:first-child,
  .ps-stream-card iframe,
  .ps-stream-card video {
    width:100% !important;
    max-width:100% !important;
  }
}

/* ==========================================================
   Grizat v10 — unified product system
   Light organization surfaces, dark media previews, compact app chrome
   ========================================================== */
body.ps-workspace-page .site-header,
body.ps-workspace-page .ast-primary-header-bar { min-height:68px !important; }
body.ps-workspace-page .site-branding img,
body.ps-workspace-page .custom-logo { max-height:42px !important; width:auto !important; }

/* Open workspace navigation: equal hierarchy, lighter visual weight. */
.ps-open-nav { gap:8px; margin-bottom:10px; }
.ps-open-nav .ps-open-back,
.ps-open-nav .ps-open-back:hover,
#ps-top-controls.ps-open-head { gap:18px; margin-bottom:10px !important; }
.ps-head-btn { min-height:40px; }
.ps-head-primary { padding:0 14px; }
.ps-head-more { width:40px; }
#ps-grilla-tabs .ps-grilla-tab-add {
  border-style:dashed;
  background:#fafbfc !important;
  color:#4f586b !important;
}
#ps-grilla-tabs .ps-grilla-tab-add:hover {
  border-color:#8e98aa;
  background:#f2f4f7 !important;
}


/* ==========================================================
   Ajustes mobile de la vista ABIERTA (antes vivían mezclados
   dentro del bloque de dashboard y dentro de la capa lima —
   se preservan acá, en su lugar correcto, al limpiar ambos).
   ========================================================== */
@media (max-width:700px) {
  .ps-open-nav .ps-open-back,
  .ps-open-nav .ps-spotlight-nav {
    flex:1 1 0;
    min-height:38px !important;
    padding:0 9px !important;
    font-size:10.5px !important;
  }
  .ps-head-primary { min-width:118px; min-height: 42px !important; }
  #ps-grilla-tabs .ps-grilla-tab-add {
    border-style:dashed;
    border-radius:var(--grizat-radius-md) var(--grizat-radius-md) 0 0;
  }
}
/* ============================================================
 * Grizat — open view final product polish (Step 4)
 * No logic changes. Optimizes the open workspace for up to 12
 * sources and normalizes visual hierarchy/copy.
 * ============================================================ */
#ps-workspace {
  width: min(100%, 1440px);
}

/* Keep the primary action visually dominant; secondary menu stays quiet. */
.ps-open-actions {
  align-self: end;
}

.ps-head-primary {
  min-width: 126px;
  box-shadow: 0 6px 18px rgba(255, 69, 0, .16);
}

.ps-head-primary:hover {
  box-shadow: 0 8px 22px rgba(255, 69, 0, .22);
}

/* The title/description belong to the media shell, so keep them readable
 * on the dark workspace rather than inheriting light-surface text colors. */
#ps-grilla-title.ps-open-title {
  max-width: 900px;
}

#ps-grilla-description.ps-open-description,
#ps-grilla-author.ps-open-description {
  max-width: 820px !important;
}

/* Stream cards can become dense at 8–12 sources; reduce ornamental weight. */
.ps-stream-card {
  box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
}

.ps-stream-footer {
  min-height: 54px;
}

.ps-stream-menu-btn {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

@media (max-width: 700px) {
  #ps-workspace {
    width: 100%;
  }

  .ps-head-primary {
    min-width: 118px;
    box-shadow: none;
  }

  .ps-stream-footer {
    min-height: 60px;
  }
}


/* Open Grizat header spacing — align with the breathing room of My grizats. */
body.grizat-app-shell #ps-grilla-view #ps-top-controls.ps-open-head {
  padding-top:18px !important;
}

@media (max-width:700px) {
  body.grizat-app-shell #ps-grilla-view #ps-top-controls.ps-open-head {
    padding-top:22px !important;
  }
}

/* ============================================================
 * Source Picker — canonical UI
 * One ownership block for search, filters, country control and result cards.
 * FacetWP owns search/filter state; Grizat owns presentation only.
 * ============================================================ */
.ps-source-picker,
.ps-source-discover {
  width:100%;
  min-width:0;
}

.ps-source-discover {
  max-height:none;
  overflow:visible;
  padding:2px 2px 8px;
}

.ps-source-discover-search {
  margin-bottom:14px;
}

.ps-source-discover-search .facetwp-facet {
  margin-bottom:0 !important;
}

.ps-source-discover-search .facetwp-facet-search input,
.ps-source-discover-search .facetwp-type-search input {
  width:100%;
  max-width:none;
  min-height:44px;
  box-sizing:border-box;
  padding:9px 12px;
  border:1px solid #394455;
  border-radius:var(--grizat-radius-md);
  background:#151b24;
  color:#fff;
  font-size:14px;
}

.ps-source-discover-search .facetwp-facet-search input:focus,
.ps-source-discover-search .facetwp-type-search input:focus {
  outline:none;
  border-color:var(--grizat-accent);
  box-shadow:0 0 0 2px rgba(0,242,254,.12);
}

.ps-source-search-help {
  margin:7px 1px 0;
  color:#9aa4b3;
  font-size:12px;
  line-height:1.45;
}

.ps-source-url-actions {
  display:none;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  padding:9px 10px;
  border:1px solid rgba(0,242,254,.22);
  border-radius:var(--grizat-radius-md);
  background:rgba(0,242,254,.055);
}

.ps-source-url-ready {
  min-width:0;
  color:#b8c3d1;
  font-size:12px;
  line-height:1.35;
}

.ps-source-picker.has-url-entry .ps-source-url-actions {
  display:grid;
}

.ps-source-picker.has-url-entry .ps-source-directory-filters,
.ps-source-picker.has-url-entry .ps-source-discover-empty,
.ps-source-picker.has-url-entry .ps-source-discover-results {
  display:none !important;
}

.ps-source-url-actions #ps-custom-channel-name,
.ps-source-url-actions #ps-add-channel-btn {
  min-height:40px;
  box-sizing:border-box;
}

.ps-source-url-actions #ps-add-channel-btn {
  white-space:nowrap;
}

.ps-source-picker-fallback {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}

.ps-source-directory-filters {
  padding-top:2px;
}

.ps-source-filter-row {
  display:flex;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:7px;
  margin:10px 0;
}

.ps-source-filter-label {
  flex:0 0 72px;
  padding-top:8px;
  color:#a9b4c4;
  font-size:11px;
  font-weight:800;
  letter-spacing:.55px;
  text-transform:uppercase;
}

.ps-source-filter-row .facetwp-facet {
  flex:1;
  min-width:0;
  margin-bottom:0 !important;
}

/* Type is an explicit Grizat control backed by the hidden FacetWP facet. */
.ps-source-native-type-facet {
  display:none !important;
}

.ps-source-type-control {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  min-width:0;
}

.ps-source-type-choice {
  appearance:none;
  min-height:36px;
  padding:7px 14px;
  border:1px solid #465267;
  border-radius:var(--grizat-radius-pill);
  background:#18202b;
  color:#e6ebf2;
  font-size:12px;
  font-weight:700;
  line-height:18px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}

.ps-source-type-choice:hover {
  border-color:#68778e;
  background:#1d2734;
}

.ps-source-type-choice.is-active {
  border-color:var(--grizat-accent);
  background:rgba(0,242,254,.10);
  color:#fff;
  box-shadow:0 0 0 1px rgba(0,242,254,.08) inset;
}

/* FacetWP chips: available choices look active/usable, not disabled. */
.ps-source-discover .facetwp-checkbox,
.ps-source-discover .facetwp-radio {
  display:inline-block;
  margin:2px 4px 2px 0;
  padding:7px 11px;
  border:1px solid #465267;
  border-radius:var(--grizat-radius-pill);
  background:#18202b;
  color:#e6ebf2;
  opacity:1;
  font-size:12px;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}

.ps-source-discover .facetwp-radio {
  padding-left:29px;
}

.ps-source-discover .facetwp-checkbox:hover,
.ps-source-discover .facetwp-radio:hover {
  border-color:#68778e;
  background:#1d2734;
}

.ps-source-discover .facetwp-checkbox.checked,
.ps-source-discover .facetwp-radio.checked {
  border-color:var(--grizat-accent) !important;
  background:rgba(0,242,254,.09) !important;
  color:#fff !important;
}

.ps-source-discover .facetwp-counter {
  display:none;
}

/* Desktop: secondary facets are always visible. Mobile: native disclosure. */
.ps-source-more-filters-disclosure {
  display:block;
}

.ps-source-more-filters {
  display:none;
  list-style:none;
}

.ps-source-more-filters::-webkit-details-marker {
  display:none;
}

.ps-source-secondary-filters {
  display:block;
}

/* Country: FacetWP's dropdown stays as the data engine, custom control avoids
   full-screen native pickers on mobile. */
.ps-source-country-control {
  position:relative;
  width:min(100%,320px);
}

.ps-source-native-country-facet {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;
  white-space:nowrap !important;
  pointer-events:none !important;
}

.ps-source-country-trigger {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:1px solid #465267;
  border-radius:var(--grizat-radius-md);
  background:#18202b;
  color:#fff;
  font:inherit;
  font-size:13px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}

.ps-source-country-trigger:hover,
.ps-source-country-trigger:focus-visible,
.ps-source-country-trigger[aria-expanded="true"] {
  border-color:var(--grizat-accent);
  outline:none;
}

.ps-source-country-trigger > span:last-child {
  color:var(--grizat-accent);
  transition:transform .16s ease;
}

.ps-source-country-trigger[aria-expanded="true"] > span:last-child {
  transform:rotate(180deg);
}

.ps-source-country-menu {
  position:absolute;
  z-index:1000;
  top:calc(100% + 6px);
  left:0;
  right:0;
  width:100%;
  max-width:100%;
  max-height:240px;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  box-sizing:border-box;
  padding:6px;
  border:1px solid #34404e;
  border-radius:var(--grizat-radius-md);
  background:#11161d;
  box-shadow:0 16px 40px rgba(0,0,0,.36);
}

.ps-source-country-menu[hidden] {
  display:none !important;
}

.ps-source-country-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  min-height:38px;
  padding:8px 10px;
  border:0;
  border-radius:var(--grizat-radius-sm);
  background:transparent;
  color:#e8edf3;
  font:inherit;
  font-size:13px;
  text-align:left;
  cursor:pointer;
}

.ps-source-country-option:hover,
.ps-source-country-option:focus-visible {
  background:#202833;
  outline:none;
}

.ps-source-country-option.is-active {
  background:rgba(0,242,254,.12);
  color:var(--grizat-accent);
}

.ps-source-country-option small {
  flex:0 0 auto;
  color:#8995a5;
  font-size:11px;
  font-weight:700;
}

.ps-source-picker-unavailable {
  margin:4px 0 0;
  color:#9aa1ad;
  font-size:13px;
}

.ps-source-discover-empty {
  display:flex;
  min-height:150px;
  margin-top:14px;
  padding:28px 20px;
  box-sizing:border-box;
  border:1px dashed #343a45;
  border-radius:var(--grizat-radius-lg);
  background:#15191f;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
}

.ps-source-discover-empty strong {
  display:block;
  margin-bottom:5px;
  color:#f2f4f7;
  font-size:15px;
  font-weight:750;
}

.ps-source-discover-empty span {
  color:#8f97a6;
  font-size:13px;
  line-height:1.45;
}

.ps-source-discover-results {
  display:none;
  width:100%;
  margin-top:14px;
}

.ps-source-discover.has-query .ps-source-discover-empty {
  display:none;
}

.ps-source-discover.has-query .ps-source-discover-results {
  display:block;
}

/* Result cards: FacetWP Listing Builder adds an FWPL wrapper around
   .ps-custom-card. Keep that wrapper neutral; the real Grizat card owns layout.
   Orange = primary Add action; cyan remains selection/focus only. */
.ps-source-discover-results .facetwp-template {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  width:100% !important;
  max-width:980px !important;
}

.ps-source-discover-results .facetwp-template > div {
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  overflow:visible !important;
}

.ps-source-discover-results .ps-custom-card {
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:72px !important;
  margin:0 !important;
  padding:9px 11px !important;
  box-sizing:border-box !important;
  border:1px solid #303947 !important;
  border-radius:var(--grizat-radius-lg) !important;
  background:#171c23 !important;
  box-shadow:none !important;
  overflow:hidden !important;
}

.ps-source-discover-results .ps-custom-card:hover {
  border-color:#46546a !important;
  background:#1a2028 !important;
}

.ps-source-discover-results .ps-clean-card-container {
  display:contents !important;
}

.ps-source-discover-results .ps-channel-card-title,
.ps-source-discover-results .ps-channel-card-actions,
.ps-source-discover-results .ps-channel-card-chat {
  display:none !important;
}

.ps-source-discover-results .ps-lazy-player {
  flex:0 0 96px !important;
  width:96px !important;
  height:58px !important;
  min-height:58px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:var(--grizat-radius-md) !important;
  overflow:hidden !important;
  background:#0b0f14 !important;
  pointer-events:none;
}

.ps-source-discover-results .ps-lazy-player img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}

.ps-source-discover-results .ps-lazy-player .ps-play-icon,
.ps-source-discover-results .ps-lazy-player .ps-tap-overlay {
  display:none !important;
}

/* Radio preview occupies its own fixed flex item and cannot overlap text. */
.ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child {
  position:relative !important;
  flex:0 0 52px !important;
  width:52px !important;
  height:52px !important;
  min-height:52px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid #405069 !important;
  border-radius:50% !important;
  background:#111923 !important;
  overflow:hidden !important;
}

.ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child > div {
  position:absolute !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
}

.ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child > div > div:first-child {
  display:none !important;
}

.ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child button {
  width:50px !important;
  height:50px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#fff !important;
  font-size:15px !important;
}

.ps-source-discover-results .ps-source-card-directory {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex:1 1 auto !important;
  min-width:0 !important;
}

.ps-source-discover-results .ps-source-card-info {
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  gap:3px !important;
  flex:1 1 auto !important;
  min-width:0 !important;
}

.ps-source-discover-results .ps-source-card-title {
  display:-webkit-box !important;
  min-width:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:750 !important;
  line-height:1.25 !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
}

.ps-source-discover-results .ps-source-card-meta {
  display:block !important;
  min-width:0 !important;
  overflow:hidden !important;
  color:#8f9bad !important;
  font-size:11px !important;
  line-height:1.25 !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

.ps-source-discover-results .grizat-discover-add-btn {
  flex:0 0 auto !important;
  width:auto !important;
  min-width:62px !important;
  height:32px !important;
  margin:0 !important;
  padding:0 10px !important;
  border:1px solid var(--grizat-primary) !important;
  border-radius:var(--grizat-radius-md) !important;
  background:var(--grizat-primary) !important;
  color:#fff !important;
  font-size:10.5px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
  cursor:pointer !important;
}

.ps-source-discover-results .grizat-discover-add-btn:hover:not(:disabled) {
  background:var(--grizat-primary-hover) !important;
  border-color:var(--grizat-primary-hover) !important;
}

.ps-source-discover-results .grizat-discover-add-btn:disabled {
  border-color:#3b4655 !important;
  background:#202630 !important;
  color:#9ca5b4 !important;
  opacity:.8 !important;
  cursor:default !important;
}

.ps-source-discover-more {
  display:flex;
  justify-content:center;
  width:100%;
  margin:18px 0 4px;
}

.ps-source-discover-more .facetwp-facet {
  margin:0 !important;
}

.ps-source-discover-more .facetwp-load-more {
  min-height:42px;
  padding:0 18px;
  border:1px solid #3b4655;
  border-radius:var(--grizat-radius-md);
  background:#171c24;
  color:#fff;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.ps-source-discover-more .facetwp-load-more:hover {
  border-color:var(--grizat-accent);
  background:#202630;
  color:var(--grizat-accent);
}

.ps-source-discover-more .facetwp-load-more:disabled {
  opacity:.55;
  cursor:default;
}

@media (min-width:701px) and (max-width:980px) {
  .ps-source-discover-results .facetwp-template {
    grid-template-columns:1fr !important;
    max-width:620px !important;
  }
}

@media (max-width:700px) {
  .ps-source-filter-label {
    flex:0 0 100%;
    padding-top:0;
  }

  .ps-source-filter-type .ps-source-type-control {
    width:100%;
    gap:6px;
  }

  .ps-source-type-choice {
    min-height:38px;
    padding:8px 14px;
    font-size:13px;
  }

  .ps-source-picker.has-url-entry .ps-source-url-actions,
  .ps-source-picker-fallback {
    grid-template-columns:1fr;
  }

  /* Large, explicit disclosure for users who don't infer an unlabeled line. */
  .ps-source-more-filters-disclosure {
    width:100%;
    margin:12px 0 4px;
    border-top:1px solid #2d3643;
    border-bottom:1px solid #2d3643;
  }

  .ps-source-more-filters {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    width:100%;
    min-height:58px;
    padding:9px 2px;
    color:#fff;
    cursor:pointer;
  }

  .ps-source-more-filters-copy {
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
  }

  .ps-source-more-filters-title {
    font-size:14px;
    font-weight:800;
    line-height:1.2;
  }

  .ps-source-more-filters-hint {
    color:#8f9bad;
    font-size:11px;
    font-weight:600;
    line-height:1.3;
  }

  .ps-source-more-filters-chevron {
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    border:1px solid #3b4655;
    border-radius:50%;
    color:var(--grizat-accent);
    font-size:18px;
    transition:transform .16s ease, border-color .16s ease;
  }

  .ps-source-more-filters-disclosure[open] .ps-source-more-filters-chevron {
    transform:rotate(180deg);
    border-color:var(--grizat-accent);
  }

  .ps-source-more-filters-disclosure:not([open]) > .ps-source-secondary-filters {
    display:none;
  }

  .ps-source-more-filters-disclosure[open] > .ps-source-secondary-filters {
    display:block;
    padding:8px 0 4px;
  }

  .ps-source-filter-row {
    margin:12px 0 16px;
  }

  .ps-source-country-control {
    width:100%;
  }

  .ps-source-country-trigger {
    min-height:46px;
    font-size:14px;
  }

  /* Country behaves like a compact anchored menu on mobile too.
     It overlays results instead of stretching the whole Source Picker. */
  .ps-source-country-menu {
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    width:100%;
    max-width:100%;
    max-height:220px;
    overflow-x:hidden;
    overflow-y:auto;
    margin-top:0;
    box-shadow:0 16px 40px rgba(0,0,0,.42);
  }

  .ps-source-country-option {
    min-height:42px;
    font-size:14px;
  }

  .ps-source-discover-empty {
    min-height:120px;
    padding:22px 16px;
  }

  .ps-source-discover-results .facetwp-template {
    grid-template-columns:1fr !important;
    max-width:none !important;
    gap:10px !important;
  }

  .ps-source-discover-results .ps-custom-card {
    min-height:76px !important;
    gap:10px !important;
    padding:9px 10px !important;
  }

  .ps-source-discover-results .ps-lazy-player {
    flex-basis:68px !important;
    width:68px !important;
    height:46px !important;
    min-height:46px !important;
  }

  .ps-source-discover-results .ps-source-card-directory {
    gap:8px !important;
  }

  .ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child {
    flex-basis:48px !important;
    width:48px !important;
    height:48px !important;
    min-height:48px !important;
  }

  .ps-source-discover-results .ps-custom-card:has(.grizat-discover-add-btn.is-radio-only) .ps-clean-card-container > div:first-child button {
    width:46px !important;
    height:46px !important;
  }

  .ps-source-discover-results .ps-source-card-title {
    font-size:13.5px !important;
  }

  .ps-source-discover-results .grizat-discover-add-btn {
    min-width:58px !important;
    padding:0 8px !important;
  }
}

/* ============================================================
 * Grizat Workspace — canonical mobile shell
 * Workspace-specific rules are scoped to ps-workspace-page.
 * Generic app chrome remains in app-navigation.css.
 * ============================================================ */

/* Open Grizat — quick actions */
.ps-grizat-quick-actions {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,220px));
  gap:10px;
  margin:0 0 14px;
}

.ps-grizat-quick-action {
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 13px;
  border:1px solid #2a3948;
  border-radius:var(--grizat-radius-md);
  background:#111923;
  color:#e8eef4;
  box-shadow:none;
  font-size:13px;
  font-weight:650;
  line-height:1;
  text-transform:none;
  letter-spacing:0;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, color .16s ease;
}

.ps-grizat-quick-action:hover {
  border-color:#536273;
  background:#15202b;
  color:#fff;
}

.ps-grizat-quick-action.is-primary {
  border-color:#2a3948;
  background:#111923;
  color:#e8eef4;
}

.ps-grizat-quick-action.is-primary:hover {
  border-color:rgba(0,242,254,.42);
  background:#15202b;
}

.ps-grizat-quick-action svg {
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

@media (max-width:700px) {
  /* Dashboard: compact first screen */
  body.ps-workspace-page #ps-grillas-list {
    padding:12px 0 22px;
  }

  body.ps-workspace-page .ps-dash-head {
    gap:10px;
    margin-bottom:14px;
  }

  body.ps-workspace-page .ps-title-line {
    gap:7px;
  }

  body.ps-workspace-page .ps-dash-title {
    font-size:25px;
    line-height:1.05;
  }

  body.ps-workspace-page .ps-plan-badge {
    margin-top:1px;
    padding:2px 6px;
    font-size:8px;
    opacity:.55;
  }

  body.ps-workspace-page .ps-dash-copy {
    display:none !important;
  }

  body.ps-workspace-page .ps-new-grizat-btn {
    min-height:44px;
    padding:0 15px;
    border-radius:var(--grizat-radius-md);
    font-size:14px;
  }

  body.ps-workspace-page .ps-workspace-grid {
    gap:12px;
  }

  body.ps-workspace-page .ps-workspace-card {
    min-height:0;
    max-width:none;
    padding:0 11px 11px;
    border-radius:var(--grizat-radius-lg);
  }

  body.ps-workspace-page .ps-card-strip {
    height:5px;
    margin:0 18px 0 12px;
  }

  body.ps-workspace-page .ps-card-preview {
    height:88px;
    margin:10px 0 10px;
    border-radius:var(--grizat-radius-md);
  }

  body.ps-workspace-page .ps-card-name {
    font-size:15px;
  }

  body.ps-workspace-page .ps-card-meta {
    display:inline-block;
    margin-top:3px;
    font-size:10.5px;
  }

  body.ps-workspace-page .ps-card-description {
    -webkit-line-clamp:1;
    margin-top:4px;
    font-size:11px;
  }

  body.ps-workspace-page .ps-card-menu-btn {
    width:38px;
    height:38px;
    flex-basis:38px;
  }
  /* Inside a grizat, Back to My grizats remains the only top navigation action. */

  body.ps-workspace-page .ps-open-nav {
    display:none !important;
  }

  /* Quick actions stay quiet and horizontal. */
  body.ps-workspace-page .ps-grizat-quick-actions {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:8px 0 12px;
  }

  body.ps-workspace-page button.ps-grizat-quick-action,
  body.ps-workspace-page button.ps-grizat-quick-action.is-primary {
    min-height:42px !important;
    height:42px !important;
    padding:0 12px !important;
    border:1px solid rgba(255,255,255,.12) !important;
    border-radius:var(--grizat-radius-md) !important;
    background:#111923 !important;
    color:#e8eef4 !important;
    box-shadow:none !important;
    font-size:13px !important;
    font-weight:650 !important;
  }

  body.ps-workspace-page button.ps-grizat-quick-action:hover,
  body.ps-workspace-page button.ps-grizat-quick-action.is-primary:hover {
    border-color:rgba(0,242,254,.4) !important;
    background:#15202b !important;
    color:#fff !important;
  }

  body.ps-workspace-page button.ps-grizat-quick-action svg {
    width:18px !important;
    height:18px !important;
    flex:0 0 18px !important;
  }

  /* Grizat tabs: readable labels and true horizontal overflow. */
  body.ps-workspace-page #ps-grilla-tabs.ps-open-tabs {
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    width:100% !important;
    max-width:100% !important;
    gap:4px !important;
    padding:0 18px 5px 0 !important;
    scroll-padding-right:18px;
    scrollbar-width:none !important;
    -webkit-overflow-scrolling:touch;
  }

  body.ps-workspace-page #ps-grilla-tabs.ps-open-tabs::-webkit-scrollbar {
    display:none !important;
  }

  body.ps-workspace-page #ps-grilla-tabs .ps-grilla-tab {
    flex:0 0 auto !important;
    min-width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
  }
}


/* Save status: transient server-confirmed feedback beside the open grizat title. */
.ps-grizat-save-status {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  opacity: .72;
}

.ps-grizat-save-status[hidden] {
  display: none !important;
}

.ps-grizat-save-status--error {
  opacity: 1;
}

@media (max-width: 767px) {
  .ps-grizat-save-status {
    margin-left: 6px;
    font-size: 11px;
  }
}



/* ============================================================
 * Menu usability hardening — dashboard + open grizat
 * ============================================================ */
body.ps-workspace-page .ps-workspace-card.menu-open {
  z-index: 120;
}

body.ps-workspace-page .ps-card-menu-btn {
  border-color: #3a4658;
  background: #172131;
  color: #d9e2ef;
}

body.ps-workspace-page .ps-card-menu-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

body.ps-workspace-page .ps-card-menu-btn:hover,
body.ps-workspace-page .ps-card-menu-btn[aria-expanded="true"] {
  border-color: var(--grizat-cyan) !important;
  color: var(--grizat-cyan) !important;
  background: #16233A !important;
}

.ps-mobile-menu-head {
  display: none;
}

@media (max-width:700px) {
  /* Dashboard card actions behave like the other mobile action menus:
     a bottom sheet, not an absolutely-positioned panel between cards. */
  body.ps-workspace-page .ps-card-actions.open {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 82px !important;
    width: auto !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    z-index: 100200 !important;
    padding: 10px !important;
    border-radius: var(--grizat-radius-lg) !important;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.66), 0 20px 48px rgba(0,0,0,.55) !important;
  }

  body.ps-workspace-page .ps-card-actions-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 2px 4px 8px 8px;
    background: var(--grizat-bg);
  }

  body.ps-workspace-page .ps-card-actions-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #344056;
    border-radius: var(--grizat-radius-md);
    background: #182131;
    color: #fff;
    font-size: 26px;
    line-height: 1;
  }

  /* Open-grizat / stream menus must sit above the persistent bottom nav
     (bottom nav is z-index 99990). */
  body.ps-workspace-page .ps-head-menu,
  body.ps-workspace-page .ps-stream-menu {
    bottom: 82px !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    z-index: 100200 !important;
  }

  .ps-mobile-menu-head {
    display: flex;
    position: sticky;
    top: -10px;
    z-index: 3;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px -2px 7px;
    padding: 4px 4px 9px 7px;
    border-bottom: 1px solid #303a49;
    background: #171717;
    color: #aeb8c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .ps-mobile-menu-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #3a4658 !important;
    border-radius: var(--grizat-radius-md) !important;
    background: #202834 !important;
    color: #fff !important;
    font-size: 26px !important;
    line-height: 1 !important;
    cursor: pointer;
  }

  body.ps-workspace-page .ps-stream-menu-btn,
  body.ps-workspace-page .ps-head-more {
    border-color: #3a4658 !important;
    background: #172131 !important;
    color: #d9e2ef !important;
  }
}


/* ============================================================
 * Mobile action menus — final geometry / clarity pass
 * ============================================================ */
@media (max-width:700px) {
  /* A transformed ancestor changes the containing block of position:fixed.
     Disable the desktop hover lift on touch layouts so card menus truly
     attach to the viewport instead of to the card. */
  body.ps-workspace-page .ps-workspace-card:hover {
    transform:none !important;
  }

  /* Make every ellipsis affordance readable before it is tapped. */
  body.ps-workspace-page .ps-card-menu-btn,
  body.ps-workspace-page .ps-stream-menu-btn,
  body.ps-workspace-page .ps-head-more {
    width:40px !important;
    min-width:40px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 !important;
    border:1px solid #31536a !important;
    border-radius:var(--grizat-radius-md) !important;
    background:#162332 !important;
    color:#00F2FE !important;
    opacity:1 !important;
  }

  body.ps-workspace-page .ps-card-menu-btn svg,
  body.ps-workspace-page .ps-card-menu-btn svg circle {
    display:block !important;
    fill:currentColor !important;
    color:#00F2FE !important;
    opacity:1 !important;
  }

  /* Dashboard actions are a viewport bottom sheet, never a card dropdown. */
  body.ps-workspace-page .ps-card-actions.open {
    position:fixed !important;
    left:12px !important;
    right:12px !important;
    top:auto !important;
    bottom:82px !important;
    width:auto !important;
    max-height:calc(100dvh - 112px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    z-index:100200 !important;
  }

  body.ps-workspace-page .ps-card-actions-head {
    position:sticky;
    top:0;
    z-index:4;
    min-height:40px;
    background:var(--grizat-bg) !important;
  }

  /* Delicate close control: no oversized rectangle. */
  body.ps-workspace-page .ps-card-actions-close,
  body.ps-workspace-page .ps-mobile-menu-close {
    display:grid !important;
    place-items:center !important;
    flex:0 0 32px !important;
    width:32px !important;
    min-width:32px !important;
    max-width:32px !important;
    height:32px !important;
    min-height:32px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    border-radius:50% !important;
    background:transparent !important;
    color:#d9e2ef !important;
    box-shadow:none !important;
    font-size:24px !important;
    font-weight:400 !important;
    line-height:1 !important;
    text-align:center !important;
  }

  body.ps-workspace-page .ps-card-actions-close:hover,
  body.ps-workspace-page .ps-mobile-menu-close:hover {
    background:rgba(0,242,254,.08) !important;
    color:#00F2FE !important;
  }

  body.ps-workspace-page .ps-head-menu,
  body.ps-workspace-page .ps-stream-menu {
    position:fixed !important;
    left:12px !important;
    right:12px !important;
    top:auto !important;
    bottom:82px !important;
    width:auto !important;
    max-width:none !important;
    max-height:calc(100dvh - 112px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    z-index:100200 !important;
  }

  body.ps-workspace-page .ps-mobile-menu-head {
    position:sticky;
    top:-10px;
    z-index:5;
    min-height:42px;
    margin:-2px -2px 7px;
    padding:4px 5px 8px 8px;
    background:#171717;
  }

  body.ps-workspace-page .ps-mobile-menu-head > span {
    white-space:nowrap;
    line-height:1.2;
  }
}


/* ============================================================
 * Mobile dashboard width containment
 * Prevent cards / kebab trigger from exceeding the viewport.
 * ============================================================ */
@media (max-width:700px) {
  body.ps-workspace-page #ps-grillas-list,
  body.ps-workspace-page .ps-workspace-grid,
  body.ps-workspace-page .ps-workspace-card,
  body.ps-workspace-page .ps-card-row,
  body.ps-workspace-page .ps-card-main,
  body.ps-workspace-page .ps-card-preview {
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  body.ps-workspace-page #ps-grillas-list,
  body.ps-workspace-page .ps-workspace-grid,
  body.ps-workspace-page .ps-workspace-card {
    width:100% !important;
  }

  body.ps-workspace-page .ps-workspace-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }

  body.ps-workspace-page .ps-card-row {
    width:100% !important;
    overflow:visible !important;
  }

  body.ps-workspace-page .ps-card-main {
    flex:1 1 auto !important;
    width:auto !important;
    overflow:hidden !important;
  }

  body.ps-workspace-page .ps-card-menu-btn {
    position:static !important;
    flex:0 0 40px !important;
    margin-left:auto !important;
    transform:none !important;
  }

  /* Keep the page itself from acquiring horizontal overflow from
     any legacy Astra/content width rule. */
  body.ps-workspace-page .site-main,
  body.ps-workspace-page .entry-content,
  body.ps-workspace-page article.page,
  body.ps-workspace-page #primary {
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }
}


/* ============================================================
 * Share grizat chooser
 * ============================================================ */
body.grizat-share-open{overflow:hidden}
.ps-share-chooser{display:none;position:fixed;inset:0;z-index:100300;align-items:center;justify-content:center;padding:18px;background:rgba(3,7,14,.72);backdrop-filter:blur(4px)}
.ps-share-chooser.is-open{display:flex}
.ps-share-chooser-card{width:min(420px,100%);overflow:hidden;border:1px solid #2d3747;border-radius:var(--grizat-radius-lg);background:#111827;box-shadow:0 24px 70px rgba(0,0,0,.48);color:#fff}
.ps-share-chooser-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 18px 14px;border-bottom:1px solid #253044}
.ps-share-chooser-eyebrow{margin:0 0 3px;color:#00F2FE;font-size:10px;font-weight:800;letter-spacing:.09em}
.ps-share-chooser-head h2{margin:0;color:#fff;font-size:20px;font-weight:800;letter-spacing:-.02em}
.ps-share-chooser-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:#d9e2ef;font-size:24px;line-height:1;cursor:pointer}
.ps-share-chooser-close:hover{background:rgba(0,242,254,.08);color:#00F2FE}
.ps-share-chooser-actions{display:flex;flex-direction:column;padding:8px}
.ps-share-choice{display:flex;align-items:center;gap:13px;width:100%;padding:13px 12px;border:0;border-radius:var(--grizat-radius-md);background:transparent;color:#fff;text-align:left;cursor:pointer}
.ps-share-choice:hover{background:#192334}
.ps-share-choice-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid #344056;border-radius:var(--grizat-radius-md);background:#182131;color:#00F2FE;font-size:17px;font-weight:800}
.ps-share-choice>span:last-child{display:flex;min-width:0;flex-direction:column;gap:2px}
.ps-share-choice strong{color:#fff;font-size:14px;font-weight:800}
.ps-share-choice small{color:#9aa6b6;font-size:11px;line-height:1.35}
.ps-share-choice[hidden]{display:none!important}
@media(max-width:600px){.ps-share-chooser{align-items:flex-end;padding:10px}.ps-share-chooser-card{width:100%;border-radius:var(--grizat-radius-lg)}}

/* Mobile workspace width: 16px app gutter */
@media (max-width:700px){
  body.grizat-app-shell #primary,
  body.grizat-app-shell .site-main,
  body.grizat-app-shell article,
  body.grizat-app-shell .entry-content{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.grizat-app-shell .entry-content{
    padding-left:16px!important;
    padding-right:16px!important;
  }
  body.grizat-app-shell #ps-grillas-list,
  body.grizat-app-shell .ps-workspace-grid,
  body.grizat-app-shell .ps-workspace-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
}
@media (max-width:380px){
  body.grizat-app-shell .entry-content{
    padding-left:12px!important;
    padding-right:12px!important;
  }
}


/* ============================================================
 * Grizat Radio Player
 * ============================================================ */
.ps-platform-badge{
  position:absolute;top:6px;left:6px;z-index:4;
  padding:2px 6px;border-radius:var(--grizat-radius-xs);
  background:rgba(0,0,0,.78);color:#00F2FE;
  font-size:9px;font-weight:800;letter-spacing:.55px;text-transform:uppercase;
}
.ps-radio-player{
  position:absolute;inset:0;
  flex-direction:column;align-items:center;justify-content:center;
  gap:8px;overflow:hidden;
  background:
    radial-gradient(circle at 50% 45%,rgba(0,242,254,.10),transparent 32%),
    linear-gradient(180deg,#0b1118 0%,#080b10 100%);
}
.ps-radio-kicker{
  position:relative;z-index:2;
  color:#00F2FE;font-size:9px;font-weight:900;letter-spacing:.12em;
}
.ps-radio-playbtn{
  position:relative;z-index:3;
  display:grid;place-items:center;
  width:58px;height:58px;padding:0;
  border:1px solid rgba(0,242,254,.42);border-radius:50%;
  background:#121b26;color:#fff;
  box-shadow:0 0 0 7px rgba(0,242,254,.05);
  font-size:17px;cursor:pointer;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.ps-radio-playbtn:hover:not(:disabled){
  transform:scale(1.04);border-color:#00F2FE;
  box-shadow:0 0 0 8px rgba(0,242,254,.09);
}
.ps-radio-playbtn:disabled{opacity:.42;cursor:not-allowed}
.ps-radio-playicon{margin-left:2px}
.ps-radio-player.is-playing .ps-radio-playicon{margin-left:0}
.ps-radio-state{
  position:relative;z-index:2;
  min-height:16px;color:#8f9cad;font-size:10px;font-weight:700;
}
.ps-radio-state[data-state="playing"]{color:#d6fbff}
.ps-radio-state[data-state="error"]{color:#ff8c78}
.ps-radio-orbit{
  position:absolute;inset:auto auto 50% 50%;
  width:180px;height:92px;transform:translate(-50%,50%);
  display:flex;align-items:center;justify-content:center;gap:5px;
  opacity:.42;pointer-events:none;
}
.ps-radio-orbit span{
  display:block;width:4px;height:18px;border-radius:999px;
  background:#00F2FE;transform-origin:center;
}
.ps-radio-orbit span:nth-child(2),.ps-radio-orbit span:nth-child(4){height:32px}
.ps-radio-orbit span:nth-child(3){height:46px}
.ps-radio-player.is-playing .ps-radio-orbit span{
  animation:grizatRadioBars .85s ease-in-out infinite alternate;
}
.ps-radio-player.is-playing .ps-radio-orbit span:nth-child(2){animation-delay:.12s}
.ps-radio-player.is-playing .ps-radio-orbit span:nth-child(3){animation-delay:.24s}
.ps-radio-player.is-playing .ps-radio-orbit span:nth-child(4){animation-delay:.36s}
.ps-radio-player.is-playing .ps-radio-orbit span:nth-child(5){animation-delay:.48s}
@keyframes grizatRadioBars{
  from{transform:scaleY(.55);opacity:.42}
  to{transform:scaleY(1.15);opacity:.92}
}
@media (prefers-reduced-motion:reduce){
  .ps-radio-player.is-playing .ps-radio-orbit span{animation:none}
}

/* ============================================================
 * Mobile open Grizat — media bleed without clipping controls
 * Keep the card/footer inside the app width. Only the player canvas
 * extends to the viewport edges.
 * ============================================================ */
@media (max-width:700px) {
  body.grizat-app-shell {
    overflow-x:hidden;
  }

  body.grizat-app-shell #ps-workspace {
    overflow-x:visible !important;
  }

  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels {
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:6px !important;
    padding-right:6px !important;
    box-sizing:border-box !important;
    gap:14px !important;
  }

  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels .ps-stream-card {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    border-left:0 !important;
    border-right:0 !important;
    border-radius:0 !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  /* Full-bleed only the actual player/preview. The footer remains inside
   * the safe content width, so the title and menu stay fully tappable. */
  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels .ps-stream-card > div:first-child {
    width:100vw !important;
    max-width:none !important;
    margin-left:calc((100% - 100vw) / 2) !important;
    margin-right:calc((100% - 100vw) / 2) !important;
    border-radius:0 !important;
    box-sizing:border-box !important;
  }

  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels .ps-stream-card iframe,
  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels .ps-stream-card video {
    width:100% !important;
    max-width:100% !important;
  }

  body.grizat-app-shell #ps-grilla-view .ps-stream-footer {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  body.grizat-app-shell #ps-grilla-view .ps-stream-name {
    min-width:0 !important;
  }

  body.grizat-app-shell #ps-grilla-view .ps-more-wrap,
  body.grizat-app-shell #ps-grilla-view .ps-stream-menu-btn {
    flex-shrink:0 !important;
  }

}


/* ============================================================
 * Mobile open Grizat — taller player viewport
 * 3:2 gives vertical screens more usable media area without stretching embeds.
 * ============================================================ */
@media (max-width:700px) {
  body.grizat-app-shell #ps-grilla-view #ps-grilla-channels .ps-stream-card > div:first-child {
    padding-bottom:66.6667% !important;
  }
}

.ps-source-country-option > span {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (min-width:701px) {
  .ps-source-discover-results .ps-source-card-directory {
    margin-left:0 !important;
  }

  .ps-source-discover-results .grizat-discover-add-btn {
    margin-left:auto !important;
  }
}

/* ==========================================================
   Selector de grizat (dropdown) — reemplaza la barra de
   pestañas horizontal. Ver comentario en grizatRenderTabs()
   (workspace-dashboard.js) para el porqué del cambio.
   ========================================================== */
.ps-grizat-switcher-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  min-height: 42px; padding: 0 14px; border: 1px solid #333; border-radius: var(--grizat-radius-md);
  background: #171717; color: #e5e5e5; font-size: 14px; font-weight: 700; cursor: pointer;
}
.ps-grizat-switcher-btn:hover,
.ps-grizat-switcher-btn[aria-expanded="true"] { border-color: var(--grizat-cyan); color: #fff; }
.ps-grizat-switcher-btn #ps-grizat-switcher-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px;
}
.ps-grizat-switcher-btn .ps-switcher-arrow { flex: 0 0 auto; transition: transform .15s; }
.ps-grizat-switcher-btn[aria-expanded="true"] .ps-switcher-arrow { transform: rotate(180deg); }
.ps-grizat-switcher-menu { max-width: 320px; }
.ps-grizat-switcher-item.active { color: var(--grizat-cyan); font-weight: 700; }
.ps-grizat-switcher-item.active::after { content: "✓"; float: right; }

@media (max-width: 700px) {
  .ps-grizat-switcher-btn #ps-grizat-switcher-label { max-width: 55vw; }
}

/* ==========================================================
   Skeletons de carga — reemplazan los textos planos "Loading..."
   / "Loading sources..." por placeholders con la misma forma que
   el contenido real, para que la espera se perciba más corta.
   ========================================================== */
.ps-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--grizat-panel-2);
}
.ps-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: ps-skeleton-shimmer 1.4s infinite;
}
@keyframes ps-skeleton-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.ps-skeleton-title {
  height: 26px; width: 220px; max-width: 60vw;
  border-radius: var(--grizat-radius-sm); margin-bottom: 10px;
}
.ps-skeleton-card .ps-skeleton {
  border-radius: var(--grizat-radius-lg) var(--grizat-radius-lg) 0 0;
}
.ps-skeleton-line {
  height: 13px; width: 65%; border-radius: var(--grizat-radius-xs);
}


/* ============================================================
 * DS1-B — Workspace markup ownership
 * Presentation formerly embedded in the WordPress page now lives here.
 * JS continues to own runtime visibility through element.style.display.
 * ============================================================ */
#ps-workspace {
  max-width: 1440px;
  margin-inline: auto;
  padding: var(--grizat-space-3);
}

#ps-grilla-view,
#ps-grilla-author,
#ps-anon-save-btn,
#ps-share-home-link,
#ps-share-banner,
#ps-trash-modal {
  display: none;
}

#ps-grilla-author.ps-open-description {
  color: var(--grizat-accent) !important;
  font-size: var(--grizat-text-sm) !important;
}

#ps-layout-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--grizat-space-2);
  padding: var(--grizat-space-1) var(--grizat-space-4) var(--grizat-space-3);
}

#ps-share-home-link {
  color: var(--grizat-accent);
  font-size: var(--grizat-text-xs);
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

#ps-addstream-panel-wrap,
#ps-share-banner {
  margin-bottom: var(--grizat-space-4);
}

#ps-share-banner {
  padding: var(--grizat-space-2) var(--grizat-space-4);
  border-left: 3px solid var(--grizat-accent);
  border-radius: var(--grizat-radius-sm);
  background: var(--grizat-accent-soft);
  color: #CFEAF5;
  font-size: var(--grizat-text-xs);
}

#ps-share-banner a {
  color: var(--grizat-accent);
  font-weight: 800;
}

#ps-grilla-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--grizat-space-5);
}

#ps-trash-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: var(--grizat-space-4);
  background: rgba(0, 0, 0, .80);
  font-family: var(--grizat-font);
}

.ps-trash-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--grizat-space-5);
  border: 1px solid var(--grizat-border);
  border-radius: var(--grizat-radius-md);
  background: var(--grizat-surface-raised);
  color: var(--grizat-text);
  box-shadow: var(--grizat-shadow-modal);
}

.ps-trash-close {
  position: absolute;
  top: var(--grizat-space-3);
  right: var(--grizat-space-4);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--grizat-text-muted);
  font-size: var(--grizat-text-lg);
  cursor: pointer;
}

.ps-trash-title {
  margin: 0 0 var(--grizat-space-4);
  font-size: var(--grizat-text-lg);
}

.ps-trash-loading {
  color: var(--grizat-text-muted);
  font-size: var(--grizat-text-sm);
}

@media (max-width: 700px) {
  #ps-workspace {
    padding: var(--grizat-space-1) 0 var(--grizat-space-3) !important;
  }
}


/* ============================================================
 * Pre-launch stream action menu stability.
 * A transformed card becomes the containing block for a fixed menu;
 * neutralize that transform while its menu is open.
 * ============================================================ */
body.ps-workspace-page .ps-stream-card.ps-menu-owner-open {
  transform: none !important;
  z-index: 10010;
}
body.ps-workspace-page .ps-stream-menu.open {
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

/* Product Pass 2 — optional multi-select, without changing the default one-click Add flow. */
.ps-source-batch-tools{display:flex;align-items:center;gap:10px;margin:8px 0 10px;min-height:34px}.ps-source-batch-toggle,.ps-source-batch-clear{border:0;background:transparent;color:#b8c3d1;font-size:12px;font-weight:700;cursor:pointer;padding:6px 0}.ps-source-batch-toggle:hover,.ps-source-batch-clear:hover{color:#fff}.ps-source-batch-hint{color:#778397;font-size:11px}.ps-source-batch-bar{position:sticky;bottom:8px;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;padding:10px 12px;border:1px solid rgba(0,242,254,.28);border-radius:12px;background:#111821;box-shadow:0 8px 26px rgba(0,0,0,.3);color:#dbe4ef;font-size:12px}.ps-source-batch-bar[hidden]{display:none}.ps-source-batch-bar>div{display:flex;align-items:center;gap:12px}.ps-source-batch-add{border:0;border-radius:9px;background:var(--grizat-accent);color:#071116;font-size:12px;font-weight:900;padding:9px 13px;cursor:pointer}.ps-source-batch-add:disabled{opacity:.45;cursor:default}.ps-source-picker.is-batch-selecting .grizat-discover-add-btn.is-selected{background:var(--grizat-accent)!important;color:#071116!important;border-color:var(--grizat-accent)!important}.ps-source-picker.is-batch-selecting .ps-source-card-directory:has(.grizat-discover-add-btn.is-selected){outline:1px solid rgba(0,242,254,.5);background:rgba(0,242,254,.05)}
@media(max-width:600px){.ps-source-batch-hint{display:none}.ps-source-batch-bar{bottom:4px}.ps-source-batch-tools{justify-content:flex-end}}

/* ============================================================
 * Product Pass 4 — shared grizat as a product/acquisition surface
 * ============================================================ */
#ps-share-banner {
  border: 1px solid rgba(58, 182, 232, .24);
  border-left: 3px solid var(--grizat-accent);
  padding: var(--grizat-space-4);
  background: linear-gradient(135deg, rgba(58,182,232,.10), rgba(255,255,255,.025));
}
.gz-shared-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--grizat-space-5);
}
.gz-shared-copy {
  display: grid;
  gap: 4px;
  max-width: 760px;
}
.gz-shared-eyebrow {
  color: var(--grizat-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
}
.gz-shared-copy strong {
  color: #fff;
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.2;
}
.gz-shared-copy > span:last-child {
  color: #b8cbd5;
  font-size: 13px;
  line-height: 1.45;
}
.gz-shared-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.gz-shared-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--grizat-radius-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.gz-shared-primary {
  border: 1px solid var(--grizat-accent);
  background: var(--grizat-accent);
  color: #07151c;
}
.gz-shared-secondary {
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.05);
  color: #fff;
}
.gz-shared-primary:hover,
.gz-shared-secondary:hover { transform: translateY(-1px); }

@media (max-width: 720px) {
  #ps-share-banner { padding: 14px; }
  .gz-shared-intro { align-items: stretch; flex-direction: column; gap: 14px; }
  .gz-shared-actions { width: 100%; }
  .gz-shared-actions button { flex: 1 1 0; }
}

/* ============================================================
 * Product Pass 5 — first-minute onboarding
 * Lightweight, session-scoped guidance; no mandatory tutorial.
 * ============================================================ */
.ps-first-run{padding:54px 24px}.ps-first-run-kicker{display:block;margin:0 0 8px;color:var(--grizat-cyan);font-size:10px;font-weight:900;letter-spacing:1.35px}.ps-first-run h3{font-size:24px}.ps-first-run p{max-width:560px;font-size:14px}.ps-first-run-actions{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:22px}.ps-first-run-actions .ps-empty-create{margin-top:0}.ps-first-run-discover{display:inline-flex;min-height:44px;align-items:center;padding:0 18px;border:1px solid var(--grizat-border);border-radius:var(--grizat-radius-md);color:var(--grizat-text);font-size:13px;font-weight:750;text-decoration:none}.ps-first-run-discover:hover{border-color:var(--grizat-cyan);color:var(--grizat-cyan)}.ps-first-run-steps{display:flex;justify-content:center;gap:22px;margin:30px auto 0;color:var(--grizat-muted);font-size:11px}.ps-first-run-steps span{display:flex;align-items:center;gap:7px}.ps-first-run-steps b{display:grid;width:22px;height:22px;place-items:center;border:1px solid var(--grizat-border);border-radius:50%;color:var(--grizat-text);font-size:10px}.ps-first-value-guide{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid rgba(0,242,254,.22);border-radius:12px;background:rgba(0,242,254,.055);color:#dce5ee;font-size:12px}.ps-first-value-guide strong{color:#fff}.ps-first-value-guide button{flex:0 0 auto;border:0;border-radius:8px;background:var(--grizat-cyan);color:#071116;padding:8px 11px;font-size:11px;font-weight:900;cursor:pointer}.ps-first-value-dots{display:inline-flex;gap:4px;margin-left:7px}.ps-first-value-dots i{width:6px;height:6px;border-radius:50%;background:#44505e}.ps-first-value-dots i.is-done{background:var(--grizat-cyan)}@media(max-width:620px){.ps-first-run{padding:38px 18px}.ps-first-run h3{font-size:21px}.ps-first-run-actions{align-items:stretch;flex-direction:column}.ps-first-run-actions>*{width:100%;box-sizing:border-box;justify-content:center}.ps-first-run-steps{gap:10px;justify-content:space-between}.ps-first-run-steps span{gap:5px;font-size:10px}.ps-first-value-guide{align-items:flex-start;flex-direction:column}.ps-first-value-guide button{width:100%}}


/* C2.3 — Guest first-run polish */
.ps-empty-sources{margin:8px 0;color:#b9c5d3;font-size:14px;line-height:1.6}
body.ps-workspace-page .ps-first-value-guide{background:rgba(0,242,254,.07);border-color:rgba(0,242,254,.3);color:#dce7f2}
@media(max-width:620px){body.ps-workspace-page .ps-first-value-guide{margin-top:4px}}


/* C2.5 — Guest has one temporary grizat, not a My Grizats dashboard.
 * Covers the legacy page-editor skeleton even when it has no #ps-back-btn id. */
body.ps-workspace-page #ps-grilla-view button[onclick="grizatCloseGrizat()"] {
  display: none;
}
\n\n/* Top-only advertising: visible before the workspace, never between streams. */\n.grizat-app-top-ad {\n  width: min(1200px, calc(100% - 32px));\n  margin: 12px auto 8px;\n  min-height: 0;\n  text-align: center;\n  overflow: visible;\n}\n.grizat-app-top-ad:empty { display: none; }\n@media (max-width: 640px) {\n  .grizat-app-top-ad {\n    width: min(100% - 20px, 1200px);\n    margin-top: 8px;\n  }\n}\n
/* C29 — Pro publishing blocks */
.ps-pro-publishing-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;padding:12px;border:1px solid #292929;border-radius:12px;background:#171717;color:#aaa;font-size:13px}
.ps-pro-tools-label{font-size:10px;font-weight:850;letter-spacing:.08em;color:#00F2FE;margin-right:4px}.ps-pro-publishing-tools button,.ps-pro-publishing-tools a{border:1px solid #353535;border-radius:9px;background:#202020;color:#fff;padding:8px 11px;font-weight:750;text-decoration:none;cursor:pointer}.ps-pro-publishing-tools a{margin-left:auto;color:#00F2FE}.ps-content-block{position:relative;min-width:0;border:1px solid #2a2a2a;border-radius:14px;background:#171717;overflow:hidden;color:#eee}.ps-content-image img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}.ps-content-caption{padding:11px 13px;font-size:13px;color:#bbb}.ps-content-link a{display:flex;min-height:160px;box-sizing:border-box;flex-direction:column;justify-content:center;gap:8px;padding:22px;color:#fff;text-decoration:none;background:linear-gradient(145deg,#171717,#202020)}.ps-content-link strong{font-size:20px;line-height:1.2}.ps-content-kicker{font-size:10px;font-weight:850;letter-spacing:.09em;color:#00F2FE}.ps-content-url{font-size:11px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ps-content-note{padding:22px}.ps-content-note p{font-size:17px;line-height:1.55;margin:10px 0 0}.ps-block-remove{position:absolute;right:8px;top:8px;z-index:5;width:32px;height:32px;border:1px solid #444;border-radius:50%;background:rgba(0,0,0,.78);color:#fff;font-size:20px;cursor:pointer}.ps-pro-block-composer{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.72)}.ps-pro-block-card{width:min(520px,100%);padding:18px;border:1px solid #333;border-radius:16px;background:#171717;box-shadow:0 24px 70px rgba(0,0,0,.5)}.ps-pro-block-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;color:#fff}.ps-pro-block-head button{border:0;background:none;color:#aaa;font-size:25px;cursor:pointer}.ps-pro-block-card input,.ps-pro-block-card textarea{display:block;width:100%;box-sizing:border-box;margin:9px 0;padding:11px 12px;border:1px solid #3a3a3a;border-radius:9px;background:#202020;color:#fff}.ps-pro-block-save{width:100%;margin-top:8px;padding:11px;border:0;border-radius:9px;background:#00F2FE;color:#101010;font-weight:850;cursor:pointer}
@media(max-width:600px){.ps-pro-publishing-tools a{margin-left:0}.ps-content-link strong{font-size:17px}.ps-content-note p{font-size:15px}}

/* C31 — visual source canvas / empty slots */
.ps-empty-canvas-intro{
  grid-column:1/-1;
  padding:18px 20px 6px;
  text-align:center;
  color:#dce7f2;
}
.ps-empty-canvas-kicker{display:block;margin-bottom:7px;color:var(--grizat-cyan);font-size:10px;font-weight:900;letter-spacing:1.4px}
.ps-empty-canvas-intro strong{display:block;color:#fff;font-size:22px;line-height:1.15}
.ps-empty-canvas-intro p{max-width:570px;margin:8px auto 0;color:#93a1b2;font-size:13px;line-height:1.55}
.ps-add-source-tile{
  appearance:none;min-width:0;min-height:190px;padding:24px 18px;border:1px dashed rgba(207,224,239,.22);border-radius:16px;
  background:rgba(255,255,255,.018);color:#8190a2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease,color .18s ease;font:inherit;text-align:center;
}
.ps-add-source-tile:hover,.ps-add-source-tile:focus-visible{border-color:rgba(0,242,254,.62);background:rgba(0,242,254,.055);color:#dffcff;transform:translateY(-1px)}
.ps-add-source-tile-plus{display:grid;width:42px;height:42px;place-items:center;border-radius:50%;background:rgba(0,242,254,.10);color:var(--grizat-cyan);font-size:25px;font-weight:400;line-height:1}
.ps-add-source-tile strong{font-size:12px;font-weight:800;color:inherit}
.ps-add-source-tile small{max-width:210px;color:#69788a;font-size:10px;line-height:1.4}
.ps-add-source-tile.is-primary-empty{border-color:rgba(0,242,254,.34);background:rgba(0,242,254,.035)}
@media(max-width:700px){
  .ps-empty-canvas-intro{padding:14px 14px 4px}.ps-empty-canvas-intro strong{font-size:19px}
  .ps-add-source-tile{min-height:142px;border-radius:13px;padding:18px 10px}.ps-add-source-tile-plus{width:38px;height:38px;font-size:22px}
  .ps-add-source-tile small{display:none}
}


/* C39 — Pro block controls: keep remove affordance fully inside every card. */
body.ps-workspace-page .ps-content-block .ps-block-remove {
  position:absolute !important;
  top:12px !important;
  right:12px !important;
  z-index:8 !important;
  display:grid !important;
  place-items:center !important;
  width:36px !important;
  min-width:36px !important;
  max-width:36px !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 !important;
  margin:0 !important;
  border:1px solid #444 !important;
  border-radius:50% !important;
  box-sizing:border-box !important;
  transform:none !important;
  line-height:1 !important;
  font-size:20px !important;
  background:rgba(0,0,0,.82) !important;
  color:#fff !important;
}
body.ps-workspace-page .ps-content-link > a { padding-right:64px; }
body.ps-workspace-page .ps-content-note { padding-right:64px; }

/* C51 — Personal library. Scoped to avoid changing players or public cards. */
body.ps-workspace-page .gz-library-tools {margin:0 0 24px;display:grid;gap:14px}
body.ps-workspace-page .gz-library-search {display:flex;align-items:center;gap:12px;border:1px solid #344050;border-radius:12px;background:#111a27;padding:0 14px;max-width:650px}
.gz-library-search svg {width:20px;height:20px;fill:none;stroke:#aab5c4;stroke-width:1.8;flex-shrink:0}
body.ps-workspace-page .gz-library-search input {width:100%;min-width:0;height:48px;margin:0;padding:0;border:0;background:transparent;color:#edf1f6;font-size:16px;box-shadow:none}
.gz-library-search:focus-within {outline:2px solid #00c5d0;outline-offset:2px}
.gz-library-controls {display:flex;align-items:center;justify-content:space-between;gap:12px}
.gz-library-filters {display:flex;gap:4px}
body.ps-workspace-page .gz-library-filters button {min-height:44px;padding:0 15px;border:0;border-radius:9px;background:transparent;color:#b3becc;font-size:15px}
body.ps-workspace-page .gz-library-filters button[aria-pressed=true] {background:#253042;color:#fff}
.gz-library-order {display:flex;align-items:center;gap:8px;color:#aab5c4;font-size:14px}
body.ps-workspace-page .gz-library-order select {min-height:44px;max-width:170px;border:1px solid #344050;border-radius:9px;background:#111a27;color:#edf1f6;font-size:14px;padding:0 10px;margin:0}
body.ps-workspace-page .gz-library-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body.ps-workspace-page .gz-library-card {display:flex;align-items:stretch;min-height:156px;max-width:none;margin:0;padding:14px;border:1px solid #2c3746;border-radius:14px;background:#111a27;box-shadow:none;transform:none;border-left:3px solid var(--gz-card-accent,#2c3746);transition:border-color .15s}
body.ps-workspace-page .gz-library-card:hover {transform:none;box-shadow:none;border-top-color:#526074;border-right-color:#526074;border-bottom-color:#526074}
body.ps-workspace-page .gz-card-open {display:flex;align-items:center;gap:18px;flex:1;min-width:0;padding:0;margin:0;border:0;border-radius:5px;background:transparent;text-align:left;color:inherit;box-shadow:none;white-space:normal}
.gz-card-previews {width:112px;flex:0 0 112px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;align-content:center}
.gz-card-thumb,.gz-card-more {position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:1.3;border-radius:5px;overflow:hidden;background:#202c3d;color:#aab5c4;font-size:14px;font-weight:600}
.gz-card-thumb img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}
.gz-card-thumb svg {width:21px;height:21px;fill:none;stroke:#8190a4;stroke-width:1.3}
.gz-card-copy {display:block;min-width:0;flex:1}
body.ps-workspace-page .gz-library-card .ps-card-name {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow:hidden;font-size:19px;line-height:1.3;color:#f1f4f8;font-weight:650;letter-spacing:0}
body.ps-workspace-page .gz-library-card .ps-card-description {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:6px 0 0;font-size:14px;line-height:1.45;color:#b7c1cf;font-weight:400}
body.ps-workspace-page .gz-library-card .ps-card-meta {display:block;margin-top:9px;font-family:var(--grizat-font);font-size:13px;line-height:1.4;color:#aab5c4}
.gz-card-recency {display:block;margin-top:2px;font-size:12px;line-height:1.4;color:#aab5c4}
.gz-card-controls {display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;margin-left:4px;flex:0 0 44px}
body.ps-workspace-page .gz-library-card .ps-card-menu-btn,body.ps-workspace-page .gz-card-favorite {display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;min-width:44px;padding:0;margin:0;border:0;border-radius:9px;background:transparent;color:#aab5c4;box-shadow:none}
.gz-card-favorite svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5}
.gz-card-favorite[aria-pressed=true] svg {fill:#d7e0ec;stroke:#d7e0ec}
body.ps-workspace-page .gz-card-favorite:hover {background:#243044;color:#fff}
.gz-library-no-results {padding:42px 16px;text-align:center;color:#b7c1cf}
.gz-library-no-results h3 {color:#edf1f6;font-size:20px}
.gz-library-no-results button {min-height:44px;border-radius:9px;background:#253042;color:#fff}
body.ps-workspace-page .gz-card-colors {margin:10px 0;padding:8px;border:0;border-top:1px solid #344050;display:flex;gap:5px}
.gz-card-colors legend {font-size:13px;color:#b7c1cf;padding-top:10px}
body.ps-workspace-page .ps-card-actions .gz-card-colors button {width:44px;min-height:44px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px}
.gz-card-colors button span {width:15px;height:15px;border-radius:50%;background:var(--gz-swatch)}
body.ps-workspace-page .ps-card-actions .gz-card-colors button[aria-pressed=true] {border-color:#b7c1cf}
.gz-card-open:focus-visible,.gz-card-favorite:focus-visible {outline:2px solid #00c5d0;outline-offset:2px}
@media(max-width:1000px) {body.ps-workspace-page .gz-library-grid {grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px) {
 body.ps-workspace-page .ps-dash-head {gap:12px;align-items:center;margin-bottom:20px}
 body.ps-workspace-page .ps-dash-title {font-size:25px}
 body.ps-workspace-page .ps-new-grizat-btn {padding:0 12px;font-size:14px;min-height:44px}
 body.ps-workspace-page .gz-library-card {padding:10px;min-height:140px}
 body.ps-workspace-page .gz-card-open {gap:12px}
 .gz-card-previews {width:76px;flex-basis:76px;gap:3px}
 body.ps-workspace-page .gz-library-card .ps-card-name {font-size:17px}
 body.ps-workspace-page .gz-library-card .ps-card-description {font-size:14px;line-height:1.4}
 .gz-library-order>span {display:none}
 .gz-card-controls {margin-left:0}
}
@media(max-width:360px) {.gz-card-previews {width:58px;flex-basis:58px}body.ps-workspace-page .gz-card-open {gap:8px}body.ps-workspace-page .ps-new-grizat-btn {font-size:12px;padding:0 8px}}
body.ps-workspace-page #ps-grillas-list .ps-dash-head {display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;text-align:left!important}
body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn {width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;flex-basis:44px!important;border:0!important;background:transparent!important;color:#aab5c4!important}
body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn:hover,body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn[aria-expanded=true] {background:#243044!important;color:#fff!important}

/* C52 — Text-first library and native title switcher. */
body.ps-workspace-page .gz-library-card {min-height:124px;padding:16px 16px 16px 20px}
body.ps-workspace-page .gz-card-open {align-items:flex-start;padding:5px 0}
.gz-library-date-filter {color:#aab5c4;font-size:14px}
.gz-library-date-filter summary {width:fit-content;cursor:pointer;min-height:32px;line-height:32px}
.gz-library-date-filter label {display:flex;align-items:center;gap:10px;margin-top:6px}
body.ps-workspace-page .gz-library-date-filter select {min-height:44px;background:#111a27;color:#edf1f6;border:1px solid #344050;border-radius:8px;margin:0;padding:0 12px}
body.ps-workspace-page .gz-library-order select {max-width:230px}
body.ps-workspace-page #ps-grilla-title.gz-title-hidden {display:none!important}
body.ps-workspace-page #ps-grizat-switcher-btn.gz-title-selector {display:inline-flex!important;align-items:center;gap:10px;max-width:100%;min-height:48px;padding:0!important;margin:0 0 12px!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:28px!important;line-height:1.3!important;font-weight:700!important;color:#f1f4f8!important;text-align:left;white-space:normal}
body.ps-workspace-page #ps-grizat-switcher-btn.gz-title-selector #ps-grizat-switcher-label {max-width:none!important;white-space:normal!important;overflow-wrap:anywhere}
.gz-library-dialog {width:min(540px,calc(100vw - 32px));max-height:80dvh;margin:auto;padding:22px;border:1px solid #3a4658;border-radius:16px;background:#111a27;color:#edf1f6;box-sizing:border-box;box-shadow:0 24px 80px #0008}
.gz-library-dialog::backdrop {background:#050a12b8}
.gz-dialog-head {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.gz-dialog-head h2 {margin:0;color:#edf1f6;font-size:21px;line-height:1.3}
.gz-library-dialog button.gz-dialog-close {width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:#b7c1cf;font-size:26px}
.gz-library-dialog .gz-switcher-query,.gz-related-editor input {display:block;width:100%;min-height:48px;margin:0;padding:10px 12px;border:1px solid #465267;border-radius:9px;background:#0b121e;color:#edf1f6;font-size:16px;box-sizing:border-box}
.gz-switcher-results {max-height:50dvh;overflow-y:auto;margin-top:14px}
.gz-switcher-results h3 {margin:15px 8px 5px;color:#aab5c4;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.gz-switcher-results button {display:flex;width:100%;min-height:48px;align-items:center;justify-content:space-between;gap:14px;border:0;border-radius:8px;background:transparent;color:#edf1f6;padding:10px 12px;margin:0;text-align:left;font-size:16px;white-space:normal}
.gz-switcher-results button:hover,.gz-switcher-results button[aria-current] {background:#253042}
.gz-switcher-results button span {overflow-wrap:anywhere}
.gz-switcher-results small {flex-shrink:0;color:#aab5c4;font-size:12px}
.gz-library-dialog input:focus-visible,.gz-switcher-results button:focus-visible {outline:2px solid #00c5d0;outline-offset:2px}
#gz-related-link {margin:8px 0 14px;font-size:15px}
#gz-related-link[hidden] {display:none}
#gz-related-link a {color:#a9d4eb;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.gz-related-editor label {display:block;margin-top:16px;color:#b7c1cf;font-size:14px}
.gz-related-editor label input {margin-top:6px}
.gz-related-editor p {color:#b7c1cf;font-size:14px;line-height:1.5}
.gz-related-editor .gz-related-error {color:#ffb6b6;min-height:20px;margin-bottom:10px}
.gz-related-buttons {display:flex;justify-content:space-between;gap:12px}
.gz-related-buttons button {min-height:44px;padding:0 16px;border:1px solid #465267;border-radius:9px;background:#253042;color:#edf1f6;font-size:14px}
.gz-related-buttons button[type=submit] {background:#edf1f6;color:#111a27}
@media(max-width:600px){
 body.ps-workspace-page .gz-library-card {min-height:118px;padding:12px 12px 12px 16px}
 body.ps-workspace-page #ps-grizat-switcher-btn.gz-title-selector {font-size:24px!important}
 .gz-library-dialog {width:100%;max-height:85dvh;margin:auto 0 0;padding:20px;border-radius:20px 20px 0 0}
 .gz-switcher-results {max-height:55dvh}
 .gz-library-order select {font-size:13px!important;max-width:210px!important}
 .gz-library-filters button {padding:0 10px!important;font-size:14px!important}
}
@media(max-width:370px){.gz-library-controls {flex-wrap:wrap}.gz-library-order {width:100%}.gz-library-order select {max-width:100%!important;width:100%}}
body.ps-workspace-page #ps-grillas-list .gz-library-search input:focus {outline:none!important}
body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn svg {fill:currentColor!important;color:inherit!important}
.gz-library-date-filter summary {min-height:44px;line-height:44px}
/* C53: one compact toolbar, filters disclosed on demand. */
body.ps-workspace-page #ps-grillas-list .gz-library-tools {display:flex;align-items:center;gap:10px;margin:0 0 18px}
body.ps-workspace-page #ps-grillas-list .gz-library-search {flex:1;min-width:0;max-width:650px}
body.ps-workspace-page #ps-grillas-list .gz-sort-filter-button {display:flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;min-height:48px;padding:0 12px;border:1px solid #344050;border-radius:10px;background:#111a27;color:#c3cdda;font-size:14px;font-weight:500;white-space:nowrap}
.gz-filter-active-dot {width:6px;height:6px;border-radius:50%;background:#9acbd8}
.gz-filter-dialog label {display:block;color:#b7c1cf;font-size:14px;margin-bottom:16px}
.gz-filter-dialog select {display:block;width:100%;min-height:48px;margin-top:6px;padding:0 12px;background:#0b121e;color:#edf1f6;border:1px solid #465267;border-radius:9px;font-size:16px}
body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn svg {fill:#aab5c4!important;color:#aab5c4!important}
body.ps-workspace-page .gz-library-card {min-height:112px}
body.ps-workspace-page .gz-library-card .ps-card-meta,body.ps-workspace-page .gz-library-card .gz-card-recency {display:inline;font-size:13px;line-height:1.5}
body.ps-workspace-page .gz-library-card .ps-card-meta {display:block;margin-top:8px}
body.ps-workspace-page .gz-library-card .gz-card-recency {display:block;font-size:12px}
@media(max-width:600px){body.ps-workspace-page #ps-grillas-list .ps-dash-head {margin-bottom:16px}body.ps-workspace-page #ps-grillas-list .gz-sort-filter-button {padding:0 10px;font-size:13px}body.ps-workspace-page #ps-grillas-list .gz-library-search {padding:0 10px;gap:8px}body.ps-workspace-page #ps-grillas-list .gz-library-card {min-height:108px}}
body.ps-workspace-page .gz-library-card .ps-card-meta .gz-card-recency {display:inline;margin:0;font-size:12px}
body.ps-workspace-page #ps-grillas-list .gz-library-card .ps-card-menu-btn svg circle {fill:#aab5c4!important;color:#aab5c4!important}

/* C54 — first entry has one centered source card. */
.gz-first-source{width:100%;max-width:1200px;margin:0 auto;padding:20px 16px 40px;box-sizing:border-box}
.gz-first-source>.ps-dash-title{margin:0 0 28px!important;font-family:Arial,Helvetica,sans-serif!important}
.gz-first-source-center{display:flex;flex-direction:column;align-items:center;width:100%;padding:16px 0 40px}
.gz-first-source .gz-first-source-start{width:310px;max-width:100%;min-height:186px;padding:28px 22px;border-radius:18px;font-family:Arial,Helvetica,sans-serif!important}
.gz-first-source .gz-first-source-start strong{font-size:17px;line-height:1.4;color:#edf5ff}
.gz-first-source .gz-first-source-start small{display:block!important;font-size:14px;line-height:1.5;color:#b7c9dc;max-width:235px}
.gz-first-source-error{max-width:420px;text-align:center;color:#f5b8b8;font-size:14px;line-height:1.5}
.gz-first-source-start:disabled{opacity:.65;cursor:wait}
@media(max-width:600px){.gz-first-source{padding:16px 12px 32px}.gz-first-source>.ps-dash-title{font-size:26px!important}.gz-first-source-center{padding-top:8px}}

/* Load error card (was inline styles in workspace.js) */
.ps-workspace-load-error{max-width:620px;margin:70px auto;padding:24px;border:1px solid #3f4a5c;border-radius:14px;background:#111827;color:#f9fafb;text-align:center}
.ps-workspace-load-error h2{margin:0 0 8px;font-size:22px;color:#f9fafb}
.ps-workspace-load-error p{margin:0 0 16px;color:#d1d5db;font-size:14px;line-height:1.5}
.ps-workspace-load-error button{min-height:40px;padding:0 16px;border:0;border-radius:8px;background:#FF4500;color:#fff;font-weight:800;cursor:pointer}
@media(max-width:600px){.ps-workspace-load-error{margin:32px 12px;padding:18px}}

/* First-entry: secondary path to Discover, under the Add your first source card */
.gz-first-source-discover{margin-top:18px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;color:#b7c9dc;text-decoration:underline;text-underline-offset:3px}
.gz-first-source-discover:hover,.gz-first-source-discover:focus-visible{color:#edf5ff}


/* First-entry onboarding: explain the broader Grizat format without crowding the primary action. */
.gz-first-source-intro{width:min(100%,620px);margin:38px auto 0;text-align:center;color:#dbe7f4}
.gz-first-source-intro h2{margin:0 0 8px;color:#f5f8fc;font-size:20px;font-weight:750;letter-spacing:-.025em}
.gz-first-source-intro>p{margin:0 auto;color:#aebfd2;font-size:14px;line-height:1.6}
.gz-first-source-types{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:18px auto 10px}
.gz-first-source-types span{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border:1px solid rgba(139,171,201,.22);border-radius:999px;background:rgba(23,42,61,.55);color:#dce8f5;font-size:12px;line-height:1.25}
.gz-first-source-intro .gz-first-source-pro-note{font-size:12px;color:#8197ad}
.gz-first-source-discover{display:inline-flex;align-items:center;gap:6px;font-weight:700;text-decoration:none!important}
.gz-first-source-discover:hover{text-decoration:underline!important}
.gz-first-source-faq{width:min(100%,620px);margin:30px auto 0;border-top:1px solid rgba(139,171,201,.2);padding-top:24px;text-align:left;color:#dbe7f4}
.gz-first-source-faq h2{margin:0 0 12px;text-align:center;color:#f5f8fc;font-size:20px;font-weight:750;letter-spacing:-.025em}
.gz-first-source-faq-list{border:1px solid rgba(139,171,201,.16);border-radius:12px;overflow:hidden;background:rgba(9,20,32,.34)}
.gz-first-source-faq-list details{border-bottom:1px solid rgba(139,171,201,.13)}
.gz-first-source-faq-list details:last-child{border-bottom:0}
.gz-first-source-faq-list summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;cursor:pointer;color:#e7f0f9;font-size:13px;font-weight:700;list-style:none}
.gz-first-source-faq-list summary::-webkit-details-marker{display:none}
.gz-first-source-faq-list summary::after{content:'+';flex:0 0 auto;color:#7f9bb5;font-size:18px;font-weight:400;line-height:1}
.gz-first-source-faq-list details[open] summary::after{content:'−'}
.gz-first-source-faq-list summary:hover{color:#fff}
.gz-first-source-faq-list p{margin:0;padding:0 16px 15px;color:#aebfd2;font-size:13px;line-height:1.6}
.gz-first-source-faq-list a{color:#00dff0;text-decoration:underline;text-underline-offset:2px}
.gz-first-source-faq-all{display:inline-flex;align-items:center;gap:6px;margin:15px 0 0;color:#b7c9dc;font-size:13px;font-weight:700;text-decoration:none}
.gz-first-source-faq-all:hover,.gz-first-source-faq-all:focus-visible{color:#f5f8fc;text-decoration:underline;text-underline-offset:3px}
.gz-first-source-footer{width:min(100%,620px);margin:34px auto 0;padding:18px 0 8px;border-top:1px solid rgba(139,171,201,.16);display:flex;justify-content:center;flex-wrap:wrap;gap:8px 22px}
.gz-first-source-footer a{color:#8298ae;font-size:12px;text-decoration:none}
.gz-first-source-footer a:hover,.gz-first-source-footer a:focus-visible{color:#eaf3fb;text-decoration:underline;text-underline-offset:3px}
@media(max-width:600px){
 .gz-first-source-intro{margin-top:30px;padding:0 8px;box-sizing:border-box}
 .gz-first-source-intro h2{font-size:18px}
 .gz-first-source-types{gap:6px;margin-top:14px}
 .gz-first-source-types span{padding:7px 9px;font-size:11px}
 .gz-first-source-faq{margin-top:24px;padding-top:20px}
 .gz-first-source-faq h2{font-size:18px}
 .gz-first-source-faq-list summary{padding:13px 14px;font-size:12px}
 .gz-first-source-faq-list p{padding:0 14px 14px;font-size:12px}
 .gz-first-source-footer{margin-top:28px;gap:10px 18px;padding-bottom:4px}
}
