:root {
    --bg: #0f1115;
    --bg-soft: #1b1f27;
    --accent: #ffb347;
    --accent-2: #ff5f6d;
    --text: #f4f4f6;
    --muted: #b0b6c1;
    --card: #161a20;
    --stroke: rgba(255, 255, 255, 0.08);
}

body.light {
    --bg: #f7f3ee;
    --bg-soft: #ffffff;
    --accent: #3a6ff7;
    --accent-2: #4ee4b4;
    --text: #1b1b22;
    --muted: #5c6470;
    --card: #ffffff;
    --stroke: rgba(27, 27, 34, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(255, 95, 109, 0.35), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(255, 179, 71, 0.28), transparent 60%),
        var(--bg);
    padding: 48px 6vw 64px;
}

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.hero {
    max-width: 760px;
    margin-bottom: 36px;
}

.eyebrow {
    letter-spacing: 0.4em;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 12px;
}

h1 {
    font-family: "Prata", serif;
    font-size: clamp(32px, 5vw, 56px);
    margin: 0 0 12px;
}

.sub {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.guide-inline {
    margin: 14px 0 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.golden-ratio {
    margin: 18px 0 8px;
    max-width: 760px;
}

.golden-ratio img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--bg-soft);
}
.grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 28px;
    align-items: start;
}

.stage {
    display: grid;
    gap: 20px;
}

.frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(160deg, #1f2430 0%, #12141a 100%);
    border: 1px solid var(--stroke);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

video, #overlay, #photo-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frame::before {
    content: "";
    display: block;
    padding-top: 77.7%;
}

#photo-preview {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.frame.has-preview #photo-preview {
    opacity: 1;
    z-index: 1;
}

.frame.has-preview video {
    opacity: 0;
}

.snapshot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.snapshot .label {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
}

#capture {
    width: 100%;
    max-width: 360px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--bg-soft);
}

.panel {
    display: grid;
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.comments #disqus_thread {
    margin-top: 12px;
}

.contact {
    margin-top: 40px;
    max-width: 520px;
    margin-left: auto;
}

.contact-form {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.field {
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.muted {
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.6;
}

button {
    width: 100%;
    padding: 14px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(130deg, var(--accent-2), var(--accent));
    color: #101016;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 95, 109, 0.35);
}

.status {
    margin: 14px 0 0;
    color: var(--muted);
}

.status.guide {
    margin-top: 6px;
    color: var(--text);
    font-weight: 600;
}

.upload {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

#upload {
    display: none;
}

.small {
    font-size: 13px;
    margin: 0;
}

.result-body {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
}

.result img {
    width: 120px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
    background: #0b0d11;
    border: 1px solid var(--stroke);
}

.name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.score {
    font-size: 16px;
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 600;
}

.metrics {
    display: grid;
    gap: 10px;
    font-size: 14px;
}

.metric {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--stroke);
}

.metric .label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.metric .value {
    font-size: 16px;
    font-weight: 600;
}

.metric .range {
    color: var(--muted);
    font-size: 12px;
}

.tips {
    margin-top: 32px;
}

.tip-list {
    margin: 12px 0 10px;
    padding-left: 18px;
    color: var(--text);
    display: grid;
    gap: 6px;
    font-size: 15px;
}

@media (max-width: 980px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .frame::before {
        padding-top: 70%;
    }

    #capture {
        max-width: 100%;
    }

    .contact {
        max-width: 100%;
        margin-left: 0;
    }
}
