/* ==========================================================
   FINAL ORDER
   CYBER / TRON / ELECTRIC UI
========================================================== */


/* ==========================================================
   ROOT
========================================================== */

:root {
    --bg: #04080c;

    --panel: #081117;
    --panel-soft: #0b171e;
    --panel-bright: #10232c;

    --cyan: #26f7ff;
    --cyan-soft: #0bc4cf;
    --cyan-dark: #075e66;

    --green: #4dffc3;
    --danger: #ff526d;

    --text: #ecfdff;
    --muted: #71939a;

    --border: rgba(38, 247, 255, 0.18);
    --border-medium: rgba(38, 247, 255, 0.34);
    --border-strong: rgba(38, 247, 255, 0.62);

    --shadow-soft:
        0 0 18px rgba(38, 247, 255, 0.12);

    --shadow-medium:
        0 0 28px rgba(38, 247, 255, 0.20);

    --shadow-strong:
        0 0 40px rgba(38, 247, 255, 0.30);

    --bolt-cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M16 1L5 16h8l-2 11 12-16h-8z' fill='%2326f7ff' stroke='%23020a0d' stroke-width='1.3'/%3E%3C/svg%3E")
        8 2,
        pointer;
}


/* ==========================================================
   ANIMATIONS
========================================================== */

@keyframes electricPulse {
    0% {
        box-shadow:
            0 0 0 rgba(38, 247, 255, 0),
            inset 0 0 0 rgba(38, 247, 255, 0);
    }

    35% {
        box-shadow:
            0 0 20px rgba(38, 247, 255, 0.18),
            inset 0 0 12px rgba(38, 247, 255, 0.04);
    }

    52% {
        box-shadow:
            0 0 34px rgba(38, 247, 255, 0.27),
            inset 0 0 18px rgba(38, 247, 255, 0.06);
    }

    58% {
        box-shadow:
            0 0 12px rgba(38, 247, 255, 0.12),
            inset 0 0 8px rgba(38, 247, 255, 0.03);
    }

    100% {
        box-shadow:
            0 0 24px rgba(38, 247, 255, 0.20),
            inset 0 0 12px rgba(38, 247, 255, 0.04);
    }
}


@keyframes electricFlicker {
    0%,
    100% {
        opacity: 0.25;
    }

    18% {
        opacity: 0.72;
    }

    21% {
        opacity: 0.18;
    }

    24% {
        opacity: 0.88;
    }

    58% {
        opacity: 0.35;
    }

    62% {
        opacity: 0.76;
    }

    65% {
        opacity: 0.28;
    }
}


@keyframes teslaCharge {
    0% {
        transform:
            translateX(-120%)
            skewX(-18deg);

        opacity: 0;
    }

    25% {
        opacity: 0.55;
    }

    55% {
        opacity: 0.16;
    }

    100% {
        transform:
            translateX(220%)
            skewX(-18deg);

        opacity: 0;
    }
}


@keyframes savePulse {
    0% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.55;
    }
}


@keyframes selectedCharge {
    0% {
        filter:
            drop-shadow(
                0 0 2px
                rgba(38, 247, 255, 0.45)
            );
    }

    50% {
        filter:
            drop-shadow(
                0 0 10px
                rgba(38, 247, 255, 0.90)
            );
    }

    100% {
        filter:
            drop-shadow(
                0 0 4px
                rgba(38, 247, 255, 0.55)
            );
    }
}


@keyframes stageScan {
    from {
        transform:
            translateY(-130%);
    }

    to {
        transform:
            translateY(130%);
    }
}


/* ==========================================================
   RESET
========================================================== */

* {
    box-sizing: border-box;
}


html {
    background: var(--bg);
}


body {
    margin: 0;

    min-height: 100%;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(0, 190, 255, 0.08),
            transparent 31%
        ),
        radial-gradient(
            circle at 93% 10%,
            rgba(38, 247, 255, 0.05),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #04080c 0%,
            #061016 47%,
            #020507 100%
        );
}


body.markup-open {
    overflow: hidden;
}


button,
input,
select {
    font: inherit;
}


button {
    -webkit-appearance: none;
}


a {
    color: inherit;
}


/* ==========================================================
   MAIN APP
========================================================== */

.app {
    position: relative;

    max-width: 1480px;

    margin: 0 auto;

    padding:
        44px
        34px
        110px;
}


.app::before {
    content: "";

    position: fixed;

    inset: 0;

    z-index: -1;

    pointer-events: none;

    opacity: 0.10;

    background-image:
        linear-gradient(
            rgba(38, 247, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(38, 247, 255, 0.06) 1px,
            transparent 1px
        );

    background-size:
        42px
        42px;
}


/* ==========================================================
   HEADER
========================================================== */

.top-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 36px;

    margin-bottom: 34px;

    padding-bottom: 28px;

    border-bottom:
        1px solid
        var(--border);
}


.brand {
    display: flex;

    align-items: center;

    gap: 20px;
}


.brand-mark {
    width: 66px;
    height: 66px;

    display: grid;

    place-items: center;

    border:
        1px solid
        var(--border-strong);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(38, 247, 255, 0.13),
            rgba(38, 247, 255, 0.02)
        );

    box-shadow:
        inset 0 0 18px rgba(38, 247, 255, 0.08),
        var(--shadow-soft);

    color: var(--cyan);

    font-size: 18px;

    font-weight: 900;

    letter-spacing: 0.14em;
}


.brand-copy {
    min-width: 0;
}


.eyebrow {
    margin-bottom: 7px;

    color: var(--cyan);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.22em;
}


h1 {
    margin: 0;

    font-size:
        clamp(
            34px,
            4vw,
            52px
        );

    line-height: 1;

    letter-spacing: -0.035em;
}


.subtitle {
    margin:
        10px
        0
        0;

    color: var(--muted);

    font-size: 15px;
}


.header-status {
    min-width: 165px;

    padding:
        14px
        16px;

    border:
        1px solid
        var(--border);

    border-radius: 12px;

    background:
        rgba(8, 17, 23, 0.84);

    text-align: right;
}


.status-label {
    margin-bottom: 4px;

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.18em;
}


.photo-count {
    color: var(--cyan);

    font-size: 16px;

    font-weight: 800;

    letter-spacing: 0.08em;
}


/* ==========================================================
   ACTIVE DRAFT
========================================================== */

.active-draft-bar {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 34px;

    padding:
        15px
        18px;

    overflow: hidden;

    border:
        1px solid
        rgba(77, 255, 195, 0.30);

    border-radius: 12px;

    background:
        linear-gradient(
            110deg,
            rgba(77, 255, 195, 0.055),
            rgba(5, 13, 15, 0.93)
        );
}


