.drop-zone {
    background: #161b28;
    text-align: center;
}

.loader {
    border: 4px solid #1e293b;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

h1 {
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: bold;
}

.drop-zone {
    background-color: #161b28;
    border-radius: 12px;
    padding: 50px 20px;
    border: 2px dashed #2a3550;
    margin-bottom: 30px;
}

.button-group {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
}

.btn-main {
    background: white;
    border: none;
    padding: 15px 30px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description {
    text-align: left;
    margin-bottom: 25px;
    color: white;
}

.check {
    background-color: #2ecc71;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    font-size: 12px;
    flex-shrink: 0;
}

body.ai-page {
    background-color: #0b0f19;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.ai-page * {
    font-family: inherit;
}

body.ai-page i.fas {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
}

body.ai-page .container {
    max-width: 1000px;
    margin: 30px auto 50px;
    padding: 0 20px;
    text-align: center;
}

body.ai-page .breadcrumb {
    color: #94a3b8;
}

body.ai-page .breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
}

body.ai-page .breadcrumb a:hover {
    color: #fff;
}

body.ai-page h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

body.ai-page [hidden] {
    display: none !important;
}

.ai-zone {
    max-width: 860px;
    margin: 0 auto 30px;
    padding: 28px 22px;
    text-align: left;
}

.ai-zone-notice {
    text-align: center;
    padding: 50px 20px;
}

.ai-zone h3 {
    color: #fff;
}

.ai-muted,
.ai-hint {
    color: rgba(255, 255, 255, .8);
    font-size: .85rem;
}

.ai-hint {
    display: block;
    margin-top: 4px;
}

.ai-opt {
    font-weight: 400;
    color: rgba(255, 255, 255, .75);
    font-size: .8rem;
    margin-left: 6px;
}

.ai-zone .format-grid {
    margin-top: 10px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.ai-zone .btn-format input,
.ai-zone .q-btn input,
.ai-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ai-zone .btn-format span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-zone .q-btn span {
    pointer-events: none;
}

.ai-zone .btn-format:focus-within,
.ai-zone .q-btn:focus-within {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.ai-rbox {
    display: inline-block;
    border: 2px solid currentColor;
    border-radius: 3px;
    opacity: .85;
    flex: none;
}

.ai-zone .btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 14px 34px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}

.ai-zone .btn-main:hover {
    background: #2563eb !important;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}

.ai-zone .btn-main:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.ai-zone .btn-main:focus-visible,
.ai-zone .btn-outline:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.ai-zone #aiDownload {
    background: #10b981 !important;
    border-color: #10b981;
    color: #ffffff !important;
}

.ai-zone .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    transition: background .15s, border-color .15s;
}

.ai-zone .btn-outline:hover:not(:disabled) {
    background: #223049 !important;
    border-color: #60a5fa;
    color: #fff !important;
}

.ai-zone .ai-sm {
    padding: 7px 14px;
    font-size: .82rem;
}

.ai-zone .btn-format,
.ai-zone .q-btn {
    position: relative;
    display: block;
    background: #111827;
    color: #f3f4f6;
    border: 1px solid #4b5563;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: .9rem;
    text-align: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.ai-zone .q-btn {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 4px 6px 0;
}

.ai-zone .btn-format:hover:not(.is-disabled),
.ai-zone .q-btn:hover {
    background: #1f2937;
    border-color: #93c5fd;
}

.ai-zone .btn-format.active,
.ai-zone .q-btn.active {
    background: #3b82f6;
    border-color: #bfdbfe;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .5);
}

.ai-zone .btn-format.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ai-notes {
    background: rgba(17, 24, 39, .85);
    border: 1px solid #4b5563;
    border-radius: 10px;
    padding: 10px 14px 10px 32px;
    color: #f3f4f6;
}

.ai-group {
    border: 0;
    padding: 0;
    margin: 0 0 24px;
    min-width: 0;
}

.ai-group legend,
.ai-label {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 6px;
    padding: 0;
}

.ai-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.ai-count {
    font-size: .8rem;
    color: rgba(255, 255, 255, .8);
}

.ai-count.is-over {
    color: #fecaca;
    font-weight: 700;
}

.ai-input {
    width: 100%;
    background: #111827;
    border: 1px solid #374151;
    color: #f3f4f6;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    font-size: .95rem;
}

.ai-input:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

.ai-textarea {
    resize: vertical;
    min-height: 110px;
}

.ai-field label {
    display: block;
    font-size: .85rem;
    margin-bottom: 4px;
}

.ai-pair {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-pair .ai-num {
    max-width: 130px;
}

.ai-range {
    flex: 1;
    min-width: 0;
    accent-color: #3b82f6;
}

.ai-grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}

.ai-adv {
    border: 1px solid #374151;
    border-radius: 12px;
    margin-bottom: 22px;
    background: rgba(17, 24, 39, .85);
}

.ai-adv summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    list-style: none;
}

.ai-adv summary::-webkit-details-marker {
    display: none;
}

.ai-adv summary i {
    margin-right: 8px;
    color: #60a5fa;
}

.ai-adv-body {
    padding: 4px 14px 14px;
}

.ai-toggle {
    margin: 12px 0 6px;
}

.ai-sub {
    border: 0;
    padding: 0 0 0 4px;
    margin: 0 0 10px;
    min-width: 0;
}

.ai-sub:disabled {
    opacity: .4;
}

.ai-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.ai-slider {
    width: 42px;
    height: 24px;
    background: #374151;
    border-radius: 24px;
    position: relative;
    transition: .2s;
    flex: none;
}

.ai-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

.ai-switch input:checked + .ai-slider {
    background: #3b82f6;
}

.ai-switch input:checked + .ai-slider::after {
    transform: translateX(18px);
}

.ai-switch input:focus-visible + .ai-slider {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.ai-pick {
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, .35);
    border-radius: 14px;
    padding: 24px 14px;
    cursor: pointer;
    transition: .2s;
}

.ai-pick:hover,
.ai-pick.is-over {
    border-color: #fff;
    background: rgba(255, 255, 255, .06);
}

.ai-thumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 12px 0 0;
}

