:root {
    --brand: #e5322d;
    --brand-dark: #bf2722;
    --ink: #26262c;
    --muted: #6d6d76;
    --line: #dedee6;
    --soft: #f7f7fb;
    --shadow: 0 10px 30px rgba(20, 24, 40, .08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Graphik, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.wrap, .nav, .footer-main, .footer-bottom {
    width: min(100% - 40px, 1160px);
    margin: 0 auto;
}
header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
}
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand);
    position: relative;
    display: inline-block;
}
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-top: 10px solid #fff;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    transform: rotate(45deg);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a {
    padding: 10px 12px;
    border-radius: 7px;
    color: #3f3f46;
    font-weight: 700;
}
.nav-links a:hover { background: #f3f4f6; color: var(--brand); }
.menu-toggle { display: none; }
.hero {
    background: linear-gradient(120deg, rgba(229,50,45,.10), rgba(37,99,235,.10), rgba(15,118,110,.10)), #fff;
    padding: 56px 0 42px;
    text-align: center;
}
.hero h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.05;
}
.hero p {
    max-width: 720px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 18px;
}
.hero-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.hero-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(23,32,51,.10);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: #344054;
    font-weight: 800;
}
.layout { padding: 34px 0 60px; }
.tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.tool-link {
    display: grid;
    gap: 14px;
    min-height: 190px;
    padding: 22px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.tool-link:hover { border-color: var(--brand); }
.tool-icon {
    width: 58px;
    height: 58px;
    background-image: url("../assets/tool-icons.png");
    background-size: 400% 400%;
    filter: drop-shadow(0 5px 5px rgba(30,30,35,.10));
}
.tool-link[data-tool="merge"] .tool-icon { background-position: 0 0; }
.tool-link[data-tool="split"] .tool-icon { background-position: 33.333% 0; }
.tool-link[data-tool="compress"] .tool-icon { background-position: 66.666% 0; }
.tool-link[data-tool="pdf-to-word"] .tool-icon { background-position: 33.333% 66.666%; }
.tool-link[data-tool="pdf-to-powerpoint"] .tool-icon { background-position: 66.666% 66.666%; }
.tool-link[data-tool="pdf-to-excel"] .tool-icon { background-position: 100% 66.666%; }
.tool-link[data-tool="pdf-to-text"] .tool-icon { background-position: 33.333% 100%; }
.tool-link[data-tool="edit-pdf"] .tool-icon { background-position: 0 100%; }
.tool-link strong { display: block; font-size: 20px; }
.tool-link span span { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.tool-page, .download-page { padding: 40px 0 70px; }
.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow);
}
.panel-head { padding: 28px; border-bottom: 1px solid var(--line); }
.panel-head h1 { margin: 0; font-size: 34px; }
.panel-head p { margin: 8px 0 0; color: var(--muted); }
form { padding: 28px; }
.drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 230px;
    border: 2px dashed rgba(229,50,45,.45);
    border-radius: 9px;
    background: #fff8f8;
    text-align: center;
    cursor: pointer;
}
.drop.is-hidden { display: none; }
.drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.drop strong { display: block; font-size: 24px; }
.drop span { display: block; margin-top: 8px; color: var(--muted); }
.file-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.file-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 90px;
    padding: 14px 48px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.file-preview {
    width: 150px;
    height: 150px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f7;
}
.file-preview object, .file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}
.options { margin-top: 22px; }
.deferred-option { display: none; }
.deferred-option.visible { display: block; }
.option-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.option-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.option-card {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: 108px;
    padding: 16px;
    border: 1px solid #d6dbe3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.option-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.option-card:has(input:checked), .option-card.active {
    border-color: rgba(229,50,45,.65);
    box-shadow: 0 0 0 3px rgba(229,50,45,.10);
}
.option-card span, .field span { color: var(--muted); font-size: 13px; }
.field {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    font-weight: 800;
}
.field input, .field select {
    height: 46px;
    padding: 0 13px;
    border: 1px solid #cfd4dc;
    border-radius: 8px;
    font: inherit;
}
.watermark-options {
    display: grid;
    gap: 18px;
}
.watermark-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.watermark-mode-option {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 46px;
    border: 1px solid #f0e3df;
    border-radius: 10px;
    background: #fffaf8;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.watermark-mode-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.watermark-mode-option.active {
    border-color: rgba(220,59,29,.6);
    box-shadow: 0 0 0 3px rgba(220,59,29,.10);
    color: #a92212;
}
.watermark-content-fields .field { margin-top: 0; }
.watermark-control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.watermark-control {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid #f0e3df;
    border-radius: 10px;
    background: #fffaf8;
}
.watermark-control span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.watermark-control input[type="range"] {
    width: 100%;
    accent-color: var(--brand);
}
.watermark-control input[type="color"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.watermark-control output {
    color: #273044;
    font-size: 11px;
    font-weight: 800;
}
.watermark-placement-layout {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(180px, 1.3fr);
    gap: 18px;
    align-items: center;
}
.watermark-placement-controls {
    display: grid;
    gap: 12px;
}
.watermark-placement-grid {
    display: grid;
    grid-template-columns: repeat(3, 34px);
    gap: 7px;
}
.watermark-placement-grid button {
    position: relative;
    width: 34px;
    height: 34px;
    border: 1px solid #f0e3df;
    border-radius: 8px;
    background: #fffaf8;
    cursor: pointer;
}
.watermark-placement-grid button::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #a92212;
    opacity: .45;
}
.watermark-placement-grid button.active {
    border-color: #dc3b1d;
    box-shadow: 0 0 0 3px rgba(220,59,29,.10);
}
.watermark-placement-grid button.active::after { opacity: 1; }
.watermark-preview-page {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid #f0e3df;
    border-radius: 12px;
    background: repeating-linear-gradient(180deg, #fff 0 24px, #f8eee9 25px 26px);
    cursor: grab;
    touch-action: none;
}
.watermark-preview-page.is-dragging { cursor: grabbing; }
.watermark-preview-lines {
    position: absolute;
    inset: 18px;
    border-top: 5px solid rgba(39,48,68,.14);
    border-bottom: 5px solid rgba(39,48,68,.10);
    pointer-events: none;
}
.watermark-preview-stamp {
    --watermark-preview-size: 36px;
    position: absolute;
    z-index: 1;
    max-width: 86%;
    color: #dc3b1d;
    font-size: var(--watermark-preview-size);
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}
.watermark-preview-stamp img {
    display: block;
    width: var(--watermark-preview-size);
    max-width: 120px;
    height: auto;
}
.watermark-preview-stamp img[hidden] { display: none; }
@media (max-width: 700px) {
    .watermark-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .watermark-placement-layout { grid-template-columns: 1fr; }
    .watermark-preview-page { min-height: 170px; }
}
.actions { margin-top: 24px; }
.actions button, .download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.download.secondary { margin-left: 10px; background: #4b5563; }
.notice {
    margin: 18px 28px 0;
    padding: 13px 15px;
    border-radius: 7px;
    background: #fff1f1;
    color: #b91c1c;
    font-weight: 800;
}
.toast {
    position: fixed;
    top: 84px;
    left: 50%;
    z-index: 99;
    transform: translate(-50%, -10px);
    opacity: 0;
    pointer-events: none;
    padding: 12px 18px;
    border-radius: 7px;
    background: #111827;
    color: #fff;
    font-weight: 900;
    transition: .18s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.check-table { width: 100%; border-collapse: collapse; }
.check-table td { padding: 14px; border-top: 1px solid var(--line); }
.ok { color: #047857; font-weight: 900; }
.bad { color: #b91c1c; font-weight: 900; }
.editor-shell {
    min-height: calc(100vh - 66px);
    background: #eef0f4;
}
.editor-app[hidden],
.editor-intro[hidden] {
    display: none;
}
.editor-intro {
    width: min(100% - 40px, 960px);
    margin: 0 auto;
    padding: 56px 0 70px;
    text-align: center;
}
.editor-intro h1 { margin: 0; font-size: 42px; }
.editor-intro p { max-width: 680px; margin: 12px auto 24px; color: var(--muted); font-size: 17px; }
.editor-upload {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.editor-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.editor-app {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: calc(100vh - 66px);
}
.editor-sidebar {
    position: sticky;
    top: 66px;
    z-index: 4;
    height: calc(100vh - 66px);
    overflow: auto;
    border-right: 1px solid #d8dbe2;
    background: #fff;
}
.editor-file {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}
.editor-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.editor-file button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.page-thumbs { display: grid; gap: 12px; padding: 12px; }
.page-thumb {
    display: grid;
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.page-thumb:hover { border-color: var(--brand); }
.page-thumb img { width: 100%; display: block; box-shadow: 0 2px 8px rgba(20,24,40,.12); }
.editor-main { min-width: 0; }
.editor-commandbar {
    position: sticky;
    top: 66px;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 16px;
    border-bottom: 1px solid #d8dbe2;
    background: #fff;
}
.editor-history, .editor-zoom, .editor-page-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.editor-commandbar button, .editor-properties button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.editor-commandbar button:disabled, .editor-properties button:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.editor-zoom output {
    min-width: 48px;
    color: #475467;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
}
.editor-toolbar {
    position: sticky;
    top: 118px;
    z-index: 6;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px 16px;
    border-bottom: 1px solid #d8dbe2;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
}
.tool-segment, .editor-properties {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tool-segment {
    flex: 0 0 auto;
    padding: 4px;
    border: 1px solid #e1e4ea;
    border-radius: 7px;
    background: #f7f8fa;
}
.editor-properties {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 3px;
}
.editor-tool, .danger-tool, .export-editor {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.editor-tool {
    min-height: 36px;
    border-color: transparent;
    background: transparent;
}
.editor-tool:hover {
    border-color: #d5d9e2;
    background: #fff;
}
.editor-tool.active {
    border-color: var(--brand);
    background: #fff1f1;
    color: var(--brand-dark);
}
.danger-tool { color: #b91c1c; }
.danger-tool:disabled { opacity: .42; cursor: not-allowed; }
.export-editor {
    margin-left: auto;
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.editor-commandbar .export-editor {
    min-height: 38px;
    margin-left: auto;
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.export-editor:disabled { opacity: .55; }
.editor-properties label {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}
.editor-properties input[type="color"] {
    width: 40px;
    height: 30px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
}
.editor-properties input[type="number"] { width: 58px; }
.editor-properties input[type="text"] { width: 150px; }
.editor-properties input[type="range"] { width: 80px; accent-color: var(--brand); }
.editor-properties input[type="text"],
.editor-properties input[type="number"], .editor-properties select {
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 12px;
}
.editor-status {
    padding: 8px 16px;
    border-bottom: 1px solid #d8dbe2;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}
.editor-status.error { color: #b91c1c; background: #fff1f1; }
.page-stage {
    display: grid;
    justify-items: center;
    gap: 28px;
    padding: 28px 20px 70px;
    touch-action: pan-y;
    overflow: auto;
}
.editor-page {
    position: relative;
    width: var(--editor-page-width, 820px);
    max-width: none;
    background: #fff;
    box-shadow: 0 8px 28px rgba(20,24,40,.16);
    overflow: hidden;
    user-select: none;
}
.editor-page > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.inline-text-editor {
    position: absolute;
    z-index: 8;
    box-sizing: border-box;
    min-width: 70px;
    min-height: 36px;
    padding: 3px 5px;
    border: 2px solid #2563eb;
    border-radius: 3px;
    outline: 0;
    background: rgba(255,255,255,.94);
    line-height: 1.2;
    letter-spacing: 0;
    resize: none;
    overflow: hidden;
    transform-origin: center;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.annotation-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.page-stage[data-tool="text"] .annotation-layer,
.page-stage[data-tool="image"] .annotation-layer,
.page-stage[data-tool="rect"] .annotation-layer,
.page-stage[data-tool="ellipse"] .annotation-layer,
.page-stage[data-tool="line"] .annotation-layer,
.page-stage[data-tool="highlight"] .annotation-layer { cursor: crosshair; }
.page-stage[data-tool="freehand"] .annotation-layer { cursor: crosshair; touch-action: none; }
.annotation { cursor: move; }
.selection-frame {
    fill: transparent;
    stroke: #2563eb;
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}
.rotation-stem {
    stroke: #2563eb;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}
.transform-handle {
    fill: #fff;
    stroke: #2563eb;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}
.resize-handle[data-handle="nw"],
.resize-handle[data-handle="se"] { cursor: nwse-resize; }
.resize-handle[data-handle="ne"],
.resize-handle[data-handle="sw"] { cursor: nesw-resize; }
.rotation-handle { cursor: grab; }
.rotation-handle:active { cursor: grabbing; }
.selection-box {
    fill: transparent;
    stroke: transparent;
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
}
.annotation.selected .selection-box { stroke: #2563eb; }
.annotation.selected:not(g) { filter: drop-shadow(0 0 2px #2563eb); }
.page-thumb.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(229,50,45,.12);
}
.thumb-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: transform .18s ease;
}
.editor-page.active { outline: 2px solid rgba(37,99,235,.3); outline-offset: 4px; }
.page-number {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(17,24,39,.78);
    color: #fff;
    font-size: 12px;
    pointer-events: none;
}
footer {
    background: #29292e;
    color: #fff;
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding: 34px 0;
}
footer a { display: block; margin-top: 8px; color: #fff; }
footer p { color: rgba(255,255,255,.72); }
.footer-bottom {
    padding: 16px 0;
    color: rgba(255,255,255,.68);
    border-top: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 850px) {
    .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-toggle { display: inline-flex; }
    .nav-links {
        position: absolute;
        top: 66px;
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .footer-main { grid-template-columns: 1fr; }
    .editor-app { grid-template-columns: 1fr; }
    .editor-sidebar {
        position: sticky;
        top: 66px;
        height: auto;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .editor-file { display: none; }
    .page-thumbs {
        display: flex;
        gap: 10px;
        padding: 9px 12px;
    }
    .page-thumb { flex: 0 0 76px; padding: 5px; }
    .editor-commandbar {
        top: 170px;
        overflow-x: auto;
        padding: 7px 10px;
    }
    .editor-toolbar {
        top: 222px;
        grid-template-columns: 1fr;
        align-items: stretch;
        flex-wrap: wrap;
    }
    .tool-segment {
        order: 1;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .editor-properties {
        order: 2;
        flex: 1 1 auto;
        overflow-x: auto;
    }
    .editor-page-actions { margin-right: auto; }
}
@media (max-width: 560px) {
    .wrap, .nav, .footer-main, .footer-bottom { width: min(100% - 22px, 1160px); }
    .hero { padding: 34px 0; }
    .hero h1 { font-size: 34px; }
    .tools { grid-template-columns: 1fr; gap: 14px; }
    .layout.home-tools .tool-link {
        grid-template-columns: 58px 1fr;
        align-items: center;
        min-height: 118px;
        padding: 20px;
    }
    .layout.home-tools .tool-icon { grid-row: 1 / span 2; }
    .layout.home-tools .tool-link > span:not(.tool-icon) { align-self: center; }
    .layout.home-tools .tool-link strong { font-size: 16px; }
    .layout.home-tools .tool-link span span { font-size: 13px; }
    .option-grid.two, .option-grid.three, .option-grid.four { grid-template-columns: 1fr; }
    .file-item { align-items: flex-start; flex-direction: column; }
    .editor-intro { width: min(100% - 22px, 960px); padding: 38px 0 54px; }
    .editor-intro h1 { font-size: 34px; }
    .editor-sidebar { top: 64px; }
    .page-thumb { flex-basis: 66px; font-size: 10px; }
    .editor-commandbar {
        top: 151px;
        min-height: 48px;
    }
    .editor-page-actions button { padding: 0 8px; font-size: 11px; }
    .editor-toolbar {
        position: sticky;
        top: 199px;
        gap: 8px;
        padding: 8px 10px;
    }
    .editor-tool, .danger-tool, .export-editor {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }
    .editor-properties label span { display: none; }
    .editor-properties input[type="text"] { width: 125px; }
    .editor-properties { min-width: 0; }
    .editor-status { padding: 7px 11px; font-size: 12px; }
    .page-stage { gap: 18px; padding: 18px 8px 48px; }
}

/* BurnPdf warm visual theme. */
:root {
    --brand: #dc3b1d;
    --brand-dark: #a92212;
    --brand-blue: #ff9d25;
    --brand-pink: #f5673c;
    --brand-gold: #f7bf3e;
    --ink: #111827;
    --muted: #647084;
    --line: #f0e3df;
    --soft: #fff5f0;
    --shadow: 0 18px 50px rgba(112, 42, 18, .10);
}
html { scroll-behavior: smooth; }
body {
    color: var(--ink);
    background:
        radial-gradient(circle at 13% 16%, rgba(220,59,29,.10), transparent 26%),
        radial-gradient(circle at 85% 9%, rgba(255,157,37,.12), transparent 25%),
        linear-gradient(180deg, #fffaf8 0%, #fff 42%, #fff5f0 100%);
    font-family: Poppins, Graphik, Arial, sans-serif;
    letter-spacing: 0;
}
.wrap, .nav, .footer-main, .footer-bottom {
    width: min(100% - 48px, 1220px);
}
header {
    border-bottom: 1px solid rgba(240,227,223,.92);
    background: rgba(255,255,255,.88);
    box-shadow: 0 8px 28px rgba(112,42,18,.06);
}
.nav { min-height: 74px; }
.brand {
    gap: 9px;
    font-size: 21px;
    letter-spacing: -.2px;
}
.brand-mark {
    width: 28px;
    height: 32px;
    border-radius: 7px 9px 7px 7px;
    background: linear-gradient(145deg, #dc3b1d, #ff9d25);
    box-shadow: 0 10px 22px rgba(220,59,29,.22);
}
.brand-mark::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-top: 9px solid #fff;
    border-left: 9px solid transparent;
    opacity: .9;
}
.brand-mark::after {
    inset: 9px 7px auto 7px;
    width: 12px;
    height: 9px;
    border: 0;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: none;
}
.brand-mark.mini {
    width: 18px;
    height: 21px;
    border-radius: 5px;
}
.nav-links { gap: 10px; }
.nav-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #252a3a;
    font-size: 14px;
    font-weight: 700;
}
.nav-links a:hover {
    background: #fff0ea;
    color: var(--brand);
}
.menu-toggle {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: 42px;
    height: 38px;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0;
    border-radius: 999px;
    background: #1f2937;
    transition: transform .18s ease, opacity .18s ease;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.premium-hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 48px;
}
.premium-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(220,59,29,.08), transparent 42%),
        linear-gradient(315deg, rgba(255,90,106,.08), transparent 40%);
    pointer-events: none;
}
.premium-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: #1d2332;
    font-weight: 900;
}
.hero-kicker::before {
    content: "";
    width: 18px;
    height: 22px;
    border-radius: 5px;
    background: linear-gradient(145deg, #dc3b1d, #ff9d25);
}
.hero-copy h1 {
    margin: 0;
    max-width: 420px;
    font-size: clamp(44px, 5vw, 66px);
    line-height: 1.04;
    letter-spacing: 0;
}
.hero-copy h1 span,
.home-phone h2 span,
.screen-mini h4 span {
    color: var(--brand);
}
.hero-copy p {
    max-width: 360px;
    margin: 22px 0 0;
    color: #253044;
    font-size: 20px;
    line-height: 1.55;
}
.hero-pills {
    justify-content: flex-start;
    margin-top: 26px;
    padding: 8px 11px;
    width: fit-content;
    border-radius: 16px;
    background: #ecebff;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(220,59,29,.06);
}
.hero-pills span {
    min-height: auto;
    padding: 0 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--brand);
    font-size: 14px;
}
.hero-pills span + span {
    border-left: 1px solid rgba(220,59,29,.22);
}
.workflow-badges {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}
.workflow-badges span {
    min-width: 94px;
    padding: 12px 13px;
    border-radius: 14px;
    background: #fff;
    color: #3d4560;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    box-shadow: var(--shadow);
}
.phone-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 26px;
    align-items: start;
}
.phone-card {
    min-height: 570px;
    padding: 18px;
    border: 1px solid rgba(232,232,244,.95);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 24px 60px rgba(48,42,95,.10);
}
.phone-card:nth-child(2) { margin-top: 10px; }
.phone-card:nth-child(3) { margin-top: 24px; }
.phone-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 900;
}
.brand-mini {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.home-phone h2 {
    margin: 24px 0 8px;
    font-size: 28px;
    line-height: 1.12;
}
.home-phone p,
.phone-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.mock-upload {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 190px;
    margin: 22px 0 20px;
    border: 1.5px dashed #d5cee9;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}
.upload-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff0ea;
    color: var(--brand);
    font-size: 26px;
    font-weight: 900;
}
.mock-upload b,
.primary-mock,
.screen-drop b,
.screen-mini > b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc3b1d, #a92212);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.mock-upload em {
    color: #1eaf74;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}
.mini-tools {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.mini-tools span,
.edit-actions span,
.share-row span,
.format-row span {
    padding: 11px 9px;
    border-radius: 11px;
    background: #f8f7ff;
    color: #31384c;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
}
.edit-canvas {
    position: relative;
    min-height: 290px;
    margin: 18px 0;
    padding: 36px 24px;
    border-radius: 16px;
    background:
        repeating-linear-gradient(180deg, transparent 0 34px, rgba(17,24,39,.08) 35px, transparent 37px),
        #fffaf8;
}
.faint-letter {
    color: rgba(17,24,39,.22);
    font-size: 56px;
}
.selected-text {
    position: absolute;
    top: 104px;
    left: 42px;
    padding: 3px 6px;
    border: 3px solid var(--brand);
    color: #172033;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.28;
    background: rgba(255,255,255,.55);
}
.selected-text::before,
.selected-text::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand);
}
.selected-text::before { left: -7px; top: -7px; }
.selected-text::after { right: -7px; bottom: -7px; }
.edit-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.primary-mock {
    width: 100%;
}
.success-mark {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 82px auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #20c884, #48dfa4);
    color: #fff;
    font-size: 48px;
    font-weight: 900;
}
.success-phone h3 {
    max-width: 250px;
    margin: 0 auto 8px;
    text-align: center;
    font-size: 20px;
    line-height: 1.35;
}
.success-phone p { text-align: center; }
.share-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.all-tools-section {
    padding: 30px 0 54px;
}
.section-heading {
    text-align: center;
    margin-bottom: 26px;
}
.section-heading h2 {
    margin: 0;
    font-size: 30px;
}
.section-heading p {
    max-width: 620px;
    margin: 8px auto 0;
    color: var(--muted);
}
.premium-tools {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}
.premium-tool-card {
    min-height: 210px;
    padding: 24px 18px 18px;
    border: 1px solid #f2e5e1;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(47,45,96,.07);
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.premium-tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220,59,29,.34);
    box-shadow: 0 20px 46px rgba(73,65,150,.13);
}
.premium-tool-card .tool-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 6px;
    border-radius: 14px;
    background-color: #f3f0ff;
}
.premium-tool-card strong {
    font-size: 16px;
}
.premium-tool-card span span {
    min-height: 54px;
    margin-top: 8px;
    font-size: 12px;
}
.premium-tool-card em {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-top: 10px;
    border-radius: 50%;
    background: #fff1ea;
    color: var(--brand);
    font-style: normal;
    font-weight: 900;
}
.workflow-section {
    padding: 20px 0 36px;
}
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.workflow-card {
    display: grid;
    gap: 14px;
    text-align: center;
    font-weight: 900;
}
.screen-mini {
    min-height: 300px;
    padding: 18px;
    border: 1px solid #ededf7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(49,45,110,.08);
    text-align: left;
}
.screen-mini h4 {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.35;
}
.screen-drop {
    display: grid;
    place-items: center;
    min-height: 145px;
    border: 1px dashed #efd8d0;
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}
.format-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.screen-mini p {
    padding: 13px;
    border-radius: 10px;
    background: #f9f9ff;
    color: #41495f;
    font-size: 12px;
}
.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid #eaeaf7;
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow);
}
.feature-strip article {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 5px 12px;
    align-items: center;
}
.feature-strip strong { font-size: 14px; }
.feature-strip p {
    grid-column: 2;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.feature-symbol {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f3f0ff;
    position: relative;
}
.feature-symbol.secure::before {
    content: "";
    width: 15px;
    height: 13px;
    border: 2px solid var(--brand);
    border-radius: 4px;
    border-top-width: 7px;
}
.feature-symbol.clean::before,
.feature-symbol.fast::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid var(--brand-pink);
    transform: rotate(45deg);
}
.feature-symbol.device::before {
    content: "";
    width: 22px;
    height: 15px;
    border: 2px solid #2caedb;
    border-radius: 4px;
}
footer {
    margin-top: 28px;
    background: #071126;
    color: #fff;
}
.footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
    gap: 34px;
    padding: 44px 0 34px;
}
footer h3 { margin: 0 0 12px; font-size: 14px; }
footer a {
    margin-top: 9px;
    color: rgba(255,255,255,.78);
    font-size: 13px;
}
footer p {
    max-width: 280px;
    color: rgba(255,255,255,.68);
    font-size: 13px;
    line-height: 1.6;
}
.footer-brand { margin-bottom: 14px; }
.subscribe-form {
    display: flex;
    gap: 8px;
    padding: 0;
}
.subscribe-form input {
    min-width: 0;
    height: 40px;
    flex: 1;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font: inherit;
}
.subscribe-form button {
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 900;
}
.footer-bottom {
    text-align: center;
    color: rgba(255,255,255,.55);
}
.tool-page, .download-page {
    padding: 54px 0 82px;
}
.panel {
    max-width: 860px;
    margin: 0 auto;
    border-color: #f2e5e1;
    border-radius: 22px;
    box-shadow: 0 22px 58px rgba(49,45,110,.10);
}
.panel-head {
    padding: 34px 34px 18px;
    text-align: center;
    border-bottom: 0;
}
.panel-head h1 {
    font-size: 36px;
}
.drop {
    min-height: 250px;
    border-color: #d9d2f4;
    border-radius: 18px;
    background: #fff;
}
.drop strong { color: #1d2332; }
.drop::before {
    content: "";
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(220,59,29,.16), rgba(255,157,37,.14));
    box-shadow: inset 0 0 0 1px rgba(220,59,29,.10);
}
.actions button,
.download,
.editor-upload,
.export-editor {
    border-radius: 10px;
    background: linear-gradient(135deg, #dc3b1d, #a92212);
    box-shadow: 0 12px 24px rgba(220,59,29,.18);
}
.option-card,
.file-item {
    border-color: #f2e5e1;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(49,45,110,.06);
}
.editor-shell {
    background:
        radial-gradient(circle at 12% 14%, rgba(220,59,29,.10), transparent 26%),
        linear-gradient(180deg, #fffaf8, #fff3ef);
}
.editor-intro {
    padding: 72px 0 88px;
}
.editor-intro h1 {
    font-size: 46px;
}
.editor-intro p {
    max-width: 560px;
}
.editor-upload-page {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: initial;
}
.editor-upload-page .editor-upload-content {
    padding: 28px;
}
.tool-showcase-head {
    text-align: center;
    margin: 0 auto 30px;
}
.tool-showcase-head h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 48px);
    line-height: 1.08;
}
.tool-showcase-head p {
    max-width: 560px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 16px;
}
.edit-workflow-page {
    width: min(100% - 48px, 980px);
}
.edit-workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}
.editor-upload-phone {
    text-align: left;
}
.editor-upload-phone h2 {
    margin: 24px 0 8px;
    font-size: 28px;
    line-height: 1.12;
}
.editor-upload-phone h2 span {
    color: var(--brand);
}
.editor-upload.mock-upload {
    display: grid;
    min-height: 190px;
    padding: 20px;
    border: 1.5px dashed #d5cee9;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: none;
}
.editor-upload.mock-upload input {
    z-index: 2;
}
.editor-upload.mock-upload strong {
    font-size: 13px;
}
.editor-upload.mock-upload b {
    min-height: 36px;
    color: #fff;
}
.tip-card {
    display: grid;
    gap: 5px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8f6ff;
    color: #586071;
    font-size: 12px;
    text-align: left;
}
.share-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 36px;
    padding: 18px;
    border: 1px solid #ededf7;
    border-radius: 18px;
    background: #fff;
    text-align: center;
}
.share-box strong {
    grid-column: 1 / -1;
    font-size: 12px;
}
.share-box span {
    color: #4f5a70;
    font-size: 10px;
    font-weight: 800;
}
.tool-workflow-page {
    padding: 54px 0 76px;
}
.merge-workflow-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(240px, 320px) minmax(240px, 320px);
    gap: 28px;
    justify-content: center;
    align-items: start;
}
.merge-phone {
    display: block;
    min-height: 620px;
    padding: 18px;
}
.merge-phone h2,
.merge-preview-phone h2 {
    margin: 26px 0 18px;
    font-size: 20px;
    line-height: 1.35;
}
.merge-drop {
    min-height: 190px;
    padding: 20px;
    border: 1.5px dashed #efd8d0;
    border-radius: 15px;
    background: #fff;
}
.merge-drop::before {
    display: none;
}
.merge-drop strong {
    margin-top: 0;
    font-size: 13px;
}
.merge-drop small {
    margin: 2px 0;
    color: var(--muted);
}
.merge-drop b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-top: 6px;
    padding: 0 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc3b1d, #a92212);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.merge-file-list {
    margin-top: 14px;
    gap: 10px;
}
.merge-phone .file-item {
    min-height: 70px;
    padding: 12px 42px 12px 12px;
    border-radius: 12px;
    background: #fafaff;
    box-shadow: none;
}
.merge-phone .file-preview {
    width: 38px;
    height: 46px;
    border-radius: 8px;
}
.merge-phone .file-preview object {
    display: none;
}
.merge-phone .file-preview::before {
    content: "";
    display: block;
    width: 20px;
    height: 26px;
    margin: 9px auto;
    border: 2px solid #a7a9bc;
    border-radius: 4px;
    background: #fff;
}
.merge-phone .file-item strong {
    display: block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.merge-phone .file-item span {
    color: var(--muted);
    font-size: 11px;
}
.merge-add-more {
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border: 0;
    border-radius: 11px;
    background: #fff1ea;
    color: var(--brand);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}
.merge-phone .actions {
    margin-top: 14px;
}
.merge-phone .actions button {
    width: 100%;
}
.phone-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 22px;
    padding-top: 13px;
    border-top: 1px solid #eeeeF8;
}
.phone-bottom-nav span {
    color: #657084;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
}
.merge-preview-phone {
    min-height: 540px;
}
.merge-demo-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}
.merge-demo-list p {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    background: #fafaff;
    color: #2d3548;
    font-weight: 800;
}
.merge-demo-list small {
    color: var(--muted);
}
.merge-success-phone {
    min-height: 540px;
}
@media (max-width: 1080px) {
    .premium-hero-grid {
        grid-template-columns: 1fr;
    }
    .phone-showcase {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .premium-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .edit-workflow-grid,
    .merge-workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 360px));
    }
}
@media (max-width: 850px) {
    .nav-links {
        top: 74px;
        left: 24px;
        right: 24px;
        border-radius: 18px;
    }
    .premium-hero { padding-top: 42px; }
    .phone-showcase {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    .phone-card {
        min-height: auto;
        margin-top: 0 !important;
    }
    .edit-workflow-grid,
    .merge-workflow-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    .premium-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .wrap, .nav, .footer-main, .footer-bottom {
        width: min(100% - 28px, 1220px);
    }
    .brand { font-size: 20px; }
    .hero-copy h1 { font-size: 42px; }
    .hero-copy p { font-size: 16px; }
    .workflow-badges { flex-wrap: wrap; }
    .premium-tools,
    .workflow-grid,
    .feature-strip,
    .footer-main {
        grid-template-columns: 1fr;
    }
    .premium-tool-card {
        grid-template-columns: 58px 1fr;
        align-items: center;
        min-height: 132px;
        text-align: left;
    }
    .premium-tool-card .tool-icon {
        margin: 0;
    }
    .premium-tool-card span span {
        min-height: auto;
    }
    .feature-strip { padding: 16px; }
    .subscribe-form { flex-direction: column; }
}

/* Advanced Edit PDF workspace: desktop inspector + mobile bottom editor. */
.advanced-editor {
    grid-template-columns: 210px minmax(0, 1fr);
    background:
        radial-gradient(circle at 78% 8%, rgba(255,157,37,.12), transparent 24%),
        linear-gradient(180deg, #fffaf8, #fff0eb);
}
.advanced-editor .editor-sidebar {
    background: rgba(255,255,255,.96);
    border-right: 1px solid #f2e5e1;
    box-shadow: 12px 0 34px rgba(49,45,110,.04);
}
.advanced-editor .editor-file {
    gap: 10px;
    padding: 18px;
}
.advanced-editor .editor-file strong {
    font-size: 14px;
}
.advanced-editor .editor-file button {
    border-radius: 10px;
    background: #f6f4ff;
    color: var(--brand);
}
.advanced-editor .page-thumb {
    border-radius: 14px;
    border-color: #f2e5e1;
    box-shadow: 0 10px 22px rgba(49,45,110,.06);
}
.advanced-editor .editor-main {
    min-width: 0;
}
.workspace-title {
    display: grid;
    gap: 2px;
    margin-right: auto;
}
.workspace-title strong {
    font-size: 16px;
}
.workspace-title span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.advanced-editor .editor-commandbar {
    top: 74px;
    min-height: 68px;
    padding: 10px 18px;
    border-bottom: 1px solid #f2e5e1;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 34px rgba(49,45,110,.05);
}
.advanced-editor .editor-commandbar button {
    border-radius: 10px;
}
.advanced-editor-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 18px;
    align-items: start;
    padding: 18px;
}
.canvas-column {
    min-width: 0;
    border: 1px solid #f2e5e1;
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 20px 55px rgba(49,45,110,.08);
    overflow: hidden;
}
.advanced-editor .editor-toolbar {
    position: sticky;
    top: 142px;
    min-height: 68px;
    display: block;
    padding: 12px;
    border-bottom-color: #f2e5e1;
    background: rgba(255,255,255,.95);
}
.advanced-editor .tool-segment {
    display: grid;
    grid-template-columns: repeat(8, minmax(72px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding: 6px;
    border: 1px solid #f2e5e1;
    border-radius: 16px;
    background: #f8f7ff;
}
.advanced-editor .editor-tool {
    min-height: 46px;
    border-radius: 12px;
    color: #31384c;
}
.advanced-editor .editor-tool.active {
    background: linear-gradient(135deg, #dc3b1d, #a92212);
    color: #fff;
    box-shadow: 0 12px 20px rgba(220,59,29,.18);
}
.advanced-editor .editor-status {
    border-bottom-color: #f2e5e1;
    background: #fffaf8;
}
.advanced-editor .page-stage {
    min-height: calc(100vh - 270px);
    padding: 34px 22px 80px;
}
.advanced-editor .editor-page {
    border-radius: 8px;
    box-shadow: 0 26px 70px rgba(34,37,62,.18);
}
.editor-inspector {
    position: sticky;
    top: 160px;
    display: grid;
    gap: 14px;
}
.inspector-card {
    border: 1px solid #f2e5e1;
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 42px rgba(49,45,110,.08);
    overflow: hidden;
}
.inspector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #f0f0f8;
}
.inspector-head strong {
    font-size: 15px;
}
.inspector-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.editor-inspector .editor-properties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 14px;
    overflow: visible;
}
.editor-inspector .editor-properties label {
    gap: 6px;
    font-size: 11px;
}
.editor-inspector .editor-properties label:first-child {
    grid-column: 1 / -1;
}
.editor-inspector .editor-properties input[type="text"],
.editor-inspector .editor-properties input[type="number"],
.editor-inspector .editor-properties select {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border-color: #e5e7f1;
}
.editor-inspector .editor-properties input[type="range"] {
    width: 100%;
}
.editor-inspector .editor-properties input[type="color"] {
    width: 100%;
    height: 38px;
    border-radius: 10px;
}
.editor-inspector .editor-properties button {
    min-height: 38px;
    border-radius: 10px;
}
.layer-list,
.ai-actions {
    display: grid;
    gap: 9px;
    padding: 14px;
}
.layer-list span,
.ai-actions button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #f2e5e1;
    border-radius: 11px;
    background: #fffaf8;
    color: #384155;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}
.ai-card {
    background:
        linear-gradient(135deg, rgba(220,59,29,.08), rgba(255,157,37,.08)),
        #fff;
}
.ai-actions button {
    cursor: default;
}
@media (max-width: 1180px) {
    .advanced-editor-workspace {
        grid-template-columns: minmax(0, 1fr) 292px;
    }
    .advanced-editor .tool-segment {
        grid-template-columns: repeat(4, minmax(78px, 1fr));
    }
}
@media (max-width: 900px) {
    .advanced-editor {
        display: grid;
        grid-template-columns: 1fr;
    }
    .advanced-editor .editor-sidebar {
        top: 74px;
        height: auto;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #f2e5e1;
    }
    .advanced-editor .editor-commandbar {
        top: 150px;
        overflow-x: auto;
    }
    .workspace-title {
        min-width: 170px;
    }
    .advanced-editor-workspace {
        display: block;
        padding: 10px;
    }
    .canvas-column {
        border-radius: 18px;
    }
    .advanced-editor .editor-toolbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        z-index: 42;
        min-height: 0;
        padding: 8px;
        border: 1px solid #f2e5e1;
        border-radius: 20px;
        box-shadow: 0 24px 60px rgba(25,28,52,.22);
    }
    .advanced-editor .tool-segment {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border: 0;
        background: transparent;
    }
    .advanced-editor .editor-tool {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 0 13px;
    }
    .editor-inspector {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 74px;
        z-index: 41;
        max-height: 42vh;
        overflow: auto;
        border-radius: 22px 22px 18px 18px;
    }
    .inspector-card {
        border-radius: 18px;
    }
    .layers-card,
    .ai-card {
        display: none;
    }
    .editor-inspector .editor-properties {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
        overflow-x: auto;
    }
    .editor-inspector .editor-properties label:first-child {
        grid-column: span 2;
    }
    .advanced-editor .page-stage {
        padding-bottom: 390px;
    }
}
@media (max-width: 560px) {
    .advanced-editor .editor-commandbar {
        top: 138px;
        min-height: 56px;
        padding: 8px 10px;
    }
    .workspace-title span {
        display: none;
    }
    .advanced-editor .editor-commandbar .export-editor {
        min-width: 120px;
    }
    .advanced-editor .page-stage {
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 420px;
    }
    .editor-inspector .editor-properties {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
    }
}

/* Final pass: closer to the uploaded desktop/mobile reference. */
.edit-workflow-page {
    width: min(100% - 42px, 1120px);
    padding-top: 40px;
}
.edit-workflow-page .tool-showcase-head {
    margin-bottom: 34px;
}
.edit-workflow-page .tool-showcase-head h1 {
    font-size: 24px;
    font-weight: 900;
}
.edit-workflow-page .tool-showcase-head p {
    margin-top: 8px;
    font-size: 13px;
}
.edit-workflow-page .edit-workflow-grid {
    grid-template-columns: repeat(3, 260px);
    justify-content: center;
    gap: 30px;
}
.edit-workflow-page .phone-card {
    min-height: 560px;
    margin-top: 0 !important;
    padding: 16px;
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(44,43,93,.10);
}
.edit-workflow-page .phone-top {
    min-height: 32px;
    font-size: 12px;
}
.edit-workflow-page .phone-top > span:last-child {
    position: relative;
    width: 20px;
    height: 18px;
    overflow: hidden;
    color: transparent;
    font-size: 0;
}
.edit-workflow-page .phone-top > span:last-child::before,
.edit-workflow-page .phone-top > span:last-child::after {
    content: "";
    position: absolute;
    right: 1px;
    width: 14px;
    height: 2px;
    border-radius: 99px;
    background: #151b2d;
    box-shadow: 0 5px 0 #151b2d;
}
.edit-workflow-page .phone-top > span:last-child::before { top: 3px; }
.edit-workflow-page .phone-top > span:last-child::after { top: 13px; box-shadow: none; }
.editor-upload-phone h2 {
    margin-top: 24px;
    font-size: 25px;
}
.editor-upload-phone p {
    max-width: 180px;
}
.editor-upload.mock-upload {
    min-height: 188px;
    margin-top: 20px;
    margin-bottom: 18px;
}
.upload-icon {
    position: relative;
    color: transparent;
    font-size: 0;
}
.upload-icon::before {
    content: "";
    width: 22px;
    height: 26px;
    border: 2px solid var(--brand);
    border-radius: 6px;
    background: #fff;
}
.upload-icon::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 18px;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--brand);
    border-top: 2px solid var(--brand);
    transform: rotate(45deg);
}
.edit-workflow-page .mini-tools {
    gap: 9px;
}
.edit-workflow-page .mini-tools span,
.edit-workflow-page .edit-actions span,
.edit-workflow-page .share-row span {
    border: 1px solid #f0eef8;
    background: #fbfaff;
    font-size: 10px;
}
.edit-workflow-page .edit-canvas {
    min-height: 282px;
    border: 1px solid #f0eef8;
    background:
        repeating-linear-gradient(180deg, transparent 0 32px, rgba(17,24,39,.07) 33px, transparent 35px),
        linear-gradient(180deg, #fbfaff, #fff);
}
.edit-workflow-page .selected-text {
    top: 104px;
    left: 40px;
    font-size: 19px;
    border-color: #c83219;
    box-shadow:
        -8px -8px 0 -3px #c83219,
        8px -8px 0 -3px #c83219,
        -8px 8px 0 -3px #c83219,
        8px 8px 0 -3px #c83219;
}
.success-mark {
    position: relative;
    color: transparent;
    font-size: 0;
}
.success-mark::before {
    content: "";
    width: 32px;
    height: 17px;
    border-left: 6px solid #fff;
    border-bottom: 6px solid #fff;
    transform: rotate(-45deg);
    margin-top: -6px;
}
.edit-workflow-page .success-phone h3 {
    font-size: 18px;
}
.edit-workflow-page .share-box {
    margin-top: 30px;
    padding: 15px;
}
.advanced-editor {
    min-height: calc(100vh - 74px);
}
.advanced-editor .editor-commandbar {
    gap: 12px;
}
.advanced-editor .editor-history,
.advanced-editor .editor-zoom,
.advanced-editor .editor-page-actions {
    padding: 4px;
    border: 1px solid #f0eff9;
    border-radius: 14px;
    background: #fbfaff;
}
.advanced-editor .tool-segment {
    scrollbar-width: thin;
}
.advanced-editor .editor-tool {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 74px;
    padding: 8px 9px;
    font-size: 12px;
}
.advanced-editor .editor-tool::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #ffe9df;
    box-shadow: inset 0 0 0 1px rgba(220,59,29,.12);
}
.advanced-editor .editor-tool[data-editor-tool="image"]::before { background: #fff6d9; }
.advanced-editor .editor-tool[data-editor-tool="rect"]::before,
.advanced-editor .editor-tool[data-editor-tool="ellipse"]::before { background: #ecfff7; }
.advanced-editor .editor-tool[data-editor-tool="highlight"]::before { background: #fff8dc; }
.advanced-editor .editor-tool[data-editor-tool="freehand"]::before { background: #fff0f5; }
.advanced-editor .editor-tool.active::before {
    background: rgba(255,255,255,.22);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
}
.editor-inspector .properties-card {
    border-top: 4px solid var(--brand);
}
.editor-inspector .editor-properties label {
    color: #485166;
}
.editor-inspector .editor-properties button {
    background: #f8f7ff;
}
.editor-inspector .editor-properties .danger-tool {
    background: #fff2f2;
}
.ai-card .inspector-head strong::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3b1d, #ff9d25);
}
@media (max-width: 900px) {
    .edit-workflow-page {
        width: 100%;
        padding: 28px 0 62px;
    }
    .edit-workflow-page .tool-showcase-head {
        width: min(100% - 28px, 520px);
    }
    .edit-workflow-page .edit-workflow-grid {
        display: flex;
        gap: 18px;
        justify-content: flex-start;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0 18px 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }
    .edit-workflow-page .phone-card {
        flex: 0 0 min(82vw, 310px);
        scroll-snap-align: center;
    }
    .advanced-editor .editor-sidebar {
        top: 74px;
    }
    .advanced-editor .editor-commandbar {
        top: 148px;
        border-radius: 0 0 18px 18px;
    }
    .advanced-editor .editor-history,
    .advanced-editor .editor-page-actions {
        display: none;
    }
    .editor-inspector {
        background: transparent;
    }
    .properties-card {
        box-shadow: 0 18px 52px rgba(25,28,52,.20);
    }
    .editor-inspector .editor-properties label span {
        display: block;
    }
    .advanced-editor .editor-toolbar {
        backdrop-filter: blur(16px);
        background: rgba(255,255,255,.94);
    }
}
@media (max-width: 560px) {
    .edit-workflow-page .phone-card {
        flex-basis: min(86vw, 300px);
        min-height: 540px;
    }
    .advanced-editor .editor-commandbar {
        top: 134px;
    }
    .advanced-editor .editor-zoom {
        display: none;
    }
    .editor-inspector {
        bottom: 78px;
        max-height: 46vh;
    }
    .inspector-head {
        padding: 13px 14px 10px;
    }
    .editor-inspector .editor-properties {
        gap: 9px;
        padding: 12px;
    }
    .advanced-editor .editor-tool {
        min-width: 68px;
    }
}

/* Shared download page for every tool. */
.download-success-page {
    min-height: calc(100vh - 74px);
    padding: 58px 0 76px;
    background:
        radial-gradient(circle at 22% 18%, rgba(220,59,29,.12), transparent 25%),
        radial-gradient(circle at 78% 12%, rgba(255,157,37,.12), transparent 24%),
        linear-gradient(180deg, #fffaf8, #fff5f1);
}
.download-success-wrap {
    display: grid;
    place-items: center;
}
.download-card {
    width: min(100%, 430px);
    padding: 18px;
    border: 1px solid #f2e5e1;
    border-radius: 28px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 70px rgba(49,45,110,.13);
    text-align: center;
}
.download-success-mark {
    margin: 0 auto 24px;
}
.download-card h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.25;
}
.download-file-name {
    margin: 10px auto 22px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.download-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.download-actions .primary-download {
    grid-column: 1 / -1;
}
.primary-download,
.ghost-download {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
}
.ghost-download {
    border: 1px solid #f2e5e1;
    background: #fff;
    color: #273044;
    box-shadow: none;
}
.download-share {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 34px;
    padding: 18px;
    border: 1px solid #f2e5e1;
    border-radius: 20px;
    background: #fff;
}
.download-share strong {
    grid-column: 1 / -1;
    font-size: 13px;
}
.download-share .social-share {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 66px;
    min-width: 0;
    padding: 8px 4px;
    border: 1px solid #f0e3df;
    border-radius: 12px;
    background: #fffaf8;
    font-size: 10px;
    font-weight: 900;
}
.social-share svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.social-share span { white-space: nowrap; }
.social-share.whatsapp { color: #168a48; background: #f1fbf5; }
.social-share.telegram { color: #188bc7; background: #f0f9ff; }
.social-share.facebook { color: #1877f2; background: #f1f6ff; }
.download-more-tools {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #f2e5e1;
    border-radius: 20px;
    background: #fff;
}
.download-more-tools > strong {
    font-size: 13px;
}
.more-tool-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}
.more-tool-shortcut {
    display: grid;
    grid-template-rows: 34px minmax(22px, auto);
    place-items: center;
    gap: 4px;
    min-height: 80px;
    min-width: 0;
    padding: 8px 2px;
    border: 1px solid #f0e3df;
    border-radius: 12px;
    background: #fffaf8;
    color: #273044;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.05;
    text-align: center;
}
.more-tool-icon {
    width: 34px;
    height: 34px;
    background-image: url("../assets/tool-icons.png");
    background-size: 400% 400%;
    filter: drop-shadow(0 3px 3px rgba(30,30,35,.10));
}
.more-tool-icon.merge { background-position: 0 0; }
.more-tool-icon.compress { background-position: 66.666% 0; }
.more-tool-icon.image-to-pdf { background-position: 100% 0; }
.more-tool-icon.word-to-pdf { background-position: 0 33.333%; }
.more-tool-icon.edit-pdf {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #ffe9df;
    color: #dc3b1d;
    filter: none;
}
.more-tool-icon.edit-pdf svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.missing-card {
    padding: 44px 28px;
}
.error-mark {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fff0f0;
    color: #e5484d;
    font-size: 36px;
    font-weight: 900;
}
@media (max-width: 560px) {
    .download-success-page {
        padding: 28px 0 52px;
    }
    .download-card {
        width: min(100%, 340px);
        border-radius: 24px;
    }
    .download-share {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .more-tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

/* Shared upload experience for every tool page. */
.upload-drop,
.merge-drop {
    position: relative;
    overflow: hidden;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.upload-drop {
    isolation: isolate;
    min-height: 280px;
    padding: 34px 26px;
    gap: 8px;
    border: 1.5px dashed #efc9be;
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 18%, rgba(220,59,29,.10), transparent 30%),
        radial-gradient(circle at 80% 88%, rgba(255,157,37,.12), transparent 28%),
        #fff;
}
.upload-drop::before {
    display: none;
}
.upload-drop::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(220,59,29,.12), rgba(255,157,37,.12));
    opacity: 0;
    transition: opacity .2s ease;
}
.upload-drop:hover,
.upload-drop.is-dragging,
.merge-drop.is-dragging {
    border-color: #dc3b1d;
    background:
        radial-gradient(circle at 20% 18%, rgba(220,59,29,.14), transparent 30%),
        radial-gradient(circle at 80% 88%, rgba(255,157,37,.15), transparent 28%),
        #fbfaff;
    box-shadow: 0 18px 44px rgba(64,52,130,.10);
}
.upload-drop.is-dragging::after {
    opacity: 1;
}
.editor-upload.mock-upload.is-dragging {
    border-color: #dc3b1d;
    background:
        radial-gradient(circle at 20% 18%, rgba(220,59,29,.14), transparent 30%),
        radial-gradient(circle at 80% 88%, rgba(255,157,37,.15), transparent 28%),
        #fbfaff;
    box-shadow: 0 18px 44px rgba(64,52,130,.10);
}
.drop input {
    z-index: 3;
}
.upload-drop > *:not(input),
.merge-drop > *:not(input) {
    position: relative;
    z-index: 1;
}
.upload-drop .upload-icon,
.merge-drop .upload-icon {
    margin: 0 auto 8px;
    animation: uploadFloat 2.4s ease-in-out infinite;
}
.upload-drop strong {
    margin: 0;
    color: #172033;
    font-size: 24px;
    line-height: 1.15;
}
.upload-drop small {
    color: #6d7284;
    font-size: 14px;
    font-weight: 700;
}
.upload-drop b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 8px;
    padding: 0 22px;
    border-radius: 11px;
    background: linear-gradient(135deg, #dc3b1d, #a92212);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(220,59,29,.20);
}
.upload-drop em {
    margin-top: 8px;
    color: #1ea66d;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}
.file-list {
    gap: 14px;
}
.file-item {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,250,255,.96)),
        radial-gradient(circle at 8% 10%, rgba(220,59,29,.10), transparent 32%);
}
.file-meta {
    min-width: 0;
}
.file-meta strong {
    display: block;
    max-width: 420px;
    overflow: hidden;
    color: #172033;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-meta span {
    display: block;
    margin-top: 6px;
    color: #6d7284;
    font-size: 13px;
    font-weight: 700;
}
.remove-file {
    display: grid;
    place-items: center;
    background: #fff0f0;
    color: #e5484d;
    font-size: 0;
    box-shadow: inset 0 0 0 1px rgba(229,72,77,.12);
}
.remove-file::before,
.remove-file::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.remove-file::before {
    transform: rotate(45deg);
}
.remove-file::after {
    transform: rotate(-45deg);
}
.form-status-note {
    color: #6d7284;
}
.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(17,24,39,.42);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.upload-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.upload-processing-card {
    width: min(100%, 430px);
    padding: 30px;
    border: 1px solid rgba(255,255,255,.64);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 90px rgba(22,24,64,.24);
    text-align: center;
    transform: translateY(14px) scale(.98);
}
.upload-overlay.visible .upload-processing-card {
    animation: uploadCardIn .28s ease forwards;
}
.upload-spinner {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(220,59,29,.12), rgba(255,157,37,.14));
}
.upload-spinner::before {
    content: "";
    width: 34px;
    height: 34px;
    border: 4px solid rgba(220,59,29,.18);
    border-top-color: #dc3b1d;
    border-radius: 50%;
    animation: uploadSpin .85s linear infinite;
}
.upload-processing-card h2 {
    margin: 0;
    color: #172033;
    font-size: 22px;
}
.upload-processing-card p {
    margin: 8px 0 18px;
    color: #6d7284;
    font-weight: 800;
}
.upload-progress-track {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #ecebfa;
}
.upload-progress-bar {
    display: block;
    height: 100%;
    width: 12%;
    border-radius: inherit;
    background: linear-gradient(90deg, #dc3b1d, #ff9d25);
    animation: uploadProgress 2.8s ease-in-out forwards;
}
.upload-processing-files {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.upload-processing-files li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7f7ff;
    color: #343b4d;
    font-size: 13px;
    font-weight: 800;
}
.upload-processing-files span {
    flex: 0 0 auto;
    color: #7b8092;
}
@keyframes uploadFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes uploadSpin {
    to { transform: rotate(360deg); }
}
@keyframes uploadCardIn {
    to { transform: translateY(0) scale(1); }
}
@keyframes uploadProgress {
    0% { width: 12%; }
    55% { width: 70%; }
    100% { width: 92%; }
}
@media (max-width: 700px) {
    .upload-drop {
        min-height: 236px;
        padding: 26px 18px;
        border-radius: 20px;
    }
    .upload-drop strong {
        font-size: 21px;
    }
    .upload-drop b {
        min-height: 40px;
        padding: 0 18px;
    }
    .file-item {
        flex-direction: row;
        align-items: center;
        min-height: 104px;
        padding: 12px 44px 12px 12px;
    }
    .file-preview {
        flex: 0 0 auto;
        width: 74px;
        height: 86px;
    }
    .file-meta strong {
        max-width: 190px;
        white-space: normal;
    }
    .upload-processing-card {
        padding: 24px 18px;
        border-radius: 22px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .upload-drop .upload-icon,
    .merge-drop .upload-icon,
    .upload-spinner::before,
    .upload-progress-bar,
    .upload-overlay.visible .upload-processing-card {
        animation: none;
    }
}

/* Edit PDF mobile tool dock icons. */
.advanced-editor .editor-tool::before {
    content: none;
}
.advanced-editor .editor-tool {
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: center;
    line-height: 1;
}
.advanced-editor .tool-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #ffe9df;
    color: #c83219;
    box-shadow: inset 0 0 0 1px rgba(220,59,29,.12);
}
.advanced-editor .tool-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.advanced-editor .tool-label {
    display: block;
    font-size: 12px;
    font-weight: 900;
}
.advanced-editor .editor-tool[data-editor-tool="image"] .tool-icon {
    background: #fff6d9;
    color: #149ab0;
}
.advanced-editor .editor-tool[data-editor-tool="rect"] .tool-icon,
.advanced-editor .editor-tool[data-editor-tool="ellipse"] .tool-icon {
    background: #ecfff7;
    color: #18a76d;
}
.advanced-editor .editor-tool[data-editor-tool="line"] .tool-icon {
    background: #eef5ff;
    color: #3478d6;
}
.advanced-editor .editor-tool[data-editor-tool="highlight"] .tool-icon {
    background: #fff8dc;
    color: #b98200;
}
.advanced-editor .editor-tool[data-editor-tool="freehand"] .tool-icon {
    background: #fff0f5;
    color: #d9487f;
}
.advanced-editor .editor-tool.active .tool-icon {
    background: rgba(255,255,255,.22);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
}
.advanced-editor .editor-tool.active .tool-label {
    color: #fff;
}
@media (max-width: 850px) {
    .advanced-editor .editor-toolbar {
        padding: 9px;
    }
    .advanced-editor .editor-tool {
        min-width: 70px;
        min-height: 58px;
        padding: 7px 9px;
        gap: 5px;
    }
}
@media (max-width: 560px) {
    .advanced-editor .tool-segment {
        gap: 6px;
    }
    .advanced-editor .editor-tool {
        min-width: 66px;
        min-height: 58px;
        padding: 7px 8px;
    }
    .advanced-editor .tool-icon {
        width: 28px;
        height: 28px;
        border-radius: 9px;
    }
    .advanced-editor .tool-icon svg {
        width: 18px;
        height: 18px;
    }
    .advanced-editor .tool-label {
        font-size: 11px;
    }
}
