:root {
    --bg: #070a12;
    --bg-2: #0b1020;
    --shell: #0f172a;
    --panel: rgba(13, 20, 36, .92);
    --panel-2: rgba(17, 25, 44, .94);
    --panel-3: rgba(22, 31, 52, .94);
    --surface: rgba(255, 255, 255, .045);
    --surface-strong: rgba(255, 255, 255, .08);
    --ink: #edf7ff;
    --muted: #9fb0c8;
    --faint: #65748b;
    --line: rgba(148, 163, 184, .2);
    --line-strong: rgba(34, 211, 238, .42);
    --cyan: #22d3ee;
    --teal: #14b8a6;
    --violet: #8b5cf6;
    --lime: #a3e635;
    --amber: #f59e0b;
    --red: #fb7185;
    --blue: #60a5fa;
    --green: #34d399;
    --shadow: 0 18px 60px rgba(0, 0, 0, .38);
    --shadow-soft: 0 12px 34px rgba(0, 0, 0, .24);
    --glow: 0 0 0 1px rgba(34, 211, 238, .16), 0 0 34px rgba(34, 211, 238, .11);
    --radius: 9px;
    --radius-sm: 7px;
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    overflow-x: hidden;
}

body {
    margin: 0;
    background:
        linear-gradient(rgba(34, 211, 238, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .04) 1px, transparent 1px),
        linear-gradient(135deg, var(--bg), #0c101c 42%, #10121f);
    background-size: 34px 34px, 34px 34px, auto;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.45;
}

body::before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(34, 211, 238, .08), transparent 12%, transparent 88%, rgba(139, 92, 246, .08)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
    opacity: .7;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--cyan);
}

img {
    display: block;
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(4, 9, 20, .76);
    color: var(--ink);
    outline: none;
    padding: 9px 11px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input::placeholder,
textarea::placeholder {
    color: #6f7f98;
}

select {
    appearance: auto;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

input[type="checkbox"] {
    width: 16px;
    min-height: 16px;
    accent-color: var(--cyan);
}

input[type="file"] {
    min-height: 42px;
    padding: 8px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    background: rgba(6, 13, 27, .96);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}

code {
    border: 1px solid rgba(34, 211, 238, .22);
    border-radius: 6px;
    background: rgba(34, 211, 238, .08);
    color: #bff6ff;
    font-family: var(--font-mono);
    font-size: .84em;
    padding: 4px 7px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.public-shell,
.auth-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 10, 22, .86);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    max-width: 1260px;
    min-height: 62px;
    margin: 0 auto;
    padding: 10px 18px;
    display: grid;
    grid-template-columns: auto minmax(280px, 520px) auto;
    gap: 14px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 850;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(34, 211, 238, .42);
    border-radius: 9px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, .24), rgba(139, 92, 246, .12)),
        #08111f;
    color: #e9fbff;
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 900;
    box-shadow: var(--glow);
}

.header-search {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.header-search::before {
    content: "AI";
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    border: 1px solid rgba(34, 211, 238, .26);
    border-radius: 5px;
    background: rgba(34, 211, 238, .08);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 950;
    line-height: 1;
    padding: 4px 6px;
}

.header-search input {
    padding-left: 48px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.site-nav a,
.admin-nav a,
.site-footer a {
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
    padding: 7px 10px;
}

.site-nav a:hover,
.admin-nav a:hover,
.site-footer a:hover {
    border-color: rgba(34, 211, 238, .24);
    background: rgba(34, 211, 238, .08);
    color: #dffbff;
}

.button {
    min-height: 38px;
    border: 1px solid rgba(34, 211, 238, .48);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(34, 211, 238, .24), rgba(20, 184, 166, .18));
    color: #f7fdff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    padding: 9px 14px;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px rgba(20, 184, 166, .12);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.button:hover {
    border-color: rgba(163, 230, 53, .6);
    background: linear-gradient(180deg, rgba(34, 211, 238, .32), rgba(20, 184, 166, .24));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 32px rgba(34, 211, 238, .16);
}

.button-ghost {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(255, 255, 255, .035);
    color: #e5eefb;
    box-shadow: none;
}

.button-ghost:hover {
    border-color: rgba(34, 211, 238, .44);
    background: rgba(34, 211, 238, .08);
}

.button-secondary {
    border-color: rgba(139, 92, 246, .52);
    background: linear-gradient(180deg, rgba(139, 92, 246, .32), rgba(96, 165, 250, .14));
}

.button-danger {
    border-color: rgba(251, 113, 133, .6);
    background: linear-gradient(180deg, rgba(251, 113, 133, .26), rgba(127, 29, 29, .2));
}

.button-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: .82rem;
}

