:root {
    color-scheme: dark;
    --bg: #0b0f19;
    --sidebar: #0b0f19;
    --card: #111622;
    --card-2: #0f131d;
    --border: #1f2937;
    --border-strong: #374151;
    --text: #f8fafc;
    --muted: #9ca3af;
    --faint: #6b7280;
    --accent: #8b5cf6;
    --accent-2: #3b82f6;
    --teal: #2dd4bf;
    --danger: #fb7185;
    --warning: #f59e0b;
    --success: #2dd4bf;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
    --radius: 16px;
    --ease: 180ms ease;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f7fb;
    --sidebar: #ffffff;
    --card: #ffffff;
    --card-2: #f1f5f9;
    --border: #dbe3ec;
    --border-strong: #b9c5d3;
    --text: #111827;
    --muted: #4b5563;
    --faint: #6b7280;
    --shadow: 0 22px 70px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    height: 100vh;
    min-height: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
    padding: 22px 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 8px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #9333ea, #2563eb);
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
}

.profile-card {
    position: relative;
    display: grid;
    justify-items: center;
    margin: 24px 6px 18px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 22px;
    text-align: center;
}

.avatar {
    position: relative;
    display: inline-grid;
    min-width: 0;
    min-height: 0;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: linear-gradient(135deg, #334155, #111827);
    color: white;
    font-weight: 800;
    isolation: isolate;
}

.avatar-large {
    width: 66px;
    height: 66px;
}

.avatar-profile-button {
    overflow: hidden;
    border: 0;
    padding: 0;
    cursor: pointer;
    clip-path: circle(50% at 50% 50%);
    contain: layout paint;
}

.avatar img,
.mini-avatar img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
}

.avatar-button {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.profile-settings {
    position: absolute;
    top: 0;
    right: 54px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
}

.profile-settings svg {
    width: 15px;
    height: 15px;
}

.profile-card h2 {
    margin: 12px 0 4px;
    font-size: 15px;
    line-height: 1.4;
}

.profile-card h2 span {
    display: inline-block;
    margin-left: 5px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
    padding: 2px 7px;
    font-size: 10px;
    text-transform: uppercase;
}

.profile-card h2 .profile-name {
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0;
    font-size: inherit;
    text-transform: none;
}

.profile-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.nav-list,
.project-list {
    display: grid;
    gap: 4px;
}

.nav-item,
.project-list button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    text-decoration: none;
    padding: 0 12px;
}

.nav-item svg,
.project-list svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.nav-item span {
    flex: 1;
}

.nav-item small {
    color: var(--faint);
    font-size: 11px;
}

.nav-item.is-active {
    border-left: 2px solid var(--accent);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), transparent);
    color: var(--text);
}

.nav-item:hover,
.project-list button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.new-badge {
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 5px;
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd !important;
    padding: 1px 6px;
    font-weight: 800;
}

.sidebar-label {
    margin: 22px 12px 8px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-card,
.usage-card {
    border: 1px solid rgba(139, 92, 246, 0.24);
    border-radius: 14px;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 42%), var(--card);
    margin-top: 18px;
    padding: 14px;
}

.premium-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c4b5fd;
    font-size: 14px;
}

.premium-title svg {
    width: 18px;
    height: 18px;
}

.premium-card ul {
    margin: 12px 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.premium-card button,
.usage-card button,
.choose-button,
.start-button,
.download-button,
.mvp-button {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #7c3aed, #2563eb);
    color: white;
    cursor: pointer;
    font-weight: 800;
}

.premium-card button,
.usage-card button {
    width: 100%;
    min-height: 36px;
    font-size: 12px;
}

.usage-card {
    border-color: var(--border);
    background: var(--card);
}

.usage-card div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
}

.usage-card span {
    color: var(--muted);
}

.meter {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #1f2937;
    margin: 10px 0;
}

.meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    transition: width var(--ease);
}

.storage-meter span {
    background: linear-gradient(90deg, #2dd4bf, #60a5fa);
}

.workspace {
    min-width: 0;
    overflow-y: auto;
    background:
        radial-gradient(circle at 72% 0%, rgba(37, 99, 235, 0.1), transparent 28%),
        radial-gradient(circle at 40% 18%, rgba(139, 92, 246, 0.08), transparent 24%),
        var(--bg);
    padding: 30px 32px 44px;
}

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

.topbar h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.08;
    font-weight: 850;
}