.active-draft-bar::after {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    width: 90px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(77, 255, 195, 0.11),
            transparent
        );

    animation:
        teslaCharge
        7s
        ease-in-out
        infinite;

    pointer-events: none;
}


.active-draft-label {
    margin-bottom: 3px;

    color: var(--green);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.19em;
}


.active-draft-name {
    font-size: 16px;

    font-weight: 760;
}


.draft-save-indicator {
    color: var(--green);

    font-size: 10px;

    font-weight: 850;

    letter-spacing: 0.14em;
}


.draft-save-indicator.saving {
    color: var(--cyan);

    animation:
        savePulse
        0.9s
        ease-in-out
        infinite;
}


.draft-save-indicator.error {
    color: var(--danger);

    animation: none;
}


/* ==========================================================
   GENERIC LABELS
========================================================== */

.section-label {
    margin-bottom: 10px;

    color: var(--cyan-soft);

    font-size: 10px;

    font-weight: 850;

    letter-spacing: 0.2em;

    text-transform: uppercase;
}


.control-copy {
    color: var(--muted);

    font-size: 14px;
}


/* ==========================================================
   LOAD AREA
========================================================== */

.drop-section {
    margin-bottom: 34px;
}


.load-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(280px, 1fr);

    gap: 18px;
}


/* ==========================================================
   DROP ZONE
========================================================== */

.drop-zone {
    position: relative;

    min-height: 250px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 36px;

    overflow: hidden;

    border:
        1px dashed
        rgba(38, 247, 255, 0.36);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(38, 247, 255, 0.045),
            rgba(3, 10, 14, 0.78)
        );

    text-align: center;

    cursor: var(--bolt-cursor);

    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}


.drop-zone:hover {
    border-color:
        rgba(38, 247, 255, 0.78);

    animation:
        electricPulse
        1.8s
        ease-in-out
        infinite alternate;
}


.drop-zone.drag-over {
    border-color: var(--cyan);

    background:
        rgba(8, 28, 35, 0.94);

    box-shadow:
        var(--shadow-strong);

    transform:
        translateY(-2px)
        scale(1.003);
}


.drop-icon {
    width: 54px;
    height: 54px;

    display: grid;

    place-items: center;

    margin-bottom: 18px;

    border:
        1px solid
        var(--border-strong);

    border-radius: 50%;

    color: var(--cyan);

    font-size: 30px;
}


.drop-title {
    color: var(--text);

    font-size: 19px;

    font-weight: 850;

    letter-spacing: 0.12em;
}


.drop-subtitle {
    max-width: 560px;

    margin-top: 10px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}


/* ==========================================================
   RESUME DRAFT PANEL
========================================================== */

.draft-launch-panel {
    position: relative;

    min-height: 250px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    padding: 28px;

    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(38, 247, 255, 0.035),
            rgba(5, 13, 18, 0.90)
        );

    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}


.draft-launch-panel:hover {
    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow-medium);

    transform:
        translateY(-2px);
}


.draft-launch-icon {
    margin-bottom: 18px;

    color: var(--cyan);

    font-size: 30px;
}


.draft-launch-title {
    margin-bottom: 10px;

    font-size: 17px;

    font-weight: 850;

    letter-spacing: 0.10em;
}


.draft-launch-copy {
    margin-bottom: 23px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.55;
}


.draft-launch-button {
    min-height: 43px;

    padding:
        10px
        16px;

    border:
        1px solid
        var(--cyan);

    border-radius: 8px;

    background:
        rgba(38, 247, 255, 0.06);

    color: var(--cyan);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 0.13em;

    cursor: var(--bolt-cursor);
}


/* ==========================================================
   DRAFT BROWSER
========================================================== */

.draft-browser {
    position: relative;

    margin:
        8px
        0
        42px;

    padding: 22px;

    border:
        1px solid
        var(--border-medium);

    border-radius: 16px;

    background:
        rgba(5, 14, 19, 0.94);

    box-shadow:
        var(--shadow-soft);
}


.draft-browser-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}


.draft-browser-title {
    font-size: 22px;

    font-weight: 780;
}


.draft-close-button {
    width: 36px;
    height: 36px;

    display: grid;

    place-items: center;

    border:
        1px solid
        var(--border);

    border-radius: 50%;

    background:
        rgba(38, 247, 255, 0.02);

    color: var(--muted);

    font-size: 21px;

    cursor: var(--bolt-cursor);
}


.draft-close-button:hover {
    border-color: var(--cyan);

    color: var(--cyan);

    box-shadow:
        var(--shadow-soft);
}


.draft-list {
    display: grid;

    gap: 10px;
}


.draft-empty {
    padding: 28px;

    border:
        1px dashed
        var(--border);

    border-radius: 10px;

    color: var(--muted);

    text-align: center;
}


.draft-card {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding:
        15px
        16px;

    border:
        1px solid
        rgba(38, 247, 255, 0.11);

    border-radius: 10px;

    background:
        rgba(38, 247, 255, 0.018);
}


.draft-card:hover {
    border-color:
        rgba(38, 247, 255, 0.42);

    box-shadow:
        var(--shadow-soft);
}


.draft-card-name {
    margin-bottom: 5px;

    font-size: 15px;

    font-weight: 760;
}


.draft-card-meta {
    color: var(--muted);

    font-size: 10px;
}


.draft-card-actions {
    display: flex;

    gap: 8px;
}


.draft-open-button,
.draft-delete-button {
    min-height: 36px;

    padding:
        8px
        13px;

    border-radius: 7px;

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.11em;

    cursor: var(--bolt-cursor);
}


.draft-open-button {
    border:
        1px solid
        var(--cyan);

    background:
        rgba(38, 247, 255, 0.06);

    color: var(--cyan);
}


.draft-delete-button {
    border:
        1px solid
        rgba(255, 82, 109, 0.25);

    background: transparent;

    color:
        rgba(255, 82, 109, 0.68);
}


/* ==========================================================
   GALLERY CONTROLS
========================================================== */

.gallery-controls {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin:
        40px
        0
        18px;
}


.gallery-action-buttons {
    display: flex;

    gap: 9px;
}


/* ==========================================================
   GALLERY
========================================================== */

.gallery {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(190px, 1fr)
        );

    gap: 15px;
}


/* ==========================================================
   PHOTO CARD
========================================================== */

.photo-card {
    position: relative;

    overflow: hidden;

    border:
        1px solid
        rgba(38, 247, 255, 0.14);

    border-radius: 13px;

    background: var(--panel);

    cursor: var(--bolt-cursor);

    box-shadow:
        0 10px 26px
        rgba(0, 0, 0, 0.26);

    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.12s ease;
}


.photo-card:hover {
    border-color:
        rgba(38, 247, 255, 0.62);

    transform:
        translateY(-2px);

    animation:
        electricPulse
        1.65s
        ease-in-out
        infinite alternate;
}


