@font-face {
    font-family: "Geologica";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Geologica-Variable.ttf") format("truetype");
}

:root {
    color-scheme: light;
    --bg: #f6f8fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #dbe4ef;
    --line-strong: #c7d3e1;
    --primary: #2764ff;
    --primary-hover: #1b4ed8;
    --teal: #0e9f8f;
    --danger: #b42318;
    --warning: #a15c07;
    --ok: #137333;
    --shadow: 0 18px 45px rgba(23, 32, 51, .09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    margin: 0;
    overflow-x: hidden;
    background: #f7f9fc;
    color: var(--text);
    font-family: "Geologica", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

body::before {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(39, 100, 255, .12) 0%, rgba(39, 100, 255, 0) 38%),
        linear-gradient(225deg, rgba(14, 159, 143, .12) 0%, rgba(14, 159, 143, 0) 42%),
        linear-gradient(20deg, rgba(245, 158, 11, .1) 0%, rgba(245, 158, 11, 0) 35%),
        repeating-linear-gradient(90deg, rgba(23, 32, 51, .035) 0 1px, transparent 1px 96px),
        repeating-linear-gradient(0deg, rgba(23, 32, 51, .03) 0 1px, transparent 1px 96px),
        linear-gradient(180deg, #fbfdff 0%, #f3f8fb 42%, #fffaf4 100%);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(199, 211, 225, .72);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 34px rgba(23, 32, 51, .06);
    backdrop-filter: blur(18px) saturate(1.16);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--text);
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-name {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    padding: 6px 4px 7px;
    background:
        linear-gradient(
            92deg,
            #ff2f7d 0%,
            #ff8a00 12%,
            #ffe45c 24%,
            #18d66b 38%,
            #00c2ff 52%,
            #2764ff 66%,
            #9b5cff 80%,
            #ff2f7d 100%
        );
    background-size: 520% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 34px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    filter: drop-shadow(0 8px 20px rgba(37, 99, 235, .28));
    animation:
        brand-shimmer 3.4s linear infinite,
        brand-pulse 5.8s ease-in-out infinite;
}

.brand-name::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -8px -12px;
    border-radius: 999px;
    background:
        conic-gradient(
            from 0deg,
            rgba(255, 47, 125, .46),
            rgba(255, 138, 0, .34),
            rgba(24, 214, 107, .36),
            rgba(0, 194, 255, .42),
            rgba(155, 92, 255, .44),
            rgba(255, 47, 125, .46)
        );
    filter: blur(14px);
    opacity: .62;
    animation: brand-aurora 6.5s linear infinite;
}

.brand-name::after {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff2f7d, #ff8a00, #18d66b, #00c2ff, #9b5cff, #ff2f7d);
    background-size: 300% 100%;
    box-shadow: 0 0 18px rgba(0, 194, 255, .45);
    animation: brand-underline 2.6s linear infinite;
}

@keyframes brand-shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@keyframes brand-pulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 8px 20px rgba(37, 99, 235, .28)) saturate(1.1);
    }

    50% {
        transform: translateY(-1px) scale(1.025);
        filter: drop-shadow(0 12px 28px rgba(255, 47, 125, .28)) saturate(1.35);
    }
}

@keyframes brand-aurora {
    0% {
        transform: rotate(0deg) scale(.96);
    }

    100% {
        transform: rotate(360deg) scale(.96);
    }
}

@keyframes brand-underline {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-name,
    .brand-name::before,
    .brand-name::after {
        animation: none;
    }

    .sample-card::after,
    .compare::before,
    .compare::after,
    .compare-half.before::after,
    .compare-half:not(.before) img {
        animation: none;
    }
}

.trial-page,
.result-page {
    min-height: calc(100vh - 76px);
    padding: 72px 20px;
    background:
        radial-gradient(circle at top left, rgba(65, 126, 255, .12), transparent 32rem),
        linear-gradient(135deg, #f7faff 0%, #fffaf4 100%);
}

.trial-card,
.result-card {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 55px rgba(30, 64, 175, .12);
}

.trial-card h1,
.result-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
}

.trial-card p,
.result-card p {
    color: var(--muted);
    line-height: 1.65;
}

.trial-preview,
.result-media {
    display: grid;
    place-items: center;
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #eef3fb;
}

.trial-preview img,
.result-media img,
.result-media video {
    display: block;
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
}

.trial-download-cta,
.result-download {
    width: 100%;
    margin-top: 4px;
}