.topbar h1 span {
    background: linear-gradient(90deg, #c084fc, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topbar p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-compress-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(251, 191, 36, 0.68);
    border-radius: 8px;
    background: rgba(161, 98, 7, 0.12);
    color: #f6c95d;
    cursor: pointer;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.quick-compress-button:hover,
.quick-compress-button:focus-visible {
    border-color: #fbbf24;
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
}

.quick-compress-button svg {
    width: 17px;
    height: 17px;
}

.quick-downloads-card {
    padding: 16px;
}

.quick-downloads-heading,
.quick-download-job-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quick-downloads-heading h2,
.quick-downloads-heading p {
    margin: 0;
}

.quick-downloads-heading h2 {
    font-size: 15px;
}

.quick-downloads-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.quick-downloads-heading .icon-button {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 7px;
}

.quick-downloads-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.quick-download-job {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.quick-download-job-summary {
    padding: 10px 11px;
}

.quick-download-job-summary > span,
.quick-download-files a > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.quick-download-job-summary strong {
    font-size: 12px;
}

.quick-download-job-summary em,
.quick-download-files em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
}

.quick-download-zip,
.quick-download-files a {
    color: var(--text);
    text-decoration: none;
}

.quick-download-zip {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(251, 191, 36, 0.48);
    border-radius: 7px;
    color: #f6c95d;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 800;
}

.quick-download-zip svg,
.quick-download-files svg {
    width: 14px;
    height: 14px;
}

.quick-download-files {
    display: grid;
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.quick-download-files a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 11px;
    font-size: 11px;
}

.quick-download-files a + a {
    border-top: 1px solid var(--border);
}

.quick-download-files a:hover,
.quick-download-files a:focus-visible {
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.quick-download-files a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mvp-button {
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 0 13px;
    font-size: 12px;
}

.round-button,
.tool-button,
.ghost-button,
.icon-button {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: pointer;
}

.round-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.dashboard-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(340px, 0.88fr) minmax(520px, 1.52fr);
    gap: 22px;
    align-items: start;
}

.left-column,
.right-column {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.right-column {
    position: sticky;
    top: 22px;
    align-self: start;
}

.right-column.is-sticky-parked {
    position: absolute;
    right: 0;
    top: var(--right-column-stop, 0);
    width: var(--right-column-width, auto);
    z-index: 2;
}

.card {
    position: relative;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 94%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    padding: 22px;
}

.card h2,
.card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.25;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.card h3 svg {
    color: #c084fc;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.step-badge {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #6d28d9;
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 0 8px;
}

.drop-zone {
    display: grid;
    min-height: 230px;
    place-items: center;
    gap: 10px;
    border: 2px dashed var(--border-strong);
    border-radius: 14px;
    background: var(--card-2);
    cursor: pointer;
    padding: 26px;
    text-align: center;
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.drop-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.drop-zone:hover,
.drop-zone.is-dragging {
    border-color: rgba(139, 92, 246, 0.75);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-1px);
}

.drop-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.16);
    color: #c084fc;
}

.drop-icon svg {
    width: 32px;
    height: 32px;
}

.drop-zone strong {
    font-size: 16px;
}

.drop-zone em,
.selected-file span,
.sample-toggle,
.range-control em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.choose-button {
    display: inline-grid;
    min-width: 180px;
    min-height: 42px;
    place-items: center;
    margin-top: 2px;
    font-size: 14px;
}

.selected-file {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
}

.selected-file img {
    width: 54px;
    height: 54px;
    border-radius: 9px;
    object-fit: cover;
    background: #020617;
}

.selected-file strong,
.selected-file span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.sample-row {
    margin-top: 16px;
}

.sample-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0 0 10px;
}

.sample-toggle svg {
    width: 15px;
    height: 15px;
}

.samples {
    display: flex;
    gap: 10px;
    overflow: hidden;
}

.sample-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: border-color var(--ease), transform var(--ease);
}

.sample-thumb:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.preset-picker {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.preset-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.preset-picker-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.preset-picker-header small {
    color: var(--faint);
    font-size: 12px;
    font-weight: 500;
}

.portrait {
    background-image: url("../images/samples/portrait.jpg");
}

.landscape {
    background-image: url("../images/samples/landscape.jpg");
}

.product {
    background-image: url("../images/samples/product.jpg");
}

.old-photo {
    background-image: url("../images/samples/old-photo.jpg");
}

.card-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.toggle-list {
    display: grid;
    gap: 14px;
}

.toggle-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.control-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.control-icon svg {
    width: 18px;
    height: 18px;
}

.toggle-row strong,
.toggle-row em,
.range-control strong,
.range-control em {
    display: block;
}

.toggle-row strong {
    font-size: 14px;
}

.toggle-row em {
    margin-top: 2px;
    color: var(--faint);
    font-size: 12px;
    font-style: normal;
}

.switch-input {
    appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #374151;
    cursor: pointer;
    transition: background var(--ease);
}

.switch-input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform var(--ease);
}

.switch-input:checked {
    background: var(--accent);
}

.switch-input:checked::after {
    transform: translateX(20px);
}

