:root {
    color-scheme: dark;
    --bg: #090a0d;
    --surface: rgba(23, 25, 30, .92);
    --surface-strong: #17191e;
    --surface-soft: #20232a;
    --text: #f7f3ea;
    --muted: #aaa6a0;
    --yellow: #ffcf4a;
    --orange: #ff6a3d;
    --green: #69de8c;
    --line: rgba(255, 255, 255, .1);
    --shadow: 0 24px 70px rgba(0, 0, 0, .38);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 93% 12%, rgba(255, 106, 61, .12), transparent 30rem),
        radial-gradient(circle at 3% 74%, rgba(255, 207, 74, .075), transparent 34rem),
        var(--bg);
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.site-header, .page-shell, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 94px;
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 54px; }
.session-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(105, 222, 140, .08); }

.page-shell {
    display: grid;
    grid-template-columns: minmax(250px, .7fr) minmax(520px, 1.3fr);
    grid-template-rows: auto auto auto;
    gap: clamp(50px, 8vw, 116px);
    row-gap: 24px;
    align-items: start;
    padding: clamp(70px, 10vw, 125px) 0 90px;
}
.intro { position: sticky; top: 48px; grid-column: 1; grid-row: 1 / span 3; padding-top: 18px; }
.intro-rule { display: block; width: 44px; height: 4px; margin-bottom: 28px; border-radius: 99px; background: var(--yellow); }
.eyebrow { margin: 0 0 18px; color: var(--yellow); font-size: .68rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3.3rem, 6.3vw, 6rem); line-height: .91; letter-spacing: -.075em; }
h1 em { color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.lead { max-width: 31rem; margin: 34px 0 0; color: var(--muted); line-height: 1.75; }
.hand-note { margin: 120px 0 0; color: rgba(247, 243, 234, .58); font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 1.15rem; font-style: italic; line-height: 1.4; transform: rotate(-5deg); }
.hand-note span { color: var(--orange); font-size: 1.6rem; }
.image-actions { grid-column: 2; grid-row: 1; min-width: 0; }
.image-card { grid-column: 2; grid-row: 2; min-width: 0; }
.comments-card { grid-column: 2; grid-row: 3; min-width: 0; }

.image-card, .comments-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.image-stage { position: relative; overflow: hidden; border-radius: inherit; background: #0f1013; }
.image-stage img { display: block; width: 100%; height: auto; animation: image-in .42s cubic-bezier(.2,.7,.2,1); }
@keyframes image-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
.empty-state { display: grid; min-height: 360px; place-content: center; justify-items: center; padding: 50px 30px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 60px; height: 60px; place-items: center; border: 1px solid var(--line); border-radius: 18px; color: var(--yellow); font-size: 1.6rem; }
.empty-state h2 { margin: 18px 0 0; color: var(--text); }
.image-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.image-title { margin: 0; color: var(--yellow); font-size: .88rem; font-weight: 760; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.next-button, .facebook-button, .submit-button, .admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 760;
    text-decoration: none;
    transition: transform .16s ease, filter .16s ease;
}
.next-button { gap: 14px; padding: 11px 16px 11px 18px; color: #17140b; background: var(--yellow); white-space: nowrap; }
.next-button span:last-child { font-size: 1.18rem; transition: transform .16s ease; }
.next-button:hover span:last-child { transform: translateX(3px); }
.facebook-button { gap: 7px; padding: 10px 14px; color: #fff; background: #1877f2; white-space: nowrap; }
.facebook-button span { font-family: Arial, sans-serif; font-size: 1.15rem; font-weight: 900; }
.next-button:hover, .facebook-button:hover, .submit-button:hover, .admin-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(255,207,74,.35); outline-offset: 3px; }

.comments-card { padding: clamp(24px, 4vw, 38px); box-shadow: 0 16px 50px rgba(0,0,0,.22); }
.comments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.comments-heading .eyebrow { margin-bottom: 9px; }
.comments-heading h2 { margin: 0; font-size: clamp(1.45rem,3vw,2rem); letter-spacing: -.04em; }
.comment-count { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .65rem; font-weight: 700; white-space: nowrap; }
.notice { margin: 24px 0 0; padding: 13px 15px; border-radius: 13px; font-size: .88rem; }
.notice.success { border: 1px solid rgba(105,222,140,.25); color: #a8efbb; background: rgba(105,222,140,.07); }
.notice.error { border: 1px solid rgba(255,106,61,.3); color: #ffb09a; background: rgba(255,106,61,.08); }
.comment-form { margin-top: 30px; }
.field-row { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(240px,1fr); gap: 24px; }
.field { position: relative; display: grid; align-content: start; gap: 9px; }
.field label { color: #dedad1; font-size: .78rem; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--text); background: rgba(8,9,11,.6); transition: border-color .16s ease; }
.field textarea { min-height: 116px; padding-bottom: 30px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus { border-color: rgba(255,207,74,.55); }
.character-count { position: absolute; right: 12px; bottom: 9px; color: var(--muted); font-size: .64rem; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-footer { display: flex; align-items: center; gap: 24px; margin-top: 18px; }
.form-footer small { max-width: 330px; color: var(--muted); line-height: 1.5; }
.submit-button, .admin-button { padding: 13px 20px; color: #fff; background: var(--orange); }
.comment-list { display: grid; gap: 12px; margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.comment-item { padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,9,11,.36); }
.comment-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.comment-meta strong { font-size: .86rem; }
.comment-meta time { color: var(--muted); font-size: .7rem; }
.comment-item p { margin: 9px 0 0; color: #d8d4cc; font-size: .92rem; line-height: 1.6; overflow-wrap: anywhere; }

footer { display: grid; grid-template-columns: auto minmax(280px,680px); gap: 50px; align-items: start; padding: 30px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; line-height: 1.6; }
footer div { display: grid; gap: 3px; } footer strong { color: var(--text); } footer p { margin: 0; text-align: right; }

.admin-shell { width: min(1000px,calc(100% - 40px)); margin: 60px auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.admin-header h1 { font-size: clamp(2.4rem,6vw,4rem); }
.admin-panel { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.admin-form { display: grid; max-width: 480px; gap: 12px; }
.admin-form input { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #0d0e11; }
.moderation-list { display: grid; gap: 15px; }
.moderation-item { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,9,11,.45); }
.moderation-item p { white-space: pre-wrap; overflow-wrap: anywhere; }
.moderation-meta { color: var(--muted); font-size: .75rem; }
.moderation-actions { display: flex; gap: 9px; margin-top: 16px; }
.moderation-actions button { padding: 9px 14px; border: 0; border-radius: 999px; color: #10120f; background: var(--green); font-weight: 750; }
.moderation-actions .delete { color: #fff; background: var(--orange); }
.status-pill { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 999px; background: var(--surface-soft); }

@media (max-width: 900px) {
    .page-shell { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; gap: 22px; padding-top: 26px; }
    .image-actions { grid-column: 1; grid-row: 1; }
    .image-card { grid-column: 1; grid-row: 2; }
    .intro { position: static; grid-column: 1; grid-row: 3; max-width: 660px; padding: 34px 0 22px; }
    .comments-card { grid-column: 1; grid-row: 4; }
    h1 { font-size: clamp(3.6rem,12vw,6.5rem); }
    .hand-note { display: none; }
}
@media (max-width: 620px) {
    .site-header, .page-shell, footer { width: calc(100% - 28px); }
    .site-header { min-height: 78px; }
    .brand-logo { height: 43px; }
    .session-status { font-size: .68rem; }
    .page-shell { padding: 18px 0 68px; }
    h1 { font-size: clamp(3.15rem,16.5vw,5rem); }
    .lead { margin-top: 26px; font-size: .94rem; }
    .image-card, .comments-card { border-radius: 21px; }
    .form-footer { align-items: stretch; flex-direction: column; }
    .image-actions { align-items: stretch; flex-direction: column; gap: 10px; }
    .toolbar-actions { display: grid; grid-template-columns: auto minmax(0,1fr); }
    .next-button { justify-content: space-between; }
    .comments-heading { flex-direction: column-reverse; }
    .field-row { grid-template-columns: 1fr; }
    .submit-button { width: 100%; }
    footer { grid-template-columns: 1fr; gap: 16px; }
    footer p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