.library-header,
.content-band,
.text-page,
.ad-band,
.prompt-detail,
.site-footer {
    max-width: 1260px;
    margin: 0 auto;
}

.library-header {
    padding: 22px 18px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    gap: 18px;
    align-items: end;
}

.library-header.compact {
    padding-top: 26px;
}

.library-title {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.library-title h1,
.admin-heading h1,
.auth-panel h1 {
    margin: 0;
    color: #f8fbff;
    font-size: clamp(2rem, 5vw, 4.1rem);
    line-height: .95;
    letter-spacing: 0;
}

.library-title .muted,
.muted {
    color: var(--muted);
}

.hero-stats,
.category-strip,
.detail-toolbar,
.detail-counts,
.prompt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-stats {
    margin-top: 14px;
}

.hero-stats span,
.category-strip a,
.detail-toolbar a,
.detail-toolbar span,
.detail-counts span,
.prompt-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 850;
    padding: 4px 8px;
    text-transform: uppercase;
}

.hero-stats strong {
    margin-right: 5px;
    color: #f8fbff;
    font-family: var(--font-body);
    font-size: .95rem;
}

.category-strip {
    margin-top: 12px;
}

.category-strip a:hover,
.detail-toolbar a:hover {
    border-color: rgba(34, 211, 238, .42);
    background: rgba(34, 211, 238, .1);
    color: #dffbff;
}

.search-panel,
.filter-panel,
.admin-panel,
.auth-panel,
.stat-card,
.prompt-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .028)),
        var(--panel);
    box-shadow: var(--shadow-soft);
}

.search-panel {
    position: relative;
    overflow: hidden;
    padding: 14px;
    box-shadow: var(--shadow);
}

.search-panel::after,
.filter-panel::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(90deg, transparent 0 18px, rgba(34, 211, 238, .12) 18px 19px, transparent 19px 100%),
        linear-gradient(180deg, transparent 0 18px, rgba(34, 211, 238, .08) 18px 19px, transparent 19px 100%);
    background-size: 38px 38px;
    opacity: .28;
}

.search-panel > *,
.filter-panel > *,
.admin-filters > * {
    position: relative;
    z-index: 1;
}

.search-panel::before,
.filter-panel::before,
.admin-panel::before,
.prompt-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .72), transparent);
    opacity: .72;
}

.search-panel label,
.filter-panel label,
.stack-form label,
.admin-filters label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.search-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    z-index: 1;
}

.search-row::before {
    content: ">";
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: var(--lime);
    font-family: var(--font-mono);
    font-weight: 950;
}

.search-row input {
    padding-left: 32px;
}

.filter-panel {
    position: relative;
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .72fr) minmax(0, .72fr) auto;
    gap: 9px;
    align-items: end;
}

.content-band,
.text-page,
.ad-band {
    padding: 14px 18px;
}

.latest-band {
    padding-top: 8px;
}

.section-heading,
.admin-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.section-heading h2,
.admin-panel h2 {
    margin: 0;
    color: #f8fbff;
    font-size: 1.18rem;
    line-height: 1.15;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prompt-card {
    position: relative;
    overflow: hidden;
    display: grid;
    min-width: 0;
    min-height: 272px;
    isolation: isolate;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.prompt-card::after {
    content: "";
    pointer-events: none;
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 8px;
    width: 3px;
    border-radius: 999px;
    background:
        linear-gradient(var(--cyan), var(--cyan)) 0 0 / 100% 12% no-repeat,
        linear-gradient(var(--lime), var(--lime)) 0 38% / 100% 10% no-repeat,
        linear-gradient(var(--violet), var(--violet)) 0 76% / 100% 14% no-repeat;
    opacity: .36;
}

.prompt-card:hover {
    border-color: rgba(34, 211, 238, .38);
    box-shadow: var(--shadow), var(--glow);
    transform: translateY(-2px);
}

.prompt-thumb {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    height: 78px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(rgba(34, 211, 238, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .08) 1px, transparent 1px),
        linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(139, 92, 246, .12)),
        rgba(5, 12, 24, .94);
    background-size: 18px 18px, 18px 18px, auto, auto;
}

.prompt-thumb::before,
.prompt-placeholder::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        repeating-linear-gradient(0deg, transparent 0 5px, rgba(191, 250, 255, .075) 5px 6px),
        linear-gradient(90deg, rgba(34, 211, 238, .16), transparent 28%, transparent 72%, rgba(139, 92, 246, .14));
    opacity: .78;
}