.photo-card.has-markup {
    border-color:
        rgba(77, 255, 195, 0.40);
}


.photo-card.dragging {
    opacity: 0.32;

    transform:
        scale(0.97);
}


.photo-card.drag-target {
    border-color: var(--cyan);

    box-shadow:
        0 0 0 1px var(--cyan),
        var(--shadow-strong);

    transform:
        scale(1.025);
}


.photo-card img {
    width: 100%;

    aspect-ratio: 4 / 3;

    display: block;

    object-fit: cover;

    background: #061016;

    user-select: none;
}


.photo-number {
    position: absolute;

    top: 9px;
    left: 9px;

    z-index: 5;

    padding:
        5px
        8px;

    border:
        1px solid
        rgba(38, 247, 255, 0.38);

    border-radius: 6px;

    background:
        rgba(0, 7, 10, 0.85);

    color: var(--cyan);

    font-size: 11px;

    font-weight: 850;
}


.remove-photo-button {
    position: absolute;

    top: 9px;
    right: 9px;

    z-index: 6;

    width: 29px;
    height: 29px;

    display: grid;

    place-items: center;

    padding: 0;

    border:
        1px solid
        rgba(255, 82, 109, 0.42);

    border-radius: 50%;

    background:
        rgba(8, 6, 10, 0.80);

    color: white;

    cursor: var(--bolt-cursor);
}


/* ==========================================================
   MARKUP BUTTON ON GALLERY CARD
========================================================== */

.markup-photo-button {
    position: absolute;

    left: 50%;
    bottom: 41px;

    z-index: 8;

    min-width: 108px;

    padding:
        8px
        11px;

    transform:
        translateX(-50%)
        translateY(7px);

    border:
        1px solid
        rgba(38, 247, 255, 0.64);

    border-radius: 7px;

    background:
        rgba(2, 11, 15, 0.88);

    color: var(--cyan);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.11em;

    opacity: 0;

    cursor: var(--bolt-cursor);

    backdrop-filter:
        blur(8px);

    transition:
        opacity 0.14s ease,
        transform 0.14s ease,
        box-shadow 0.14s ease;
}


.photo-card:hover
.markup-photo-button,
.photo-card.has-markup
.markup-photo-button {
    opacity: 1;

    transform:
        translateX(-50%)
        translateY(0);
}


.markup-photo-button:hover {
    box-shadow:
        0 0 24px
        rgba(38, 247, 255, 0.30);

    background:
        rgba(8, 36, 43, 0.94);
}


.photo-card.has-markup
.markup-photo-button {
    color: var(--green);

    border-color:
        rgba(77, 255, 195, 0.62);
}


.photo-filename {
    padding:
        10px
        11px
        11px;

    border-top:
        1px solid
        rgba(38, 247, 255, 0.07);

    color: var(--muted);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 10px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ==========================================================
   SETTINGS
========================================================== */

.settings-section {
    margin-top: 46px;
}


.advanced-panel {
    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background:
        rgba(7, 15, 20, 0.88);
}


.advanced-panel summary {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        19px
        21px;

    list-style: none;

    cursor: var(--bolt-cursor);
}


.advanced-panel summary::-webkit-details-marker {
    display: none;
}


.advanced-title {
    font-size: 18px;

    font-weight: 760;
}


.advanced-hint {
    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.18em;
}


.advanced-content {
    padding:
        5px
        21px
        24px;

    border-top:
        1px solid
        rgba(38, 247, 255, 0.10);
}


.settings-group {
    padding-top: 24px;
}


.settings-group +
.settings-group {
    margin-top: 26px;

    padding-top: 26px;

    border-top:
        1px solid
        rgba(38, 247, 255, 0.10);
}


.settings-group-title {
    margin-bottom: 18px;

    font-size: 13px;

    font-weight: 800;
}


.settings-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 15px;
}