.trial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.trial-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #eff5ff;
    color: #315b9e;
    font-size: 13px;
    font-weight: 700;
}

.trial-processing {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 26px 0;
    padding: 20px;
    border-radius: 18px;
    background: #f5f8ff;
}

.trial-processing h2 {
    margin: 0 0 4px;
}

.trial-spinner {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 4px solid #d8e4ff;
    border-top-color: #2d68f6;
    border-radius: 50%;
    animation: trial-spin .9s linear infinite;
}

.result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

@keyframes trial-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .trial-page,
    .result-page {
        padding: 32px 12px;
    }

    .trial-card,
    .result-card {
        padding: 20px;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trial-spinner {
        animation: none;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.nav a:not(.button) {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 7px 12px;
    color: #405168;
    font-weight: 650;
    transition:
        color .2s ease,
        background-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
    will-change: transform;
}

.nav a:not(.button):hover {
    background: rgba(255, 255, 255, .86);
    color: #172033;
    box-shadow: 0 10px 24px rgba(39, 100, 255, .12);
    text-decoration: none;
    transform: translateY(-1px) scale(1.08);
}

.nav form {
    margin: 0;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 64px;
    flex: 1;
}

.home-page {
    width: 100%;
    padding-top: 0;
}

.home-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 30px;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(118deg, transparent 0 24%, rgba(255, 255, 255, .72) 24% 44%, transparent 44% 100%),
        linear-gradient(72deg, rgba(20, 184, 166, .1), transparent 38%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .48) 0 1px, transparent 1px 18px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 18px;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
    padding: 5px 12px;
    background: #eef5ff;
    color: #2453bf;
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    width: min(850px, 100%);
    margin: 0 auto 14px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero p {
    width: min(700px, 100%);
    margin: 0 auto;
    color: #526174;
    font-size: 18px;
}

.upload-stage {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}

.upload-box {
    display: grid;
    place-items: center;
    min-height: 236px;
    border: 2px dashed #b8cae1;
    border-radius: 8px;
    background: #f8fbff;
    padding: 28px;
    text-align: center;
}

.upload-box form {
    width: 100%;
}

.upload-box h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.upload-box p {
    margin: 0 0 18px;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.mode-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: left;
}

.mode-picker.compact {
    width: min(660px, 100%);
    margin: 18px auto;
}

.mode-option {
    display: grid;
    position: relative;
    grid-template-columns: auto 1fr;
    gap: 9px;
    align-items: center;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.mode-option:hover {
    border-color: #adc1f4;
    box-shadow: 0 12px 26px rgba(39, 100, 255, .1);
    transform: translateY(-2px);
}

.mode-option:has(input:checked) {
    border-color: #6f95ff;
    background: #f1f6ff;
    box-shadow: 0 0 0 3px rgba(39, 100, 255, .1);
}

.mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-option:focus-within {
    outline: 3px solid rgba(39, 100, 255, .16);
    border-color: var(--primary);
}

.mode-option-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
}

.mode-option-icon .tool-icon {
    width: 18px;
    height: 18px;
}

.mode-option:has(input:checked) .mode-option-icon {
    background: #dce9ff;
    color: #3267bd;
}

.mode-option strong,
.mode-option small {
    display: block;
}

.mode-option strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
}

.mode-option small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.mode-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0;
}

.mode-preview span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    background: #fff;
    color: #405168;
    font-size: 12px;
    font-weight: 800;
}

.processing-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 2px;
    text-align: left;
}

.processing-options.compact {
    width: min(660px, 100%);
    margin: 0 auto 18px;
}

.processing-options .full {
    grid-column: 1 / -1;
}

.options-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 11px;
}

.options-heading > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 999px;
    background: #e6efff;
    color: #3267bd;
    font-size: 11px;
    font-weight: 900;
}

.options-heading strong,
.options-heading small {
    display: block;
}

.options-heading strong {
    color: var(--text);
    font-size: 14px;
}

.options-heading small {
    color: var(--muted);
    font-size: 12px;
}

.setting-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.setting-group legend {
    margin-bottom: 7px;
    color: #263447;
    font-size: 13px;
    font-weight: 760;
}

.choice-grid {
    display: grid;
    gap: 7px;
}

.ratio-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.orientation-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}

.animation-preset-group[hidden] {
    display: none;
}

