/* Creator inherits Home's width and responsive outer spacing through .home-view. */
.creator-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.creator-toolbar-filters { display: flex; flex: 1 1 auto; align-items: center; gap: 16px; min-width: 0; }
.creator-toolbar-filters .creator-search { flex: 0 1 340px; min-width: 170px; }
.creator-status-filters { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.creator-status-filter { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 6%); color: var(--text-secondary); font-size: 13px; font-weight: 600; white-space: nowrap; }
.creator-status-filter:hover { background: rgb(255 255 255 / 11%); color: #fff; }
.creator-status-filter[aria-pressed="true"] { background: #fff; color: #151515; }
.creator-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.creator-search { display: flex; align-items: center; gap: 11px; width: min(340px, 100%); height: 46px; padding: 0 16px; border-radius: 999px; background: rgb(255 255 255 / 6%); }
.creator-search > img { flex: 0 0 auto; opacity: .6; }
.creator-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 14px; }
.creator-search input:focus-visible { outline: none; }
.creator-search input::placeholder { color: var(--text-secondary); }
.creator-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.creator-create { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 23px; border: 0; border-radius: 999px; background: #fff; color: #151515; font-size: 14px; font-weight: 750; }
.creator-create:hover { background: #e4e2e8; }
.creator-create:active { transform: scale(.98); }
.creator-status { margin: -12px 0 24px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.creator-status.is-error { color: #f1a5ac; }
.creator-stories { margin: 0; padding: 0; list-style: none; }
.creator-story { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid rgb(255 255 255 / 6%); }
.creator-story:first-child { padding-top: 0; }
.creator-artwork { position: relative; width: 80px; height: 120px; aspect-ratio: 2 / 3; border-radius: 8px; }
.creator-artwork .creator-cover-button { width: 100%; height: 100%; border-radius: inherit; }
.creator-cover { display: block; width: 80px; height: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: rgb(255 255 255 / 5%); }
.creator-artwork .creator-cover { width: 100%; height: 100%; }
.creator-private-indicator { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 50%; background: rgb(12 10 16 / 78%); color: #eee9f3; }
.creator-copy { min-width: 0; }
.creator-title { margin: 0; overflow: hidden; color: var(--text); font-size: 17px; font-weight: 650; line-height: 1.5; letter-spacing: -.3px; white-space: nowrap; text-overflow: ellipsis; }
.creator-description { margin: 7px 0 13px; overflow: hidden; color: var(--text-secondary); font-size: 14px; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; }
.creator-genres { display: flex; flex-wrap: wrap; gap: 7px; }
.creator-genre { padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / 6%); color: #c8c4ce; font-size: 11px; font-weight: 600; line-height: 16px; }
.creator-row-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.creator-story-tools { display: flex; align-items: center; gap: 8px; }
.creator-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; }
.creator-icon img { opacity: .58; }
.creator-icon:hover { background: rgb(255 255 255 / 6%); }
.creator-icon:hover img { opacity: 1; }
.creator-icon:disabled { cursor: default; }
.creator-icon:disabled img { opacity: .25; }
.creator-icon:disabled:hover { background: transparent; }
.creator-icon.creator-layout-toggle { width: 42px; height: 42px; }
.creator-layout-toggle[aria-pressed="true"] img { opacity: 1; }
.creator-switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / 12%); }
.creator-switch::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #a6a0ad; content: ''; }
.creator-switch[aria-checked="true"] { background: #fff; }
.creator-switch[aria-checked="true"]::after { background: #26232b; transform: translateX(16px); }
.creator-switch:disabled { cursor: progress; opacity: .5; }
.creator-empty { margin: 80px 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; text-align: center; }
.creator-prompt { position: fixed; width: 880px; max-width: calc(100vw - 48px); max-height: calc(100dvh - 80px); padding: 28px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 20px; background: #1c1a20; color: var(--text); box-shadow: 0 30px 100px rgb(0 0 0 / 45%); }
.creator-prompt[open] { display: flex; flex-direction: column; }
.creator-prompt::backdrop { background: rgb(6 5 9 / 78%); backdrop-filter: blur(8px); }
.creator-prompt-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 20px; }
.creator-prompt-header > div { min-width: 0; }
.creator-prompt h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
#creator-prompt-story { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
#creator-prompt-context { flex: 0 0 auto; margin: 16px 0 20px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
#creator-prompt-status { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
#creator-prompt-content { min-height: 0; margin: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; border-radius: 10px; background: rgb(0 0 0 / 20%); color: #d9d5e1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .creator-create, .creator-status-filter, .creator-icon, .creator-icon img, .creator-switch, .creator-switch::after { transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease; }
}
@media (max-width: 1100px) {
  .creator-story { gap: 18px; }
  .creator-row-actions { gap: 8px; }
}
@media (max-width: 900px) {
  .creator-story { grid-template-columns: 72px minmax(0, 1fr); column-gap: 18px; row-gap: 12px; }
  .creator-artwork { grid-row: 1 / 3; align-self: start; width: 72px; height: 108px; }
  .creator-row-actions { grid-column: 2; gap: 12px; }
  .creator-description { margin: 5px 0 9px; }
}
@media (max-width: 600px) {
  html:has(#creator-view:not([hidden])) { min-width: 0; }
  .creator-toolbar { flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
  .creator-toolbar-actions { gap: 6px; margin-left: auto; }
  .creator-search { flex: 1 1 160px; }
  .creator-search { gap: 8px; height: 42px; padding-inline: 12px; }
  .creator-search input { font-size: 12px; }
  .creator-create { gap: 5px; height: 42px; padding-inline: 15px; font-size: 12px; }
  .creator-create img { width: 15px; height: 15px; }
  .creator-story { grid-template-columns: 60px minmax(0, 1fr); column-gap: 14px; }
  .creator-artwork { grid-row: 1; width: 60px; height: 90px; }
  .creator-title { font-size: 14px; }
  .creator-description { font-size: 12px; }
  .creator-genre { padding: 3px 9px; font-size: 10px; }
  .creator-row-actions { grid-column: 1 / -1; gap: 8px; }
  .creator-prompt { max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); padding: 20px; border-radius: 15px; }
  #creator-prompt-content { padding: 14px; font-size: 12px; }
}

/* Reuse the same story elements and controls in both views. */
.creator-stories.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); align-items: start; gap: 32px 24px; }
.creator-stories.is-grid .creator-story { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: 0; border: 0; }
.creator-stories.is-grid .creator-artwork { grid-row: auto; width: 100%; height: auto; aspect-ratio: 2 / 3; }
.creator-stories.is-grid .creator-cover { width: 100%; height: 100%; aspect-ratio: 2 / 3; }
.creator-stories.is-grid .creator-copy { margin-top: 14px; }
.creator-stories.is-grid .creator-title { display: -webkit-box; height: 44px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 22px; white-space: normal; overflow-wrap: anywhere; }
.creator-stories.is-grid .creator-description { margin: 6px 0 12px; font-size: 13px; }
.creator-stories.is-grid .creator-genres { min-height: 26px; }
.creator-stories.is-grid .creator-row-actions { grid-column: auto; width: 100%; gap: 12px; margin-top: 12px; }

.creator-import-button { background: rgb(255 255 255 / 7%); color: var(--text); border: 1px solid rgb(255 255 255 / 12%); }
.creator-import-button:hover { background: rgb(255 255 255 / 12%); }
.creator-import { width: 680px; overflow-y: auto; gap: 18px; }
.creator-import p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.creator-import-downloads { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.creator-import-downloads a { color: #dfd8ef; font-size: 12px; text-underline-offset: 4px; }
.creator-import-file { display: grid; gap: 10px; padding: 18px; border: 1px dashed rgb(255 255 255 / 23%); border-radius: 12px; font-size: 14px; }
.creator-import-file input { max-width: 100%; color: var(--text-secondary); font: inherit; font-size: 12px; }
.creator-import-file input::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 0; border-radius: 6px; background: #e8e4ed; color: #1b1920; cursor: pointer; }
#creator-import-limits { font-size: 11px; }
.creator-import .is-error, .creator-import-errors { color: #f1a5ac; }
.creator-import-errors, #creator-import-warnings ul { margin: 0; padding-left: 20px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.creator-import-overview { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
#creator-import-cover { width: 64px; height: 96px; object-fit: cover; border-radius: 6px; }
#creator-import-title { margin: 0 0 8px; font-size: 18px; overflow-wrap: anywhere; }
.creator-import details { font-size: 13px; }
.creator-import summary { cursor: pointer; }
#creator-import-content { max-height: 220px; overflow: auto; padding: 14px; border-radius: 8px; background: rgb(0 0 0 / 20%); font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
#creator-import-warnings { margin-top: 18px; color: #d8c7a5; }
#creator-import-warnings h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; }
.creator-import-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.creator-import button:disabled { cursor: default; opacity: .45; }
@media (max-width: 1100px) { .creator-toolbar { flex-wrap: wrap; } .creator-toolbar-actions { margin-left: auto; } }
@media (max-width: 600px) {
  .creator-toolbar-filters { flex-wrap: wrap; }
  .creator-toolbar-filters .creator-search { flex-basis: 100%; }
  .creator-import { gap: 14px; }
}

@media (max-width: 760px) {
  .creator-toolbar-filters { flex-wrap: wrap; }
  .creator-toolbar-filters .creator-search { flex-basis: 100%; }
  .creator-status-filters { max-width: 100%; gap: 6px; }
  .creator-status-filter { padding-inline: 12px; }
}
