:root {
    --c-deep: #0d0049;
    --c-blue: #0153cc;
    --c-soft: #98adff;
    --c-text: #f4f6ff;
    --c-glass: rgba(255,255,255,0.08);
    --c-glass-strong: rgba(255,255,255,0.14);
    --c-ice: #dff6ff;
    --c-gold: #ffd76f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background: #0a0030; color: #fff; }

/* ========== LOGIN ========== */
.login-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(1,83,204,0.45), transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(152,173,255,0.25), transparent 60%),
        linear-gradient(160deg, #0d0049 0%, #06002a 60%, #0153cc 140%);
    position: relative;
}

.login-shell {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 88px 0 32px;
}

.developer-credit {
    position: absolute;
    top: 16px;
    left: 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    max-width: min(360px, calc(100vw - 48px));
    padding: 10px 16px 10px 12px;
    color: var(--c-text);
    text-decoration: none;
    background: rgba(7, 10, 48, 0.78);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.26);
    transition: transform .18s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.developer-credit:hover {
    transform: translateY(-2px);
    background: rgba(10, 15, 68, 0.9);
    border-color: rgba(223,246,255,0.36);
    box-shadow: 0 24px 56px rgba(0,0,0,0.3);
}

.developer-credit:focus-visible {
    outline: none;
    border-color: rgba(223,246,255,0.5);
    box-shadow: 0 0 0 4px rgba(152,173,255,0.22), 0 18px 48px rgba(0,0,0,0.26);
}

.developer-credit-flag {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 8px 18px rgba(0,0,0,0.22);
}

.developer-credit-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.developer-credit-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.developer-credit-copy strong {
    color: #f8fbff;
    font-size: .84rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.developer-credit-copy span {
    color: rgba(223, 246, 255, 0.82);
    font-size: .92rem;
    line-height: 1.35;
}

.login-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    margin-top: 8px;
    background: rgba(8, 4, 45, 0.6);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

.topbar-copy {
    margin: 8px 0 0;
    max-width: 420px;
    color: rgba(223, 246, 255, 0.8);
    font-size: .92rem;
    line-height: 1.5;
}

.top-menu {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 14px;
}

.menu-login-label {
    color: var(--c-text);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .72rem;
}

.menu-login:hover .menu-login-label,
.menu-login[open] .menu-login-label {
    background: rgba(255,255,255,0.12);
    border-color: rgba(223,246,255,0.28);
}

.menu-login {
    position: relative;
}

.menu-login-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--c-gold);
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.menu-login-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 16px currentColor;
}

.menu-login-label::after {
    content: "+";
    font-size: .95rem;
    line-height: 1;
}

.menu-login-label::-webkit-details-marker {
    display: none;
}

.menu-login[open] .menu-login-label::after {
    content: "−";
}

.menu-login-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    padding: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 20;
}

.login-hero {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(580px, 1fr);
    gap: 40px;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 36px 0 12px;
}

.hero-copy {
    padding: 12px 4px;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--c-ice);
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.8rem, 5vw, 5.4rem);
    line-height: .95;
    letter-spacing: -.05em;
    max-width: 10ch;
}