.setting-hint {
    margin: -2px 0 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

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

.animation-preset-option {
    justify-content: flex-start;
    min-height: 68px;
    text-align: left;
}

.animation-preset-option strong,
.animation-preset-option small {
    display: block;
}

.animation-preset-option small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.choice-option,
.toggle-option {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 9px;
    background: #fff;
    color: #405168;
    font-size: 12px;
    font-weight: 760;
    cursor: pointer;
}

.choice-option {
    justify-content: center;
    text-align: center;
}

.toggle-option {
    gap: 10px;
    grid-column: 1 / -1;
    min-height: 62px;
}

.toggle-option.disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.choice-option:has(input:checked),
.toggle-option:has(input:checked) {
    border-color: #6f95ff;
    background: #f1f6ff;
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(39, 100, 255, .1);
}

.choice-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-option:focus-within {
    outline: 3px solid rgba(39, 100, 255, .16);
    border-color: var(--primary);
}

.toggle-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color .2s ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .18);
    transition: transform .2s ease;
}

.toggle-option:has(input:checked) .toggle-switch {
    background: var(--primary);
}

.toggle-option:has(input:checked) .toggle-switch::after {
    transform: translateX(16px);
}

.toggle-option strong,
.toggle-option small {
    display: block;
}

.toggle-option small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.sample-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.sample-card {
    position: relative;
    overflow: hidden;
    height: 92px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.sample-card:hover {
    border-color: #adc1f4;
    box-shadow: 0 14px 28px rgba(23, 32, 51, .12);
    transform: translateY(-3px) scale(1.03);
}

.sample-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 35%, rgba(255,255,255,.6) 48%, rgba(20,184,166,.2) 53%, transparent 66%);
    transform: translateX(-120%);
    animation: card-glow 5.5s ease-in-out infinite;
    pointer-events: none;
}

.sample-card:nth-child(2)::after {
    animation-delay: .7s;
}

.sample-card:nth-child(3)::after {
    animation-delay: 1.4s;
}

.sample-card:nth-child(4)::after {
    animation-delay: 2.1s;
}

.sample-card:nth-child(5)::after {
    animation-delay: 2.8s;
}

.sample-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.sample-card:hover img {
    transform: scale(1.15);
}

.site-hover-image,
.task-hover-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .24s ease;
}

.sample-card:hover .site-hover-image,
.feature-card:hover .task-hover-image {
    opacity: 1;
}

.task-hover-image {
    z-index: 4;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .24s ease, transform .35s ease;
}

.sample-card:nth-child(1) img,
.sample-card:nth-child(3) img {
    filter: grayscale(1) sepia(.35) contrast(.92);
}

.sample-card:nth-child(2) img,
.sample-card:nth-child(5) img {
    filter: saturate(1.08) contrast(1.03);
}

@keyframes card-glow {
    0%,
    35% {
        transform: translateX(-120%);
        opacity: 0;
    }

    52% {
        opacity: 1;
    }

    72%,
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

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

.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, .9);
    text-align: left;
}

.stat strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.stat span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.section {
    position: relative;
    padding: 64px 0;
}

.section-head {
    width: min(760px, 100%);
    margin-bottom: 26px;
}

.section-head.center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 38px;
    line-height: 1.12;
}

h2 {
    font-size: 34px;
    line-height: 1.14;
}

h3 {
    font-size: 19px;
    line-height: 1.25;
}

p {
    margin: 0;
    color: var(--muted);
}

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

.feature-card,
.auth-card,
.panel,
.pricing-card,
.faq-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(23, 32, 51, .06);
}

.feature-card {
    overflow: hidden;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.feature-card:hover {
    border-color: #adc1f4;
    box-shadow: 0 18px 42px rgba(23, 32, 51, .1);
    transform: translateY(-4px);
}

.compare {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 270px;
}

.compare::before {
    content: "";
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: calc(50% - 1px);
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,.95), rgba(20,184,166,.9), transparent);
    box-shadow: 0 0 18px rgba(20, 184, 166, .8);
    animation: processing-line 4.8s ease-in-out infinite;
}

.compare::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 40%, rgba(255,255,255,.34) 48%, rgba(37,99,235,.22) 55%, transparent 66%);
    transform: translateX(-110%);
    animation: scan-glow 5.6s ease-in-out infinite;
    pointer-events: none;
}

.compare-half {
    position: relative;
    overflow: hidden;
}