.prompt-thumb::after,
.prompt-placeholder::after {
    content: "";
    position: absolute;
    inset: auto 12px 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, .8), transparent);
}

.prompt-thumb img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prompt-thumb span,
.prompt-placeholder span,
.prompt-placeholder {
    position: relative;
    z-index: 2;
    color: #bffaff;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.prompt-card-body {
    position: relative;
    min-width: 0;
    padding: 12px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 8px;
}

.prompt-card-body::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 211, 238, .44), transparent 42%, rgba(163, 230, 53, .36));
    opacity: .6;
}

.prompt-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.prompt-id {
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 999px;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 850;
    padding: 4px 7px;
}

.prompt-card h2 {
    margin: 0;
    color: #f8fbff;
    font-size: .98rem;
    line-height: 1.22;
    min-width: 0;
}

.prompt-card h2 a {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.prompt-card p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    font-size: .88rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.card-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
}

.copy-button::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 14px rgba(163, 230, 53, .8);
}

.prompt-detail {
    padding: 20px 18px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
}

.detail-media {
    position: sticky;
    top: 82px;
    align-self: start;
    display: grid;
    gap: 12px;
}

.prompt-placeholder {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(34, 211, 238, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .07) 1px, transparent 1px),
        linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(96, 165, 250, .1)),
        rgba(5, 12, 24, .94);
    background-size: 20px 20px, 20px 20px, auto, auto;
}

.prompt-placeholder img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-copy {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.detail-copy::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(34, 211, 238, .9), rgba(163, 230, 53, .7), rgba(139, 92, 246, .7));
}

.detail-copy h1 {
    margin: 0;
    color: #f8fbff;
    font-size: clamp(1.7rem, 3.7vw, 3.1rem);
    line-height: 1;
}

.detail-copy h2 {
    margin: 4px 0 0;
    color: #e9f8ff;
    font-size: 1rem;
}

.prompt-text {
    position: relative;
    overflow-x: auto;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        rgba(3, 8, 18, .78);
    background-size: 100% 1.65em;
    color: #dcecff;
    font-family: var(--font-mono);
    font-size: .92rem;
    line-height: 1.65;
    padding: 15px;
    white-space: normal;
}

.prompt-text.secondary {
    border-color: rgba(251, 113, 133, .22);
    color: #ffdce4;
}

.style-notes {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(120px, .34fr) minmax(0, 1fr);
    gap: 8px;
}

.style-notes dt,
.style-notes dd {
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    padding-bottom: 7px;
}

.style-notes dt {
    color: var(--cyan);
    font-family: var(--font-mono);
    font-weight: 900;
    text-transform: capitalize;
}