.subtitle {
    margin: 0;
    color: #cfd8ff;
    font-size: 1rem;
    line-height: 1.7;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hero-stats article {
    padding: 18px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
}

.hero-stats strong {
    display: block;
    font-size: 1.8rem;
    color: var(--c-gold);
}

.hero-stats span {
    display: block;
    margin-top: 6px;
    color: rgba(223,246,255,0.78);
    font-size: .86rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.scan-stage {
    position: relative;
    width: min(860px, 100%);
    min-height: 620px;
}

.scan-frame {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(223,246,255,0.16);
    background:
        radial-gradient(circle at 50% 25%, rgba(152,173,255,0.3), transparent 35%),
        linear-gradient(180deg, rgba(9, 14, 62, 0.88), rgba(6, 6, 34, 0.94));
    box-shadow: inset 0 0 80px rgba(152,173,255,0.12), 0 24px 80px rgba(0,0,0,0.34);
}

.base-frame {
    height: 560px;
}

.frame-grid,
.scan-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.frame-grid {
    background-image:
        linear-gradient(rgba(223,246,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(223,246,255,0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
}

.scan-noise {
    background:
        linear-gradient(180deg, transparent, rgba(223,246,255,0.05) 50%, transparent),
        repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 4px);
    opacity: .55;
    animation: noiseDrift 8s linear infinite;
}

@keyframes noiseDrift {
    from { transform: translateY(-4%); }
    to { transform: translateY(4%); }
}

/* Stars */
.stars, .stars2, .stars3 {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(1px 1px at 90px 80px, #cfd8ff, transparent),
        radial-gradient(1.5px 1.5px at 160px 200px, #fff, transparent),
        radial-gradient(1px 1px at 240px 120px, #98adff, transparent),
        radial-gradient(2px 2px at 320px 60px, #fff, transparent),
        radial-gradient(1px 1px at 400px 240px, #cfd8ff, transparent);
    background-repeat: repeat;
    background-size: 450px 300px;
    animation: twinkle 6s linear infinite;
    opacity: 0.7;
}
.stars2 { animation-duration: 10s; opacity: 0.5; background-size: 600px 400px; }
.stars3 { animation-duration: 14s; opacity: 0.35; background-size: 800px 500px; }
@keyframes twinkle {
    0%,100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

/* UFO */
.ufo-wrap {
    position: absolute; top: 14%; left: 32%; transform: translateX(-50%);
    width: 260px; height: 160px;
    animation: hover 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(1,83,204,0.55));
}
@keyframes hover {
    0%,100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
    50%     { transform: translateX(-50%) translateY(-12px) rotate(2deg); }
}
.ufo { position: relative; width: 100%; height: 100%; }
.ufo-dome {
    position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 130px; height: 72px;
    background: radial-gradient(ellipse at 30% 30%, #cfd8ff, #98adff 60%, #0153cc);
    border-radius: 110px 110px 10px 10px / 60px 60px 5px 5px;
    box-shadow: inset -10px -8px 20px rgba(0,0,0,0.25), inset 10px 10px 25px rgba(255,255,255,0.4);
}
.ufo-body {
    position: absolute; left: 50%; top: 60px; transform: translateX(-50%);
    width: 260px; height: 48px;
    background: linear-gradient(180deg, #98adff 0%, #0153cc 50%, #0d0049 100%);
    border-radius: 50%;
    box-shadow: inset 0 -6px 14px rgba(0,0,0,0.4), 0 10px 25px rgba(1,83,204,0.4);
}
.ufo-lights {
    position: absolute; top: 90px; left: 50%; transform: translateX(-50%);
    width: 210px; display: flex; justify-content: space-between;
}
.ufo-lights span {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 12px #98adff, 0 0 22px #0153cc;
    animation: blink 1.4s infinite;
}
.ufo-lights span:nth-child(2) { animation-delay: .2s; }
.ufo-lights span:nth-child(3) { animation-delay: .4s; background: #98adff; }
.ufo-lights span:nth-child(4) { animation-delay: .6s; }
.ufo-lights span:nth-child(5) { animation-delay: .8s; }
@keyframes blink { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .35; transform: scale(.7);} }
.ufo-beam {
    position: absolute; top: 116px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 260px;
    background: linear-gradient(180deg, rgba(152,173,255,0.7), rgba(152,173,255,0));
    clip-path: polygon(45% 0, 55% 0, 100% 100%, 0% 100%);
    filter: blur(6px);
    animation: beam 3s ease-in-out infinite;
    transform-origin: top center;
}
@keyframes beam {
    0%,100% { opacity: .55; transform: translateX(-50%) scaleY(1); }
    50%     { opacity: .9;  transform: translateX(-50%) scaleY(1.15); }
}

.target-ring {
    position: absolute;
    border: 1px solid rgba(223,246,255,0.34);
    border-radius: 50%;
    box-shadow: 0 0 0 18px rgba(223,246,255,0.03);
    animation: ringPulse 3.4s ease-in-out infinite;
}

.ring-one {
    width: 210px;
    height: 210px;
    left: 17%;
    top: 15%;
}

.ring-two {
    width: 320px;
    height: 320px;
    left: 9%;
    top: 5%;
    animation-delay: 1.1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: .45; transform: scale(.96); }
    50% { opacity: .9; transform: scale(1.04); }
}

.selected-overlay {
    position: absolute;
    top: 70px;
    left: 140px;
    width: 320px;
    animation: overlayFloat 6s ease-in-out infinite;
}

.selected-card {
    position: relative;
    padding: 16px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(180deg, rgba(20, 28, 80, 0.35), rgba(10, 10, 35, 0.68));
    box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}

.selected-badge,
.panel-label {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--c-gold);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.selected-preview {
    position: relative;
    height: 220px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 25%, rgba(152,173,255,0.25), transparent 34%),
        linear-gradient(180deg, rgba(8,14,54,0.94), rgba(4,5,22,0.96));
}

.selected-preview::before,
.selected-preview::after {
    content: "";
    position: absolute;
    inset: 0;
}

.selected-preview::before {
    background-image:
        linear-gradient(rgba(223,246,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(223,246,255,0.06) 1px, transparent 1px);
    background-size: 34px 34px;
}

.selected-preview::after {
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 62%);
}

.preview-glow {
    position: absolute;
    inset: 26px 34px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.3);
    background: radial-gradient(circle at center, rgba(223,246,255,0.16), transparent 70%);
    animation: selectedFade 3.2s ease-in-out infinite;
}

.mini-ufo {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 160px;
    height: 110px;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 10px 22px rgba(1,83,204,0.5));
}

.mini-dome {
    position: absolute;
    left: 50%;
    top: 10px;
    width: 78px;
    height: 42px;
    transform: translateX(-50%);
    border-radius: 90px 90px 10px 10px / 48px 48px 5px 5px;
    background: radial-gradient(circle at 40% 30%, #f6fcff, #98adff 60%, #0153cc);
}

.mini-body {
    position: absolute;
    left: 50%;
    top: 42px;
    width: 160px;
    height: 30px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: linear-gradient(180deg, #c6d6ff, #0153cc 60%, #0d0049);
}

@keyframes selectedFade {
    0%, 100% { opacity: .18; transform: scale(.94); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes overlayFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.evidence-arrow {
    position: absolute;
    top: 210px;
    left: 442px;
    width: 170px;
    height: 110px;
}

.arrow-line {
    position: absolute;
    left: 0;
    top: 46px;
    width: 138px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,215,111,0), rgba(255,215,111,0.95));
    transform-origin: left center;
    animation: arrowSweep 2.2s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(255,215,111,0.55);
}

.arrow-head {
    position: absolute;
    right: 8px;
    top: 35px;
    width: 22px;
    height: 22px;
    border-top: 4px solid var(--c-gold);
    border-right: 4px solid var(--c-gold);
    transform: rotate(45deg);
    animation: arrowBlink 1.2s ease-in-out infinite;
    box-shadow: 4px -4px 18px rgba(255,215,111,0.35);
}

@keyframes arrowSweep {
    0% { transform: scaleX(.2); opacity: .25; }
    45% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(.86); opacity: .55; }
}

@keyframes arrowBlink {
    0%, 100% { opacity: .45; }
    50% { opacity: 1; }
}

.evidence-panel {
    position: absolute;
    top: 132px;
    right: 16px;
    width: 250px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(8, 14, 52, 0.86);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 45px rgba(0,0,0,0.24);
}

.evidence-panel article {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.evidence-panel article:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.evidence-panel strong {
    display: block;
    color: var(--c-ice);
    font-size: .95rem;
}

.evidence-panel span {
    display: block;
    margin-top: 6px;
    color: rgba(223,246,255,0.72);
    font-size: .82rem;
    line-height: 1.55;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(40px) scale(.96); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0) scale(1);     filter: blur(0); }
}
.logo {
    font-size: 1.6rem; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(90deg, #98adff, #fff, #98adff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 200% 100%;
    animation: shine 4s linear infinite;
}
.logo span { color: #98adff; -webkit-text-fill-color: #98adff; margin: 0 6px; }
@keyframes shine { to { background-position: 200% 0; } }
.subtitle { margin: 6px 0 0; color: #cfd8ff; font-size: .92rem; }
.login-icon-link {
    width: 42px;
    height: 42px;
    margin: 14px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f4f6ff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(1,83,204,0.22);
    transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.login-icon-link:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.14);
    border-color: rgba(152,173,255,0.7);
    color: #98adff;
}
.login-icon-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(152,173,255,0.24), 0 10px 24px rgba(1,83,204,0.22);
}

.field {
    position: relative; margin: 18px 0;
}
.compact-field {
    margin: 0 0 14px;
}
.field input {
    width: 100%;
    padding: 18px 14px 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    color: #fff; font-size: 1rem; outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input:focus {
    border-color: var(--c-soft);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 0 0 4px rgba(152,173,255,0.18);
}
.field label {
    position: absolute; left: 14px; top: 14px;
    color: #b8c4ff; font-size: 1rem;
    pointer-events: none; transition: all .2s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    top: 4px; font-size: .72rem; color: #98adff; letter-spacing: .5px;
}
.field-error { display: block; color: #ffb4b4; font-size: .8rem; margin-top: 4px; }
.error-summary { color: #ffd1d1; background: rgba(255,80,80,0.12); border: 1px solid rgba(255,80,80,0.35); padding: 8px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px; }
.error-summary ul { margin: 0; padding-left: 18px; }

.btn-login {
    margin-top: 8px;
    width: 100%; padding: 14px 18px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #0153cc, #98adff);
    color: #fff; font-weight: 700; font-size: 1rem;
    border: none; border-radius: 12px; cursor: pointer;
    box-shadow: 0 8px 24px rgba(1,83,204,0.45);
    transition: transform .15s, box-shadow .25s, filter .25s;
    position: relative; overflow: hidden;
}
.btn-login::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s;
}
.btn-login:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn-login:hover::before { transform: translateX(100%); }
.btn-login:active { transform: translateY(0); }

.login-footer {
    text-align: center; margin-top: 14px;
    color: #98adff; font-size: .8rem; letter-spacing: .5px;
}

.registered-gallery {
    margin-top: 22px;
    padding: 30px 0 8px;
}

.gallery-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.gallery-header h2 {
    margin: 14px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.gallery-header p {
    max-width: 520px;
    margin: 0;
    color: rgba(223,246,255,0.74);
    line-height: 1.7;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.gallery-card,
.gallery-empty {
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(8, 14, 52, 0.72);
    box-shadow: 0 20px 42px rgba(0,0,0,0.18);
}

.gallery-card {
    overflow: hidden;
    padding: 18px;
}

.gallery-empty {
    padding: 22px;
    color: rgba(223,246,255,0.74);
}

.gallery-image-stack {
    position: relative;
    flex: 0 0 210px;
    min-height: 190px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    background:
        radial-gradient(circle at 50% 20%, rgba(152,173,255,0.22), transparent 35%),
        linear-gradient(180deg, rgba(9, 14, 62, 0.94), rgba(5, 7, 28, 0.98));
}

.gallery-image-stack::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(5,7,28,0.12) 55%, rgba(5,7,28,0.65) 100%);
    pointer-events: none;
}

.gallery-image {
    position: absolute;
    inset: 18px;
    width: calc(100% - 36px);
    height: calc(100% - 36px);
    object-fit: contain;
    object-position: center;
}

.gallery-image.selected-image {
    opacity: 0;
    animation: galleryFade 4.8s ease-in-out infinite;
}

.gallery-connection {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gallery-link-arrow {
    position: relative;
    flex: 0 0 56px;
    height: 26px;
}

.gallery-link-line {
    position: absolute;
    left: 0;
    top: 11px;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,215,111,0.08), rgba(255,215,111,0.96));
    box-shadow: 0 0 14px rgba(255,215,111,0.38);
}

.gallery-link-head {
    position: absolute;
    right: 2px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-top: 3px solid var(--c-gold);
    border-right: 3px solid var(--c-gold);
    transform: rotate(45deg);
}

.gallery-evidence-panel {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

.gallery-evidence-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 16px;
    align-items: start;
}

.gallery-evidence-copy {
    min-width: 0;
}

.gallery-evidence-count {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--c-gold);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gallery-evidence-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.gallery-evidence-list li {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gallery-evidence-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.gallery-evidence-list strong,
.gallery-evidence-more,
.gallery-evidence-empty {
    color: var(--c-ice);
}

.gallery-evidence-list strong {
    display: block;
    font-size: .92rem;
}

.gallery-evidence-list span,
.gallery-evidence-more,
.gallery-evidence-empty {
    display: block;
    margin-top: 6px;
    color: rgba(223,246,255,0.74);
    font-size: .82rem;
    line-height: 1.55;
}

.gallery-evidence-visual {
    display: grid;
    gap: 10px;
}

.gallery-evidence-visual-label {
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(223,246,255,0.56);
}

.gallery-evidence-carousel {
    position: relative;
    min-height: 208px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background:
        radial-gradient(circle at top, rgba(255,215,111,0.18), transparent 38%),
        linear-gradient(180deg, rgba(10, 16, 58, 0.96), rgba(4, 8, 28, 0.98));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.gallery-evidence-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 30%, rgba(5,7,28,0.7) 100%);
    pointer-events: none;
}

.gallery-evidence-frame {
    --frame-duration: calc(var(--evidence-count) * 3.6s);
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    animation: evidenceFrameFade var(--frame-duration) ease-in-out infinite;
    animation-delay: calc(var(--evidence-index) * 3.6s);
}

.gallery-evidence-image {
    position: absolute;
    inset: 16px 16px 44px;
    width: calc(100% - 32px);
    height: calc(100% - 60px);
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 14px 28px rgba(0,0,0,0.34));
}

.gallery-evidence-image.selected {
    opacity: 0;
    animation: evidenceSelectedFade var(--frame-duration) ease-in-out infinite;
    animation-delay: calc(var(--evidence-index) * 3.6s);
}

.gallery-evidence-frame figcaption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 1;
    color: var(--c-ice);
    font-size: .76rem;
    line-height: 1.4;
    letter-spacing: .02em;
}

.gallery-meta {
    padding: 16px 4px 4px;
}

.gallery-meta strong {
    display: block;
    color: var(--c-ice);
    font-size: 1rem;
}

.gallery-meta span {
    display: block;
    margin-top: 8px;
    color: rgba(223,246,255,0.74);
    font-size: .88rem;
    line-height: 1.6;
}

@keyframes galleryFade {
    0%, 18%, 100% { opacity: 0; }
    36%, 72% { opacity: 1; }
}

@keyframes evidenceFrameFade {
    0%, 8% { opacity: 0; transform: scale(0.96); }
    16%, 72% { opacity: 1; transform: scale(1); }
    84%, 100% { opacity: 0; transform: scale(1.04); }
}

@keyframes evidenceSelectedFade {
    0%, 22%, 100% { opacity: 0; }
    36%, 74% { opacity: 1; }
}

@media (max-width: 1120px) {
    .login-hero {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .scan-stage {
        min-height: 700px;
    }

    .evidence-panel {
        right: 24px;
    }

    .gallery-header {
        align-items: start;
        flex-direction: column;
    }

    .gallery-evidence-layout {
        grid-template-columns: 1fr;
    }

    .gallery-evidence-visual {
        order: -1;
    }

}

@media (max-width: 860px) {
    .login-shell {
        width: min(100% - 24px, 1280px);
        padding-top: 92px;
    }

    .login-topbar {
        padding: 18px;
    }

    .developer-credit {
        left: 0;
        max-width: min(340px, calc(100vw - 24px));
    }

    .top-menu {
        margin-left: auto;
    }

    .menu-login-panel {
        width: min(360px, calc(100vw - 32px));
    }

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

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

    .gallery-connection {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-image-stack {
        flex-basis: auto;
        min-height: 240px;
    }

    .gallery-link-arrow {
        align-self: center;
        transform: rotate(90deg);
    }

    .scan-stage {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        min-height: auto;
    }

    .base-frame {
        height: 420px;
    }

    .ufo-wrap {
        left: 50%;
        top: 9%;
        width: 220px;
        height: 140px;
    }

    .selected-overlay {
        position: static;
        width: 100%;
        max-width: none;
        animation: none;
    }

    .evidence-arrow {
        display: none;
    }

    .evidence-panel {
        position: static;
        width: 100%;
        max-width: none;
        margin: 0;
        transform: none;
    }

    .evidence-panel article {
        padding: 16px 0;
    }
}

@media (max-width: 560px) {
    .login-shell {
        padding-top: 108px;
    }

    .developer-credit {
        top: 10px;
        left: 0;
        right: auto;
        gap: 10px;
        max-width: calc(100vw - 24px);
        padding-right: 14px;
        border-radius: 24px;
    }

    .developer-credit-copy strong {
        font-size: .76rem;
    }

    .developer-credit-copy span {
        font-size: .84rem;
    }

    .login-topbar {
        flex-direction: column;
    }

    .top-menu {
        width: 100%;
        justify-content: flex-end;
    }

    .menu-login {
        margin-left: auto;
    }

    .menu-login-label {
        justify-content: center;
    }

    .menu-login-panel {
        right: 0;
    }

    .hero-copy h1 {
        font-size: clamp(2.3rem, 10vw, 3.4rem);
    }

    .base-frame {
        height: 360px;
    }

    .selected-card,
    .evidence-panel {
        padding: 14px;
        border-radius: 22px;
    }

    .selected-preview {
        height: 168px;
    }

    .panel-label {
        margin-bottom: 6px;
    }

    .evidence-panel strong {
        font-size: .88rem;
    }

    .evidence-panel span {
        font-size: .8rem;
        line-height: 1.5;
    }
}
