/* Shared shell for generation, gallery, and discussions. */
@font-face {
  font-family: Workspace;
  src: url('/fonts/gotham-medium.ttf') format('truetype');
  font-display: swap;
}
:root {
  --workspace-bg: #10121a;
  --workspace-panel: #191e2b;
  --workspace-border: #30394d;
  --workspace-muted: #a5afc8;
  --workspace-accent: #bdcaff;
}
body[data-workspace] {
  width: 100%;
  margin: 0;
  overflow-x: clip;
  background: radial-gradient(ellipse at 15% 0%, #202b443d, transparent 55%), var(--workspace-bg);
  color: #eaf0ff;
}
.workspace-header, .workspace-header *, .workspace-intro, .workspace-intro * { box-sizing: border-box; }
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px 40px;
  flex-wrap: wrap;
  min-height: 76px;
  padding: 12px 28px;
  overflow: visible;
  background: #10121af5;
  border-bottom: 1px solid var(--workspace-border);
  backdrop-filter: blur(16px);
  font-family: Workspace, Arial, sans-serif;
}
.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f2f5ff;
  text-decoration: none;
  white-space: nowrap;
}
.workspace-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border: 1px solid #8196d5;
  border-radius: 8px;
  background: linear-gradient(145deg, #415989, #22283c);
  font: 24px Georgia, serif;
  box-shadow: -4px 3px 0 #283148;
}
.workspace-brand strong { display: block; font-size: 17px; letter-spacing: -.04em; }
.workspace-brand small { display: block; margin-top: 4px; color: var(--workspace-muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.workspace-nav { display: flex; gap: 6px; }
.workspace-nav a {
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--workspace-muted);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.workspace-nav a:hover { color: white; background: #222a3c; }
.workspace-nav a[aria-current='page'] { background: #283550; border-color: #4c618c; color: #edf2ff; }
.workspace-header a:focus-visible, .workspace-action:focus-visible, .creator-menu-tabs button:focus-visible {
  outline: 2px solid var(--workspace-accent);
  outline-offset: 3px;
}
.workspace-caption { margin-left: auto; font-size: 11px; color: var(--workspace-muted); }
.workspace-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--workspace-border);
  border-radius: 16px;
  background: linear-gradient(120deg, #202a41, #191e2b 75%);
  font-family: Workspace, Arial, sans-serif;
}
.workspace-eyebrow { margin: 0 0 10px; color: var(--workspace-accent); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.workspace-intro h1 { margin: 0; padding: 0; color: #f3f5ff; font: 600 28px/1.2 Workspace, Arial, sans-serif; letter-spacing: -.04em; }
.workspace-intro-lead { display: flex; align-items: center; gap: 16px; flex: 1 1 280px; min-width: 0; }
.workspace-intro-copy { min-width: 0; }
.workspace-set-logo {
  display: block;
  width: 104px;
  height: 104px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--workspace-border);
  border-radius: 14px;
  background: #10121a;
}
.workspace-set-logo[hidden] { display: none; }
.workspace-intro p:not(.workspace-eyebrow) { margin: 10px 0 0; padding: 0; max-width: 680px; font-size: 12px; line-height: 1.7; color: var(--workspace-muted); }
.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.workspace-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid #566992;
  border-radius: 9px;
  background: #2b3c5c;
  color: #eef2ff;
  font: 12px/1.4 Workspace, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.workspace-action:hover { background: #354a70; color: white; }
.workspace-action--quiet { border-color: var(--workspace-border); background: #161c2b; }
.workspace-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; color: var(--workspace-muted); font-size: 11px; }
.workspace-meta > span { border: 1px solid var(--workspace-border); padding: 7px 10px; border-radius: 6px; background: #10121a55; }
body[data-workspace] .pageShell, body[data-workspace] .discussionShell, .editor-shell {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 24px 28px;
  box-sizing: border-box;
}
.editor-shell .main-content { overflow: visible; }
.editor-shell .creator-grid { padding: 0; gap: 20px; align-items: start; }
.creator-nav-label { margin: 8px 12px 12px; color: var(--workspace-muted); font: 10px Workspace, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.editor-shell .creator-menu-nav { top: 96px; }
.editor-shell .creator-menu-tabs button { font: 12px/1.4 Workspace, Arial, sans-serif; color: var(--workspace-muted); cursor: pointer; }
.editor-shell .creator-menu-tabs button.selected { background: #283550; border-color: #4c618c; color: #edf2ff; }
.editor-shell .creator-menu { box-shadow: none; }
.editor-shell .readable-background { background: var(--workspace-panel); border: 1px solid var(--workspace-border); backdrop-filter: none; }
.editor-shell .creator-canvas { max-width: 100%; border-radius: 18px; }
.editor-shell .input { border-radius: 8px; font: 14px/1.5 Workspace, Arial, sans-serif; }
.editor-shell .input-description { color: #b9c3da; font: 12px/1.7 Workspace, Arial, sans-serif; }
body[data-workspace='editor'] .notification-container { bottom: 16px; z-index: 100; pointer-events: none; }
body[data-workspace='editor'] .notification { pointer-events: auto; background: #222c42; }
body[data-workspace='gallery'] .stats-card, body[data-workspace='gallery'] .gallery-card { border-radius: 16px; border-color: var(--workspace-border); box-shadow: none; }
body[data-workspace='gallery'] .fieldLabel, body[data-workspace='gallery'] .section-muted { color: #b9c3da; }
body[data-workspace='gallery'] #clearFilters { width: auto; padding: 8px 12px; font-size: 12px; }
.workspace-preview-link { display: none; }
#previewCanvas { scroll-margin-top: 150px; }
@media (min-width: 1250px) {
  .editor-shell .creator-grid { grid-template-columns: 150px minmax(360px, 1fr) minmax(280px, .85fr); }
  .editor-shell .creator-menu, .editor-shell .creator-menu-nav { max-height: calc(100vh - 116px); }
  .editor-shell .creator-canvas { position: sticky; top: 96px; width: auto; height: auto; max-height: calc(100vh - 116px); justify-self: center; }
}
@media (max-width: 1249px) {
  .workspace-preview-link { display: inline-flex; }
  .editor-shell .creator-menu-nav { position: static; width: 100%; }
  .editor-shell .creator-menu-tabs { flex-direction: row; flex-wrap: wrap; }
  .editor-shell .creator-menu-tabs button { min-width: auto; flex: 0 0 auto; padding: 10px 12px; }
  .editor-shell .creator-canvas { width: min(100%, 500px); }
}
@media (max-width: 700px) {
  .workspace-header { padding: 12px 16px 10px; gap: 12px; flex-wrap: wrap; }
  .workspace-brand strong { font-size: 15px; }
  .workspace-mark { width: 29px; height: 33px; font-size: 21px; }
  .workspace-caption { display: none; }
  .workspace-nav { width: 100%; gap: 4px; }
  .workspace-nav a { flex: 1; text-align: center; padding: 10px 7px; font-size: 11px; }
  body[data-workspace] .pageShell, body[data-workspace] .discussionShell, .editor-shell { padding: 16px 12px; }
  .workspace-intro { padding: 20px 16px; gap: 16px; }
  .workspace-intro h1 { font-size: 24px; }
  .workspace-set-logo { width: 72px; height: 72px; }
  .workspace-actions { width: 100%; }
  .workspace-actions > a { flex: 1; }
  .editor-shell .creator-grid { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-nav a { transition: none; }
}

@media (max-width: 380px) {
  .workspace-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-nav a { min-width: 0; white-space: normal; }
}
