:root {
    color-scheme: dark;
    --bg: #080d1c;
    --surface: #11182b;
    --surface2: #19223a;
    --border: #29334d;
    --text: #f4f6ff;
    --muted: #a5b0c9;
    --accent: #a78bfa;
    --primary: #7550e9;
    --success: #52d6a0;
    --danger: #fb7185;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
button {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 17px;
    font-weight: 650;
    color: var(--text);
    transition: background .18s, border-color .18s;
}
.primary { background: var(--primary); }
.primary:hover { background: #8966f5; }
.secondary { background: var(--surface2); border-color: var(--border); }
.secondary:hover { border-color: var(--accent); }
.danger { background: #4b1c30; color: #ffb6c5; }
.container { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #080d1cf5;
    border-bottom: 1px solid var(--border);
}
.nav { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
.brand-icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: linear-gradient(145deg,#9465ff,#3c62dd);
    color: white;
}
.accent { color: var(--accent); }
.nav-links { display: flex; gap: 25px; margin-left: auto; color: var(--muted); font-size: 14px; }
.languages { display: flex; gap: 4px; margin-left: auto; }
.languages button { padding: 6px 10px; background: transparent; color: var(--muted); }
.languages button.active { background: var(--surface2); color: white; border-color: var(--border); }
.hero {
    background: radial-gradient(ellipse at 50% 10%,#292052 0%,#11182b 42%,#080d1c 76%);
    padding: 90px 0 75px;
    text-align: center;
}
.hero-content { max-width: 950px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(38px,6vw,72px); line-height: 1.12; letter-spacing: -2.5px; margin: 22px 0; }
h1 span { display: block; }
.gradient-text { background: linear-gradient(90deg,#a78bfa,#7aa9ff); color: transparent; background-clip: text; }
.hero p { color: var(--muted); font-size: 18px; max-width: 650px; margin: 0 auto 28px; }
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 680px;
    margin: auto;
    padding: 8px 8px 8px 18px;
    background: var(--surface);
    border: 1px solid #45446b;
    border-radius: 15px;
}
input,select,textarea {
    width: 100%;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 12px;
}
.search-box input { background: transparent; border: 0; min-width: 0; flex: 1; }
.hero-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.hero-tags span::before { content: "\2713"; color: var(--success); margin-right: 6px; }
.gallery-section { padding-block: 35px 65px; scroll-margin-top: 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.section-heading h2 { margin: 6px 0; }
h2 { font-size: clamp(23px,3vw,32px); letter-spacing: -.7px; }
.section-heading select { width: auto; min-width: 125px; }
.categories { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0; }
.categories button { background: var(--surface); border-color: var(--border); color: var(--muted); font-size: 13px; border-radius: 30px; }
.categories button.active { background: var(--primary); color: white; border-color: var(--primary); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(245px,1fr)); gap: 22px; }
.prompt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; min-width: 0; }
.prompt-card:hover { border-color: #7561b7; }
.image-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: var(--surface2); }
.prompt-card img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.card-body { padding: 17px; }
.card-body h3 { margin: 8px 0 5px; font-size: 18px; overflow-wrap: anywhere; }
.card-body p { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-block; color: var(--accent); background: #a78bfa18; border-radius: 6px; padding: 3px 8px; font-size: 11px; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; font-size: 12px; padding-inline: 9px; }
.card-meta { display: flex; gap: 15px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 24px; }
.empty-state { grid-column: 1/-1; border: 1px dashed var(--border); padding: 55px 20px; text-align: center; border-radius: 16px; color: var(--muted); }
.how-section { background: #0e1425; padding: 65px 0; border-block: 1px solid var(--border); scroll-margin-top: 80px; }
.how-section h2 { text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.steps article { background: var(--surface); border: 1px solid var(--border); padding: 28px; border-radius: 15px; }
.step-number { color: var(--accent); font-size: 30px; font-weight: 800; }
.steps h3 { margin: 10px 0; }
.steps p { color: var(--muted); margin-bottom: 0; }
.legal-section { max-width: 900px; padding-block: 50px; }
.legal-section h2 { font-size: 21px; scroll-margin-top: 90px; }
.legal-section p { color: var(--muted); font-size: 14px; }
footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 18px; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; width: min(900px,94vw); max-height: 90vh; padding: 22px; }
dialog::backdrop { background: #000b; }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.detail-grid img { width: 100%; max-height: 550px; object-fit: contain; border-radius: 12px; background: var(--bg); }
.prompt-text { background: var(--bg); border: 1px solid var(--border); padding: 16px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 330px; overflow: auto; font-size: 14px; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #263b35; color: white; border: 1px solid var(--success); border-radius: 12px; padding: 14px 22px; z-index: 100; max-width: 90vw; }
.admin-main { padding-block: 40px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 25px; margin-bottom: 24px; }
.login-panel { max-width: 460px; margin: 60px auto; }
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.full { grid-column: 1/-1; }
textarea { min-height: 100px; resize: vertical; }
#prompt { min-height: 180px; }
.admin-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 22px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin-bottom: 25px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.stat strong { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 12px; }
.admin-item { display: flex; gap: 13px; border-bottom: 1px solid var(--border); padding: 15px 0; }
.admin-item img { width: 74px; height: 92px; object-fit: cover; border-radius: 8px; }
.admin-item-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.admin-item-body h3 { font-size: 15px; margin-bottom: 4px; }
.admin-item-body p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.admin-item-body button { font-size: 12px; padding: 6px 10px; margin: 3px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.notice { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); }
.success { color: var(--success); }
#image-preview { max-width: 180px; max-height: 220px; object-fit: contain; border-radius: 10px; margin-top: 10px; }
@media(max-width: 850px) {
    .admin-layout { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero { padding: 65px 0 45px; }
}
@media(max-width: 550px) {
    .container { width: calc(100% - 28px); }
    .nav { min-height: 62px; gap: 8px; }
    .brand { font-size: 19px; }
    .brand-icon { width: 32px; height: 32px; }
    h1 { font-size: 36px; letter-spacing: -1.5px; }
    .hero p { font-size: 15px; }
    .hero-tags { gap: 10px; font-size: 11px; }
    .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .card-body { padding: 11px; }
    .card-body h3 { font-size: 14px; }
    .card-actions { flex-direction: column; }
    .card-meta { gap: 6px; flex-wrap: wrap; font-size: 10px; }
    .section-heading { align-items: start; }
    .section-heading select { min-width: 90px; font-size: 12px; padding: 8px; }
    .categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
    .categories button { flex-shrink: 0; }
    .detail-grid,.form-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .panel { padding: 17px; }
}
@media(prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
/* SOSAPROMPTS BRAND AND INDIVIDUAL PAGES */
.brand-icon {
    background: transparent;
    box-shadow: none;
    color: transparent;
    background-image: url('/favicon.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.share-link {
    display: inline-flex;
    margin-top: 12px;
    text-decoration: none;
}

.individual-main {
    padding-top: 40px;
    padding-bottom: 60px;
}

.individual-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.individual-layout img {
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.individual-layout .prompt-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    user-select: text;
}

.individual-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 760px) {
    .individual-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* S015 audience engagement */

.sosa-engagement {
    margin: 16px auto;
    padding: 14px;
    max-width: 1200px;
}

.sosa-engagement-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.sosa-engagement-button {
    background: #182239;
    color: #fff;
    border: 1px solid #46516a;
    border-radius: 10px;
    padding: 10px 16px;
    min-height: 44px;
    font: inherit;
    cursor: pointer;
}

.sosa-engagement-controls > button:first-child {
    background: #7c3aed;
    border-color: #8b5cf6;
}

.sosa-engagement-button:hover,
.sosa-engagement-button[aria-pressed="true"] {
    border-color: #a78bfa;
    background: #49318b;
}

.sosa-engagement-panel {
    max-width: 650px;
    margin: 14px auto;
    padding: 18px;
    background: #131b30;
    border: 1px solid #46516a;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.sosa-engagement-panel a {
    color: #a78bfa;
}

.sosa-engagement-panel button {
    margin: 8px;
}

.sosa-engagement-panel input {
    width: 100%;
    padding: 10px;
}

.sosa-favorite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #35415b;
}

.sosa-engagement-status {
    text-align: center;
    font-size: 14px;
}

.sosa-engagement-status:empty {
    display: none;
}

@media (max-width: 480px) {
    .sosa-engagement {
        padding: 8px;
    }

    .sosa-engagement-button {
        padding: 10px 12px;
        font-size: 13px;
    }
}


/* S019_GALLERY_FULL_PHOTO */

#gallery-grid .prompt-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#gallery-grid .prompt-card .image-button {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
    background: #080d1c;
}

#gallery-grid .prompt-card .image-button img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
}

#gallery-grid .prompt-card .card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#gallery-grid .prompt-card .card-body h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#gallery-grid .prompt-card .card-meta {
    margin: 0;
    padding: 0;
    font-size: 12px;
}

#gallery-grid .prompt-card .card-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: auto;
    padding-top: 4px;
}

#gallery-grid .prompt-card .card-actions .primary {
    width: 100%;
    min-height: 42px;
    padding: 9px 6px;
}

@media (max-width: 600px) {
    #gallery-grid .prompt-card .card-body {
        padding: 9px;
        gap: 6px;
    }

    #gallery-grid .prompt-card .card-body h3 {
        font-size: 13px;
    }

    #gallery-grid .prompt-card .card-meta {
        font-size: 10px;
    }
}


/* S027_SHARED_ACTIONS */

:is(.individual-layout, #post-dialog) .individual-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

:is(.individual-layout, #post-dialog) .individual-actions > button,
:is(.individual-layout, #post-dialog) .individual-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 650;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

:is(.individual-layout, #post-dialog) .individual-actions > .primary {
    background: var(--primary);
    color: var(--text);
}

:is(.individual-layout, #post-dialog) .individual-actions > .primary:hover {
    background: #8966f5;
}

:is(.individual-layout, #post-dialog) .individual-actions > .secondary {
    background: var(--surface2);
    border-color: var(--border);
    color: var(--text);
}

:is(.individual-layout, #post-dialog) .individual-actions > .secondary:hover {
    border-color: var(--accent);
}

@media (max-width: 600px) {
    :is(.individual-layout, #post-dialog) .individual-actions {
        flex-direction: column;
    }

    :is(.individual-layout, #post-dialog) .individual-actions > button,
    :is(.individual-layout, #post-dialog) .individual-actions > a {
        width: 100%;
        min-height: 48px;
    }
}