.metadata-grid {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


.field {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.field-wide {
    grid-column:
        span 2;
}


.field > span {
    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.field small {
    color:
        rgba(113, 147, 154, 0.72);

    font-size: 10px;
}


/* ==========================================================
   INPUTS
========================================================== */

input,
select {
    width: 100%;

    min-height: 43px;

    padding:
        10px
        11px;

    border:
        1px solid
        rgba(38, 247, 255, 0.16);

    border-radius: 8px;

    outline: none;

    background: #071117;

    color: var(--text);
}


input:focus,
select:focus {
    border-color: var(--cyan);

    box-shadow:
        0 0 0 2px
        rgba(38, 247, 255, 0.10);
}


.input-with-unit {
    display: flex;
}


.input-with-unit input {
    border-radius:
        8px
        0
        0
        8px;
}


.input-unit {
    display: grid;

    place-items: center;

    min-width: 54px;

    border:
        1px solid
        rgba(38, 247, 255, 0.16);

    border-left: 0;

    border-radius:
        0
        8px
        8px
        0;

    color: var(--cyan-soft);
}


/* ==========================================================
   PREVIEW
========================================================== */

.filename-preview {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 19px;

    padding:
        14px
        16px;

    border:
        1px solid
        rgba(38, 247, 255, 0.11);

    border-radius: 9px;

    background:
        rgba(38, 247, 255, 0.025);
}


.preview-label {
    color: var(--muted);

    font-size: 10px;

    font-weight: 800;
}


.preview-value {
    color: var(--cyan);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-weight: 800;
}


.settings-note {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}


/* ==========================================================
   BUTTONS
========================================================== */

.secondary-button {
    min-height: 42px;

    padding:
        10px
        15px;

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    background:
        rgba(38, 247, 255, 0.025);

    color: var(--text);

    font-size: 10px;

    font-weight: 850;

    letter-spacing: 0.12em;

    cursor: var(--bolt-cursor);
}


.secondary-button:hover {
    border-color: var(--cyan);

    color: var(--cyan);

    box-shadow:
        var(--shadow-soft);
}


.secondary-button:disabled {
    opacity: 0.35;

    cursor: default;
}


.save-draft-button {
    color: var(--green);

    border-color:
        rgba(77, 255, 195, 0.26);
}


.danger-button:hover {
    border-color: var(--danger);

    color: var(--danger);
}


/* ==========================================================
   FINALIZE
========================================================== */

.finalize-panel {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 28px;

    margin-top: 34px;

    padding:
        24px
        25px;

    border:
        1px solid
        rgba(38, 247, 255, 0.30);

    border-radius: 16px;

    background:
        linear-gradient(
            110deg,
            rgba(38, 247, 255, 0.055),
            rgba(5, 10, 14, 0.92)
        );
}


.finalize-title {
    margin-bottom: 7px;

    font-size: 23px;

    font-weight: 780;
}


.finalize-summary {
    max-width: 760px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.55;
}


.finalize-button {
    min-width: 230px;

    padding:
        14px
        20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 2px;

    border:
        1px solid
        var(--cyan);

    border-radius: 9px;

    background:
        linear-gradient(
            180deg,
            rgba(38, 247, 255, 0.16),
            rgba(38, 247, 255, 0.05)
        );

    color: var(--cyan);

    cursor: var(--bolt-cursor);

    box-shadow:
        var(--shadow-soft);
}


.finalize-button:hover {
    box-shadow:
        var(--shadow-strong);
}


.finalize-button:disabled {
    opacity: 0.45;

    cursor: wait;
}


.button-small {
    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.18em;

    opacity: 0.75;
}


.button-main {
    font-size: 16px;

    font-weight: 900;

    letter-spacing: 0.08em;
}


/* ==========================================================
   EXPORT STATUS
========================================================== */

.status {
    margin-top: 24px;

    border:
        1px solid
        rgba(77, 255, 195, 0.34);

    border-radius: 15px;

    background:
        rgba(5, 12, 13, 0.94);
}


.status-content {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 28px;

    padding:
        22px
        23px;
}


.status-kicker {
    color: var(--green);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.20em;
}


.status-title {
    font-size: 19px;

    font-weight: 780;
}


.status-message,
.folder-path {
    margin-top: 6px;

    color: var(--muted);

    font-size: 12px;
}


.download-button {
    min-height: 64px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding:
        13px
        18px;

    border:
        1px solid
        var(--green);

    border-radius: 9px;

    background:
        rgba(77, 255, 195, 0.08);

    color: var(--green);

    text-decoration: none;

    cursor: var(--bolt-cursor);
}


.download-small {
    font-size: 8px;

    letter-spacing: 0.18em;
}


.download-main {
    font-size: 13px;

    font-weight: 900;
}


/* ==========================================================
   SAVE DRAFT MODAL
========================================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: grid;

    place-items: center;

    padding: 22px;

    background:
        rgba(1, 5, 8, 0.82);

    backdrop-filter:
        blur(12px);
}


.draft-modal {
    width:
        min(
            520px,
            100%
        );

    padding: 27px;

    border:
        1px solid
        var(--border-strong);

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(10, 27, 35, 0.98),
            rgba(3, 9, 13, 0.99)
        );

    box-shadow:
        0 0 52px
        rgba(38, 247, 255, 0.18);
}


.modal-kicker {
    margin-bottom: 8px;

    color: var(--cyan);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.2em;
}


.modal-title {
    margin-bottom: 9px;

    font-size: 25px;

    font-weight: 800;
}


.modal-copy {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}


.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 22px;
}


/* ==========================================================
   MARKUP FULL-SCREEN OVERLAY
========================================================== */

.markup-overlay {
    position: fixed;

    inset: 0;

    z-index: 5000;

    padding: 18px;

    overflow: auto;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(38, 247, 255, 0.09),
            transparent 32%
        ),
        rgba(0, 4, 7, 0.96);

    backdrop-filter:
        blur(14px);
}


.markup-editor {
    position: relative;

    min-height:
        calc(
            100vh - 36px
        );

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border:
        1px solid
        rgba(38, 247, 255, 0.42);

    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(7, 18, 24, 0.99),
            rgba(2, 8, 11, 0.995)
        );

    box-shadow:
        0 0 70px
        rgba(38, 247, 255, 0.16);
}


.markup-editor::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    opacity: 0.12;

    background-image:
        linear-gradient(
            rgba(38, 247, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(38, 247, 255, 0.06) 1px,
            transparent 1px
        );

    background-size:
        30px
        30px;
}


/* ==========================================================
   MARKUP HEADER
========================================================== */

.markup-header {
    position: relative;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding:
        17px
        21px;

    border-bottom:
        1px solid
        rgba(38, 247, 255, 0.18);

    background:
        rgba(4, 14, 19, 0.90);
}


.markup-header::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -1px;

    width: 160px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            var(--cyan),
            transparent
        );

    animation:
        electricFlicker
        1.8s
        linear
        infinite;
}


.markup-kicker {
    margin-bottom: 5px;

    color: var(--cyan);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.20em;
}


.markup-title-row {
    display: flex;

    align-items: baseline;

    gap: 15px;
}


.markup-title {
    font-size: 25px;

    font-weight: 820;
}


.markup-photo-name {
    max-width: 420px;

    overflow: hidden;

    color: var(--muted);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 11px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.markup-close-button {
    width: 40px;
    height: 40px;

    display: grid;

    place-items: center;

    border:
        1px solid
        var(--border-medium);

    border-radius: 50%;

    background:
        rgba(38, 247, 255, 0.03);

    color: var(--muted);

    font-size: 24px;

    cursor: var(--bolt-cursor);
}


.markup-close-button:hover {
    border-color: var(--cyan);

    color: var(--cyan);

    box-shadow:
        var(--shadow-medium);
}


/* ==========================================================
   MARKUP WORKSPACE
========================================================== */

.markup-workspace {
    position: relative;

    z-index: 2;

    flex: 1;

    display: grid;

    grid-template-columns:
        178px
        minmax(0, 1fr)
        250px;

    min-height: 0;
}


/* ==========================================================
   MARKUP SIDE PANELS
========================================================== */

.markup-tools,
.markup-inspector {
    position: relative;

    z-index: 5;

    padding: 18px;

    background:
        rgba(3, 11, 15, 0.90);
}


.markup-tools {
    border-right:
        1px solid
        rgba(38, 247, 255, 0.14);
}


.markup-inspector {
    border-left:
        1px solid
        rgba(38, 247, 255, 0.14);
}


.markup-tools::after,
.markup-inspector::after {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    width: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(38, 247, 255, 0.70),
            transparent
        );

    animation:
        electricFlicker
        3.5s
        linear
        infinite;
}


.markup-tools::after {
    right: -1px;
}


.markup-inspector::after {
    left: -1px;
}


.markup-panel-label {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.18em;
}


/* ==========================================================
   MARKUP TOOL BUTTONS
========================================================== */

.markup-tool-button,
.markup-action-button {
    width: 100%;

    min-height: 43px;

    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 8px;

    padding:
        9px
        11px;

    border:
        1px solid
        rgba(38, 247, 255, 0.17);

    border-radius: 8px;

    background:
        rgba(38, 247, 255, 0.025);

    color: var(--text);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.07em;

    cursor: var(--bolt-cursor);
}


.markup-tool-button:hover,
.markup-action-button:hover {
    border-color:
        rgba(38, 247, 255, 0.70);

    color: var(--cyan);

    background:
        rgba(38, 247, 255, 0.08);

    box-shadow:
        0 0 20px
        rgba(38, 247, 255, 0.14);
}