.style-notes dd {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    color: var(--muted);
    padding: 20px;
    text-align: center;
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.pagination-summary {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.pagination-summary strong {
    color: var(--ink);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.pagination-mobile {
    display: none;
}

.pagination a,
.pagination span,
.pagination-mobile a,
.pagination-mobile span {
    min-width: 34px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05);
    display: grid;
    place-items: center;
    color: #e7f6ff;
    font-weight: 850;
    padding: 0 10px;
}

.pagination a:hover,
.pagination-mobile a:hover {
    border-color: var(--cyan);
    background: rgba(34, 211, 238, .1);
}

.pagination .active {
    border-color: rgba(163, 230, 53, .55);
    background: rgba(163, 230, 53, .16);
    color: #f7ffe7;
}

.pagination .disabled,
.pagination .pagination-ellipsis,
.pagination-mobile .disabled {
    color: var(--faint);
    cursor: default;
}

.pagination .disabled,
.pagination-mobile .disabled {
    background: rgba(255, 255, 255, .025);
}

.pagination .pagination-ellipsis {
    border-color: transparent;
    background: transparent;
}

.pagination-step {
    min-width: 84px;
}

.text-page {
    max-width: 820px;
    padding-top: 32px;
}

.text-page h1 {
    margin: 0 0 12px;
    color: #f8fbff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.text-page p,
.site-footer p {
    color: var(--muted);
}

.site-footer {
    padding: 28px 18px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.site-footer strong {
    color: #f8fbff;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ad-band {
    color: var(--faint);
}

.flash {
    max-width: 1260px;
    margin: 12px auto;
    border: 1px solid rgba(34, 211, 238, .24);
    border-radius: var(--radius);
    background: rgba(34, 211, 238, .08);
    color: #dffbff;
    padding: 12px 18px;
}

.flash-error {
    border-color: rgba(251, 113, 133, .34);
    background: rgba(251, 113, 133, .1);
    color: #ffe0e6;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-panel {
    width: min(100%, 420px);
    padding: 20px;
}

.auth-brand {
    margin-bottom: 18px;
}

.auth-panel h1 {
    margin-bottom: 16px;
    font-size: 2rem;
}

.auth-panel a {
    color: #bff6ff;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.two-column-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: 1 / -1;
}

.admin-shell {
    min-height: 100vh;
    background:
        linear-gradient(rgba(139, 92, 246, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .04) 1px, transparent 1px),
        linear-gradient(135deg, #060914, #111827 48%, #0b111c);
    background-size: 32px 32px, 32px 32px, auto;
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--line);
    background: rgba(4, 8, 18, .88);
    backdrop-filter: blur(18px);
    padding: 16px;
}

.admin-brand {
    margin-bottom: 18px;
}

.admin-nav {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
}

.admin-nav a {
    border-radius: var(--radius-sm);
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    min-height: 58px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 10, 18, .86);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
}

.admin-content {
    padding: 18px;
}

.admin-heading {
    margin-bottom: 14px;
}

.admin-heading h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 13px;
    display: grid;
    gap: 5px;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto 12px 10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(34, 211, 238, .7), rgba(163, 230, 53, .42), transparent);
}

.stat-card span {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card strong {
    color: #f8fbff;
    font-size: 1.55rem;
    line-height: 1;
}

.admin-panel {
    position: relative;
    margin-bottom: 14px;
    padding: 14px;
}

.admin-filters {
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 1.4fr repeat(7, minmax(112px, 1fr));
    gap: 8px;
    align-items: end;
    padding: 12px;
}

.admin-filters::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .78), transparent);
}

.bulk-bar {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bulk-bar select {
    width: auto;
    min-width: 150px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    padding: 10px 11px;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 16, 30, .98);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}

td {
    color: #d7e3f4;
}

tbody tr {
    background: rgba(255, 255, 255, .018);
}

tbody tr:hover {
    background: rgba(34, 211, 238, .055);
}

td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.35;
}

.status {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 950;
    padding: 4px 8px;
    text-transform: uppercase;
}

.status-completed {
    border-color: rgba(52, 211, 153, .42);
    background: rgba(52, 211, 153, .1);
    color: #bbf7d0;
}

.status-processing {
    border-color: rgba(34, 211, 238, .46);
    background: rgba(34, 211, 238, .11);
    color: #cffafe;
}

.status-pending,
.status-draft {
    border-color: rgba(245, 158, 11, .46);
    background: rgba(245, 158, 11, .11);
    color: #fde68a;
}

.status-failed {
    border-color: rgba(251, 113, 133, .52);
    background: rgba(251, 113, 133, .12);
    color: #fecdd3;
}

.create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.asset-preview {
    display: grid;
    gap: 12px;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.asset-grid figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
}

.asset-grid img,
.asset-grid .prompt-placeholder {
    width: 100%;
    min-height: 220px;
    object-fit: cover;
}

.asset-grid figcaption {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 900;
    padding: 9px;
    text-transform: uppercase;
}

.danger-zone {
    border: 1px solid rgba(251, 113, 133, .28);
    border-radius: var(--radius);
    background: rgba(251, 113, 133, .055);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px;
}

