:root {
    --ink: #332c29;
    --muted: #756b64;
    --soft-muted: #9a8d83;
    --panel: #fffdf9;
    --panel-soft: #f4eee8;
    --line: #e7ddd4;
    --accent: #bd755e;
    --accent-dark: #9e5948;
    --sage: #78968b;
    --bg: #f8f4ef;
    --shadow: 0 18px 45px rgba(77, 53, 40, .08);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 0%, #fffdfa 0, var(--bg) 42rem);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--accent-dark);
    outline-offset: 2px;
}
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 14px; background: #fff; color: var(--ink); border: 2px solid var(--accent-dark); border-radius: 8px; }
.skip-link:focus { top: 8px; }
.generation-issues { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.generation-issues ul { margin: 6px 0 0; padding-left: 20px; }
.generation-issues li { margin-top: 4px; }

.fast-deck-intro { max-width: 780px; margin: 0 auto 30px; text-align: center; }
.fast-deck-intro h1 { margin: 10px 0 12px; font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -.05em; }
.fast-deck-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, .8fr); gap: 22px; align-items: start; max-width: 1120px; margin: auto; }
.fast-deck-form, .fast-deck-side, .fast-deck-result > .panel, .fast-deck-slide { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.fast-deck-form { display: grid; gap: 14px; padding: clamp(18px, 3vw, 30px); }
.fast-deck-form > label:first-child { font-size: 14px; font-weight: 750; }
.fast-deck-form textarea, .fast-deck-form select, .fast-deck-clarify textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 12px; }
.fast-deck-form textarea { resize: vertical; min-height: 190px; line-height: 1.55; }
.fast-deck-form-row { display: grid; grid-template-columns: 1fr 1.4fr .7fr; gap: 12px; }
.fast-deck-form-row label, .fast-deck-advanced > label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
.fast-deck-advanced { border-top: 1px solid var(--line); padding-top: 12px; }
.fast-deck-advanced summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.fast-deck-advanced > label { margin-top: 14px; }
.fast-deck-consent { display: flex; align-items: start; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.fast-deck-consent input { margin-top: 2px; }
.fast-deck-gate { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.fast-deck-side { padding: 24px; }
.fast-deck-side ul { padding-left: 20px; color: var(--muted); line-height: 1.8; font-size: 13px; }
.fast-deck-result { max-width: 1120px; margin: 34px auto 0; }
.fast-deck-result > .panel { padding: clamp(18px, 3vw, 30px); }
.fast-deck-clarify ul { line-height: 1.7; }
.fast-deck-clarify textarea { margin: 10px 0; line-height: 1.5; }
.fast-deck-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.fast-deck-directions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fast-deck-directions article { display: grid; gap: 6px; padding: 13px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; }
.fast-deck-directions p { margin: 0; font-size: 12px; line-height: 1.45; }
.fast-deck-directions small, .fast-deck-directions b { font-size: 10px; color: var(--muted); }
.fast-deck-caption { white-space: pre-wrap; line-height: 1.6; }
.fast-deck-slide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.fast-deck-slide { overflow: hidden; padding: 13px; }
.fast-deck-slide > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--panel-soft); border-radius: 9px; }
.fast-deck-slide h3 { margin: 14px 0 8px; }
.fast-deck-slide p, .fast-deck-slide li { font-size: 12px; line-height: 1.5; }
.fast-deck-slide details { border-top: 1px solid var(--line); padding-top: 9px; font-size: 11px; }
@media (max-width: 780px) {
    .fast-deck-columns { grid-template-columns: 1fr; }
    .fast-deck-form-row { grid-template-columns: 1fr 1fr; }
    .fast-deck-form-row label:first-child { grid-column: 1 / -1; }
    .fast-deck-directions { grid-template-columns: 1fr; }
}

.topbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 42px);
    background: rgba(255, 253, 249, .94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
}
.brand { font-size: 15px; letter-spacing: .16em; font-weight: 800; color: var(--ink); }
.brand span { color: var(--accent); }
.topnav { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 11px; }
.topnav a:hover, .back-link:hover { color: var(--accent-dark); }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; font-size: 11px; }
.link-button:hover { color: var(--accent-dark); }