.markup-tool-button.active {
    border-color: var(--cyan);

    color: var(--cyan);

    background:
        rgba(38, 247, 255, 0.13);

    box-shadow:
        0 0 26px
        rgba(38, 247, 255, 0.24);
}


.markup-tool-icon {
    min-width: 22px;

    color: var(--cyan);

    font-size: 16px;

    text-align: center;
}


.markup-tool-divider {
    height: 1px;

    margin:
        18px
        0;

    background:
        linear-gradient(
            90deg,
            rgba(38, 247, 255, 0.35),
            transparent
        );
}


.markup-action-button {
    justify-content: center;
}


.markup-action-button.danger:hover {
    border-color: var(--danger);

    color: var(--danger);

    background:
        rgba(255, 82, 109, 0.07);

    box-shadow: none;
}


.markup-action-button:disabled {
    opacity: 0.28;

    cursor: default;
}


/* ==========================================================
   MARKUP STAGE WRAPPER
========================================================== */

.markup-stage-wrap {
    position: relative;

    min-width: 0;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 24px;

    overflow: auto;

    background:
        radial-gradient(
            circle at center,
            rgba(38, 247, 255, 0.035),
            transparent 62%
        ),
        #02070a;
}


/* ==========================================================
   MARKUP STAGE
========================================================== */

.markup-stage {
    position: relative;

    display: inline-block;

    max-width: 100%;

    line-height: 0;

    overflow: hidden;

    border:
        1px solid
        rgba(38, 247, 255, 0.30);

    border-radius: 8px;

    background: #000;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.65),
        0 0 24px
        rgba(38, 247, 255, 0.08);

    user-select: none;
}


.markup-stage::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    height: 90px;

    top: -90px;

    pointer-events: none;

    opacity: 0.16;

    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(38, 247, 255, 0.13),
            transparent
        );

    animation:
        stageScan
        9s
        linear
        infinite;
}


.markup-stage.drawing-lines {
    cursor: crosshair;

    border-color:
        rgba(38, 247, 255, 0.75);

    box-shadow:
        0 0 34px
        rgba(38, 247, 255, 0.21);
}


/* ==========================================================
   BASE IMAGE
========================================================== */

.markup-base-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;

    max-height:
        calc(
            100vh - 235px
        );

    object-fit: contain;

    user-select: none;

    pointer-events: none;
}


/* ==========================================================
   OVERLAY LAYER
========================================================== */

.markup-overlay-layer {
    position: absolute;

    inset: 0;

    z-index: 4;

    pointer-events: none;
}


/* ==========================================================
   PIN / FIRE OBJECTS
========================================================== */

.markup-object {
    position: absolute;

    z-index: 10;

    height: auto;

    max-width: none;

    transform-origin: center center;

    pointer-events: auto;

    cursor:
        grab;

    touch-action: none;

    user-select: none;

    filter:
        drop-shadow(
            0 2px 4px
            rgba(0, 0, 0, 0.65)
        );
}


.markup-object:hover {
    filter:
        drop-shadow(
            0 0 8px
            rgba(38, 247, 255, 0.70)
        );

    cursor:
        grab;
}


.markup-object:active {
    cursor:
        grabbing;
}


.markup-object.selected {
    outline:
        1px dashed
        rgba(38, 247, 255, 0.85);

    outline-offset: 5px;

    animation:
        selectedCharge
        1.15s
        ease-in-out
        infinite alternate;
}


/* ==========================================================
   PROPERTY LINE SVG
========================================================== */

.property-lines-svg {
    position: absolute;

    inset: 0;

    z-index: 20;

    width: 100%;
    height: 100%;

    overflow: visible;

    pointer-events: none;
}


.property-line-path {
    pointer-events:
        stroke;

    cursor:
        var(--bolt-cursor);

    filter:
        drop-shadow(
            0 0 3px
            rgba(0, 0, 0, 0.75)
        );
}


.property-line-path.selected {
    filter:
        drop-shadow(
            0 0 6px
            rgba(38, 247, 255, 0.90)
        );
}


.property-line-point {
    pointer-events:
        all;

    cursor:
        grab;

    filter:
        drop-shadow(
            0 0 4px
            rgba(38, 247, 255, 0.65)
        );
}


.property-line-point:active {
    cursor:
        grabbing;
}


.property-line-point.selected {
    filter:
        drop-shadow(
            0 0 8px
            rgba(38, 247, 255, 1)
        );
}


/* ==========================================================
   MARKUP HELP
========================================================== */

.markup-stage-help {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap:
        8px
        22px;

    color:
        rgba(113, 147, 154, 0.78);

    font-size: 10px;

    letter-spacing: 0.04em;
}


/* ==========================================================
   INSPECTOR
========================================================== */

.markup-inspector-section {
    position: relative;
}


.markup-empty-title {
    margin:
        18px
        0
        7px;

    font-size: 17px;

    font-weight: 760;
}


.markup-empty-copy {
    margin: 0;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.55;
}


.selected-overlay-type {
    margin:
        10px
        0
        20px;

    color: var(--cyan);

    font-size: 21px;

    font-weight: 900;

    letter-spacing: 0.12em;

    text-shadow:
        0 0 16px
        rgba(38, 247, 255, 0.32);
}


/* ==========================================================
   MARKUP RANGE CONTROLS
========================================================== */

.markup-range-field {
    display: block;

    margin-bottom: 19px;
}


.markup-range-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.11em;
}


.markup-range-value {
    color: var(--cyan);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
}


.markup-range-field
input[type="range"] {
    min-height: 18px;

    height: 18px;

    padding: 0;

    border: 0;

    background: transparent;

    accent-color: var(--cyan);

    cursor: var(--bolt-cursor);
}


/* ==========================================================
   MARKUP DELETE
========================================================== */

.markup-delete-button {
    width: 100%;

    min-height: 40px;

    margin-top: 7px;

    border:
        1px solid
        rgba(255, 82, 109, 0.35);

    border-radius: 8px;

    background:
        rgba(255, 82, 109, 0.04);

    color:
        rgba(255, 82, 109, 0.80);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.11em;

    cursor: var(--bolt-cursor);
}


.markup-delete-button:hover {
    border-color: var(--danger);

    color: var(--danger);

    background:
        rgba(255, 82, 109, 0.10);
}


/* ==========================================================
   PROPERTY LINE INSPECTOR
========================================================== */

.property-line-status {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin:
        9px
        0
        20px;

    padding:
        10px
        11px;

    border:
        1px solid
        rgba(38, 247, 255, 0.15);

    border-radius: 7px;

    background:
        rgba(38, 247, 255, 0.025);

    color: var(--cyan);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.10em;
}


.markup-color-field {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 20px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.11em;
}