.compare-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.feature-card:hover .compare-half img,
.feature-card:hover .task-hover-image {
    transform: scale(1.12);
}

.compare-half:not(.before) img {
    filter: saturate(1.12) contrast(1.04) brightness(1.04);
    animation: restored-breathe 6s ease-in-out infinite;
}

.compare-half.before img {
    filter: grayscale(1) sepia(.42) contrast(.82) brightness(.9);
}

.compare-half.before::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, transparent 0 34%, rgba(255,255,255,.5) 35%, transparent 37%),
        linear-gradient(15deg, transparent 0 61%, rgba(68, 47, 35, .35) 62%, transparent 64%);
    mix-blend-mode: screen;
    animation: old-photo-shimmer 7s ease-in-out infinite;
}

@keyframes processing-line {
    0%,
    100% {
        opacity: .5;
        transform: translateX(-5px);
    }

    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

@keyframes scan-glow {
    0%,
    35% {
        transform: translateX(-110%);
        opacity: 0;
    }

    55% {
        opacity: .85;
    }

    76%,
    100% {
        transform: translateX(110%);
        opacity: 0;
    }
}

@keyframes old-photo-shimmer {
    0%,
    100% {
        opacity: .72;
    }

    50% {
        opacity: .95;
    }
}

@keyframes restored-breathe {
    0%,
    100% {
        filter: saturate(1.08) contrast(1.02) brightness(1.02);
    }

    50% {
        filter: saturate(1.18) contrast(1.08) brightness(1.06);
    }
}

.compare-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(17, 24, 39, .78);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.feature-body {
    padding: 20px;
}

.feature-body h3 {
    margin-bottom: 8px;
}

.useful-section {
    border-top: 1px solid rgba(219, 228, 239, .8);
    border-bottom: 1px solid rgba(219, 228, 239, .8);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .58)),
        repeating-linear-gradient(90deg, rgba(39, 100, 255, .05) 0 1px, transparent 1px 74px),
        linear-gradient(120deg, rgba(20, 184, 166, .1), rgba(245, 158, 11, .08));
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tip-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border: 1px solid rgba(207, 217, 230, .95);
    border-radius: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 14px 34px rgba(23, 32, 51, .07);
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.tip-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(39, 100, 255, .1), transparent 45%, rgba(14, 159, 143, .08));
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.tip-card:hover {
    border-color: #9db7ff;
    box-shadow: 0 20px 44px rgba(23, 32, 51, .11);
    transform: translateY(-5px);
}

.tip-card:hover::before {
    opacity: 1;
}

.tip-number {
    display: block;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #2764ff, #0e9f8f, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 13px;
    font-weight: 950;
}

.tip-card h3 {
    position: relative;
    margin-bottom: 10px;
    font-size: 18px;
}

.tip-card p {
    position: relative;
    font-size: 14px;
}

.pricing-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 360px));
    justify-content: center;
    gap: 18px;
}

.pricing-card {
    padding: 24px;
}

.pricing-card.featured {
    border-color: #9db7ff;
    box-shadow: 0 18px 46px rgba(39, 100, 255, .13);
}

.price {
    margin: 18px 0 16px;
    font-size: 38px;
    font-weight: 850;
}

.price small {
    color: var(--muted);
    font-size: 15px;
    font-weight: 650;
}

.bullets {
    display: grid;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    color: #405168;
}

.bullets li::before {
    content: "✓";
    margin-right: 9px;
    color: var(--teal);
    font-weight: 900;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    padding: 20px;
}

.faq-item h3 {
    margin-bottom: 6px;
}

.auth-page {
    min-height: calc(100vh - 145px);
    display: grid;
    place-items: center;
    padding: 34px 0;
}

.auth-card {
    width: min(456px, 100%);
    padding: 30px;
}

.auth-card h1 {
    margin-bottom: 8px;
    font-size: 32px;
}

.panel {
    padding: 24px;
}

.form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 7px;
}

label {
    color: #263447;
    font-size: 14px;
    font-weight: 720;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="file"],
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

.verification-code-input {
    text-align: center;
    letter-spacing: 9px;
    font-size: 28px;
    font-weight: 850;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(39, 100, 255, .16);
    border-color: var(--primary);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    padding: 10px 17px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 12px 24px rgba(39, 100, 255, .18);
    transition:
        background-color .2s ease,
        box-shadow .2s ease,
        color .2s ease,
        transform .2s ease;
    will-change: transform;
}

