:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #07111b;
    color: #f4f8fb;
    --background: #07111b;
    --surface: rgb(10 22 34 / 88%);
    --surface-strong: #0f2030;
    --surface-soft: rgb(105 227 235 / 9%);
    --border: rgb(117 223 230 / 24%);
    --text: #f4f8fb;
    --muted: #9fb3c2;
    --accent: #69e3eb;
    --accent-strong: #20bac5;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #fb7185;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 12%, #123e52 0, transparent 32%),
        radial-gradient(circle at 86% 88%, #35215d 0, transparent 34%),
        var(--background);
    color: var(--text);
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgb(5 14 23 / 78%);
    color: var(--text);
}

input,
select {
    min-height: 48px;
    padding: 10px 13px;
}

textarea {
    padding: 13px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(105 227 235 / 14%);
}

a {
    color: inherit;
}

.landing-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.gallery-page {
    padding: clamp(12px, 3vw, 38px);
}

.gallery-shell,
.form-shell {
    width: min(1320px, 100%);
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgb(0 0 0 / 35%);
    overflow: hidden;
}

.gallery-header,
.page-header {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    padding: clamp(24px, 4vw, 48px);
    border-bottom: 1px solid var(--border);
}

.gallery-title,
.page-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
}

.gallery-header .hero-copy {
    margin: 14px 0 0;
}

.gallery-content {
    padding: clamp(24px, 4vw, 48px);
}

.account-card-compact {
    min-width: min(100%, 520px);
}

.section-heading {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.empty-gallery {
    padding: clamp(28px, 5vw, 56px);
    border: 1px dashed var(--border);
    border-radius: 22px;
    text-align: center;
}

.empty-gallery strong {
    font-size: 1.35rem;
}

.empty-gallery p {
    margin: 10px auto 22px;
    color: var(--muted);
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.design-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgb(7 17 27 / 62%);
}

.design-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    min-height: 190px;
    padding: 24px;
    background: linear-gradient(135deg, #092838, #24204c 60%, #123e52);
}

.design-visual span {
    border: 1px solid rgb(105 227 235 / 38%);
    border-radius: 18px;
    background: rgb(10 22 34 / 72%);
    box-shadow: inset 0 0 25px rgb(105 227 235 / 6%);
}

.design-card-body {
    padding: 20px;
}

.design-card h3 {
    margin: 12px 0 8px;
    font-size: 1.3rem;
}

.design-card p {
    min-height: 3em;
    color: var(--muted);
    line-height: 1.5;
}

.design-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.design-badges span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: #dffcff;
    font-size: 0.76rem;
}

.design-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.form-shell {
    max-width: 940px;
    padding-bottom: 34px;
}

.form-shell-wide {
    max-width: 1220px;
}

.submission-form,
.moderation-form {
    display: grid;
    gap: 22px;
    padding: clamp(24px, 4vw, 44px);
}

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

.field {
    display: grid;
    gap: 9px;
    font-weight: 700;
}

.field small,
.field em {
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 400;
}

.check-field {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--muted);
    line-height: 1.5;
}

.check-field input {
    width: 20px;
    min-height: 20px;
    flex: 0 0 auto;
}

.notice-success {
    border-color: rgb(74 222 128 / 35%);
    background: rgb(74 222 128 / 10%);
    color: #bbf7d0;
}

.notice-error {
    margin: 24px 44px 0;
    border-color: rgb(251 113 133 / 45%);
    background: rgb(251 113 133 / 10%);
    color: #fecdd3;
}

.review-grid {
    padding: clamp(24px, 4vw, 44px);
    border-bottom: 1px solid var(--border);
}

.metadata-list {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
}

.metadata-list div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
}

.metadata-list dt {
    color: var(--muted);
}

.metadata-list dd {
    margin: 0;
}

.hash-value {
    overflow-wrap: anywhere;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
}

.json-preview {
    max-height: 520px;
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #050c13;
    color: #c6f6f8;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.decision-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.button-danger {
    border-color: rgb(251 113 133 / 42%);
    background: rgb(251 113 133 / 11%);
    color: #fecdd3;
}

.hero-card,
.admin-shell {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 30px 80px rgb(0 0 0 / 35%);
    backdrop-filter: blur(18px);
}

.hero-card {
    width: min(820px, 100%);
    padding: clamp(32px, 7vw, 72px);
    border-radius: 32px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hero-copy {
    max-width: 620px;
    margin: 26px 0 32px;
    color: #b8c8d4;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.65;
}

.notice,
.system-status {
    border-radius: 16px;
}

.notice {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgb(251 191 36 / 35%);
    background: rgb(251 191 36 / 9%);
    color: #fde68a;
}

.system-status {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 30px 0 0;
    padding: 16px 18px;
    background: var(--surface-soft);
    color: #dffcff;
}

.system-status::before {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 18px currentColor;
    content: '';
}

.system-status.is-ready::before {
    background: var(--success);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 750;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease,
        background-color 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 3px solid rgb(105 227 235 / 42%);
    outline-offset: 3px;
}

.button-primary {
    background: var(--accent-strong);
    color: #041216;
}

.button-primary:hover {
    background: var(--accent);
}

.button-secondary {
    border-color: var(--border);
    background: transparent;
    color: var(--text);
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.button-large {
    min-height: 52px;
    padding-inline: 24px;
}

.account-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}

.avatar {
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.account-copy {
    display: grid;
    flex: 1;
    gap: 3px;
}

.account-copy span,
.muted {
    color: var(--muted);
}

.account-actions,
.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.account-actions form,
.admin-actions form {
    margin: 0;
}

.admin-page {
    padding: clamp(16px, 4vw, 44px);
}

.admin-shell {
    width: min(1220px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 28px;
}

.admin-header {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    border-bottom: 1px solid var(--border);
}

.admin-title {
    margin: 0 0 5px;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    letter-spacing: -0.035em;
}

.admin-content {
    padding: 28px 32px 36px;
}

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

.stat-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}

.stat-value {
    display: block;
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.stat-label {
    color: var(--muted);
}

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgb(7 17 27 / 42%);
}

.panel-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    margin-bottom: 5px;
}

.empty-state {
    margin: 0;
    padding: 34px 22px;
    color: var(--muted);
}

.submission-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.submission-item {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.submission-item:last-child {
    border-bottom: 0;
}

.submission-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

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

    .admin-header,
    .account-card,
    .gallery-header,
    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .design-grid,
    .field-grid,
    .review-grid {
        grid-template-columns: 1fr;
    }

    .admin-actions,
    .account-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .landing-page,
    .admin-page,
    .gallery-page {
        padding: 10px;
    }

    .hero-card,
    .admin-shell,
    .gallery-shell,
    .form-shell {
        border-radius: 22px;
    }

    .hero-card,
    .admin-header,
    .admin-content {
        padding: 24px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .button,
    .account-actions form,
    .admin-actions form {
        width: 100%;
    }

    .gallery-header,
    .gallery-content,
    .page-header,
    .submission-form,
    .review-grid,
    .moderation-form {
        padding: 22px 18px;
    }

    .design-footer,
    .decision-actions,
    .submission-item {
        align-items: stretch;
        flex-direction: column;
    }

    .notice-error {
        margin: 20px 18px 0;
    }
}