.markup-color-field
input[type="color"] {
    width: 52px;
    height: 34px;

    min-height: 34px;

    padding: 3px;

    border:
        1px solid
        rgba(38, 247, 255, 0.24);

    border-radius: 7px;

    cursor: var(--bolt-cursor);
}


.property-line-actions {
    display: grid;

    gap: 8px;

    margin-top: 18px;
}


/* ==========================================================
   MARKUP FOOTER
========================================================== */

.markup-footer {
    position: relative;

    z-index: 6;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        14px
        18px;

    border-top:
        1px solid
        rgba(38, 247, 255, 0.16);

    background:
        rgba(4, 13, 17, 0.96);
}


.markup-footer-note {
    color: var(--muted);

    font-size: 10px;

    line-height: 1.45;
}


.markup-footer-actions {
    display: flex;

    align-items: center;

    gap: 9px;
}


.markup-done-button {
    min-width: 185px;
}


/* ==========================================================
   HIDDEN
========================================================== */

.hidden {
    display: none !important;
}


/* ==========================================================
   SCROLLBAR
========================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}


::-webkit-scrollbar-track {
    background: #04080b;
}


::-webkit-scrollbar-thumb {
    border:
        2px solid
        #04080b;

    border-radius: 10px;

    background: #163b43;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-dark);
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1150px) {

    .markup-workspace {
        grid-template-columns:
            145px
            minmax(0, 1fr)
            220px;
    }


    .markup-tools,
    .markup-inspector {
        padding: 14px;
    }
}


@media (max-width: 1000px) {

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


    .settings-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .status-content {
        align-items: stretch;

        flex-direction: column;
    }


    .markup-overlay {
        padding: 0;
    }


    .markup-editor {
        min-height: 100vh;

        border: 0;

        border-radius: 0;
    }


    .markup-workspace {
        grid-template-columns:
            130px
            minmax(0, 1fr);
    }


    .markup-inspector {
        grid-column:
            1 / -1;

        border-left: 0;

        border-top:
            1px solid
            rgba(38, 247, 255, 0.14);
    }


    .markup-inspector::after {
        display: none;
    }


    .markup-base-image {
        max-height: 56vh;
    }
}


@media (max-width: 760px) {

    .app {
        padding:
            28px
            18px
            80px;
    }


    .top-header,
    .active-draft-bar,
    .gallery-controls,
    .finalize-panel,
    .markup-footer {
        align-items: stretch;

        flex-direction: column;
    }


    .header-status {
        width: 100%;

        text-align: left;
    }


    .gallery {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .settings-grid,
    .metadata-grid {
        grid-template-columns:
            1fr;
    }


    .field-wide {
        grid-column:
            span 1;
    }


    .finalize-button,
    .download-button {
        width: 100%;
    }


    .draft-card {
        align-items: flex-start;

        flex-direction: column;
    }


    .markup-header {
        align-items: flex-start;
    }


    .markup-title-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 4px;
    }


    .markup-workspace {
        display: flex;

        flex-direction: column;
    }


    .markup-tools {
        display: grid;

        grid-template-columns:
            repeat(
                3,
                1fr
            );

        gap: 7px;

        border-right: 0;

        border-bottom:
            1px solid
            rgba(38, 247, 255, 0.14);
    }


    .markup-tools
    .markup-panel-label,
    .markup-tool-divider {
        display: none;
    }


    .markup-tool-button,
    .markup-action-button {
        margin: 0;
    }


    .markup-stage-wrap {
        padding: 12px;
    }


    .markup-base-image {
        max-height: 52vh;
    }


    .markup-inspector {
        border-top:
            1px solid
            rgba(38, 247, 255, 0.14);
    }


    .markup-footer-actions {
        width: 100%;
    }


    .markup-footer-actions
    button {
        flex: 1;
    }
}


@media (max-width: 480px) {

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


    .drop-zone {
        min-height: 220px;

        padding:
            28px
            20px;
    }


    .markup-tools {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }


    .markup-stage-help {
        align-items: flex-start;

        flex-direction: column;
    }
}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration:
            0.001ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;
    }
}/* ==========================================================
   FINAL ORDER — MASK / BLEND TOOL
========================================================== */


/* ----------------------------------------------------------
   MASK CANVAS
---------------------------------------------------------- */

.markup-mask-canvas {
    position: absolute;

    inset: 0;

    z-index: 30;

    width: 100%;
    height: 100%;

    pointer-events: none;

    touch-action: none;
}


/* ----------------------------------------------------------
   ACTIVE MASKING STAGE
---------------------------------------------------------- */

.markup-stage.masking {
    cursor: none;

    border-color:
        rgba(38, 247, 255, 0.82);

    box-shadow:
        0 0 0 1px
        rgba(38, 247, 255, 0.18),

        0 0 34px
        rgba(38, 247, 255, 0.20),

        0 20px 60px
        rgba(0, 0, 0, 0.70);
}


/* ----------------------------------------------------------
   BRUSH CURSOR
---------------------------------------------------------- */

.mask-brush-cursor {
    position: absolute;

    z-index: 45;

    width: 50px;
    height: 50px;

    border:
        1.5px solid
        rgba(255, 255, 255, 0.95);

    border-radius: 50%;

    pointer-events: none;

    box-shadow:
        0 0 0 1px
        rgba(0, 0, 0, 0.65),

        0 0 8px
        rgba(38, 247, 255, 0.70),

        inset 0 0 8px
        rgba(38, 247, 255, 0.08);

    transform:
        translate(-50%, -50%);

    transition:
        width 0.08s ease,
        height 0.08s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}


/* tiny center point for precision */

.mask-brush-cursor::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    width: 3px;
    height: 3px;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    background: white;

    box-shadow:
        0 0 5px
        rgba(38, 247, 255, 0.95);
}


/* ----------------------------------------------------------
   MASK CONTROL PANEL
---------------------------------------------------------- */

.mask-controls {
    margin-top: 4px;
}


.mask-description {
    margin:
        -3px
        0
        16px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.55;
}


/* ----------------------------------------------------------
   ERASE / RESTORE TOGGLE BUTTONS
---------------------------------------------------------- */

.mask-mode-buttons {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;

    margin-bottom: 20px;
}


.mask-mode-button {
    min-height: 40px;

    border:
        1px solid
        rgba(38, 247, 255, 0.18);

    border-radius: 8px;

    background:
        rgba(38, 247, 255, 0.025);

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.12em;

    cursor: var(--bolt-cursor);

    transition:
        color 0.12s ease,
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.12s ease;
}


.mask-mode-button:hover {
    color: var(--cyan);

    border-color:
        rgba(38, 247, 255, 0.65);

    background:
        rgba(38, 247, 255, 0.07);
}


/* ----------------------------------------------------------
   ACTIVE TOGGLE
---------------------------------------------------------- */