.more-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 16px;
    border: 0;
    border-top: 1px solid var(--border-strong);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 14px 0 0;
    font-size: 13px;
}

.more-options.is-open svg {
    transform: rotate(180deg);
}

.advanced-editor {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.advanced-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 4px;
}

.advanced-tabs button {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.advanced-tabs button.is-selected {
    background: var(--card-strong, var(--card-2));
    color: var(--text);
}

.advanced-panel {
    display: grid;
    gap: 14px;
}

.advanced-intro {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

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

.compact-range {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.compact-range > span {
    display: flex;
    min-height: 26px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.compact-range strong {
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
}

.compact-range output {
    display: inline-grid;
    min-width: 38px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(139, 92, 246, 0.34);
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.compact-range input {
    appearance: none;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    cursor: pointer;
}

.compact-range input::-webkit-slider-thumb {
    appearance: none;
    width: 17px;
    height: 17px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 2px var(--accent);
}

.compact-range input::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 2px var(--accent);
}

.guided-actions {
    display: grid;
    gap: 8px;
}

.guided-actions button {
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    cursor: pointer;
    padding: 12px;
    text-align: left;
}

.guided-actions button:hover {
    border-color: rgba(139, 92, 246, 0.6);
}

.guided-actions span {
    color: var(--muted);
    font-size: 12px;
}

.range-control {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.curve-control {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.curve-control strong,
.curve-control em {
    display: block;
}

.curve-control em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.curve-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.curve-button {
    min-height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.curve-button.is-selected {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.18);
    color: var(--text);
}

.range-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: center;
}

.range-line input {
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    cursor: pointer;
}

.range-line input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 2px var(--accent);
}

.range-line output {
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #1f2937;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 30px;
    text-align: center;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header h2 {
    margin: 0;
}

.ghost-button {
    grid-auto-flow: column;
    gap: 7px;
    min-height: 34px;
    border-radius: 9px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 750;
}

.ghost-button svg {
    width: 16px;
    height: 16px;
}

.preview-card {
    min-height: 520px;
}

.preview-stage {
    --position: 50%;
    --zoom: 1;
    position: relative;
    display: grid;
    min-height: 410px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #111827;
    border-radius: 14px;
    background: #020617;
    touch-action: none;
}

.preview-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
    padding: 28px;
}

.preview-empty span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.18) 50%, rgba(139, 92, 246, 0.18) 50%);
}

.preview-empty svg {
    width: 34px;
    height: 34px;
}

.preview-empty strong {
    color: var(--text);
    font-size: 18px;
}

.preview-empty em {
    max-width: 320px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

.preview-image,
.original-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.preview-image {
    object-fit: contain;
    transform: scale(var(--zoom));
    transition: filter 260ms ease, transform var(--ease);
}

.enhanced-image {
    filter: var(--enhanced-filter, none);
}

.original-layer {
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
}

.original-image {
    filter: blur(0.8px) contrast(0.85) saturate(0.72);
}

.preview-label {
    position: absolute;
    top: 14px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: white;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.original-label {
    left: 14px;
}

.enhanced-label {
    right: 14px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.8), rgba(37, 99, 235, 0.8));
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position);
    z-index: 4;
    width: 2px;
    background: white;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.5);
    transform: translateX(-50%);
    pointer-events: none;
}

.comparison-handle span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: white;
    color: #111827;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow);
}

.comparison-range {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: ew-resize;
    opacity: 0;
}

.preview-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 10px;
    background: #1f2937;
    padding: 4px;
}

.tool-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.tool-button:hover,
.ghost-button:hover,
.round-button:hover,
.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.zoom-controls span {
    min-width: 54px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    font-size: 13px;
    text-decoration: none;
}

.download-button.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
    pointer-events: none;
}

.process-list {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.process-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.process-list li span {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
}

.process-list li.is-active {
    color: var(--text);
    font-weight: 800;
}

.process-list li.is-active span {
    border-color: var(--accent);
    border-top-color: transparent;
    animation: spin 900ms linear infinite;
}

.process-list li.is-complete span {
    border-color: rgba(45, 212, 191, 0.4);
    background: rgba(45, 212, 191, 0.16);
}

.process-list li.is-complete span::before {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid #5eead4;
    border-bottom: 2px solid #5eead4;
    transform: rotate(-45deg) translate(1px, -1px);
}

.trust-strip,
.start-button {
    grid-column: 1 / -1;
}

.preset-picker small {
    color: var(--faint);
    font-size: 13px;
    font-weight: 500;
}

.carousel-buttons {
    display: flex;
    gap: 8px;
}

.preset-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}

.preset-carousel.compact {
    gap: 10px;
    margin-right: -2px;
    padding-bottom: 2px;
}