.page-shell { max-width: 1480px; margin: 0 auto; padding: clamp(36px, 6vw, 76px) clamp(20px, 4vw, 64px); }
.page-heading, .workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-heading { margin-bottom: 34px; }
.eyebrow, .panel-label {
    margin: 0;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}
.page-heading h1, .workspace-head h1 {
    margin: 10px 0 13px;
    font-size: clamp(32px, 4vw, 56px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 750;
}
.muted { color: var(--muted); line-height: 1.55; }
.small { font-size: 12px; }
.library-heading > div:first-child { max-width: 650px; }
.library-actions { display: grid; justify-items: end; gap: 14px; }
.catalog-note { color: var(--soft-muted); font-size: 12px; }
.upload-form { display: flex; align-items: center; gap: 9px; }
.file-button, .secondary-button, .primary-button, .ghost-button, .toolbar-button, .rail-button, .version-pill {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 15px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.file-button input { display: none; }
.file-button:hover, .secondary-button:hover, .ghost-button:hover, .toolbar-button:hover, .rail-button:hover, .version-pill:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}
.primary-button { background: var(--accent); border-color: var(--accent); color: #fffaf6; }
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.primary-button:disabled, .secondary-button:disabled, .ghost-button:disabled, .generation-pill:disabled { cursor: default; opacity: .58; }
.full { width: 100%; }
.status-line { min-height: 22px; margin: -12px 0 15px; color: var(--sage); font-size: 13px; }

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    gap: 20px;
}
.deck-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 7px 22px rgba(77, 53, 40, .035);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.deck-card:hover { transform: translateY(-4px); border-color: rgba(189, 117, 94, .6); box-shadow: var(--shadow); }
.deck-cover {
    position: relative;
    display: flex;
    min-height: 280px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    align-items: flex-end;
    background: linear-gradient(145deg, #e8d9cb, #bd755e 68%, #6f887d);
}
.deck-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(255,255,255,.68); font-size: 12px; letter-spacing: .18em; }
.deck-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    color: #fffaf5;
    background: linear-gradient(180deg, rgba(41,28,23,.28), transparent 42%, rgba(41,28,23,.76));
}
.deck-cover-overlay span { font-size: 10px; letter-spacing: .06em; }
.deck-cover-overlay strong { max-width: 205px; font-size: 20px; line-height: 1.04; letter-spacing: -.03em; }
.deck-meta { display: grid; gap: 7px; padding: 16px; }
.deck-meta strong { overflow: hidden; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.deck-meta span { color: var(--soft-muted); font-size: 11px; }
.deck-meta b { margin-top: 3px; color: var(--accent-dark); font-size: 12px; }
.empty-state, .auth-card {
    max-width: 620px;
    padding: 35px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}
.auth-card { max-width: 500px; margin: 12vh auto; padding: 44px; }
.auth-card h1 { margin: 12px 0; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.stack-form { display: grid; gap: 16px; margin-top: 28px; }
.stack-form label, .ai-panel label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.stack-form input, .ai-panel textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px;
    background: #fffefa;
    color: var(--ink);
}
.stack-form input:focus, .ai-panel textarea:focus { border-color: var(--accent); outline: 3px solid rgba(189, 117, 94, .15); }
.form-foot { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.form-foot a { color: var(--accent-dark); }
.alert { margin-top: 20px; padding: 12px; border-radius: 9px; font-size: 13px; }
.alert.error { border: 1px solid #c9867c; background: #f8e9e5; color: #8a453d; }
.alert.success { border: 1px solid rgba(120, 150, 139, .42); background: #edf5f0; color: #55776c; }

.workspace {
    width: 100%;
    max-width: 1660px;
    margin: 0 auto;
    padding: 10px clamp(12px, 2.5vw, 32px) 24px;
}
.workspace-shell {
    /* Keep the core workspace comfortably above the fold, but let the page
       continue naturally when comparison cards, suggestions or extra version
       controls add content below it. */
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    overflow: visible;
}
.workspace-shell > * { min-height: 0; }
.workspace-head { align-items: center; min-height: 42px; }
.workspace-head h1 { margin: 4px 0 2px; font-size: clamp(19px, 1.8vw, 28px); }
.workspace-head .muted { margin: 0; font-size: 10px; }
.back-link { display: inline-block; color: var(--muted); font-size: 10px; }
.head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.head-actions .secondary-button { padding: 8px 10px; font-size: 10px; }
.source-badge {
    padding: 8px 11px;
    border: 1px solid rgba(120, 150, 139, .38);
    border-radius: 99px;
    color: var(--sage);
    font-size: 10px;
    white-space: nowrap;
}
.is-disabled { opacity: .48; pointer-events: none; }
.source-rail, .preview-panel, .ai-panel, .generation-bar {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, .86);
    box-shadow: 0 6px 24px rgba(77, 53, 40, .035);
}
.source-rail { padding: 9px 12px 10px; }
.rail-heading, .version-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rail-heading strong, .version-heading strong { display: block; margin-top: 3px; font-size: 12px; }
.rail-controls { display: flex; gap: 5px; }
.rail-button { width: 30px; height: 28px; padding: 0; color: var(--muted); }
.slide-strip {
    display: flex;
    min-width: 0;
    gap: 8px;
    margin-top: 8px;
    padding: 1px 1px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #d5c6ba transparent;
}
.slide-strip::-webkit-scrollbar { height: 6px; }
.slide-strip::-webkit-scrollbar-thumb { border-radius: 99px; background: #d5c6ba; }
.slide-thumb {
    position: relative;
    flex: 0 0 65px;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--muted);
    cursor: pointer;
    scroll-snap-align: start;
    text-align: left;
}
.slide-thumb:hover { border-color: rgba(189, 117, 94, .55); }
.slide-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(189, 117, 94, .13); }
.slide-thumb span { position: absolute; top: 4px; left: 5px; z-index: 1; padding: 2px 4px; border-radius: 4px; background: rgba(255,253,249,.9); color: var(--ink); font-size: 9px; font-weight: 800; }
.slide-thumb img, .thumb-placeholder { display: block; width: 100%; aspect-ratio: 9 / 13; object-fit: cover; background: #eee6df; }
.thumb-placeholder { display: grid; place-items: center; padding: 4px; color: var(--soft-muted); font-size: 8px; text-align: center; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 28vw); gap: 10px; height: auto; min-height: clamp(520px, 68vh, 780px); align-items: start; overflow: visible; }
.preview-panel { display: flex; height: clamp(440px, 65vh, 680px); min-height: 0; flex-direction: column; padding: 10px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.toolbar-button { padding: 7px 10px; font-size: 10px; }
.large-preview {
    position: relative;
    display: grid;
    min-height: 0;
    flex: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #eee8e1;
}
.large-preview img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.preview-fallback-note { position: absolute; right: 10px; bottom: 10px; left: 10px; margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 253, 249, .95); color: var(--ink); font-size: 11px; text-align: center; }
.preview-empty { color: var(--muted); font-size: 13px; }
.preview-caption { min-height: 20px; padding: 7px 2px 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: visible; padding: clamp(16px, 2vw, 23px); }
.ai-panel h2 { margin: 8px 0 4px; font-size: clamp(21px, 2vw, 27px); line-height: 1.05; letter-spacing: -.04em; }
.ai-panel textarea { height: 98px; min-height: 98px; max-height: 180px; margin: 12px 0 8px; resize: vertical; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.quick-prompts button { padding: 7px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-soft); color: var(--muted); cursor: pointer; font-size: 10px; }
.quick-prompts button:hover { border-color: var(--accent); color: var(--accent-dark); }
.request-scope { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; padding: 10px; }
.request-scope legend { color: var(--muted); font-size: 12px; }
.request-slide-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 100px; overflow: auto; }
.request-slide-list label { display: inline-flex; align-items: center; gap: 4px; }
.attachment-composer { display: grid; gap: 8px; margin: 10px 0; }
.attachment-composer input[type=file], .attachment-composer select { max-width: 100%; min-height: 36px; }
.attachment-composer button { width: fit-content; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--panel-soft); cursor: pointer; }
.request-attachment { display: grid; gap: 6px; margin: 8px 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.request-attachment img { max-width: 160px; max-height: 120px; object-fit: contain; }
.request-attachment pre { max-height: 100px; overflow: auto; margin: 0; white-space: pre-wrap; font: inherit; font-size: 11px; }
.generation-progress { margin: 15px 0 3px; }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 11px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #eadfd6; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s; }
.generation-overlay[hidden] { display: none; }
.generation-overlay {
    position: fixed;
    z-index: 30;
    right: 16px;
    bottom: 16px;
    display: grid;
    width: min(360px, calc(100vw - 32px));
    padding: 0;
    pointer-events: none;
}
.generation-overlay-card {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    background: rgba(255, 253, 249, .98);
    box-shadow: 0 28px 80px rgba(51, 44, 41, .22);
}
.generation-overlay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.generation-overlay-head h2 { margin: 9px 0 5px; color: var(--ink); font-size: clamp(22px, 4vw, 30px); line-height: 1.05; letter-spacing: -.045em; }
.generation-overlay-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.overlay-spinner {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 3px solid #eadfd6;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: elovibes-spin .8s linear infinite;
}
@keyframes elovibes-spin { to { transform: rotate(360deg); } }
.overlay-generations { display: grid; gap: 13px; margin: 27px 0 23px; }
.overlay-generation { padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.overlay-generation.is-complete { border-color: rgba(120, 150, 139, .5); background: #eef4f0; }
.overlay-generation-head, .overlay-total-head { display: flex; align-items: center; gap: 9px; }
.overlay-generation-head strong { font-size: 12px; }
.overlay-generation-state { min-width: 0; overflow: hidden; flex: 1; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.overlay-generation-percent, .overlay-total-head strong { color: var(--accent-dark); font-size: 11px; }
.overlay-generation-track, .overlay-progress-track { height: 6px; overflow: hidden; margin-top: 9px; border-radius: 99px; background: #e5d9cf; }
.overlay-generation-track i, .overlay-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.overlay-generation.is-complete .overlay-generation-track i { background: var(--sage); }
.overlay-total { padding-top: 15px; border-top: 1px solid var(--line); }
.overlay-total-head { justify-content: space-between; color: var(--muted); font-size: 11px; }
.overlay-progress-track { margin-top: 8px; height: 7px; }
.overlay-progress-track i { background: linear-gradient(90deg, var(--accent), #d49a72); }
.workspace-actions { display: grid; gap: 7px; margin-top: auto; padding-top: 11px; }
.workspace-actions .secondary-button, .workspace-actions .ghost-button { padding: 10px; }

.generation-bar { display: flex; align-items: center; gap: 18px; min-height: 0; overflow: hidden; padding: 9px 12px; }
.version-heading { flex: 0 0 auto; min-width: 145px; }
.version-pill { padding: 8px 11px; color: var(--accent-dark); }
.version-pill.is-active { border-color: var(--accent); background: #f9ebe5; }
.generation-list { display: flex; min-width: 0; min-height: 0; flex: 1; gap: 7px; overflow-x: auto; }
.generation-pill {
    display: grid;
    min-width: 103px;
    gap: 3px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}
.generation-pill:hover:not(:disabled) { border-color: var(--accent); }
.generation-pill.is-winner { border-color: var(--sage); background: #eef4f0; color: #55776c; }
.generation-pill small { color: var(--soft-muted); font-size: 9px; }
.generation-pill.is-winner small { color: var(--sage); }
.compare-active .large-preview { outline: 3px solid rgba(120, 150, 139, .4); }
.compare-grid { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.compare-grid figure { display: grid; min-width: 0; gap: 6px; margin: 0; align-content: start; }
.compare-grid figcaption { color: var(--sage); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.compare-grid img { width: 100%; max-height: 62vh; object-fit: contain; }

.variant-comparison { width: calc(100% - clamp(28px, 6vw, 84px)); max-width: 1660px; margin: 10px auto 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.comparison-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.comparison-head h2 { margin: 7px 0 4px; font-size: 22px; letter-spacing: -.04em; }
.critic-recommendation { max-width: 300px; padding: 11px 13px; border: 1px solid rgba(189, 117, 94, .45); border-radius: 10px; color: var(--accent-dark); font-size: 12px; }
.variant-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 300px)); gap: 12px; margin-top: 16px; }
.variant-card { display: grid; width: 100%; max-width: 300px; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.variant-card h3 { margin: 0; font-size: 15px; }
.variant-card p { min-height: 34px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.variant-card img { width: 100%; height: 150px; border-radius: 7px; background: #eee8e1; object-fit: contain; }
.variant-image-link { display: block; cursor: zoom-in; }
.variant-card .card-actions { display: flex; gap: 7px; }
.variant-card button { flex: 1; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 750; }
.variant-card button:hover { border-color: var(--accent); color: var(--accent-dark); }
.variant-card button:disabled { opacity: .45; cursor: not-allowed; }
.variant-card .critic-tag { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.asset-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.asset-suggestions img { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 7px; object-fit: cover; }
.asset-suggestions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; }
.asset-suggestions button:hover { border-color: var(--accent); color: var(--accent-dark); }
.graphic-catalog { margin: 15px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.graphic-catalog h3 { margin: 0 0 6px; font-size: 16px; }
.graphic-catalog-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.graphic-catalog-filters input { width: 100%; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); }
.graphic-results { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.graphic-result { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 9px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.graphic-result img { width: 70px; height: 70px; object-fit: contain; }
.graphic-result div { display: grid; gap: 3px; min-width: 0; }
.graphic-result small { overflow-wrap: anywhere; color: var(--muted); }
.graphic-result button { justify-self: start; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }

@media (max-width: 1050px) and (min-width: 681px) {
    .workspace { padding-inline: 12px; }
    .workspace-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); }
    .head-actions .source-badge { display: none; }
    .slide-thumb { flex-basis: 59px; }
    .ai-panel { padding: 15px; }
    .ai-panel textarea { height: 82px; min-height: 82px; }
    .quick-prompts button { font-size: 9px; }
}
@media (max-width: 680px) {
    .topbar { height: 52px; padding: 0 18px; }
    .topnav { gap: 12px; }
    .topnav span { display: none; }
    .page-shell { padding: 40px 18px; }
    .page-heading, .workspace-head { display: block; }
    .library-actions { justify-items: start; margin-top: 22px; }
    .upload-form { flex-wrap: wrap; }
    .deck-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .deck-cover { min-height: 205px; }
    .deck-cover-overlay strong { font-size: 16px; }
    .deck-meta { padding: 12px; }
    .deck-meta strong { font-size: 12px; }
    .workspace { padding: 15px 10px 28px; }
    .workspace-shell { display: block; height: auto; max-height: none; min-height: 0; }
    .workspace-head { margin-bottom: 10px; }
    .workspace-head h1 { font-size: 25px; }
    .head-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 13px; }
    .head-actions .source-badge { display: none; }
    .source-rail { margin-bottom: 10px; }
    .workspace-grid { display: flex; flex-direction: column; width: 100%; height: auto; min-height: 0; }
    .preview-panel { height: clamp(360px, 55vh, 520px); min-height: 0; }
    .ai-panel { width: 100%; min-width: 0; min-height: 0; overflow: visible; }
    .large-preview { min-height: 0; }
    .generation-bar { display: block; margin-top: 10px; }
    .version-heading { margin-bottom: 8px; }
    .generation-list { padding-bottom: 2px; }
    .variant-cards { grid-template-columns: 1fr; }
    .variant-comparison { width: calc(100% - 20px); }
    .comparison-head { display: block; }
    .critic-recommendation { margin-top: 13px; }
}
.graphic-trio { display: grid; gap: 8px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.graphic-trio h3 { margin: 0; font-size: 16px; }
.graphic-trio > input { width: 100%; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); }
.graphic-trio .trio-check { display: flex; align-items: start; gap: 7px; font-size: 12px; }
.trio-results { display: grid; gap: 8px; }
.trio-card { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.trio-card img { width: 70px; height: 70px; object-fit: contain; }
.trio-card div { display: grid; gap: 4px; min-width: 0; }
.trio-card small { color: var(--muted); overflow-wrap: anywhere; }
.trio-card select { width: 100%; min-width: 0; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.trio-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.trio-results button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); cursor: pointer; }
.batch-shell { max-width: 1100px; margin-inline: auto; }
.batch-panel { margin-block: 1.25rem; padding: 1.3rem; border: 1px solid #d9dce6; border-radius: 1rem; background: #fff; }
.batch-decks { display: grid; gap: .7rem; }
.batch-deck { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem; border: 1px solid #d9dce6; border-radius: .7rem; cursor: pointer; }
.batch-deck input { margin-top: .2rem; }
.batch-deck a { margin-left: .5rem; }
.batch-result { padding: 1rem; border-top: 1px solid #d9dce6; }
.batch-result ol, #batch-preflight ol { padding-left: 1.4rem; }
.batch-result li, #batch-preflight li { margin-block: .7rem; }