.mask-mode-button.active {
    color: #001014;

    border-color: var(--cyan);

    background: var(--cyan);

    box-shadow:
        0 0 10px
        rgba(38, 247, 255, 0.45),

        0 0 28px
        rgba(38, 247, 255, 0.24);

    transform:
        translateY(-1px);
}


/* ----------------------------------------------------------
   MASK STROKE COUNTER
---------------------------------------------------------- */

.mask-status {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin:
        18px
        0
        10px;

    padding:
        9px
        10px;

    border:
        1px solid
        rgba(38, 247, 255, 0.12);

    border-radius: 7px;

    background:
        rgba(38, 247, 255, 0.018);

    color: var(--muted);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.10em;
}


#mask-stroke-count {
    color: var(--cyan);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 11px;
}


/* ----------------------------------------------------------
   MASK HELP MESSAGE
---------------------------------------------------------- */

#mask-stage-help {
    color: var(--cyan);

    text-shadow:
        0 0 10px
        rgba(38, 247, 255, 0.25);
}


/* ----------------------------------------------------------
   SHORTCUT NOTE
---------------------------------------------------------- */

.markup-shortcuts {
    display: inline-block;

    margin-left: 12px;

    color:
        rgba(38, 247, 255, 0.72);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 9px;
}
/* ==========================================================
   FINAL ORDER — UNIFIED OBJECT STACK
========================================================== */

.markup-overlay-layer {
    z-index: auto;
}


/* the original single property-line SVG is now only a
   compatibility shell; actual line objects are rendered
   individually in the unified object layer */

#property-lines-svg {
    pointer-events: none;
}
/* ==========================================================
   FINAL ORDER — FULL SCREEN PHOTO PREVIEW
========================================================== */


/* ----------------------------------------------------------
   PREVIEW OVERLAY
---------------------------------------------------------- */

.photo-preview-overlay {
    position: fixed;

    inset: 0;

    z-index: 4500;

    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(38, 247, 255, 0.045),
            transparent 42%
        ),
        rgba(0, 4, 7, 0.975);

    backdrop-filter:
        blur(14px);
}


body.photo-preview-open {
    overflow: hidden;
}


/* ----------------------------------------------------------
   VIEWER SHELL
---------------------------------------------------------- */

.photo-preview-shell {
    position: relative;

    width: 100vw;
    height: 100vh;

    display: grid;

    grid-template-rows:
        72px
        minmax(0, 1fr)
        48px;

    overflow: hidden;
}


/* ----------------------------------------------------------
   HEADER
---------------------------------------------------------- */

.photo-preview-header {
    position: relative;

    z-index: 20;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding:
        13px
        22px;

    border-bottom:
        1px solid
        rgba(38, 247, 255, 0.16);

    background:
        linear-gradient(
            180deg,
            rgba(5, 16, 21, 0.97),
            rgba(3, 10, 14, 0.90)
        );
}


.photo-preview-header::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -1px;

    width: 220px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            var(--cyan),
            transparent
        );

    box-shadow:
        0 0 12px
        rgba(38, 247, 255, 0.40);
}


/* ----------------------------------------------------------
   PHOTO INFO
---------------------------------------------------------- */

.photo-preview-info {
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 18px;
}


.photo-preview-position {
    flex: 0 0 auto;

    padding:
        7px
        10px;

    border:
        1px solid
        rgba(38, 247, 255, 0.35);

    border-radius: 7px;

    background:
        rgba(38, 247, 255, 0.045);

    color: var(--cyan);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 0.08em;

    box-shadow:
        inset 0 0 10px
        rgba(38, 247, 255, 0.03);
}


.photo-preview-filename {
    min-width: 0;

    max-width:
        min(
            60vw,
            700px
        );

    overflow: hidden;

    color:
        rgba(236, 253, 255, 0.78);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 11px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* ----------------------------------------------------------
   HEADER ACTIONS
---------------------------------------------------------- */

.photo-preview-actions {
    display: flex;

    align-items: center;

    gap: 9px;
}


/* ----------------------------------------------------------
   DOWNLOAD CURRENT PHOTO
---------------------------------------------------------- */

.photo-preview-download {
    min-height: 41px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        9px
        14px;

    border:
        1px solid
        rgba(77, 255, 195, 0.42);

    border-radius: 8px;

    background:
        rgba(77, 255, 195, 0.045);

    color: var(--green);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.11em;

    cursor: var(--bolt-cursor);

    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.12s ease;
}


.photo-preview-download:hover {
    border-color: var(--green);

    background:
        rgba(77, 255, 195, 0.10);

    box-shadow:
        0 0 26px
        rgba(77, 255, 195, 0.20);

    transform:
        translateY(-1px);
}


.photo-preview-download:disabled {
    opacity: 0.38;

    cursor: wait;

    transform: none;

    box-shadow: none;
}


.photo-preview-download-icon {
    font-size: 17px;

    line-height: 1;
}


/* ----------------------------------------------------------
   CLOSE
---------------------------------------------------------- */

.photo-preview-close {
    width: 41px;
    height: 41px;

    display: grid;

    place-items: center;

    padding: 0;

    border:
        1px solid
        rgba(38, 247, 255, 0.25);

    border-radius: 50%;

    background:
        rgba(38, 247, 255, 0.025);

    color:
        rgba(236, 253, 255, 0.68);

    font-size: 25px;

    line-height: 1;

    cursor: var(--bolt-cursor);

    transition:
        color 0.12s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}


.photo-preview-close:hover {
    border-color: var(--cyan);

    color: var(--cyan);

    box-shadow:
        0 0 24px
        rgba(38, 247, 255, 0.22);
}


/* ----------------------------------------------------------
   IMAGE AREA
---------------------------------------------------------- */

.photo-preview-stage-wrap {
    position: relative;

    min-width: 0;
    min-height: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding:
        22px
        90px;

    overflow: hidden;
}


/* ----------------------------------------------------------
   ACTUAL IMAGE STAGE

   Important:
   This stage shrink-wraps the visible photo so markup
   coordinates line up exactly with the image itself.
---------------------------------------------------------- */

.photo-preview-stage {
    position: relative;

    display: inline-block;

    width: fit-content;
    height: fit-content;

    max-width: 100%;
    max-height: 100%;

    overflow: hidden;

    line-height: 0;

    border:
        1px solid
        rgba(38, 247, 255, 0.18);

    border-radius: 7px;

    background: #000;

    box-shadow:
        0 28px 80px
        rgba(0, 0, 0, 0.72),

        0 0 28px
        rgba(38, 247, 255, 0.06);
}


.photo-preview-stage::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 10000;

    pointer-events: none;

    border:
        1px solid
        rgba(255, 255, 255, 0.025);

    border-radius: inherit;
}


