:root {
    --brand: lch(71% 29% 258deg);
    --brand-light: lch(85% 20% 258deg);
    --brand-fallback: #6a7aff;
    --surface: #ffffff;
    --surface-soft: #f5f7ff;
    --surface-strong: #eef3ff;
    --text: #243047;
    --muted: #5f6980;
    --border: #d8def4;
    --shadow: 0 24px 50px rgba(62, 92, 170, 0.12);
    font-size: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(137, 164, 255, 0.35), transparent 28%),
        radial-gradient(circle at top right, rgba(196, 214, 255, 0.75), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7ff 42%, #fbfcff 100%);
}

a, a:hover, a:visited {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(216, 222, 244, 0.7);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.hero__glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0.55;
}

.hero__glow--left {
    top: -180px;
    left: -120px;
    background: rgba(118, 145, 255, 0.28);
}

.hero__glow--right {
    right: -100px;
    bottom: -170px;
    background: rgba(175, 195, 255, 0.34);
}

.hero__inner {
    position: relative;
    padding: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand__logo {
    width: 104px;
    height: auto;
}

.brand__eyebrow {
    color: var(--muted);
    font-size: 0.9rem;
}

.brand h1 {
    margin: 0;
    color: var(--brand);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.hero__lead {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero__kicker {
    margin: 22px 0 0;
    color: var(--brand);
    font-size: 0.96rem;
    font-weight: 700;
}

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

.card {
    border: 1px solid rgba(216, 222, 244, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.panel {
    padding: 24px;
}

.section-title {
    margin: 0;
    font-size: 1.35rem;
}

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

.workflow {
    overflow: hidden;
}

.format-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
    padding: 0;
    border: none;
    min-width: 0;
}

.format-selector__legend {
    padding: 0;
    margin-right: 4px;
    color: var(--text);
    font-weight: 700;
}

.format-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    cursor: pointer;
}

.format-option input {
    margin: 0;
    accent-color: var(--brand);
}

.format-option span {
    color: var(--brand);
    font-weight: 700;
    text-transform: lowercase;
}

.dropzone {
    margin-top: 20px;
    border: 3px dashed #aecaef;
    border-radius: 28px;
    padding: 46px 24px;
    background:
        linear-gradient(180deg, rgba(245, 248, 255, 0.96), rgba(238, 244, 255, 0.98)),
        var(--surface-soft);
    text-align: center;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.dropzone.is-dragover {
    border-color: var(--brand);
    background:
        linear-gradient(180deg, rgba(231, 239, 255, 0.98), rgba(224, 234, 255, 0.98)),
        var(--surface-strong);
    transform: translateY(-1px);
}

.dropzone__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 26px;
    border: none;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(91, 115, 216, 0.22);
}

.dropzone__eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(106, 122, 255, 0.1);
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.dropzone__title {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.dropzone__copy {
    max-width: 580px;
    margin: 0 auto 16px;
    color: var(--muted);
    line-height: 1.6;
}

.dropzone__hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.status-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.status-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.status-item strong,
.status-item span {
    display: block;
}

.status-item strong {
    font-size: 0.98rem;
}

.status-item span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.status-item--active {
    border-color: var(--brand);
    background: rgba(106, 122, 255, 0.08);
}

.status-item--done {
    border-color: #a8dcbb;
    background: rgba(227, 250, 236, 0.9);
}

.status-item--error {
    border-color: #f0b9b9;
    background: rgba(255, 241, 241, 0.95);
}

.summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 24px;
    background: #f7f9ff;
    border: 1px solid var(--border);
}

.summary__label {
    color: var(--muted);
    font-size: 0.9rem;
}

.summary__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
}

.status-panel__head {
    margin-bottom: 12px;
}

.status-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 20;
    width: min(720px, calc(100% - 24px));
    transform: translateX(-50%);
    padding: 16px 18px;
    border: 1px solid rgba(106, 122, 255, 0.2);
    border-radius: 20px;
    background: rgba(36, 48, 71, 0.94);
    color: #fff;
    box-shadow: 0 24px 50px rgba(23, 31, 49, 0.28);
    backdrop-filter: blur(16px);
}

.status-toast strong,
.status-toast span {
    display: block;
}

.status-toast strong {
    font-size: 0.96rem;
}

.status-toast span {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.5;
}

.status-toast--error {
    border-color: rgba(255, 100, 100, 0.4);
    background: rgba(80, 20, 20, 0.96);
}

.status-toast--error strong {
    color: #ffb3b3;
}

.progress-bar {
    margin-top: 12px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    transition: width 0.4s ease;
}

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

    .hero__inner,
    .panel {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    :root {
        font-size: 16px;
    }

    .page-shell {
        width: min(100% - 20px, 1080px);
        padding-top: 12px;
    }

    .brand {
        gap: 10px;
    }

    .brand__logo {
        width: 84px;
    }

    .format-selector {
        align-items: flex-start;
        gap: 12px;
    }

    .dropzone {
        padding: 30px 18px;
    }

    .status-toast {
        top: 10px;
        border-radius: 16px;
    }
}