.preset-carousel::-webkit-scrollbar,
.workspace::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.preset-carousel::-webkit-scrollbar-thumb,
.workspace::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--border-strong);
}

.preset-card {
    display: grid;
    width: 92px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: center;
}

.preset-carousel.compact .preset-card {
    width: 74px;
    gap: 7px;
}

.preset-card > span {
    position: relative;
    display: block;
    height: 112px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 14px;
    background: var(--card-2);
    background-position: center;
    background-size: cover;
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.preset-carousel.compact .preset-card > span {
    height: 86px;
    border-radius: 12px;
}

.preset-card:hover > span {
    border-color: rgba(139, 92, 246, 0.55);
    transform: translateY(-1px);
}

.preset-card.is-selected {
    color: var(--text);
}

.preset-card.is-selected > span {
    border-color: var(--accent-2);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.28);
}

.preset-card.is-selected > span::after {
    content: "";
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--card);
    border-radius: 50%;
    background: var(--accent-2);
}

.preset-card strong {
    min-height: 28px;
    font-size: 12px;
    line-height: 1.15;
}

.preset-carousel.compact .preset-card strong {
    min-height: 24px;
    font-size: 11px;
}

.none > span::before {
    content: "";
    position: absolute;
    inset: 28%;
    border: 8px solid #4b5563;
    border-radius: 50%;
}

.none > span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 26%;
    width: 48%;
    height: 8px;
    border-radius: 999px;
    background: #4b5563;
    transform: rotate(-45deg);
}

.portrait > span { background-image: url("../images/presets/portrait-pro.jpg"); }
.silken > span { background-image: url("../images/presets/silken-smooth.jpg"); }
.natural > span { background-image: url("../images/presets/natural-look.jpg"); }
.cinematic > span { background-image: url("../images/presets/cinematic-glam.jpg"); }
.hollywood > span { background-image: url("../images/presets/hollywood-focus.jpg"); }
.vibrant > span { background-image: url("../images/presets/vibrant.jpg"); }
.teal-orange > span { background-image: url("../images/presets/teal-orange.jpg"); }
.bw > span { background-image: url("../images/presets/bw-contrast.jpg"); }

.start-button {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 78px;
    box-shadow: 0 0 26px rgba(139, 92, 246, 0.28);
    transition: transform var(--ease), opacity var(--ease), box-shadow var(--ease);
}

.start-button span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
}

.start-button svg {
    width: 22px;
    height: 22px;
}

.start-button em {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-style: normal;
}

.start-button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
    box-shadow: none;
}

.start-button:not(:disabled):hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 0 34px rgba(139, 92, 246, 0.36);
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.trust-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 82px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    padding: 15px;
    text-align: left;
    transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.trust-card:hover,
.trust-card:focus-visible {
    border-color: rgba(139, 92, 246, 0.62);
    background: rgba(255, 255, 255, 0.055);
    transform: translateY(-1px);
}

.trust-card svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    color: #fbbf24;
}

.trust-card:nth-child(2) svg { color: #60a5fa; }
.trust-card:nth-child(3) svg { color: #c084fc; }
.trust-card:nth-child(4) svg { color: #2dd4bf; }

.trust-card strong,
.trust-card em {
    display: block;
}

.trust-card strong {
    font-size: 14px;
}

.trust-card em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.mobile-nav {
    display: none;
}

.demo-gated .app-shell,
.demo-gated .mobile-nav {
    user-select: none;
    pointer-events: none;
}

.demo-gate {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    background:
        linear-gradient(rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.94)),
        url("../images/presets/cinematic-glam.jpg") center / cover no-repeat;
    padding: 28px 18px;
}

.demo-gate-panel {
    width: min(620px, 100%);
    margin: auto 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 20, 32, 0.97);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
    padding: clamp(26px, 5vw, 46px);
}

.demo-gate-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
}

.demo-gate-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.demo-gate h1 {
    margin: 18px 0 12px;
    color: #f8fafc;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.08;
    letter-spacing: 0;
}

.demo-gate-panel > p {
    max-width: 540px;
    margin: 0;
    color: #a9b1c0;
    font-size: 16px;
    line-height: 1.65;
}

.demo-gate-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 26px 0;
    padding: 0;
    list-style: none;
}

.demo-gate-benefits li {
    min-width: 0;
    border: 1px solid #263043;
    border-radius: 8px;
    background: #171d2a;
    padding: 14px;
}

.demo-gate-benefits strong,
.demo-gate-benefits span {
    display: block;
}

.demo-gate-benefits strong {
    margin-bottom: 4px;
    color: #f8fafc;
    font-size: 19px;
}

.demo-gate-benefits span {
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.4;
}

.demo-access-form > label {
    display: block;
    margin-bottom: 8px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 750;
}