/* ----------------------------------------------------------
   BASE PHOTO
---------------------------------------------------------- */

.photo-preview-base-image {
    display: block;

    width: auto;
    height: auto;

    max-width:
        calc(
            100vw - 200px
        );

    max-height:
        calc(
            100vh - 165px
        );

    object-fit: contain;

    user-select: none;

    pointer-events: none;
}


/* ----------------------------------------------------------
   MARKUP LAYER
---------------------------------------------------------- */

.photo-preview-markup-layer {
    position: absolute;

    inset: 0;

    z-index: 5;

    overflow: hidden;

    pointer-events: none;
}


/* ----------------------------------------------------------
   LOADING INDICATOR
---------------------------------------------------------- */

.photo-preview-loading {
    position: absolute;

    left: 50%;
    top: 50%;

    z-index: 20000;

    transform:
        translate(-50%, -50%);

    padding:
        10px
        14px;

    border:
        1px solid
        rgba(38, 247, 255, 0.36);

    border-radius: 7px;

    background:
        rgba(2, 10, 14, 0.90);

    color: var(--cyan);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.17em;

    box-shadow:
        0 0 24px
        rgba(38, 247, 255, 0.16);

    animation:
        savePulse
        1s
        ease-in-out
        infinite;
}


/* ----------------------------------------------------------
   PREVIOUS / NEXT
---------------------------------------------------------- */

.photo-preview-nav {
    position: absolute;

    top: 50%;

    z-index: 40;

    width: 54px;
    height: 76px;

    display: grid;

    place-items: center;

    transform:
        translateY(-50%);

    border:
        1px solid
        rgba(38, 247, 255, 0.16);

    border-radius: 11px;

    background:
        rgba(3, 12, 16, 0.67);

    color:
        rgba(236, 253, 255, 0.60);

    font-size: 43px;

    font-weight: 200;

    line-height: 1;

    backdrop-filter:
        blur(10px);

    cursor: var(--bolt-cursor);

    transition:
        color 0.12s ease,
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.12s ease;
}


.photo-preview-nav:hover {
    color: var(--cyan);

    border-color:
        rgba(38, 247, 255, 0.64);

    background:
        rgba(7, 29, 35, 0.84);

    box-shadow:
        0 0 28px
        rgba(38, 247, 255, 0.18);
}


.photo-preview-nav:disabled {
    opacity: 0.14;

    cursor: default;

    box-shadow: none;
}


.photo-preview-prev {
    left: 20px;
}


.photo-preview-next {
    right: 20px;
}


/* ----------------------------------------------------------
   FOOTER
---------------------------------------------------------- */

.photo-preview-footer {
    position: relative;

    z-index: 20;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 28px;

    padding:
        0
        20px;

    border-top:
        1px solid
        rgba(38, 247, 255, 0.10);

    background:
        rgba(3, 10, 14, 0.86);

    color:
        rgba(113, 147, 154, 0.72);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;

    font-size: 9px;

    letter-spacing: 0.05em;
}


/* ==========================================================
   GALLERY CARD — INDIVIDUAL PHOTO DOWNLOAD
========================================================== */

.photo-card-download-button {
    position: absolute;

    top: 9px;
    left: 58px;

    z-index: 12;

    width: 29px;
    height: 29px;

    display: grid;

    place-items: center;

    padding: 0;

    border:
        1px solid
        rgba(77, 255, 195, 0.38);

    border-radius: 50%;

    background:
        rgba(1, 10, 12, 0.82);

    color: var(--green);

    font-size: 15px;

    font-weight: 900;

    line-height: 1;

    opacity: 0;

    transform:
        translateY(-3px);

    cursor: var(--bolt-cursor);

    backdrop-filter:
        blur(7px);

    transition:
        opacity 0.14s ease,
        transform 0.14s ease,
        border-color 0.14s ease,
        box-shadow 0.14s ease,
        background 0.14s ease;
}


.photo-card:hover
.photo-card-download-button,
.photo-card.has-markup
.photo-card-download-button {
    opacity: 1;

    transform:
        translateY(0);
}


.photo-card-download-button:hover {
    border-color: var(--green);

    background:
        rgba(21, 63, 52, 0.88);

    box-shadow:
        0 0 20px
        rgba(77, 255, 195, 0.24);
}


.photo-card-download-button:disabled {
    opacity: 0.30;

    cursor: wait;
}


/* ----------------------------------------------------------
   PHOTO ITSELF IS NOW CLEARLY CLICKABLE
---------------------------------------------------------- */

.photo-preview-frame {
    cursor: zoom-in;
}


.photo-preview-frame::after {
    content: "CLICK TO PREVIEW";

    position: absolute;

    left: 50%;
    top: 50%;

    z-index: 9;

    transform:
        translate(-50%, -45%);

    padding:
        7px
        10px;

    border:
        1px solid
        rgba(38, 247, 255, 0.30);

    border-radius: 6px;

    background:
        rgba(1, 8, 12, 0.78);

    color: var(--cyan);

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 0.13em;

    white-space: nowrap;

    opacity: 0;

    pointer-events: none;

    backdrop-filter:
        blur(8px);

    transition:
        opacity 0.14s ease,
        transform 0.14s ease;
}


.photo-card:hover
.photo-preview-frame::after {
    opacity: 1;

    transform:
        translate(-50%, -50%);
}


/* ==========================================================
   PREVIEW RESPONSIVE
========================================================== */

@media (max-width: 900px) {

    .photo-preview-shell {
        grid-template-rows:
            auto
            minmax(0, 1fr)
            42px;
    }


    .photo-preview-header {
        padding:
            11px
            14px;
    }


    .photo-preview-stage-wrap {
        padding:
            14px
            58px;
    }


    .photo-preview-base-image {
        max-width:
            calc(
                100vw - 125px
            );

        max-height:
            calc(
                100vh - 150px
            );
    }


    .photo-preview-nav {
        width: 42px;
        height: 64px;
    }


    .photo-preview-prev {
        left: 8px;
    }


    .photo-preview-next {
        right: 8px;
    }
}


@media (max-width: 650px) {

    .photo-preview-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }


    .photo-preview-actions {
        width: 100%;
    }


    .photo-preview-download {
        flex: 1;

        justify-content: center;
    }


    .photo-preview-info {
        width: 100%;
    }


    .photo-preview-filename {
        max-width:
            calc(
                100vw - 105px
            );
    }


    .photo-preview-stage-wrap {
        padding:
            8px
            46px;
    }


    .photo-preview-base-image {
        max-width:
            calc(
                100vw - 100px
            );

        max-height:
            calc(
                100vh - 190px
            );
    }


    .photo-preview-footer {
        gap: 12px;

        font-size: 8px;
    }


    .photo-preview-footer span:last-child {
        display: none;
    }
}