.button:hover {
    background: var(--primary-hover);
    box-shadow: 0 16px 32px rgba(39, 100, 255, .24);
    text-decoration: none;
    transform: translateY(-1px) scale(1.05);
}

.button.secondary {
    background: #eef3f7;
    color: var(--text);
    box-shadow: 0 10px 22px rgba(23, 32, 51, .08);
}

.button.secondary:hover {
    background: #e2e8f0;
    box-shadow: 0 14px 28px rgba(23, 32, 51, .12);
}

.button.compact {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 14px;
}

.error {
    color: var(--danger);
    font-size: 13px;
}

.error-summary {
    display: grid;
    gap: 6px;
    border: 1px solid #f1b8b3;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 650;
    text-align: left;
}

.notice {
    border: 1px solid #bfe3d8;
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #edf9f5;
    color: #0d594f;
}

.resend-form {
    margin-top: 18px;
    text-align: center;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.link-button:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-footer {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.photos-page-head {
    align-items: center;
}

.library-counter {
    display: grid;
    min-width: 96px;
    place-items: center;
    border: 1px solid rgba(199, 211, 225, .78);
    border-radius: 16px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 12px 30px rgba(23, 32, 51, .06);
    backdrop-filter: blur(12px);
}

.library-counter strong {
    color: var(--primary);
    font-size: 24px;
    line-height: 1;
}

.library-counter span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.library-head span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.library-head h2 {
    margin: 5px 0 4px;
    font-size: 25px;
}

.photos-library {
    min-width: 0;
}

.library-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 14px;
}

.library-head p {
    max-width: 310px;
    font-size: 13px;
    text-align: right;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.photo-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(23, 32, 51, .07);
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.photo-card:hover {
    border-color: #adc1f4;
    box-shadow: 0 20px 42px rgba(23, 32, 51, .12);
    transform: translateY(-3px);
}

.photo-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #edf2f7;
}

.photo-card-media img,
.photo-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.photo-card:hover .photo-card-media img {
    transform: scale(1.04);
}

.photo-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .06), transparent 52%, rgba(15, 23, 42, .3));
    pointer-events: none;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef3f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.photo-card-media .status {
    position: absolute;
    z-index: 2;
    top: 11px;
    right: 11px;
    border: 1px solid rgba(255, 255, 255, .58);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.status.done {
    background: #e6f4ea;
    color: var(--ok);
}

.status.failed {
    background: #fce8e6;
    color: var(--danger);
}

.status.processing {
    background: #fff4df;
    color: var(--warning);
}

.status.pending {
    background: #eef3ff;
    color: #345ca8;
}

.photo-media-label {
    position: absolute;
    z-index: 2;
    bottom: 11px;
    left: 11px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(15, 23, 42, .62);
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.photo-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.photo-card-title,
.photo-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.photo-card-title strong {
    color: var(--text);
    font-size: 16px;
}

.photo-card-title span,
.photo-card-footer > span {
    color: var(--muted);
    font-size: 11px;
}

.photo-mode {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #405168;
    font-size: 13px;
    font-weight: 800;
}

.photo-mode .tool-icon {
    width: 17px;
    height: 17px;
    color: #5074b8;
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.photo-tags span {
    border-radius: 999px;
    padding: 4px 7px;
    background: #f1f5f9;
    color: #526174;
    font-size: 10px;
    font-weight: 760;
}

.photo-card-error {
    overflow-wrap: anywhere;
    border-radius: 8px;
    padding: 8px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.4;
}

.photo-card-footer {
    min-height: 30px;
    border-top: 1px solid #edf1f5;
    padding-top: 10px;
}

.photo-result-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    padding: 6px 9px;
    background: #e6efff;
    color: #285aa7;
    font-size: 11px;
    font-weight: 850;
}

.photo-result-link:hover {
    background: #d7e6ff;
    text-decoration: none;
}

.meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.empty {
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    padding: 28px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.tools-section {
    padding: 38px 0 12px;
}

.upload-tools-section {
    margin: 26px 0 18px;
    text-align: left;
}

.upload-tools-section .tools-heading {
    margin-bottom: 14px;
}

.upload-tools-section .tools-heading h2 {
    font-size: clamp(24px, 3vw, 32px);
}

.upload-tools-section .tools-group-hint {
    width: auto;
}

.home-custom-ratio {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.home-custom-ratio label {
    color: #263447;
    font-size: 13px;
    font-weight: 760;
}

.tools-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
}

.tools-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.tools-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -.035em;
}

.tools-heading p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    text-align: right;
}

.tools-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 44px rgba(46, 63, 86, .08);
}