.demo-access-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid #3d4960;
    border-radius: 8px;
    background: #0c111d;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.demo-access-field:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.demo-access-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 14px 16px;
    color: #f8fafc;
}

.demo-access-field button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 148px;
    border: 0;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    padding: 12px 18px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.demo-access-field button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.demo-access-field button svg {
    width: 17px;
    height: 17px;
}

.demo-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.demo-access-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: #8e98aa;
    font-size: 12px;
    line-height: 1.5;
}

.demo-access-status.is-error {
    color: #fda4af;
}

.demo-access-status.is-success {
    color: #5eead4;
}

.demo-gate-footer {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 26px;
    border-top: 1px solid #242d3d;
    padding-top: 20px;
    color: #8e98aa;
    font-size: 13px;
}

.demo-gate-footer a {
    color: #c4b5fd;
    font-weight: 800;
    text-decoration: none;
}

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.72);
    padding: 20px;
    backdrop-filter: blur(14px);
}

.processing-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.78);
    padding: 20px;
    backdrop-filter: blur(16px);
}

.processing-modal {
    width: min(480px, 100%);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.52);
    padding: 24px;
    outline: none;
}

.processing-modal-heading {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.processing-modal-heading h2,
.processing-modal-heading p {
    margin: 0;
}

.processing-modal-heading h2 {
    font-size: 20px;
}

.processing-modal-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.processing-modal-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.14);
    color: #c4b5fd;
}

.processing-modal-icon svg {
    width: 24px;
    height: 24px;
}

.processing-progress {
    height: 7px;
    overflow: hidden;
    margin-top: 22px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.processing-progress span {
    display: block;
    width: 4%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 360ms ease;
}

.processing-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.processing-process-list {
    margin-top: 18px;
}

.processing-modal-layer.is-complete .processing-modal-icon {
    border-color: rgba(45, 212, 191, 0.44);
    background: rgba(45, 212, 191, 0.14);
    color: #5eead4;
}

.processing-modal-layer.is-error .processing-modal-icon {
    border-color: rgba(248, 113, 113, 0.44);
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.modal {
    position: relative;
    width: min(560px, 100%);
    max-height: min(720px, 88vh);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: pointer;
}

.modal h2 {
    margin: 0 42px 10px 0;
}

.modal p {
    color: var(--muted);
    line-height: 1.55;
}

.modal-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
}

.modal-list button,
.modal-list a,
.modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 12px;
    text-decoration: none;
}

.modal-list button {
    cursor: pointer;
}

.modal-list button > span {
    display: grid;
    gap: 3px;
    min-width: 0;
    text-align: left;
}

.modal-list button em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}

.feature-modal {
    width: min(660px, 100%);
}

.feature-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.feature-facts div {
    display: grid;
    gap: 6px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.feature-facts span,
.feature-facts strong {
    overflow-wrap: anywhere;
}

.feature-facts span {
    color: var(--muted);
    font-size: 11px;
}

.feature-facts strong {
    font-size: 13px;
    line-height: 1.35;
}

.feature-form,
.feature-choice-grid,
.feature-section {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.feature-field,
.feature-switch,
.feature-choice {
    display: grid;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.feature-field {
    grid-template-columns: minmax(0, 1fr) 150px;
}

.feature-switch {
    grid-template-columns: minmax(0, 1fr) 44px;
    cursor: pointer;
}

.feature-field span,
.feature-switch span,
.feature-choice span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.feature-field em,
.feature-switch em,
.feature-choice em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.4;
}

.feature-field select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--card-2);
    color: var(--text);
    padding: 0 10px;
}

.feature-switch input {
    appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    background: #374151;
    cursor: pointer;
    transition: background var(--ease);
}

.feature-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform var(--ease);
}

.feature-switch input:checked {
    background: var(--accent);
}

.feature-switch input:checked::after {
    transform: translateX(20px);
}

.feature-choice {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    cursor: pointer;
    transition: border-color var(--ease), background var(--ease);
}

.feature-choice:hover,
.feature-choice:has(input:checked),
.feature-choice.is-selected {
    border-color: rgba(139, 92, 246, 0.64);
    background: rgba(139, 92, 246, 0.09);
}

.feature-choice input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--accent);
}

.feature-choice b {
    color: #c4b5fd;
    font-size: 12px;
    white-space: nowrap;
}

.compact-choice {
    grid-template-columns: 20px minmax(0, 1fr);
}

.locked-choice {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    cursor: default;
    opacity: 0.66;
}

.locked-choice:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.035);
}

.locked-choice input {
    cursor: not-allowed;
}

.upgrade-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    border: 1px solid rgba(196, 181, 253, 0.5);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.13);
    color: #ddd6fe;
    cursor: pointer;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 850;
}