@media (max-width: 1180px) {
    .prompt-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .site-header-inner,
    .library-header,
    .filter-panel,
    .search-row,
    .prompt-detail,
    .create-grid,
    .two-column-form,
    .asset-grid {
        grid-template-columns: 1fr;
    }

    .site-header-inner {
        align-items: stretch;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }

    .header-search::before,
    .search-row::before {
        top: 19px;
    }

    .site-nav,
    .site-footer,
    .section-heading,
    .admin-heading,
    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .site-nav,
    .site-footer nav {
        justify-content: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .library-title h1 {
        max-width: 12em;
        font-size: 2.2rem;
    }

    .category-strip {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .category-strip::-webkit-scrollbar {
        display: none;
    }

    .prompt-grid,
    .compact-grid,
    .stat-grid,
    .admin-filters {
        grid-template-columns: 1fr;
    }

    .prompt-card {
        min-height: 234px;
    }

    .prompt-card p {
        max-height: 5.7em;
        -webkit-line-clamp: unset;
    }

    .prompt-card h2 a {
        -webkit-line-clamp: 2;
    }

    .detail-media {
        position: static;
    }

    .pagination-wrap {
        align-items: stretch;
        flex-direction: column;
        max-width: calc(100vw - 24px);
        width: calc(100vw - 24px);
    }

    .pagination-desktop {
        display: none;
    }

    .pagination-mobile {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .pagination-mobile .pagination-step {
        width: 100%;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-content {
        padding: 14px;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 14px;
    }

    .site-header-inner,
    .library-header,
    .content-band,
    .prompt-detail,
    .text-page,
    .site-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .library-title h1,
    .admin-heading h1 {
        max-width: 100%;
        font-size: 1.86rem;
    }

    .hero-stats {
        gap: 6px;
    }

    .hero-stats span {
        min-height: 28px;
        padding: 4px 8px;
    }

    .prompt-thumb {
        height: 92px;
    }

    .prompt-grid,
    .prompt-card,
    .prompt-card-body,
    .prompt-card-top,
    .prompt-card h2,
    .prompt-card h2 a,
    .prompt-card p {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .card-actions,
    .danger-zone {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-bar select,
    .bulk-bar .button {
        width: 100%;
    }

    .style-notes {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Light interface refresh: compact prompt library, index-card cards, technical but readable. */
:root {
    --bg: #f6f9fc;
    --bg-2: #eef6ff;
    --shell: #ffffff;
    --panel: rgba(255, 255, 255, .92);
    --panel-2: rgba(248, 252, 255, .96);
    --panel-3: #edf7ff;
    --surface: rgba(14, 116, 144, .07);
    --surface-strong: rgba(14, 116, 144, .12);
    --ink: #142033;
    --muted: #64748b;
    --faint: #91a1b5;
    --line: #d9e5f2;
    --line-strong: #8bd8eb;
    --cyan: #0891b2;
    --teal: #0f766e;
    --violet: #7c3aed;
    --lime: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --blue: #2563eb;
    --green: #059669;
    --shadow: 0 22px 54px rgba(15, 23, 42, .1);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, .08);
    --glow: 0 0 0 1px rgba(8, 145, 178, .12), 0 18px 40px rgba(8, 145, 178, .12);
}

body,
.public-shell,
.auth-shell {
    background:
        linear-gradient(rgba(14, 116, 144, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 116, 144, .045) 1px, transparent 1px),
        linear-gradient(180deg, #fbfdff 0, var(--bg) 42%, #edf6ff 100%);
    background-size: 36px 36px, 36px 36px, auto;
    color: var(--ink);
}

body::before {
    background:
        linear-gradient(90deg, rgba(8, 145, 178, .08), transparent 18%, transparent 82%, rgba(124, 58, 237, .06)),
        repeating-linear-gradient(0deg, rgba(15, 23, 42, .018) 0 1px, transparent 1px 5px);
    opacity: .85;
}

a:hover {
    color: var(--cyan);
}

input,
select,
textarea {
    border-color: #cfdae8;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

input::placeholder,
textarea::placeholder {
    color: #9aa8ba;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, .12);
}

code {
    border-color: #bfd7ee;
    background: #f1f8ff;
    color: #0f4c81;
}

.site-header,
.admin-topbar {
    border-bottom-color: rgba(148, 163, 184, .22);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .82), 0 12px 32px rgba(15, 23, 42, .06);
}

.site-header-inner {
    min-height: 60px;
}

.brand {
    color: #0f172a;
}

.brand-mark {
    border-color: rgba(8, 145, 178, .28);
    background:
        linear-gradient(135deg, rgba(224, 247, 255, .95), rgba(243, 238, 255, .95)),
        #ffffff;
    color: #075985;
    box-shadow: 0 10px 24px rgba(8, 145, 178, .14);
}

.header-search::before {
    border-color: rgba(8, 145, 178, .18);
    background: #effaff;
    color: #0e7490;
}

.site-nav a,
.admin-nav a,
.site-footer a {
    color: #506178;
}

.site-nav a:hover,
.admin-nav a:hover,
.site-footer a:hover {
    border-color: rgba(8, 145, 178, .18);
    background: #edfaff;
    color: #075985;
}

.button {
    border-color: rgba(8, 145, 178, .32);
    background: linear-gradient(180deg, #0ea5c6, #087f9d);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(8, 145, 178, .18), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.button:hover {
    border-color: rgba(6, 95, 120, .5);
    background: linear-gradient(180deg, #0891b2, #0f766e);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(8, 145, 178, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.button-ghost {
    border-color: #cfddeb;
    background: rgba(255, 255, 255, .75);
    color: #334155;
    box-shadow: none;
}

.button-ghost:hover {
    border-color: rgba(8, 145, 178, .28);
    background: #effaff;
    color: #075985;
}

.button-secondary {
    border-color: rgba(124, 58, 237, .26);
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

.button-danger {
    border-color: rgba(220, 38, 38, .28);
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #ffffff;
}

.library-header {
    padding-top: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
}

.eyebrow {
    color: #0e7490;
    letter-spacing: .08em;
}

.library-title h1,
.admin-heading h1,
.auth-panel h1,
.text-page h1,
.detail-copy h1 {
    color: #0f172a;
}

.library-title h1 {
    max-width: 880px;
    font-size: clamp(2rem, 4vw, 3.65rem);
    letter-spacing: -.01em;
}

.muted,
.library-title .muted,
.site-footer p,
.text-page p {
    color: var(--muted);
}

.hero-stats {
    margin-top: 12px;
}

.hero-stats span,
.category-strip a,
.detail-toolbar a,
.detail-toolbar span,
.detail-counts span,
.prompt-meta span {
    border-color: #d8e5f2;
    background: rgba(255, 255, 255, .72);
    color: #52647a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .86);
}

.hero-stats strong {
    color: #0f172a;
}

.category-strip a:hover,
.detail-toolbar a:hover {
    border-color: rgba(8, 145, 178, .25);
    background: #eafaff;
    color: #075985;
}

.search-panel,
.filter-panel,
.admin-panel,
.auth-panel,
.stat-card,
.prompt-card,
.empty-state,
.detail-copy,
.prompt-placeholder,
.asset-grid figure,
.table-wrap {
    border-color: var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(249, 252, 255, .9)),
        var(--panel);
    box-shadow: var(--shadow-soft);
}

.search-panel {
    padding: 13px;
    box-shadow: var(--shadow);
}

.search-panel::after,
.filter-panel::after {
    background:
        linear-gradient(90deg, transparent 0 18px, rgba(8, 145, 178, .08) 18px 19px, transparent 19px 100%),
        linear-gradient(180deg, transparent 0 18px, rgba(8, 145, 178, .055) 18px 19px, transparent 19px 100%);
    opacity: .42;
}

.search-panel::before,
.filter-panel::before,
.admin-panel::before,
.prompt-card::before {
    background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .45), rgba(124, 58, 237, .24), transparent);
}

.search-panel label,
.filter-panel label,
.stack-form label,
.admin-filters label {
    color: #44546a;
}

.search-row::before {
    color: #0f766e;
}

.content-band,
.text-page,
.ad-band {
    padding-top: 12px;
}

.section-heading h2,
.admin-panel h2,
.site-footer strong,
.prompt-card h2,
.detail-copy h2 {
    color: #0f172a;
}

.prompt-grid,
.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.prompt-card {
    min-height: 294px;
    background:
        linear-gradient(180deg, #ffffff 0, #ffffff 60%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .065);
}

.prompt-card::after {
    right: 9px;
    background:
        linear-gradient(var(--cyan), var(--cyan)) 0 0 / 100% 18% no-repeat,
        linear-gradient(var(--teal), var(--teal)) 0 44% / 100% 11% no-repeat,
        linear-gradient(var(--violet), var(--violet)) 0 82% / 100% 12% no-repeat;
    opacity: .3;
}

.prompt-card:hover {
    border-color: rgba(8, 145, 178, .34);
    box-shadow: var(--shadow), var(--glow);
}

.prompt-thumb {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 8.4;
    border-bottom-color: #e1ebf5;
    background:
        linear-gradient(rgba(8, 145, 178, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, .07) 1px, transparent 1px),
        linear-gradient(135deg, #eafaff, #f4f0ff 58%, #f8fcff);
    background-size: 18px 18px, 18px 18px, auto;
}

.prompt-thumb::before,
.prompt-placeholder::before {
    background:
        repeating-linear-gradient(0deg, transparent 0 7px, rgba(8, 145, 178, .07) 7px 8px),
        linear-gradient(90deg, rgba(8, 145, 178, .13), transparent 30%, transparent 72%, rgba(124, 58, 237, .1));
    opacity: .62;
}

.prompt-thumb::after,
.prompt-placeholder::after {
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, .48), transparent);
}

.prompt-thumb span,
.prompt-placeholder span,
.prompt-placeholder {
    color: #075985;
}

.prompt-card-body {
    padding: 12px;
}

.prompt-card-body::before {
    background: linear-gradient(90deg, rgba(8, 145, 178, .24), transparent 44%, rgba(124, 58, 237, .22));
}

.prompt-id {
    border-color: #d8e5f2;
    background: #f8fbff;
    color: #8292a7;
}

.prompt-card p {
    color: #5f6f86;
}

.copy-button::before {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, .45);
}

.prompt-detail {
    grid-template-columns: 300px minmax(0, 1fr);
}

.prompt-placeholder {
    min-height: 250px;
    background:
        linear-gradient(rgba(8, 145, 178, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, .06) 1px, transparent 1px),
        linear-gradient(135deg, #ebfbff, #f6f1ff 58%, #ffffff);
    background-size: 20px 20px, 20px 20px, auto;
}

.detail-copy::before {
    background: linear-gradient(90deg, rgba(8, 145, 178, .78), rgba(20, 184, 166, .55), rgba(124, 58, 237, .45));
}

.prompt-text {
    border-color: #c7dceb;
    background:
        linear-gradient(rgba(8, 145, 178, .045) 1px, transparent 1px),
        #fbfdff;
    background-size: 100% 1.65em;
    color: #1f2a3d;
}

.prompt-text.secondary {
    border-color: #f4c7cf;
    background: #fff8fa;
    color: #7f1d1d;
}

.style-notes dt {
    color: #0e7490;
}

.style-notes dd,
.empty-state,
.pagination-summary {
    color: var(--muted);
}

.empty-state {
    background:
        linear-gradient(135deg, rgba(236, 253, 245, .88), rgba(239, 246, 255, .92)),
        #ffffff;
}

.pagination a,
.pagination span,
.pagination-mobile a,
.pagination-mobile span {
    border-color: #d7e3f0;
    background: rgba(255, 255, 255, .86);
    color: #334155;
}

.pagination a:hover,
.pagination-mobile a:hover {
    border-color: rgba(8, 145, 178, .34);
    background: #effaff;
    color: #075985;
}

.pagination .active {
    border-color: rgba(8, 145, 178, .5);
    background: linear-gradient(180deg, #0ea5c6, #0891b2);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(8, 145, 178, .18);
}

.pagination .disabled,
.pagination-mobile .disabled {
    background: #f3f7fb;
}

.flash {
    border-color: rgba(8, 145, 178, .18);
    background: #eafaff;
    color: #075985;
}

.flash-error {
    border-color: rgba(220, 38, 38, .22);
    background: #fff1f2;
    color: #991b1b;
}

.auth-shell {
    background:
        linear-gradient(rgba(8, 145, 178, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, .04) 1px, transparent 1px),
        linear-gradient(180deg, #ffffff, #eff6ff);
    background-size: 34px 34px, 34px 34px, auto;
}

.auth-panel a {
    color: #075985;
}

.admin-shell {
    background:
        linear-gradient(rgba(37, 99, 235, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, .035) 1px, transparent 1px),
        linear-gradient(180deg, #f8fbff, #edf6ff);
    background-size: 34px 34px, 34px 34px, auto;
}

.admin-sidebar {
    border-right-color: #d7e3f0;
    background: rgba(255, 255, 255, .86);
    box-shadow: 12px 0 32px rgba(15, 23, 42, .045);
}

.admin-topbar strong {
    color: #0f172a;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff, #f6fbff);
}

.stat-card::after {
    background: linear-gradient(90deg, rgba(8, 145, 178, .55), rgba(124, 58, 237, .22), transparent);
}

.stat-card span,
th,
.status,
.asset-grid figcaption {
    color: #0e7490;
}

.stat-card strong {
    color: #0f172a;
}

.admin-filters {
    border-color: var(--line);
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-soft);
}

.admin-filters::before {
    background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .4), rgba(124, 58, 237, .28), transparent);
}

.table-wrap {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

th {
    background: #f1f7fd;
    border-bottom-color: #cdddea;
}

td {
    color: #243247;
}

th,
td {
    border-bottom-color: #e2ebf4;
}

tbody tr {
    background: #ffffff;
}

tbody tr:nth-child(even) {
    background: #f8fbff;
}

tbody tr:hover {
    background: #eefaff;
}

td small {
    color: var(--muted);
}

.status {
    border-color: #d7e3f0;
    background: #f7fbff;
}

.status-completed {
    border-color: rgba(5, 150, 105, .25);
    background: #ecfdf5;
    color: #047857;
}

.status-processing {
    border-color: rgba(8, 145, 178, .28);
    background: #ecfeff;
    color: #0e7490;
}

.status-pending,
.status-draft {
    border-color: rgba(217, 119, 6, .28);
    background: #fffbeb;
    color: #92400e;
}

.status-failed {
    border-color: rgba(220, 38, 38, .24);
    background: #fff1f2;
    color: #991b1b;
}

.asset-grid figure {
    background: #ffffff;
}

.asset-grid figcaption {
    border-top-color: #e0eaf4;
    background: #f8fbff;
}

.danger-zone {
    border-color: rgba(220, 38, 38, .18);
    background: #fff7f7;
}

@media (max-width: 1180px) {
    .prompt-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .library-header {
        gap: 12px;
    }

    .prompt-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel .button {
        width: 100%;
    }

    .prompt-card {
        min-height: 276px;
    }
}

@media (max-width: 680px) {
    .site-header-inner,
    .library-header,
    .filter-panel,
    .search-row,
    .prompt-detail,
    .create-grid,
    .two-column-form,
    .asset-grid,
    .prompt-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .site-header-inner {
        gap: 10px;
        max-width: 100vw;
    }

    .brand,
    .site-nav {
        width: 100%;
        min-width: 0;
    }

    .site-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .site-nav a {
        min-width: 0;
        padding-inline: 7px;
        justify-content: center;
        text-align: center;
    }

    .header-search {
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
    }

    .library-title h1 {
        max-width: 100%;
        font-size: 1.88rem;
        line-height: 1.06;
        overflow-wrap: anywhere;
    }

    .hero-stats span,
    .category-strip a,
    .detail-toolbar a,
    .detail-toolbar span,
    .detail-counts span,
    .prompt-meta span {
        font-size: .66rem;
    }

    .prompt-card {
        min-height: auto;
    }

    .prompt-thumb {
        aspect-ratio: 16 / 8.8;
    }

    .card-actions .button {
        width: 100%;
    }

    .prompt-detail {
        padding-top: 14px;
    }

    .prompt-placeholder {
        min-height: 210px;
    }

    .admin-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .site-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-search {
        grid-template-columns: 1fr;
    }

    .header-search::before {
        top: 19px;
    }

    .library-title h1,
    .admin-heading h1 {
        font-size: 1.58rem;
    }

    .button,
    .button-small {
        width: 100%;
    }

    .prompt-card-body {
        padding: 11px;
    }
}
