/* me.aphias.com — minimal stylesheet */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background: #f9fafb;
}

a {
    color: #1d4ed8;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

/* ── Nav ────────────────────────────────────────────────────────── */
.nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #111827;
}
.nav-links {
    display: flex;
    gap: 18px;
    flex: 1;
}
.nav-links a {
    color: #4b5563;
    font-weight: 500;
}
.nav-links a:hover { color: #1d4ed8; text-decoration: none; }
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.nav-email { color: #6b7280; }
.nav-logout {
    color: #6b7280;
    font-size: 13px;
}

/* ── Main ─────────────────────────────────────────────────────── */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 130px);
}

.page {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
}

h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
h3 {
    margin: 24px 0 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.lede {
    color: #6b7280;
    margin: 0 0 24px;
    font-size: 15px;
}

.muted { color: #6b7280; }
.small { font-size: 13px; }

/* ── Centered card (login, opt-in) ────────────────────────────── */
.centered-card {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}
.centered-card.wide { max-width: 720px; text-align: left; }
.centered-card h1 {
    font-size: 32px;
    margin: 0 0 8px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}
.btn-primary:hover {
    background: #1e40af;
    text-decoration: none;
    color: #fff;
}
.btn-secondary {
    background: #fff;
    color: #1f2937;
    border-color: #d1d5db;
}
.btn-secondary:hover {
    background: #f9fafb;
    text-decoration: none;
}
.btn-link {
    background: none;
    border: none;
    color: #1d4ed8;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}
.btn-link:hover { text-decoration: underline; }
.btn-danger { color: #b91c1c; }

/* ── Flash messages ───────────────────────────────────────────── */
.flash-area {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 1100; width: auto; max-width: 90vw; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.flash {
    pointer-events: auto;
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: 8px; margin: 0;
    font-size: 14px; max-width: 560px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease;
}
.flash-msg { flex: 1 1 auto; word-break: break-word; }
.flash-close {
    flex: 0 0 auto; background: none; border: none; cursor: pointer;
    font-size: 18px; line-height: 1; color: inherit; opacity: 0.6; padding: 0;
}
.flash-close:hover { opacity: 1; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-info    { background: #dbeafe; color: #1e40af; }

/* ── Dashboard cards ──────────────────────────────────────────── */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}
.card h3 {
    margin-top: 0;
}
.big-num {
    font-size: 28px;
    font-weight: 600;
    margin: 4px 0 0;
    color: #111827;
}
.card-links {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}
.card-links li { padding: 4px 0; }

/* ── Settings layout ──────────────────────────────────────────── */
.settings-page {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    background: transparent;
    border: none;
    padding: 0;
}
.settings-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}
.settings-sidebar h3 { margin-top: 0; }
.settings-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.settings-sidebar li { padding: 5px 0; }
.settings-sidebar a.active {
    color: #111827;
    font-weight: 600;
}
.settings-main {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
}

/* ── Doc editor ───────────────────────────────────────────────── */
.doc-form {
    margin: 16px 0;
}
.doc-editor {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
}
.doc-editor:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}
.doc-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

/* ── Versions list ────────────────────────────────────────────── */
.versions-list, .timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.versions-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.version-time { color: #6b7280; min-width: 130px; }
.version-preview { color: #4b5563; flex: 1; }

.timeline li {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.timeline-time { color: #6b7280; margin-right: 8px; font-size: 13px; }
.timeline-preview {
    margin: 6px 0 0;
    color: #4b5563;
    font-size: 13px;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-attn {
    background: #fef3c7;
    color: #92400e;
}

/* ── Rules + prefs tables ─────────────────────────────────────── */
.rules-table, .prefs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}
.rules-table th, .rules-table td,
.prefs-table th, .prefs-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}
.rules-table th, .prefs-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 600;
}
.rule-inactive { opacity: 0.5; }

.rule-form, .pref-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}
.rule-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}
.rule-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.priority-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.pref-form {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}
.pref-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}

.inline { display: inline; }

/* ── Opt-in form ──────────────────────────────────────────────── */
.optin-form {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}
.checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Proposals ────────────────────────────────────────────────── */
.proposals {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 16px 20px;
    border-radius: 4px;
    margin: 16px 0;
}
.proposals h3 {
    margin-top: 0;
    color: #78350f;
}
.proposal {
    margin: 12px 0;
}
.proposal-summary { font-weight: 500; margin: 0; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 16px 24px;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 720px) {
    .settings-page { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

/* ── Stories ────────────────────────────────────────────────────────── */
.stories-head { margin-bottom: 16px; }
.story-list { list-style: none; margin: 0; padding: 0; }
.story-list-item { border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; }
.story-list-item:last-child { border-bottom: none; }
.story-list-link {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; padding: 14px 4px; text-decoration: none; color: inherit;
}
.story-list-link:hover { background: #f9fafb; text-decoration: none; }
.story-list-name { font-weight: 600; color: #111827; }
.story-list-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.story-list-date { font-size: 13px; }
.story-list-item .story-list-link { flex: 1 1 auto; min-width: 0; }
.story-delete-form { flex: 0 0 auto; margin: 0; padding-left: 12px; }
.story-new-form { display: flex; gap: 8px; margin-top: 12px; }
.story-new-input {
    flex: 1 1 auto; padding: 8px 10px; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 14px;
}

.story-topbar { margin-bottom: 18px; }
.story-back { padding-left: 0; }
.story-title { margin: 4px 0 0; }

.story-layout { display: flex; gap: 28px; align-items: flex-start; }
.story-nav {
    flex: 0 0 220px; position: sticky; top: 16px;
    max-height: calc(100vh - 32px); overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid #e5e7eb; padding-right: 16px;
}
.story-nav-item {
    display: block; padding: 7px 10px; border-radius: 6px;
    color: #4b5563; text-decoration: none; font-size: 14px; line-height: 1.35;
}
.story-nav-item:hover { background: #f3f4f6; text-decoration: none; color: #1f2937; }
.story-nav-item.is-active { background: #eef2ff; color: #1d4ed8; font-weight: 600; }
.story-nav-num { color: #9ca3af; margin-right: 2px; }
.story-nav-label {
    margin: 14px 0 6px; padding: 0 10px; font-size: 11px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: #9ca3af;
}
.story-nav-empty { padding: 0 10px; }

.story-content { flex: 1 1 auto; min-width: 0; }
.story-chapter-title, .story-section-h { margin-top: 0; }
.story-section-h { margin-top: 28px; padding-top: 18px; border-top: 1px solid #f3f4f6; }
.story-section-h:first-of-type { border-top: none; padding-top: 0; }

/* Rendered markdown body */
.story-md { line-height: 1.7; color: #1f2937; }
.story-md h1, .story-md h2, .story-md h3 { line-height: 1.3; margin: 1.4em 0 .5em; }
.story-md p { margin: 0 0 1em; }
.story-md ul, .story-md ol { margin: 0 0 1em; padding-left: 1.4em; }
.story-md li { margin: .2em 0; }
.story-md img {
    max-width: 100%; height: auto; border-radius: 8px;
    border: 1px solid #e5e7eb; margin: .6em 0;
}
.story-md blockquote {
    margin: 0 0 1em; padding: .2em 1em; border-left: 3px solid #e5e7eb; color: #4b5563;
}
.story-md code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; }
.story-md hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.6em 0; }

.story-pager {
    display: flex; justify-content: space-between; gap: 12px;
    margin-top: 32px; padding-top: 18px; border-top: 1px solid #e5e7eb;
}

@media (max-width: 720px) {
    .story-layout { flex-direction: column; }
    .story-nav {
        flex-basis: auto; width: 100%; position: static;
        max-height: none; overflow: visible;
        border-right: none; border-bottom: 1px solid #e5e7eb;
        padding-right: 0; padding-bottom: 12px;
    }
}

/* Story image gallery (overview) */
.story-gallery-note { margin-top: -4px; margin-bottom: 14px; font-size: 13px; }
.story-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.story-gallery-item { margin: 0; position: relative; }
.story-gallery-item img {
    width: 100%; height: auto; display: block; border-radius: 8px;
    border: 1px solid #e5e7eb; background: #f9fafb;
}
.story-gallery-item figcaption { margin-top: 6px; font-size: 12px; line-height: 1.4; }

/* Delete-image control on a gallery item */
.story-img-delete-form { position: absolute; top: 6px; right: 6px; margin: 0; line-height: 0; }
.story-img-delete {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; padding: 0; border: none; cursor: pointer;
    border-radius: 999px; background: rgba(17, 24, 39, .6); color: #fff;
    font-size: 19px; line-height: 1; transition: background .15s ease;
}
.story-img-delete:hover { background: rgba(190, 30, 30, .92); }
.story-img-delete:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* Story inline editing + lightbox */
.story-edit-link { font-size: 13px; font-weight: 400; margin-left: 10px; }
/* Image audit pane */
.img-audit-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.img-audit-chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--border, #ccc); border-radius: 12px; font-size: 12px; text-decoration: none; }
.img-audit-chip.is-active { background: var(--accent, #4a6cf7); color: #fff; border-color: var(--accent, #4a6cf7); }
.img-audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-top: 16px; }
.img-audit-card { display: flex; gap: 12px; border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 10px; align-items: flex-start; }
.img-audit-thumbwrap { position: relative; margin: 0; flex-shrink: 0; }
.img-audit-thumb { width: 180px; height: 180px; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; }
.img-audit-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0 8px; }
.lightbox-meta { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; max-width: min(92vw, 900px); background: rgba(0, 0, 0, .72); color: #fff; border-radius: 10px; padding: 8px 14px; text-align: center; pointer-events: none; }
.lightbox-meta-loras { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.lightbox-meta-params { font-size: 12px; opacity: .85; margin-top: 2px; overflow-wrap: anywhere; }
/* Events queue dashboard */
.eq-h { margin: 22px 0 8px; }
.eq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eq-table th { text-align: left; color: var(--muted, #777); font-weight: 600; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--border, #ddd); }
.eq-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--border, #eee); }
.eq-row-run td { background: rgba(74, 108, 247, .06); }
.eq-row-stale td { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.eq-row-stale td:last-child { text-decoration: none; }
.eq-badge { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 700; }
.eq-b-run  { background: #dbe4ff; color: #2746b8; }
.eq-b-wait { background: #eee;    color: #555; }
.eq-b-ok   { background: #d9f2dd; color: #1d7a33; }
.eq-b-skip { background: #f4e9d6; color: #8a6116; }
.eq-b-err  { background: #f6d9d9; color: #a32020; }
.eq-counts { margin: 6px 0 10px; }
.eq-live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2bb24c; margin-left: 6px; animation: eqpulse 2s infinite; vertical-align: middle; }
.eq-live-dot.eq-live-err { background: #c33; animation: none; }
@keyframes eqpulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.img-audit-meta { flex: 1; min-width: 0; }
.img-audit-story { font-weight: 600; margin-bottom: 6px; }
.img-audit-table { font-size: 12.5px; border-collapse: collapse; width: 100%; }
.img-audit-table th { text-align: left; padding: 2px 8px 2px 0; vertical-align: top; color: var(--muted, #777); font-weight: 600; white-space: nowrap; }
.img-audit-table td { padding: 2px 0; }
.img-audit-lora { display: flex; justify-content: space-between; gap: 8px; }
.img-audit-lora-name { overflow-wrap: anywhere; }
.img-audit-lora-w { font-weight: 700; white-space: nowrap; }
.story-char-link { display: inline-block; margin-left: 0; margin-top: 6px; }
.story-char-rename-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-width: 520px; }
.story-char-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.story-char-input { padding: 6px 10px; border: 1px solid var(--border, #ccc); border-radius: 6px; font-size: 14px; min-width: 180px; }
.story-char-nicknames { padding: 6px 10px; border: 1px solid var(--border, #ccc); border-radius: 6px; font-size: 13px; font-family: inherit; resize: vertical; }
.story-char-actions { display: flex; gap: 8px; }
.story-char-arrow { color: var(--muted, #888); font-weight: 600; }
.story-char-hint { font-size: 12px; color: var(--muted, #888); margin: 4px 0 0; }
.story-form-actions { display: flex; gap: 10px; margin-top: 10px; }
.story-gallery img, .story-md img { cursor: zoom-in; }
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(17, 24, 39, .85); align-items: center;
    justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
    max-width: 95vw; max-height: 92vh; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff;
    cursor: default;
}
.lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    z-index: 1001; cursor: pointer;
    width: 56px; height: 72px; border: none; border-radius: 8px;
    background: rgba(255, 255, 255, .12); color: #fff;
    font-size: 40px; line-height: 1; display: flex;
    align-items: center; justify-content: center;
    transition: background .15s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    z-index: 1001; color: #e5e7eb; font-size: 14px;
    background: rgba(17, 24, 39, .6); padding: 4px 12px; border-radius: 999px;
}
@media (max-width: 640px) {
    .lightbox-nav { width: 44px; height: 60px; font-size: 30px; }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
}

/* Story chapter add/edit */
.story-title-input {
    width: 100%; padding: 8px 10px; margin-bottom: 10px;
    border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 16px; font-weight: 600; color: #111827;
}
.story-nav-add { margin-top: 8px; color: #1d4ed8; font-weight: 600; }
.story-nav-add:hover { background: #eef2ff; color: #1d4ed8; }

/* Inline rename (topbar) */
.story-rename-form { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.story-rename-form .story-title-input { width: auto; min-width: 280px; margin-bottom: 0; }

/* Reorder chapters */
.story-reorder { margin-top: 6px; }
.story-reorder-list { list-style: none; margin: 0 0 4px; padding: 0; }
.story-reorder-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 6px;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px;
}
.story-reorder-handle { color: #9ca3af; cursor: default; user-select: none; }
.story-reorder-name { flex: 1; color: #1f2937; }
.story-reorder-btns { display: flex; gap: 4px; }
.story-reorder-btns .btn { padding: 2px 10px; font-size: 14px; line-height: 1.4; }

/* ── story readiness, QC flags, style directive, from-idea ───────── */
.story-ready { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; }
.story-ready-form { display: inline; margin: 0; }
.story-ready-badge {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.story-ready-badge.is-ready { background: #dcfce7; color: #166534; }
.story-ready-badge.is-draft { background: #fef3c7; color: #92400e; }
.story-publish-badge {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.story-publish-badge.pub-published { background: #dbeafe; color: #1e40af; }
.story-publish-badge.pub-changes_pending { background: #ffedd5; color: #9a3412; }
.story-publish-badge.pub-not_published { background: #f3f4f6; color: #6b7280; }
.story-tag-badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.story-tag-badge.is-tagged { background: #dcfce7; color: #166534; }
.story-tag-badge.is-partial { background: #ffedd5; color: #9a3412; }
.story-publish-link { margin-left: auto; }

.story-chapter-actions {
    display: flex; align-items: center; gap: 12px; margin: 2px 0 14px;
}
.story-qc-form { display: inline; margin: 0; }
.story-chapter-delete-form { display: inline; margin: 0 0 0 auto; }
.story-chapter-delete { color: #b91c1c; }
.story-chapter-delete:hover { color: #7f1d1d; }
.story-qc-badge {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: #fee2e2; color: #991b1b;
}
.story-nav-qc { color: #dc2626; font-size: 12px; }

.story-idea-form { margin-top: 10px; }
.story-idea-input {
    display: block; width: 100%; max-width: 720px; margin-bottom: 8px;
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px;
    font: inherit; resize: vertical;
}

.story-style-editor { margin-top: 14px; max-width: 720px; }
.story-style-editor > summary { cursor: pointer; font-weight: 600; }
.story-style-form { margin-top: 8px; }
.story-style-input {
    display: block; width: 100%; margin-bottom: 8px;
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px;
    font: inherit; resize: vertical;
}