.upgrade-chip:hover,
.upgrade-chip:focus-visible {
    border-color: #c4b5fd;
    background: rgba(139, 92, 246, 0.24);
}

.upgrade-chip svg {
    width: 14px;
    height: 14px;
}

.enterprise-upgrade-link {
    margin-left: auto;
}

.feature-label {
    font-size: 13px;
}

.format-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.format-choice {
    cursor: pointer;
}

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

.format-choice span {
    display: grid;
    min-height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-weight: 800;
}

.format-choice input:checked + span {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.14);
    color: var(--text);
}

.quality-range {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.quality-range > span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.quality-range output {
    color: #c4b5fd;
    font-weight: 850;
}

.quality-range input {
    width: 100%;
    accent-color: var(--accent);
}

.quality-range input:disabled {
    opacity: 0.4;
}

.feature-status {
    min-height: 42px;
    margin: 16px 0 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    padding: 10px 12px;
    font-size: 12px;
}

.feature-status.is-success {
    border-color: rgba(45, 212, 191, 0.36);
    background: rgba(45, 212, 191, 0.08);
    color: #99f6e4;
}

.feature-status.is-warning {
    border-color: rgba(251, 191, 36, 0.38);
    color: #fde68a;
}

.feature-status.is-error {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
}

.feature-actions {
    justify-content: space-between;
}

.feature-actions .danger-action {
    border-color: rgba(248, 113, 113, 0.36);
    color: #fecaca;
}

.feedback-form,
.roadmap-list,
.terms-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.feedback-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 750;
}

.feedback-form select,
.feedback-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 12px;
    resize: vertical;
}

.roadmap-list div {
    display: grid;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
}

.roadmap-list span,
.terms-list label {
    color: var(--muted);
    line-height: 1.45;
}

.terms-list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-list input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.modal-actions button {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    padding: 0 14px;
    font-weight: 800;
}

.modal-actions button:last-child {
    border-color: rgba(139, 92, 246, 0.55);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.modal-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.modal-loading {
    width: 34px;
    height: 34px;
    margin: 28px auto 8px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.batch-controls {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.batch-controls > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    padding: 12px;
}

.batch-controls select,
.preference-list select {
    min-width: 0;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--card-strong, var(--card-2));
    color: var(--text);
    padding: 8px 10px;
}

.batch-upload {
    cursor: pointer;
}

.batch-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.batch-upload span {
    color: #c4b5fd;
    font-weight: 800;
    text-align: right;
}

.batch-save-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-save-label input {
    accent-color: var(--accent);
}

.batch-queue {
    display: grid;
    gap: 6px;
    max-height: 230px;
    margin-top: 14px;
    overflow-y: auto;
}

.batch-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding: 9px 2px;
}

.batch-file > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.batch-file strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-file em,
.batch-empty span,
.project-empty span,
.account-profile span,
.preference-list em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.batch-file b {
    flex: 0 0 auto;
    color: #86efac;
    font-size: 12px;
}

.batch-empty,
.project-empty {
    display: grid;
    gap: 5px;
    margin-top: 14px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.batch-progress {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.batch-progress > div {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.batch-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    transition: width 180ms ease;
}

.modal.quick-compress-modal {
    width: min(880px, 100%);
    max-height: min(820px, 92vh);
}

.quick-compress-heading {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding-right: 42px;
}

.quick-compress-heading h2,
.quick-compress-heading p {
    margin: 0;
}

.quick-compress-heading p {
    margin-top: 3px;
    font-size: 13px;
}

.quick-compress-heading-icon,
.quick-compress-result-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(45, 212, 191, 0.36);
    border-radius: 8px;
    background: rgba(13, 148, 136, 0.14);
    color: #5eead4;
}

.quick-compress-drop {
    display: grid;
    min-height: 124px;
    place-items: center;
    gap: 4px;
    margin-top: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    padding: 20px;
    text-align: center;
    transition: border-color var(--ease), background var(--ease);
}

.quick-compress-drop:hover,
.quick-compress-drop.is-dragging {
    border-color: #2dd4bf;
    background: rgba(13, 148, 136, 0.1);
}

.quick-compress-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.quick-compress-drop > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #5eead4;
}

.quick-compress-drop strong {
    color: var(--text);
    font-size: 14px;
}

.quick-compress-drop em,
.quick-compress-settings em,
.quick-compress-file em,
.quick-compress-file small,
.quick-compress-results em,
.quick-compress-empty em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.quick-compress-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--border);
}

.quick-compress-summary span {
    display: flex;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    background: var(--card-2);
    color: var(--muted);
    padding: 9px 8px;
    font-size: 11px;
    text-align: center;
}

.quick-compress-summary strong {
    color: var(--text);
}