.home-tools-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #b9d0ff;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 18px;
    background: #f4f8ff;
    box-shadow: 0 18px 44px rgba(46, 63, 86, .06);
}

.home-tools-file-input {
    display: none;
}

.home-tools-upload-button {
    min-height: 54px;
    border-radius: 12px;
    padding-inline: 28px;
    background: #175cff;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 16px 30px rgba(23, 92, 255, .28);
}

.home-tools-upload-button:hover {
    background: #0d4ee5;
    text-decoration: none;
    transform: translateY(-1px);
}

.home-tools-upload-hint {
    max-width: 430px;
    color: #526174;
    font-size: 13px;
    line-height: 1.45;
}

.home-tools-errors {
    flex-basis: 100%;
    display: grid;
    gap: 6px;
    border: 1px solid #f1b8b3;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 650;
}

.tools-group {
    min-width: 0;
    padding: 20px 16px 16px;
}

.tools-group + .tools-group {
    border-left: 1px solid var(--line);
}

.tools-group h3 {
    min-height: 42px;
    margin: 0 10px 12px;
    color: #243246;
    font-size: 15px;
    line-height: 1.4;
}

.tools-list {
    display: grid;
    gap: 4px;
}

.tool-link {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: #36445a;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.tool-link:hover,
.tool-link.active {
    background: #e6efff;
    color: #173d78;
    text-decoration: none;
    transform: translateY(-1px);
}

.tool-link.active {
    box-shadow: inset 3px 0 0 #5b8def;
}

.tool-link.disabled,
.tool-link.disabled:hover {
    background: transparent;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .72;
    pointer-events: none;
    transform: none;
}

.tools-group-hint {
    margin: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.tool-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #64748b;
    transition: color .18s ease;
}

.tool-link:hover .tool-icon,
.tool-link.active .tool-icon {
    color: #3267bd;
}

.tool-badge {
    margin-left: auto;
    border-radius: 4px;
    padding: 2px 5px;
    color: #fff;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .06em;
    line-height: 1.2;
}

.tool-badge.hot {
    background: #f04438;
}

.tool-badge.new {
    background: #6d45f6;
}

@media (max-width: 920px) {
    .nav {
        gap: 10px;
        overflow-x: auto;
    }

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

    .home-tools-upload {
        border-top: 1px solid #b9d0ff;
        border-radius: 12px;
    }

    .tools-group:nth-child(3) {
        border-left: 0;
    }

    .tools-group:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .stats,
    .feature-grid,
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 0;
    }

    .brand-name {
        font-size: 30px;
    }

    .hero {
        padding-top: 44px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
    }

    .tools-section {
        padding-top: 28px;
    }

    .tools-heading {
        display: grid;
        gap: 8px;
    }

    .tools-heading p {
        text-align: left;
    }

    .tools-toolbar {
        grid-template-columns: 1fr;
    }

    .home-tools-upload {
        display: grid;
        justify-items: stretch;
    }

    .home-tools-upload-button {
        width: 100%;
    }

    .tools-group + .tools-group,
    .tools-group:nth-child(3) {
        border-left: 0;
    }

    .tools-group:nth-child(n + 2) {
        border-top: 1px solid var(--line);
    }

    .tools-group h3 {
        min-height: 0;
    }

    .sample-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats,
    .feature-grid,
    .tips-grid,
    .mode-picker {
        grid-template-columns: 1fr;
    }

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

    .library-head {
        display: grid;
        gap: 4px;
    }

    .library-head p {
        text-align: left;
    }

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

    .animation-preset-picker {
        grid-template-columns: 1fr;
    }

    .compare {
        min-height: 220px;
    }

    .page-head {
        display: grid;
    }

    .library-counter {
        width: fit-content;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-name,
    .brand-name::before,
    .brand-name::after,
    .sample-card::after,
    .compare::before,
    .compare::after,
    .compare-half.before::after,
    .compare-half:not(.before) img {
        animation: none;
    }

    .sample-card img {
        transition: none;
    }

    .compare-half img,
    .task-hover-image {
        transition: none;
    }

    .sample-card:hover img,
    .feature-card:hover .compare-half img,
    .feature-card:hover .task-hover-image {
        transform: none;
    }
}