.ai-thumbs li {
    position: relative;
    width: 96px;
}

.ai-thumbs img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #374151;
    display: block;
}

.ai-thumbs button {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.ai-thumbs small {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, .8);
    font-size: .72rem;
}

.ai-suggest {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.ai-suggest button {
    width: 100%;
    text-align: left;
    background: #111827;
    border: 1px solid #374151;
    color: #f3f4f6;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: .88rem;
}

.ai-suggest button:hover {
    border-color: #60a5fa;
}

.ai-submit-row,
.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.ai-status .ai-actions,
.ai-result .ai-actions {
    justify-content: center;
    margin-top: 18px;
}

.ai-error {
    color: #fff;
    background: rgba(127, 29, 29, .85);
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 14px;
    font-size: .9rem;
}

.ai-error a {
    color: #fff;
    font-weight: 700;
}

.ai-warn {
    color: #fff;
    background: rgba(120, 53, 15, .85);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 14px;
    font-size: .88rem;
}

.ai-status,
.ai-result {
    text-align: center;
}

.ai-status h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.ai-elapsed {
    display: inline-block;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 999px;
    padding: 3px 12px;
    font-variant-numeric: tabular-nums;
    font-size: .88rem;
    margin: 6px 0;
}

.ai-steps {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 16px auto;
    max-width: 620px;
}

.ai-steps li {
    flex: 1;
    min-width: 0;
}

.ai-seg {
    height: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .4);
    overflow: hidden;
    position: relative;
}

.ai-steps li.is-done .ai-seg {
    background: #10b981;
}

.ai-steps li.is-error .ai-seg {
    background: #111827;
    box-shadow: inset 0 0 0 2px #fca5a5;
}

.ai-steps li.is-active .ai-seg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: ai-slide 1.3s ease-in-out infinite;
}

.ai-steps li.is-active .ai-seg.is-determinate::after {
    animation: none;
    background: #fff;
    width: var(--p, 0%);
    right: auto;
    transition: width .2s;
}

.ai-steps span {
    display: block;
    font-size: .72rem;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: .8;
}

.ai-steps li.is-active span,
.ai-steps li.is-done span {
    opacity: 1;
    font-weight: 600;
}

@keyframes ai-slide {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

.ai-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 14px 0;
    text-align: left;
}

.ai-meta > div {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 0;
}