.quick-compress-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.quick-compress-settings > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    padding: 10px 11px;
}

.quick-compress-settings > label > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.quick-compress-settings strong {
    color: var(--text);
    font-size: 12px;
}

.quick-compress-settings select {
    min-width: 0;
    max-width: 170px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--card-strong, var(--card-2));
    color: var(--text);
    padding: 7px 9px;
    font-size: 11px;
}

.quick-compress-settings .quick-compress-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
}

.quick-compress-settings .switch-input {
    flex: 0 0 auto;
}

.quick-compress-queue {
    display: grid;
    max-height: 238px;
    margin-top: 14px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.quick-compress-file {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    border-bottom: 1px solid var(--border);
    padding: 7px 2px;
}

.quick-compress-file-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 7px;
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

.quick-compress-file-icon svg {
    width: 17px;
    height: 17px;
}

.quick-compress-file-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.quick-compress-file-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-compress-file-copy small,
.quick-compress-file.is-error b {
    color: #fca5a5;
}

.quick-compress-file b {
    color: var(--muted);
    font-size: 11px;
}

.quick-compress-file.is-complete b {
    color: #5eead4;
}

.quick-compress-file > button,
.quick-compress-file-download {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
}

.quick-compress-file-download {
    border-color: rgba(45, 212, 191, 0.35);
    color: #5eead4;
    text-decoration: none;
}

.quick-compress-file > button svg,
.quick-compress-file-download svg {
    width: 15px;
    height: 15px;
}

.quick-compress-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-top: 14px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.quick-compress-empty > span {
    color: var(--faint);
}

.quick-compress-progress {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.07);
    padding: 12px;
}

.quick-compress-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-size: 12px;
}

.quick-compress-progress-copy output {
    color: #93c5fd;
    font-weight: 800;
}

.quick-compress-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.quick-compress-progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2dd4bf, #3b82f6);
    transition: width 220ms ease;
}

.quick-compress-progress > span {
    color: var(--muted);
    font-size: 11px;
}

.quick-compress-progress.is-error {
    border-color: rgba(251, 113, 133, 0.34);
    background: rgba(190, 24, 93, 0.08);
}

.quick-compress-results {
    display: grid;
    grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 8px;
    background: rgba(13, 148, 136, 0.08);
    padding: 12px;
}

.quick-compress-results > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-compress-result-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

.quick-compress-results span span,
.quick-compress-results > div:first-child > span:last-child {
    display: grid;
    gap: 2px;
}

.quick-compress-results strong {
    color: var(--text);
    font-size: 12px;
}

.quick-compress-result-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.quick-compress-result-stats > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.quick-compress-error {
    margin: 12px 0 0;
    border-left: 3px solid #fb7185;
    background: rgba(190, 24, 93, 0.08);
    color: #fecdd3 !important;
    padding: 9px 11px;
    font-size: 12px;
}

.quick-compress-actions a,
.quick-compress-actions button {
    gap: 7px;
}

.quick-compress-actions #quick-compress-clear,
.quick-compress-actions #quick-compress-clear:last-child {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.quick-compress-actions svg {
    width: 16px;
    height: 16px;
}

.modal-download {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.55);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 0 14px;
    font-weight: 800;
    text-decoration: none;
}

.modal-download.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.project-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.project-summary > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.project-summary strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.project-summary span {
    color: var(--muted);
    font-size: 11px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: 330px;
    margin-top: 16px;
    overflow-y: auto;
}

.project-thumb {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: 11px;
    text-decoration: none;
}

.project-thumb img {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 7px;
    object-fit: cover;
}

.project-thumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.account-avatar {
    position: relative;
    width: 68px;
    height: 68px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    clip-path: circle(50% at 50% 50%);
    contain: layout paint;
}

.account-profile > div {
    display: grid;
    gap: 4px;
}

.preference-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.preference-list label {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.preference-list label > span {
    display: grid;
    gap: 4px;
}

body.fullscreen-preview .preview-card {
    position: fixed;
    inset: 18px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    background: var(--card);
    box-shadow: var(--shadow);
}

body.fullscreen-preview .preview-stage {
    flex: 1;
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1180px) {
    body {
        overflow: auto;
    }

    .app-shell {
        display: block;
        height: auto;
    }

    .sidebar {
        display: none;
    }

    .workspace {
        min-height: 100vh;
        overflow: visible;
        padding: 22px 18px 44px;
    }

    .dashboard-grid {
        grid-template-columns: minmax(300px, 0.84fr) minmax(390px, 1.16fr);
    }
}

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

    .right-column {
        position: static;
    }

    .right-column.is-sticky-parked {
        position: static;
        width: auto;
    }

    .left-column,
    .right-column {
        display: contents;
    }

    .upload-card { order: 1; }
    .preview-card { order: 2; }
    .quick-downloads-card { order: 3; }
    .ai-card { order: 4; }
    .strength-card { order: 5; }
    .color-card { order: 6; }
    .start-button { order: 7; }
    .trust-strip { order: 8; }
}