.ai-meta dt {
    font-size: .72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ai-meta dd {
    margin: 2px 0 0;
    font-weight: 600;
    font-size: .92rem;
    overflow-wrap: anywhere;
    color: #fff;
}

.ai-notes {
    margin: 0 0 14px;
    padding-left: 20px;
    text-align: left;
    font-size: .88rem;
}

.ai-skel {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background: linear-gradient(100deg, #1a2133 30%, #263049 50%, #1a2133 70%);
    background-size: 200% 100%;
    animation: ai-shimmer 1.4s linear infinite;
}

.ai-skel-static {
    aspect-ratio: 4 / 3;
    animation: none;
}

@keyframes ai-shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

.ai-status .ai-skel {
    max-width: 420px;
    margin: 16px auto 0;
}

.ai-fig {
    margin: 14px auto;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
    max-width: 640px;
}

.ai-fig img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity .5s ease;
    position: relative;
}

.ai-fig img.is-loaded {
    opacity: 1;
}

.ai-fig .ai-skel {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    transition: opacity .4s;
}

.ai-fig.is-loaded .ai-skel {
    opacity: 0;
    pointer-events: none;
}

.ai-final {
    text-align: left;
    margin: 10px 0;
}

.ai-final summary {
    cursor: pointer;
}

.ai-final p {
    font-size: .88rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    margin-top: 6px;
}

.ai-gallery {
    max-width: 860px;
    margin: 30px auto;
    text-align: left;
}

.ai-gallery h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.ai-gallery {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

.ai-gal-lead {
    margin: -6px 0 14px;
}

.ai-gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.ai-gal-card {
    margin: 0;
    background: #161b28;
    border: 1px solid #1e293b;
    border-radius: 14px;
    overflow: hidden;
}

.ai-gal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.ai-gal-filter {
    background: #161b28;
    color: #cbd5e1;
    border: 1px solid #1e293b;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .82rem;
    cursor: pointer;
}

.ai-gal-filter.is-active {
    background: #0984e3;
    border-color: #0984e3;
    color: #fff;
}

.ai-gal-sets {
    display: grid;
    gap: 18px;
}

.ai-gal-set {
    background: #11161f;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 14px;
}

.ai-gal-set[hidden] {
    display: none;
}

.ai-gal-head {
    margin: 0 0 12px;
    display: grid;
    gap: 4px;
}

.ai-gal-title {
    margin: 0;
    font-size: 1rem;
    color: #e2e8f0;
}

.ai-gal-prompt {
    margin: 0;
    font-size: .85rem;
    color: #94a3b8;
    overflow-wrap: anywhere;
}

.ai-gal-note {
    margin: 0;
    font-size: .82rem;
    color: #7dd3fc;
}

.ai-gal-note b {
    color: #38bdf8;
}

.ai-gal-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.ai-gal-tile {
    margin: 0;
    background: #161b28;
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-gal-tile img {
    width: 100%;
    height: auto;
    display: block;
    background: #0f1420;
}

.ai-gal-tile figcaption {
    padding: 8px 10px 10px;
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.ai-gal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ai-chip {
    background: #1e293b;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: .72rem;
}

.ai-gal-btns {
    display: grid;
    gap: 6px;
}

.ai-gal-btns .ai-btn {
    width: 100%;
}

.ai-gal-img {
    cursor: zoom-in;
}

.ai-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(2, 6, 14, .92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ai-lightbox.is-open {
    display: flex;
}

.ai-lb-inner {
    max-width: 1400px;
    max-height: 100%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    overflow: auto;
}

.ai-lb-inner figure {
    margin: 0;
    text-align: center;
    color: #cbd5e1;
    font-size: .8rem;
}

.ai-lb-inner img {
    max-width: min(660px, 92vw);
    max-height: 86vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    display: block;
    background: #0f1420;
    min-width: 120px;
    min-height: 120px;
}

.ai-lb-inner:not(.is-pair) img {
    max-width: min(1200px, 96vw);
}

.ai-lb-inner.is-pair img {
    max-width: min(900px, calc((100vw - 56px) / 2));
}

@media (max-width: 700px) {
    .ai-lb-inner.is-pair img {
        max-width: 92vw;
    }
}

.ai-lb-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1;
}

.ai-ba {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #0f1420;
}

.ai-ba > div {
    position: relative;
    min-width: 0;
}

.ai-ba span {
    position: absolute;
    left: 6px;
    top: 6px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 999px;
    pointer-events: none;
}

.ai-gal-set.is-edit .ai-gal-row {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.seo-content {
    max-width: 600px;
    margin: 40px auto 10px;
    text-align: left;
    line-height: 1.7;
}

.seo-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 32px 0 12px;
}

.seo-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 20px 0 6px;
}

.seo-content p,
.seo-content li {
    color: #94a3b8;
    font-size: 0.95rem;
}

.seo-content p {
    margin: 0 0 10px;
}

.seo-content ol,
.seo-content ul {
    padding-left: 22px;
    margin: 0 0 8px;
}

.seo-content li {
    margin-bottom: 6px;
}

.seo-content strong {
    color: #e2e8f0;
    font-weight: 600;
}

.ai-all-tools {
    margin-top: 50px;
}

.ai-all-tools h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    background-color: #1e293b;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: transform .3s, background-color .3s;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    background-color: #262f45;
    border-color: #3b82f6;
}

.tool-icon {
    font-size: 40px;
    color: #3b82f6;
    margin-bottom: 15px;
}

.tool-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.tool-card p {
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 520px) {
    .ai-zone {
        padding: 20px 14px;
    }
    .ai-steps span {
        font-size: .62rem;
    }
    body.ai-page h1 {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-skel,
    .ai-steps li.is-active .ai-seg::after {
        animation: none;
    }
    .ai-fig img {
        transition: none;
    }
}

.ai-select {
    width: 100%;
}

.ai-field-select .ai-label {
    display: block;
    margin-bottom: 6px;
}

.ai-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
}

.ai-tag-chip {
    background: #1e3a5f;
    color: #e0f2fe;
    border: 1px solid #3b82f6;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: .82rem;
    cursor: pointer;
}

.ai-tag-chip:hover {
    background: #274b7a;
}

#aiUpscaleGroup .ai-sub {
    margin-top: 10px;
    display: grid;
    gap: 12px;
}

.ai-sc {
    margin: 28px 0;
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.ai-sc .ai-gal-btns .ai-btn {
    width: 100%;
}

.ai-enh-row {
    flex-wrap: wrap;
}

.ai-enh-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ai-zone select.ai-enh-level {
    width: auto;
    padding: 6px 10px;
    font-size: .82rem;
}

.ai-zone .btn-outline:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ai-undo {
    background: none;
    border: 0;
    padding: 0;
    color: #60a5fa;
    text-decoration: underline;
    cursor: pointer;
    font-size: .85rem;
}

.ai-undo:hover {
    color: #93c5fd;
}

.ai-thumbs .ai-thumb-num {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(17, 24, 39, .85);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    pointer-events: none;
}

/* Converted from inline style attributes */
.st-c-94a3b8-mb-30px {
    color: #94a3b8;
    margin-bottom: 30px;
}

.st-fs-60px-mb-20px {
    font-size: 60px;
    margin-bottom: 20px;
}

.st-fs-50px-mb-12px {
    font-size: 50px;
    margin-bottom: 12px;
}

.st-mw-460px {
    max-width: 460px;
}


/* ===== theme fix: readable labels / links on the dark AI card ===== */
.ai-zone label,
.ai-zone .ai-label { color: #e2e8f0; }
.ai-zone .ai-hint,
.ai-zone small { color: #a3b1c6; }
.ai-zone .ai-input::placeholder { color: #7b8ba3; }
.ai-undo { color: #93c5fd; }
.ai-undo:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* ===== theme fix: dropdowns (native list follows the dark colour scheme) ===== */
.ai-zone select.ai-input,
.ai-zone .ai-select {
    color-scheme: dark;
    color: #f1f5f9;
    background-color: #111827;
    border: 1px solid #64748b;
}
.ai-zone select.ai-input:hover { border-color: #94a3b8; }
.ai-zone select.ai-input:focus { border-color: #60a5fa; outline: 2px solid rgba(96, 165, 250, .35); outline-offset: 1px; }
.ai-zone select.ai-input option {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 8px 12px;
}
.ai-zone select.ai-input option:checked,
.ai-zone select.ai-input option:hover {
    background: #2563eb linear-gradient(#2563eb, #2563eb);
    color: #fff;
}

/* ===== theme fix: gallery buttons (View full image / Try it / Try again) ===== */
.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font: inherit;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.2;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #1e293b;
    color: #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.ai-btn:hover { background: #273449; border-color: #94a3b8; }
.ai-btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.ai-btn:disabled { opacity: .5; cursor: not-allowed; }
.ai-btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 7px; }
.ai-btn-ghost { background: #1e293b; }
.ai-btn-ghost:hover { background: #223049; border-color: #60a5fa; }
.ai-btn[data-gal-apply] { background: rgba(59, 130, 246, .14); border-color: #3b82f6; color: #bfdbfe; }
.ai-btn[data-gal-apply]:hover { background: #1d4ed8; border-color: #3b82f6; color: #fff; }


/* ===== custom dropdown (ai/assets/dropdown.js) - mouse devices only; touch keeps the native picker ===== */
.ai-dd { position: relative; width: 100%; }
.ai-dd-sm { display: inline-block; width: auto; vertical-align: middle; }

.ai-dd .ai-dd-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.ai-dd-btn {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: .95rem;
    line-height: 1.4;
    padding: 11px 42px 11px 14px;
    background: #111827;
    color: #f1f5f9;
    border: 1px solid #64748b;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.ai-dd-btn::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .15s, border-color .15s;
}
.ai-dd-btn:hover { border-color: #94a3b8; background: #141c2e; }
.ai-dd-btn:focus-visible,
.ai-dd.is-open .ai-dd-btn {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .28);
    outline: none;
}
.ai-dd.is-open .ai-dd-btn::after { transform: translateY(-30%) rotate(-135deg); border-color: #60a5fa; }
.ai-dd-btn:disabled { opacity: .5; cursor: not-allowed; background: #111827; border-color: #475569; }
.ai-dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-dd-sm .ai-dd-btn { width: auto; padding: 6px 32px 6px 12px; font-size: .82rem; border-radius: 8px; }
.ai-dd-sm .ai-dd-btn::after { right: 12px; width: 6px; height: 6px; }

.ai-dd-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1000;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #1b2538;
    border: 1px solid #52627d;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .65), 0 2px 8px rgba(0, 0, 0, .4);
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #52627d transparent;
    animation: ai-dd-in .12s ease-out;
}
.ai-dd-list[hidden] { display: none; }
.ai-dd-up .ai-dd-list { top: auto; bottom: calc(100% + 6px); transform-origin: bottom; }
.ai-dd-sm .ai-dd-list { right: auto; min-width: 150px; }

.ai-dd-opt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 38px 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: .93rem;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
}
.ai-dd-opt + .ai-dd-opt { margin-top: 2px; }
.ai-dd-opt.is-active { background: #2c3c58; color: #fff; }
.ai-dd-opt.is-selected { color: #fff; font-weight: 600; background: rgba(59, 130, 246, .2); }
.ai-dd-opt.is-selected.is-active { background: rgba(59, 130, 246, .38); }
.ai-dd-opt.is-selected::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 5px;
    height: 10px;
    border-right: 2px solid #60a5fa;
    border-bottom: 2px solid #60a5fa;
    transform: translateY(-62%) rotate(45deg);
}
.ai-dd-opt.is-disabled { opacity: .4; cursor: not-allowed; }
.ai-dd-tag {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 999px;
    background: #475569;
    color: #fff;
}

@keyframes ai-dd-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-dd-list { animation: none; }
    .ai-dd-btn, .ai-dd-btn::after { transition: none; }
}

/* SEO content: follow container width on PC */
.seo-content {
    max-width: 100%;
    overflow-wrap: break-word;
}

/* clearer borders: inputs vs action buttons */
.drop-zone.ai-zone {
    border-color: rgba(59, 130, 246, .55);
}
.ai-zone .ai-input,
.ai-zone select.ai-input {
    border: 1px solid #64748b;
}
.ai-zone .ai-input:hover {
    border-color: #94a3b8;
}
.ai-zone .ai-input:focus {
    border-color: #60a5fa;
    outline: 2px solid rgba(96, 165, 250, .35);
    outline-offset: 1px;
}
.ai-zone .btn-outline:not(:disabled):not(:hover) {
    background: rgba(59, 130, 246, .14) !important;
    border-color: rgba(59, 130, 246, .55);
}