@media (max-width: 900px) {
    .workspace {
        padding: 22px 14px 112px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 18px;
    }

    .top-actions {
        flex-wrap: wrap;
    }

    .modal.quick-compress-modal {
        width: min(760px, 100%);
    }

    .mobile-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: flex;
        justify-content: space-between;
        border-top: 1px solid var(--border);
        background: color-mix(in srgb, var(--bg) 94%, transparent);
        padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
        backdrop-filter: blur(16px);
    }

    .mobile-nav a,
    .mobile-nav button {
        display: grid;
        justify-items: center;
        gap: 3px;
        border: 0;
        background: transparent;
        color: var(--faint);
        font-size: 10px;
        font-weight: 750;
        text-decoration: none;
    }

    .mobile-nav svg {
        width: 22px;
        height: 22px;
    }

    .mobile-nav .is-active {
        color: #c084fc;
    }

    .mini-avatar {
        position: relative;
        display: grid;
        width: 22px;
        height: 22px;
        overflow: hidden;
        place-items: center;
        border: 1px solid var(--border-strong);
        border-radius: 50%;
        color: var(--text);
        font-size: 9px;
    }
}

@media (max-width: 680px) {
    .topbar h1 {
        font-size: 28px;
    }

    .topbar p {
        font-size: 14px;
    }

    .card {
        padding: 16px;
        border-radius: 14px;
    }

    .card h2 {
        font-size: 17px;
    }

    .drop-zone {
        min-height: 214px;
        padding: 22px;
    }

    .preview-stage {
        min-height: 320px;
    }

    .preview-toolbar {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }

    .trust-strip {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .trust-card {
        width: 172px;
        flex: 0 0 auto;
    }

    .card-tag {
        position: static;
        display: inline-block;
        margin-bottom: 12px;
    }

    .carousel-buttons {
        display: none;
    }

    .advanced-grid,
    .project-summary {
        grid-template-columns: 1fr;
    }

    .batch-controls > label {
        grid-template-columns: 1fr;
    }

    .batch-upload span {
        text-align: left;
    }

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

    .modal {
        max-height: calc(100vh - 32px - env(safe-area-inset-bottom));
        border-radius: 12px;
        padding: 20px 16px;
    }

    .feature-facts {
        grid-template-columns: 1fr;
    }

    .feature-field {
        grid-template-columns: 1fr;
    }

    .feature-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .feature-actions button {
        width: 100%;
    }

    .quick-compress-button {
        min-height: 38px;
    }

    .modal.quick-compress-modal {
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
    }

    .quick-compress-heading {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
    }

    .quick-compress-heading-icon {
        width: 38px;
        height: 38px;
    }

    .quick-compress-summary,
    .quick-compress-settings,
    .quick-compress-results {
        grid-template-columns: 1fr;
    }

    .quick-compress-summary {
        gap: 1px;
    }

    .quick-compress-summary span {
        justify-content: space-between;
    }

    .quick-compress-settings > label {
        grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
    }

    .quick-compress-file {
        grid-template-columns: 28px minmax(0, 1fr) auto;
    }

    .quick-compress-file > button {
        grid-column: 3;
    }

    .quick-compress-result-stats {
        border-top: 1px solid rgba(45, 212, 191, 0.18);
        padding-top: 10px;
    }

    .quick-compress-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quick-compress-actions a,
    .quick-compress-actions button {
        width: 100%;
    }

    .processing-modal-layer {
        align-items: end;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    }

    .processing-modal {
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
        overflow-y: auto;
        border-radius: 16px 16px 10px 10px;
        padding: 20px 16px;
    }
}

@media (max-width: 620px) {
    .demo-gate {
        align-items: flex-start;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    }

    .demo-gate-panel {
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
        overflow-y: auto;
        border-radius: 10px;
        padding: 24px 18px;
    }

    .demo-gate-brand {
        margin-bottom: 24px;
    }

    .demo-gate-benefits {
        grid-template-columns: 1fr;
    }

    .demo-gate-benefits li {
        display: grid;
        grid-template-columns: 54px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .demo-gate-benefits strong {
        margin: 0;
    }

    .demo-access-field {
        grid-template-columns: 1fr;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .demo-access-field:focus-within {
        box-shadow: none;
    }

    .demo-access-field input {
        min-height: 50px;
        border: 1px solid #3d4960;
        border-radius: 8px;
        background: #0c111d;
    }

    .demo-access-field button {
        min-height: 50px;
        margin-top: 10px;
        border-radius: 8px;
    }
}
