:root {
        --dt-green: #22C55E;
        --dt-green-dark: #065f46;
        --dt-green-mid: #16a34a;
        --dt-bg: #f8fafc;
        --dt-card: #ffffff;
        --dt-text: #0f172a;
        --dt-muted: #64748b;
        --dt-line: rgba(6, 95, 70, 0.16);
        --dt-soft: #ecfdf5;
        --dt-shadow: 0 18px 55px rgba(15, 23, 42, 0.09);
    }
    body.dt-page {
        background: #f4f4f5;
    }
    .dt-shell {
        width: min(1180px, calc(100% - 28px));
        margin: 0 auto;
        padding: 28px 0 52px;
        color: var(--dt-text);
        font-family: "Instrument Sans", "Segoe UI", sans-serif;
    }
    .dt-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px;
        align-items: end;
        margin-bottom: 22px;
    }
    .dt-kicker {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--dt-green-dark);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .dt-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--dt-green);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, .12);
    }
    .dt-hero h1 {
        margin: 8px 0 8px;
        color: var(--dt-green-dark);
        font-size: clamp(2rem, 5vw, 4.6rem);
        line-height: .96;
        letter-spacing: -.055em;
        font-weight: 900;
    }
    .dt-hero p {
        max-width: 690px;
        margin: 0;
        color: var(--dt-muted);
        font-size: 16px;
        line-height: 1.65;
    }
    .dt-hero-links,
    .dt-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    .dt-link {
        color: var(--dt-green-dark);
        font-weight: 800;
        text-decoration: none;
    }
    .dt-link:hover { text-decoration: underline; }
    .dt-drop {
        display: grid;
        place-items: center;
        min-height: 168px;
        padding: 38px 20px;
        border: 2px dashed rgba(6, 95, 70, .28);
        border-radius: 30px;
        background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(236,253,245,.64));
        box-shadow: var(--dt-shadow);
        text-align: center;
        cursor: pointer;
        transition: border-color .18s ease, transform .18s ease, background .18s ease;
    }
    .dt-drop:hover,
    .dt-drop.is-drag {
        border-color: var(--dt-green);
        transform: translateY(-2px);
        background: #f0fdf4;
    }
    .dt-drop-icon {
        width: 82px;
        height: 82px;
        display: grid;
        place-items: center;
        margin: 0 auto 18px;
        border-radius: 26px;
        color: var(--dt-green-dark);
        background: var(--dt-soft);
        box-shadow: inset 0 0 0 1px rgba(6,95,70,.12);
        font-size: 34px;
        font-weight: 900;
    }
    .dt-drop h2 {
        margin: 0 0 10px;
        color: var(--dt-green-dark);
        font-size: clamp(1.8rem, 4vw, 3.4rem);
        letter-spacing: -.045em;
    }
    .dt-drop p {
        max-width: 540px;
        margin: 0 auto 20px;
        color: var(--dt-muted);
        line-height: 1.65;
    }
    .dt-workspace {
        display: none;
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 18px;
        align-items: start;
    }
    .dt-workspace.is-on { display: grid; }
    .dt-main,
    .dt-side,
    .dt-toolbar {
        border: 1px solid var(--dt-line);
        background: rgba(255,255,255,.92);
        border-radius: 24px;
        box-shadow: 0 10px 34px rgba(15,23,42,.06);
    }
    .dt-main {
        min-height: 620px;
        padding: 16px;
        position: relative;
    }
    .dt-side {
        position: sticky;
        top: calc(var(--main-header-height, 72px) + 58px);
        padding: 20px;
    }
    .dt-side h2,
    .dt-panel-title {
        margin: 0 0 8px;
        color: var(--dt-green-dark);
        font-size: 24px;
        letter-spacing: -.03em;
    }
    .dt-side p,
    .dt-help,
    .dt-status {
        color: var(--dt-muted);
        font-size: 14px;
        line-height: 1.55;
    }
    .dt-status {
        min-height: 22px;
        margin-top: 12px;
    }
    .dt-status.is-error { color: #b91c1c; }
    .dt-status.is-done { color: #047857; font-weight: 800; }
    .dt-btn {
        border: 0;
        border-radius: 14px;
        padding: 12px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font: inherit;
        font-weight: 900;
        text-decoration: none;
        cursor: pointer;
        transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    }
    .dt-btn:hover { transform: translateY(-1px); }
    .dt-btn:disabled {
        cursor: not-allowed;
        opacity: .55;
        transform: none;
    }
    .dt-btn-primary {
        width: 100%;
        color: #fff;
        background: linear-gradient(135deg, var(--dt-green), var(--dt-green-mid));
        box-shadow: none;
    }
    .dt-btn-secondary,
    .dt-btn-ghost {
        color: var(--dt-green-dark);
        background: #fff;
        border: 1px solid var(--dt-line);
    }
    .dt-btn-ghost {
        padding: 9px 12px;
        border-radius: 12px;
        background: rgba(236,253,245,.66);
    }
    .dt-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
        gap: 16px;
        align-items: start;
    }
    .dt-page-card {
        position: relative;
        min-height: 210px;
        padding: 10px;
        border: 1px solid var(--dt-line);
        border-radius: 18px;
        background: var(--dt-card);
        box-shadow: 0 10px 24px rgba(15,23,42,.06);
        cursor: grab;
    }
    .dt-page-card:active { cursor: grabbing; }
    .dt-page-card.is-deleted {
        display: none;
    }
    .dt-thumb {
        display: grid;
        place-items: center;
        min-height: 160px;
        border-radius: 13px;
        background: #f1f5f9;
        overflow: hidden;
    }
    .dt-thumb canvas,
    .dt-thumb img {
        display: block;
        max-width: 100%;
        height: auto;
        box-shadow: 0 8px 18px rgba(15,23,42,.12);
        transform-origin: center;
    }
    .dt-card-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 10px;
        color: var(--dt-muted);
        font-size: 12px;
        font-weight: 800;
    }
    .dt-badge {
        display: inline-flex;
        max-width: 86px;
        padding: 4px 7px;
        border-radius: 999px;
        color: #fff;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 900;
    }
    .dt-card-actions {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 10px;
        display: flex;
        justify-content: space-between;
        opacity: 0;
        pointer-events: none;
        transition: opacity .16s ease;
    }
    .dt-page-card:hover .dt-card-actions,
    .dt-page-card:focus-within .dt-card-actions {
        opacity: 1;
        pointer-events: auto;
    }
    .dt-icon-btn {
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 999px;
        color: var(--dt-green-dark);
        background: rgba(255,255,255,.92);
        box-shadow: 0 8px 22px rgba(15,23,42,.16);
        cursor: pointer;
        font-weight: 900;
    }
    .dt-add-fab {
        position: sticky;
        bottom: 20px;
        margin-left: auto;
        width: 58px;
        height: 58px;
        border-radius: 999px;
        font-size: 26px;
        box-shadow: none;
    }
    .dt-file-list {
        display: grid;
        gap: 8px;
        margin: 16px 0;
        padding: 0;
        list-style: none;
    }
    .dt-file-list li {
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr) auto;
        gap: 9px;
        align-items: center;
        padding: 10px;
        border: 1px solid var(--dt-line);
        border-radius: 13px;
        background: rgba(236,253,245,.46);
        color: var(--dt-muted);
        font-size: 12px;
    }
    .dt-swatch {
        width: 10px;
        height: 10px;
        border-radius: 999px;
    }
    .dt-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
        padding: 12px;
    }
    .dt-tools {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .dt-tool {
        border: 1px solid var(--dt-line);
        border-radius: 12px;
        padding: 9px 11px;
        color: var(--dt-green-dark);
        background: #fff;
        font: inherit;
        font-weight: 850;
        cursor: pointer;
    }
    .dt-tool.is-on {
        color: #fff;
        border-color: transparent;
        background: var(--dt-green-dark);
    }
    .dt-edit-layout {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    .dt-canvas-wrap {
        position: relative;
        display: grid;
        place-items: center;
        min-height: 620px;
        overflow: auto;
        border-radius: 18px;
        background: linear-gradient(135deg, #e2e8f0, #f8fafc);
        padding: 28px;
        order: 1;
    }
    .dt-thumbs {
        max-height: 700px;
        overflow: auto;
        display: grid;
        gap: 10px;
        padding-right: 4px;
        order: 0;
    }
    .dt-mini {
        border: 2px solid transparent;
        border-radius: 14px;
        padding: 8px;
        background: #fff;
        cursor: pointer;
        color: var(--dt-muted);
        font-size: 12px;
        font-weight: 850;
        text-align: center;
    }
    .dt-mini.is-on {
        border-color: var(--dt-green);
        color: var(--dt-green-dark);
        background: var(--dt-soft);
    }
    .dt-mini canvas {
        width: 100%;
        height: auto;
        display: block;
        margin-bottom: 5px;
    }
    .dt-stage {
        position: relative;
        line-height: 0;
        box-shadow: 0 18px 50px rgba(15,23,42,.22);
    }
    .dt-stage canvas {
        display: block;
    }
    .dt-overlay {
        position: absolute;
        inset: 0;
        z-index: 2;
        touch-action: none;
    }
    .dt-anno {
        position: absolute;
        z-index: 3;
        border: 1px dashed rgba(6,95,70,.2);
        cursor: move;
        line-height: 1.2;
    }
    .dt-anno-text {
        min-width: 40px;
        color: var(--dt-green-dark);
        font-weight: 800;
        white-space: pre-wrap;
        padding: 2px 4px;
    }
    .dt-anno-img img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .dt-zoom {
        position: absolute;
        right: 18px;
        bottom: 18px;
        z-index: 4;
        display: flex;
        gap: 8px;
        padding: 8px;
        border-radius: 999px;
        background: rgba(255,255,255,.92);
        box-shadow: 0 12px 28px rgba(15,23,42,.14);
    }
    .dt-field {
        display: grid;
        gap: 6px;
        margin: 14px 0;
        color: var(--dt-green-dark);
        font-size: 13px;
        font-weight: 850;
    }
    .dt-field input,
    .dt-field textarea,
    .dt-field select {
        width: 100%;
        border: 1px solid var(--dt-line);
        border-radius: 13px;
        padding: 10px 12px;
        background: #fff;
        color: var(--dt-text);
        font: inherit;
    }
    .dt-field textarea {
        min-height: 86px;
        resize: vertical;
    }
    .dt-loader {
        display: none;
        align-items: center;
        gap: 10px;
        color: var(--dt-muted);
        font-weight: 800;
    }
    .dt-loader.is-on { display: flex; }
    .dt-spinner {
        width: 22px;
        height: 22px;
        border: 3px solid rgba(34,197,94,.18);
        border-top-color: var(--dt-green);
        border-radius: 999px;
        animation: dt-spin .85s linear infinite;
    }
    @keyframes dt-spin { to { transform: rotate(360deg); } }

    html.ja-dark body.dt-page {
        background: radial-gradient(circle at top left, rgba(34,197,94,.10), transparent 34%), #111;
        color: #e5e7eb;
    }
    html.ja-dark .dt-shell { color: #e5e7eb; }
    html.ja-dark .dt-hero h1,
    html.ja-dark .dt-side h2,
    html.ja-dark .dt-panel-title,
    html.ja-dark .dt-link,
    html.ja-dark .dt-kicker,
    html.ja-dark .dt-field,
    html.ja-dark .dt-tool,
    html.ja-dark .dt-btn-secondary,
    html.ja-dark .dt-btn-ghost,
    html.ja-dark .dt-anno-text {
        color: #86efac;
    }
    html.ja-dark .dt-hero p,
    html.ja-dark .dt-side p,
    html.ja-dark .dt-help,
    html.ja-dark .dt-status,
    html.ja-dark .dt-card-foot {
        color: #9ca3af;
    }
    html.ja-dark .dt-drop,
    html.ja-dark .dt-main,
    html.ja-dark .dt-side,
    html.ja-dark .dt-toolbar,
    html.ja-dark .dt-page-card,
    html.ja-dark .dt-mini,
    html.ja-dark .dt-btn-secondary,
    html.ja-dark .dt-btn-ghost,
    html.ja-dark .dt-tool,
    html.ja-dark .dt-field input,
    html.ja-dark .dt-field textarea,
    html.ja-dark .dt-field select {
        border-color: rgba(134,239,172,.18);
        background: #171717;
        color: #e5e7eb;
    }
    html.ja-dark .dt-drop:hover,
    html.ja-dark .dt-drop.is-drag,
    html.ja-dark .dt-mini.is-on {
        background: rgba(6,95,70,.34);
    }
    html.ja-dark .dt-thumb,
    html.ja-dark .dt-canvas-wrap {
        background: #111827;
    }
    html.ja-dark .dt-file-list li {
        border-color: rgba(134,239,172,.18);
        background: rgba(6,95,70,.18);
        color: #cbd5e1;
    }
    @media (max-width: 900px) {
        .dt-hero,
        .dt-workspace {
            grid-template-columns: 1fr;
        }
        .dt-side {
            position: static;
            order: -1;
        }
        .dt-edit-layout {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        .dt-canvas-wrap {
            order: 0;
            min-height: 420px;
            padding: 14px;
        }
        .dt-thumbs {
            order: 1;
            display: flex;
            flex-direction: row;
            gap: 8px;
            max-height: none;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 4px 2px 10px;
            -webkit-overflow-scrolling: touch;
        }
        .dt-mini {
            flex: 0 0 92px;
            width: 92px;
        }
    }
    @media (max-width: 560px) {
        .dt-shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
        .dt-drop { min-height: 150px; border-radius: 22px; }
        .dt-main,
        .dt-side,
        .dt-toolbar { border-radius: 18px; }
        .dt-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
        .dt-page-card { min-height: 180px; }
        .dt-thumb { min-height: 130px; }
    }

/* Hub + simple-tool extras */
.dt-hub {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto 56px;
    padding-top: 12px;
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    color: #171717;
}
.dt-hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 28px;
    align-items: center;
    padding: 36px 40px;
    border: 1px solid #e4e4e7;
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
    margin-bottom: 24px;
}
.dt-hub-hero .dt-kicker {
    color: #52525b;
    letter-spacing: .04em;
}
.dt-hub-hero .dt-dot {
    background: #52525b;
}
.dt-hub-hero h1 {
    margin: 10px 0 8px;
    color: #065f46;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: .92;
    letter-spacing: -.06em;
    font-weight: 800;
    font-family: "Instrument Sans", inherit;
}
.dt-hub-typing-line {
    display: flex;
    align-items: center;
    min-height: 1.6em;
    margin: 0 0 12px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    max-width: none !important;
}
.dt-hub-typing {
    white-space: nowrap;
}
.dt-hub-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    margin-left: 3px;
    background: #2563eb;
    animation: dt-hub-blink 0.9s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes dt-hub-blink {
    50% { opacity: 0; }
}
.dt-hub-hero > div > p:not(.dt-hub-typing-line) {
    color: #52525b;
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
    max-width: 620px;
}
.dt-hub-panel {
    padding: 22px;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid #e4e4e7;
}
.dt-hub-panel strong {
    display: block;
    color: #18181b;
    font-size: 17px;
    margin-bottom: 8px;
}
.dt-hub-panel p {
    margin: 0;
    color: #52525b;
    line-height: 1.55;
    font-size: 15px;
}
.dt-hub .dt-btn-primary {
    background: #2563eb;
    border-color: #2563eb;
}
.dt-hub .dt-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.dt-hub-featured {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 36px;
}
.dt-hub-feat {
    display: grid;
    grid-template-rows: 140px auto;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-top: 3px solid #a1a1aa;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .15s ease, background .15s ease;
}
.dt-hub-feat.tone-blue { border-top-color: #3b82f6; background: #eff6ff; }
.dt-hub-feat.tone-amber { border-top-color: #f59e0b; background: #fffbeb; }
.dt-hub-feat.tone-rose { border-top-color: #f43f5e; background: #fff1f2; }
.dt-hub-feat.tone-teal { border-top-color: #14b8a6; background: #f0fdfa; }
.dt-hub-feat.tone-indigo { border-top-color: #6366f1; background: #eef2ff; }
.dt-hub-feat.tone-slate { border-top-color: #94a3b8; background: #f8fafc; }
.dt-hub-feat.tone-mint { border-top-color: #34d399; background: #ecfdf5; }
.dt-hub-feat.tone-sky { border-top-color: #38bdf8; background: #f0f9ff; }
.dt-hub-feat.tone-coral { border-top-color: #fb7185; background: #fff7ed; }
.dt-hub-feat:hover { filter: brightness(0.98); }
.dt-hub-feat.tone-blue:hover,
.dt-hub-feat.tone-amber:hover,
.dt-hub-feat.tone-rose:hover,
.dt-hub-feat.tone-teal:hover { border-color: inherit; }
.dt-hub-feat img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    padding: 16px;
    display: block;
}
.dt-hub-feat-copy {
    display: grid;
    gap: 4px;
    padding: 14px 14px 16px;
}
.dt-hub-feat-copy strong {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #18181b;
}
.dt-hub-feat-copy em {
    font-style: normal;
    font-size: 13px;
    line-height: 1.45;
    color: #71717a;
}

.dt-hub-toolbar {
    display: grid;
    gap: 10px;
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e4e7;
}
.dt-hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.dt-hub-filter {
    border: 0;
    background: transparent;
    padding: 6px 0;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: #71717a;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.dt-hub-filter.is-on,
.dt-hub-filter:hover {
    color: #18181b;
    border-bottom-color: #2563eb;
}
.dt-hub-note {
    margin: 0;
    font-size: 13px;
    color: #71717a;
}

.dt-hub-section {
    margin: 0 0 34px;
}
.dt-hub-section-head {
    margin: 0 0 12px;
}
.dt-hub-section-head h2 {
    margin: 0;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #18181b;
}
.dt-hub-list {
    display: grid;
    gap: 0;
    border-top: 1px solid #e4e4e7;
}
.dt-hub-tool {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 10px;
    border-bottom: 1px solid #e4e4e7;
    border-left: 3px solid #d4d4d8;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
}
.dt-hub-tool.tone-blue { border-left-color: #3b82f6; background: #eff6ff; }
.dt-hub-tool.tone-amber { border-left-color: #f59e0b; background: #fffbeb; }
.dt-hub-tool.tone-rose { border-left-color: #f43f5e; background: #fff1f2; }
.dt-hub-tool.tone-teal { border-left-color: #14b8a6; background: #f0fdfa; }
.dt-hub-tool.tone-indigo { border-left-color: #6366f1; background: #eef2ff; }
.dt-hub-tool.tone-slate { border-left-color: #94a3b8; background: #f8fafc; }
.dt-hub-tool.tone-mint { border-left-color: #34d399; background: #ecfdf5; }
.dt-hub-tool.tone-sky { border-left-color: #38bdf8; background: #f0f9ff; }
.dt-hub-tool.tone-coral { border-left-color: #fb7185; background: #fff7ed; }
.dt-hub-tool:hover {
    filter: brightness(0.97);
}
.dt-hub-tool-art {
    width: 72px;
    height: 60px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(0,0,0,.06);
}
.dt-hub-tool-art img {
    max-width: 52px;
    max-height: 48px;
    object-fit: contain;
}
.dt-hub-tool-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.dt-hub-tool-body strong {
    font-size: 1rem;
    font-weight: 700;
    color: #18181b;
}
.dt-hub-tool-body span {
    font-size: 13px;
    line-height: 1.45;
    color: #71717a;
}
.dt-hub-tool-meta {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: .02em;
}
.dt-hub-tool-meta.is-members {
    color: #b45309;
}

html.ja-dark .dt-hub { color: #e5e5e5; }
html.ja-dark .dt-hub-hero {
    background: #171717 !important;
    border-color: #2a2a2a !important;
}
html.ja-dark .dt-hub-hero h1 {
    color: #86efac !important;
}
html.ja-dark .dt-hub-panel strong,
html.ja-dark .dt-hub-feat-copy strong,
html.ja-dark .dt-hub-section-head h2,
html.ja-dark .dt-hub-tool-body strong,
html.ja-dark .dt-hub-filter.is-on,
html.ja-dark .dt-hub-filter:hover {
    color: #f5f5f5 !important;
}
html.ja-dark .dt-hub-typing-line,
html.ja-dark .dt-hub-typing {
    color: #93c5fd !important;
}
html.ja-dark .dt-hub-cursor {
    background: #93c5fd;
}
html.ja-dark .dt-hub-feat.tone-blue,
html.ja-dark .dt-hub-tool.tone-blue { background: rgba(37,99,235,.15) !important; }
html.ja-dark .dt-hub-feat.tone-amber,
html.ja-dark .dt-hub-tool.tone-amber { background: rgba(245,158,11,.14) !important; }
html.ja-dark .dt-hub-feat.tone-rose,
html.ja-dark .dt-hub-tool.tone-rose { background: rgba(244,63,94,.14) !important; }
html.ja-dark .dt-hub-feat.tone-teal,
html.ja-dark .dt-hub-tool.tone-teal { background: rgba(20,184,166,.14) !important; }
html.ja-dark .dt-hub-feat.tone-indigo,
html.ja-dark .dt-hub-tool.tone-indigo { background: rgba(99,102,241,.14) !important; }
html.ja-dark .dt-hub-feat.tone-mint,
html.ja-dark .dt-hub-tool.tone-mint { background: rgba(52,211,153,.12) !important; }
html.ja-dark .dt-hub-feat.tone-sky,
html.ja-dark .dt-hub-tool.tone-sky { background: rgba(56,189,248,.12) !important; }
html.ja-dark .dt-hub-feat.tone-coral,
html.ja-dark .dt-hub-tool.tone-coral { background: rgba(251,113,133,.12) !important; }
html.ja-dark .dt-hub-feat.tone-slate,
html.ja-dark .dt-hub-tool.tone-slate { background: rgba(148,163,184,.12) !important; }
html.ja-dark .dt-hub-hero .dt-kicker,
html.ja-dark .dt-hub-hero > div > p,
html.ja-dark .dt-hub-panel p,
html.ja-dark .dt-hub-feat-copy em,
html.ja-dark .dt-hub-note,
html.ja-dark .dt-hub-tool-body span,
html.ja-dark .dt-hub-filter {
    color: #a3a3a3 !important;
}
html.ja-dark .dt-hub-panel,
html.ja-dark .dt-hub-feat,
html.ja-dark .dt-hub-tool-art {
    background: #141414 !important;
    border-color: #2a2a2a !important;
}
html.ja-dark .dt-hub-feat img { background: transparent; }
html.ja-dark .dt-hub-feat:hover,
html.ja-dark .dt-hub-tool:hover { filter: brightness(1.08); }
html.ja-dark .dt-hub-toolbar,
html.ja-dark .dt-hub-list,
html.ja-dark .dt-hub-tool { border-color: #2a2a2a; }
html.ja-dark .dt-hub .dt-btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .dt-hub-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dt-hub-hero { grid-template-columns: 1fr; padding: 26px; }
}
@media (max-width: 640px) {
    .dt-hub-featured { grid-template-columns: 1fr; }
    .dt-hub-tool { grid-template-columns: 56px minmax(0, 1fr); }
    .dt-hub-tool-meta { grid-column: 2; }
}

/* Legacy hub bits (kept for older markup) */
.dt-hub-hero.legacy,
.dt-chip-row,
.dt-card-grid { }
.dt-simple { max-width: 920px; margin: 0 auto 46px; }
.dt-tool-form, .dt-lock-card { border:1px solid var(--dt-line); border-radius:28px; background:rgba(255,255,255,.94); box-shadow:var(--dt-shadow); padding:22px; }
.dt-drop-compact { min-height: 150px; box-shadow:none; }
.dt-options { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:14px; margin:18px 0; }
.dt-signature { display:grid; gap:10px; margin:16px 0; padding:14px; border:1px solid var(--dt-line); border-radius:18px; background:#fff; color:var(--dt-green-dark); font-weight:900; }
.dt-signature canvas { width:100%; height:190px; border:1px dashed rgba(6,95,70,.28); border-radius:14px; background:#fff; touch-action:none; }
.dt-result { display:none; margin-top:14px; padding:16px; border:1px solid var(--dt-line); border-radius:18px; background:#fff; color:var(--dt-text); white-space:pre-wrap; max-height:420px; overflow:auto; }
.dt-result.is-on { display:block; }
.dt-lock-card h2 { margin:8px 0; color:var(--dt-green-dark); font-size:32px; letter-spacing:-.04em; }
.dt-lock-card p { color:var(--dt-muted); }
.dt-shape-menu { position:relative; display:inline-flex; }
.dt-shape-popover { display:none; position:absolute; left:0; top:calc(100% + 8px); z-index:10; min-width:150px; padding:8px; border:1px solid var(--dt-line); border-radius:14px; background:#fff; box-shadow:0 18px 40px rgba(15,23,42,.14); }
.dt-shape-menu:hover .dt-shape-popover, .dt-shape-menu:focus-within .dt-shape-popover { display:grid; gap:6px; }
.dt-anno.is-selected { outline:2px solid #22c55e; outline-offset:2px; }
.dt-control-row { display:grid; grid-template-columns: 1fr 120px; gap:10px; align-items:end; }
html.ja-dark .dt-hub-panel, html.ja-dark .dt-card, html.ja-dark .dt-tool-form, html.ja-dark .dt-lock-card, html.ja-dark .dt-signature, html.ja-dark .dt-result, html.ja-dark .dt-shape-popover { background:#171717; border-color:rgba(134,239,172,.18); color:#e5e7eb; }
html.ja-dark .dt-hub-panel strong, html.ja-dark .dt-card h2, html.ja-dark .dt-lock-card h2 { color:#86efac; }
html.ja-dark .dt-card p, html.ja-dark .dt-lock-card p { color:#9ca3af; }
html.ja-dark .dt-chip { background:#171717; border-color:rgba(134,239,172,.18); color:#86efac; }
html.ja-dark .dt-chip.is-on, html.ja-dark .dt-chip:hover { background:#065f46; color:#fff; }
@media (max-width: 820px) { .dt-control-row { grid-template-columns:1fr; } }

/* Edit toolbar props (color / size / delete) */
.dt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.dt-tool-props {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 6px 8px;
    border: 1px solid var(--dt-line);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.dt-prop-color input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--dt-line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}
.dt-prop-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    color: var(--dt-green-dark);
}
.dt-prop-size input {
    width: 64px;
    height: 36px;
    border: 1px solid var(--dt-line);
    border-radius: 10px;
    padding: 0 8px;
    font-weight: 800;
    color: var(--dt-text);
    background: #fff;
}
.dt-prop-unit { font-size: 12px; font-weight: 900; opacity: .75; }
.dt-tool-danger { color: #b91c1c !important; }
.dt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.dt-shape-menu.is-open .dt-shape-popover { display: grid; gap: 6px; }
html.ja-dark .dt-tool-props {
    background: #171717;
    border-color: rgba(134,239,172,.18);
}
html.ja-dark .dt-prop-size,
html.ja-dark .dt-prop-unit { color: #86efac; }
html.ja-dark .dt-prop-size input,
html.ja-dark .dt-prop-color input[type="color"] {
    background: #141414;
    border-color: rgba(134,239,172,.18);
    color: #e5e7eb;
}
@media (max-width: 820px) {
    .dt-tool-props { margin-left: 0; width: 100%; justify-content: flex-start; }
}

/* Compact drops */
.dt-drop { padding: 22px 16px; border-radius: 18px; }
.dt-drop-icon { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; font-size: 22px; }
.dt-drop h2 { font-size: clamp(1.25rem, 3vw, 1.7rem) !important; margin-bottom: 6px !important; }
.dt-drop p { margin-bottom: 12px !important; font-size: 13px; }
.dt-drop-compact { min-height: 150px !important; padding: 18px 14px; }

/* Working overlay */
.dt-working {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--dt-line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--dt-green-dark);
    font-weight: 700;
}
.dt-working.is-on { display: flex; }
.dt-working .dt-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(6,95,70,.2);
    border-top-color: #16a34a;
    border-radius: 999px;
    animation: dt-spin .7s linear infinite;
}
@keyframes dt-spin { to { transform: rotate(360deg); } }

/* AI / text result prose */
.dt-result {
    display: none;
    margin-top: 14px;
    padding: 18px 18px 8px;
    border: 1px solid var(--dt-line);
    border-radius: 18px;
    background: #fff;
    color: var(--dt-text);
    max-height: 520px;
    overflow: auto;
    white-space: normal;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
.dt-result.is-on { display: block; }
.dt-result h1, .dt-result h2, .dt-result h3, .dt-result h4 {
    margin: 0 0 10px;
    color: var(--dt-green-dark);
    letter-spacing: -.03em;
    line-height: 1.25;
}
.dt-result h1 { font-size: 1.45rem; }
.dt-result h2 { font-size: 1.25rem; }
.dt-result h3 { font-size: 1.1rem; }
.dt-result p { margin: 0 0 12px; }
.dt-result ul, .dt-result ol { margin: 0 0 12px; padding-left: 1.2rem; }
.dt-result li { margin: 0 0 6px; }
.dt-result strong { color: #0f172a; }
.dt-result code {
    padding: 1px 5px;
    border-radius: 6px;
    background: #f3f4f6;
    font-size: .92em;
}
.dt-result pre {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f3f4f6;
    overflow: auto;
    white-space: pre-wrap;
}

/* SEO block */
.dt-seo {
    width: min(1180px, calc(100% - 28px));
    margin: 8px auto 48px;
}
.dt-seo-inner {
    padding: 22px 24px;
    border: 1px solid var(--dt-line);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
}
.dt-seo h2 {
    margin: 0 0 10px;
    color: var(--dt-green-dark);
    font-size: 1.35rem;
    letter-spacing: -.03em;
}
.dt-seo h3 {
    margin: 0 0 8px;
    color: var(--dt-green-dark);
    font-size: 1rem;
}
.dt-seo p, .dt-seo li { color: var(--dt-muted); font-size: 14px; line-height: 1.6; }
.dt-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 16px;
}
.dt-seo ul { margin: 0; padding-left: 1.1rem; }
.dt-seo-links { list-style: none; padding-left: 0; }
.dt-seo-links a { color: var(--dt-green-dark); font-weight: 700; text-decoration: none; }
.dt-seo-links a:hover { text-decoration: underline; }
.dt-seo-foot { margin-top: 16px; font-size: 13px; }
.dt-seo-foot a { color: var(--dt-green-dark); font-weight: 700; }

/* Dark grey theme overrides */
html.ja-dark body.dt-page {
    background: #111 !important;
}
html.ja-dark .dt-hub-panel,
html.ja-dark .dt-card,
html.ja-dark .dt-tool-form,
html.ja-dark .dt-lock-card,
html.ja-dark .dt-signature,
html.ja-dark .dt-result,
html.ja-dark .dt-shape-popover,
html.ja-dark .dt-seo-inner,
html.ja-dark .dt-working,
html.ja-dark .dt-drop,
html.ja-dark .dt-main,
html.ja-dark .dt-side,
html.ja-dark .dt-toolbar,
html.ja-dark .dt-page-card,
html.ja-dark .dt-mini,
html.ja-dark .dt-btn-secondary,
html.ja-dark .dt-btn-ghost,
html.ja-dark .dt-tool,
html.ja-dark .dt-field input,
html.ja-dark .dt-field textarea,
html.ja-dark .dt-field select,
html.ja-dark .dt-tool-props {
    background: #171717 !important;
    border-color: rgba(255,255,255,.08) !important;
    color: #e5e5e5;
}
html.ja-dark .dt-tool {
    background: #171717 !important;
    border-color: rgba(255,255,255,.08) !important;
    color: #e5e5e5;
}
html.ja-dark .dt-tool.is-on,
html.ja-dark .dt-tools .dt-tool.is-on,
html.ja-dark #shapeToggle.is-on {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
html.ja-dark .dt-tool.dt-tool-danger {
    color: #f87171 !important;
    background: #171717 !important;
}
html.ja-dark .dt-chip {
    background: #171717;
    border-color: rgba(255,255,255,.1);
    color: #86efac;
}
html.ja-dark .dt-result strong { color: #f5f5f5; }
html.ja-dark .dt-result code,
html.ja-dark .dt-result pre { background: #222; color: #e5e5e5; }
html.ja-dark .dt-seo h2,
html.ja-dark .dt-seo h3,
html.ja-dark .dt-seo-links a,
html.ja-dark .dt-seo-foot a,
html.ja-dark .dt-working { color: #86efac; }
html.ja-dark .dt-seo p,
html.ja-dark .dt-seo li { color: #a3a3a3; }
@media (max-width: 820px) {
    .dt-seo-grid { grid-template-columns: 1fr; }
}

/* Compact hero */
.dt-hero--compact { margin-bottom: 16px; }
.dt-hero--compact h1 { font-size: clamp(1.8rem, 4vw, 3rem); }

/* Flat primary button (no glow) */
.dt-btn-primary {
    box-shadow: none !important;
    filter: none !important;
}
.dt-btn-primary:hover {
    box-shadow: none !important;
    filter: none !important;
    transform: none;
}

/* iLovePDF-style workspace */
.dt-ilo { margin: 0 auto 40px; max-width: 1180px; }
.dt-ilo-ad {
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--dt-line);
    border-radius: 14px;
    background: #fff;
    min-height: 90px;
    display: grid;
    place-items: center;
}
.dt-ilo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
    gap: 16px;
    align-items: start;
}
.dt-ilo-main,
.dt-ilo-side {
    border: 1px solid var(--dt-line);
    border-radius: 18px;
    background: #fff;
}
.dt-ilo-main { padding: 14px; min-height: 420px; }
.dt-ilo-side { padding: 18px; position: sticky; top: 96px; }
.dt-ilo-side h2 {
    margin: 0 0 8px;
    color: var(--dt-green-dark);
    font-size: 1.6rem;
    letter-spacing: -.03em;
}
.dt-ilo-side > p { margin: 0 0 14px; color: var(--dt-muted); font-size: 14px; line-height: 1.5; }
.dt-ilo-actions { flex-direction: column; align-items: stretch; }
.dt-ilo-drop { min-height: 360px !important; box-shadow: none; margin: 0; }
.dt-ilo-empty { display: grid; place-items: center; text-align: center; gap: 8px; }
.dt-ilo-art {
    width: min(180px, 46vw);
    height: auto;
    margin: 0 auto 6px;
    object-fit: contain;
}
.dt-ilo-art--sm { width: 96px; margin-bottom: 8px; }
.dt-ilo-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.dt-ilo-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.dt-ilo-card {
    position: relative;
    padding: 12px;
    border: 1px solid var(--dt-line);
    border-radius: 12px;
    background: #fafafa;
}
.dt-ilo-card-body { display: grid; gap: 4px; padding-right: 22px; }
.dt-ilo-card-body strong {
    font-size: 13px;
    color: var(--dt-text);
    word-break: break-word;
}
.dt-ilo-card-body span { font-size: 12px; color: var(--dt-muted); }
.dt-ilo-card-x {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.dt-ilo-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}
.dt-ilo-page {
    border: 1px solid var(--dt-line);
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    cursor: pointer;
    text-align: center;
}
.dt-ilo-page.is-on {
    border-color: #16a34a;
    box-shadow: inset 0 0 0 1px #16a34a;
}
.dt-ilo-page img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    background: #f3f4f6;
}
.dt-ilo-page span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--dt-green-dark);
}
.dt-ilo-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dt-green-dark);
    font-weight: 700;
}
html.ja-dark .dt-ilo-ad,
html.ja-dark .dt-ilo-main,
html.ja-dark .dt-ilo-side,
html.ja-dark .dt-ilo-card,
html.ja-dark .dt-ilo-page {
    background: #171717 !important;
    border-color: rgba(255,255,255,.08) !important;
}
html.ja-dark .dt-ilo-side h2,
html.ja-dark .dt-ilo-page span { color: #86efac; }
html.ja-dark .dt-ilo-side > p,
html.ja-dark .dt-ilo-card-body span { color: #a3a3a3; }
@media (max-width: 900px) {
    .dt-ilo-grid { grid-template-columns: 1fr; }
    .dt-ilo-side { position: static; }
    .dt-ilo-drop { min-height: 280px !important; }
}

/* Visibility helper (beats display:grid on .dt-drop) */
.dt-ilo .is-hidden,
.dt-drop.is-hidden,
.dt-ilo-board.is-hidden,
.dt-ilo-pages.is-hidden,
.dt-ilo-preview.is-hidden {
    display: none !important;
}

.dt-ilo-shell {
    width: min(1100px, calc(100% - 28px));
    margin: 0 auto 40px;
}
.dt-ilo-ad {
    width: min(728px, 100%);
    margin: 0 auto 14px;
    padding: 8px;
    border: 1px solid var(--dt-line);
    border-radius: 12px;
    background: #fff;
    min-height: 70px;
    max-height: 120px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.dt-ilo-ad .adsense-ad-container,
.dt-ilo-ad ins {
    max-width: 100% !important;
}
.dt-ilo {
    max-width: none;
    margin: 0;
}
.dt-ilo-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 320px);
    gap: 14px;
}
.dt-ilo-main {
    min-height: 360px;
    padding: 12px;
}
.dt-ilo-side {
    padding: 16px;
    background: #f7f7f8;
}
.dt-ilo-drop {
    min-height: 280px !important;
    cursor: pointer;
}
.dt-ilo-board {
    display: block;
}
.dt-ilo-board-sub {
    margin: 4px 0 0;
    color: var(--dt-muted);
    font-size: 13px;
}
.dt-ilo-board-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.dt-ilo-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.dt-ilo-card-actions {
    display: inline-flex;
    gap: 4px;
}
.dt-ilo-mini {
    width: 28px;
    height: 28px;
    border: 1px solid var(--dt-line);
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-weight: 800;
}
.dt-ilo-mini:disabled { opacity: .35; cursor: default; }
.dt-ilo-mini-danger { color: #b91c1c; }
.dt-ilo-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.dt-ilo-page {
    position: relative;
    padding: 8px;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px var(--dt-line);
}
.dt-ilo-page.is-on {
    border-color: #16a34a;
    box-shadow: 0 0 0 1px #16a34a;
    background: #f0fdf4;
}
.dt-ilo-sign-frame {
    position: relative;
    border: 2px dashed #c4c4c4;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    max-width: 520px;
    cursor: crosshair;
}
.dt-ilo-sign-frame .dt-ilo-sign-page {
    display: block;
    width: 100%;
    height: auto;
}
.dt-ilo-sign-overlay {
    position: absolute;
    pointer-events: none;
    object-fit: contain;
    z-index: 2;
}
.dt-signed-preview {
    display: grid;
    gap: 10px;
}
.dt-signed-preview strong {
    font-size: 13px;
    color: var(--dt-green-dark);
}
.dt-signed-preview img {
    width: 100%;
    border: 1px solid var(--dt-line);
    border-radius: 10px;
    background: #fff;
}
.dt-signed-preview p {
    margin: 0;
    font-size: 13px;
    color: var(--dt-muted);
}
.dt-signed-preview--main {
    max-width: 560px;
}
.dt-ilo-sign-frame.is-signed {
    cursor: default;
    border-style: solid;
    border-color: #16a34a;
    max-width: 560px;
}
.dt-sign-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}
.dt-sign-tab {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 4px;
    cursor: pointer;
}
.dt-sign-tab.is-on {
    background: #fff;
    border-color: #dc2626;
    color: #dc2626;
}
.dt-sign-panel { display: none; }
.dt-sign-panel.is-on { display: grid; gap: 10px; }
.dt-sign-type-preview {
    min-height: 64px;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px dashed #d4d4d4;
    border-radius: 10px;
    background: #fff;
    color: #064E3B;
    font-size: 1.65rem;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}
.dt-sign-type-preview--sm { font-size: 2rem; min-height: 72px; }
.dt-sign-upload-preview img {
    max-width: 100%;
    max-height: 90px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    background: #fff;
}
.dt-sign-stamp-preview {
    display: grid;
    gap: 4px;
    place-items: center;
    text-align: center;
    padding: 14px 10px;
    border: 3px solid #b91c1c;
    border-radius: 12px;
    background: rgba(185, 28, 28, 0.06);
    color: #b91c1c;
}
.dt-sign-stamp-preview strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
}
.dt-sign-stamp-preview span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: 600;
}
html.ja-dark .dt-sign-tab {
    background: #222 !important;
    border-color: #2a2a2a !important;
    color: #d4d4d4 !important;
}
html.ja-dark .dt-sign-tab.is-on {
    border-color: #dc2626 !important;
    color: #fca5a5 !important;
    background: #1a1a1a !important;
}
html.ja-dark .dt-sign-type-preview,
html.ja-dark .dt-sign-stamp-preview {
    background: #111 !important;
}
html.ja-dark .dt-signed-preview strong { color: #86efac; }

.dt-ilo-preview {
    margin-top: 16px;
}
.dt-ilo-preview > p {
    margin: 8px 0 0;
    color: var(--dt-muted);
    font-size: 13px;
}
.dt-signature {
    display: grid;
    gap: 8px;
}
.dt-signature strong {
    font-size: 13px;
    color: #4b5563;
}
.dt-signature canvas {
    width: 100%;
    height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}
.dt-sign-xy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
html.ja-dark .dt-signature canvas,
html.ja-dark .dt-ilo-sign-frame {
    background: #fff !important;
    border-color: #2a2a2a !important;
}
html.ja-dark .dt-signature strong { color: #a3a3a3; }
@media (max-width: 960px) {
    .dt-ilo-sign-frame { max-width: 100%; }
}
html.ja-dark .dt-ilo-side { background: #141414 !important; }
html.ja-dark .dt-ilo-ad { background: #171717 !important; }
html.ja-dark .dt-ilo-page.is-on { background: rgba(22,163,74,.12); }
html.ja-dark .dt-ilo-mini { background: #1a1a1a; color: #e5e5e5; border-color: rgba(255,255,255,.1); }
@media (max-width: 900px) {
    .dt-ilo-grid { grid-template-columns: 1fr; }
    .dt-ilo-side { position: static; }
    .dt-ilo-ad { width: 100%; }
}

.dt-ilo-shell {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto 40px;
}
.dt-ilo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
}
.dt-ilo-grid--ready {
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 0;
    border: 1px solid var(--dt-line);
    border-radius: 16px;
    overflow: hidden;
    background: #ececec;
}
.dt-ilo-grid:not(.dt-ilo-grid--ready) .dt-ilo-main {
    border: 1px solid var(--dt-line);
    border-radius: 16px;
}
.dt-ilo-grid--ready .dt-ilo-main {
    border: 0;
    border-radius: 0;
    background: #ececec;
    min-height: 520px;
}
.dt-ilo-side.is-hidden,
aside.dt-ilo-side[hidden] {
    display: none !important;
}
.dt-ilo-grid--ready .dt-ilo-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 340px;
    min-width: 340px;
    max-width: 340px;
    min-height: 520px;
    margin: 0;
    padding: 20px 18px 16px;
    border: 0;
    border-left: 1px solid #d4d4d4;
    border-radius: 0;
    background: #fff;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 100px);
}
.dt-ilo-side-title {
    margin: 0;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #1f2937;
}
.dt-side-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.dt-side-mode {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 76px;
    padding: 10px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.dt-side-mode.is-on {
    border-color: #16a34a;
    box-shadow: inset 0 0 0 1px #16a34a;
    background: #f0fdf4;
}
.dt-side-mode-check {
    display: none;
    position: absolute;
    top: 6px;
    left: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #16a34a;
}
.dt-side-mode-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.dt-side-mode.is-on .dt-side-mode-check { display: block; }
.dt-side-mode-icon {
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
}
.dt-side-panel { display: none; }
.dt-side-panel.is-on { display: grid; gap: 10px; }
.dt-side-label,
.dt-side-help {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}
.dt-side-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.dt-side-pill {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
}
.dt-side-pill.is-on {
    background: #fff;
    border-color: #dc2626;
    color: #dc2626;
}
.dt-ranges-box { display: grid; gap: 10px; }
.dt-range-row {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: grid;
    gap: 8px;
}
.dt-range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
}
.dt-range-remove {
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-weight: 800;
}
.dt-range-field {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
}
.dt-range-field--full {
    grid-template-columns: 1fr;
    gap: 6px;
}
.dt-range-field input {
    width: 100%;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #111827;
    box-sizing: border-box;
}
.dt-fixed-box { display: grid; gap: 10px; }
.dt-fixed-box.is-hidden,
#dtCustomRanges.is-hidden {
    display: none !important;
}
.dt-side-info {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #e8f4fc;
    color: #1e3a5f;
    font-size: 13px;
    line-height: 1.45;
}
.dt-side-outline {
    width: 100%;
    border: 1px solid #dc2626;
    border-radius: 10px;
    background: #fff;
    color: #dc2626;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 12px;
    cursor: pointer;
    box-sizing: border-box;
}
.dt-side-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}
.dt-side-check input { margin-top: 2px; }
.dt-side-stat {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}
.dt-ilo-side-foot {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}
.dt-ilo-side .dt-btn-primary {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    min-height: 48px;
    font-weight: 800;
}
.dt-ilo-side .dt-btn-primary:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}
.dt-ilo-side .dt-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}
.dt-ilo-side .dt-field input,
.dt-ilo-side .dt-field select,
.dt-ilo-side .dt-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    color: #111827;
    box-sizing: border-box;
}

/* Page grid like iLovePDF */
.dt-ilo-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 18px 14px;
    padding: 8px 4px 20px;
}
.dt-ilo-page {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 10px 8px 8px;
    border: 2px dashed #c4c4c4;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    cursor: default;
    text-align: center;
}
.dt-ilo-page.is-ranged,
.dt-ilo-page.is-on {
    border-style: solid;
    border-color: #16a34a;
    background: #fff;
}
.dt-ilo-page img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    background: #f3f4f6;
}
.dt-ilo-page > span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}
.dt-ilo-range-badge {
    display: block;
    margin: 0;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-align: center;
}
.dt-ilo-sign-frame img.dt-ilo-sign-page {
    display: block;
    width: 100%;
    height: auto;
}
.dt-ilo-sign-frame img.dt-ilo-sign-overlay {
    width: auto;
    height: auto;
}
.dt-ilo-preview {
    margin-top: 16px;
}
.dt-ilo-preview > p {
    margin: 8px 0 0;
    color: var(--dt-muted);
    font-size: 13px;
}
.dt-signature {
    display: grid;
    gap: 8px;
}
.dt-signature strong {
    font-size: 13px;
    color: #4b5563;
}
.dt-signature canvas {
    width: 100%;
    height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}
.dt-sign-xy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
html.ja-dark .dt-signature strong { color: #a3a3a3; }
html.ja-dark .dt-signature canvas {
    border-color: #2a2a2a !important;
}

/* Compact ad */
.dt-ilo-ad {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
}
.dt-ilo-ad .ad-placeholder-card {
    min-height: 0 !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    border: 1px solid #d4d4d4 !important;
    background: #f4f4f4 !important;
    box-shadow: none !important;
}
.dt-ilo-ad .ad-placeholder-icon {
    width: 28px !important;
    height: 28px !important;
    margin: 0 auto 6px !important;
}
.dt-ilo-ad .ad-placeholder-title {
    font-size: 0.85rem !important;
    margin: 0 0 2px !important;
}
.dt-ilo-ad .ad-placeholder-desc {
    font-size: 0.72rem !important;
    margin: 0 0 4px !important;
}
.dt-ilo-ad .ad-placeholder-cta {
    font-size: 0.78rem !important;
    color: #16a34a !important;
}

html.ja-dark .dt-ilo-grid--ready {
    background: #111 !important;
    border-color: #2a2a2a !important;
}
html.ja-dark .dt-ilo-grid--ready .dt-ilo-main {
    background: #111 !important;
}
html.ja-dark .dt-ilo-grid--ready .dt-ilo-side {
    background: #171717 !important;
    border-left-color: #2a2a2a !important;
}
html.ja-dark .dt-ilo-side-title { color: #f3f3f3; }
html.ja-dark .dt-side-mode,
html.ja-dark .dt-range-row,
html.ja-dark .dt-side-stat,
html.ja-dark .dt-side-pill.is-on,
html.ja-dark .dt-ilo-side .dt-field input,
html.ja-dark .dt-ilo-side .dt-field select,
html.ja-dark .dt-ilo-side .dt-field textarea,
html.ja-dark .dt-range-field input,
html.ja-dark .dt-ilo-page {
    background: #1a1a1a !important;
    border-color: #2a2a2a !important;
    color: #e5e5e5 !important;
}
html.ja-dark .dt-side-mode.is-on,
html.ja-dark .dt-ilo-page.is-ranged,
html.ja-dark .dt-ilo-page.is-on {
    background: rgba(22,163,74,.1) !important;
    border-color: #16a34a !important;
}
html.ja-dark .dt-side-pill {
    background: #222 !important;
    border-color: #2a2a2a !important;
    color: #d4d4d4 !important;
}
html.ja-dark .dt-side-pill.is-on {
    border-color: #dc2626 !important;
    color: #fca5a5 !important;
}
html.ja-dark .dt-side-label,
html.ja-dark .dt-side-help,
html.ja-dark .dt-range-head,
html.ja-dark .dt-range-field,
html.ja-dark .dt-side-check,
html.ja-dark .dt-ilo-side .dt-field,
html.ja-dark .dt-ilo-range-badge,
html.ja-dark .dt-ilo-page > span {
    color: #a3a3a3 !important;
}
html.ja-dark .dt-side-info {
    background: #1a2430 !important;
    color: #bfdbfe !important;
}
html.ja-dark .dt-ilo-side-foot { border-top-color: #2a2a2a; }
html.ja-dark .dt-ilo-ad .ad-placeholder-card {
    background: #1a1a1a !important;
    border-color: #2a2a2a !important;
}
html.ja-dark .dt-ilo-ad .ad-placeholder-title { color: #f3f3f3 !important; }
html.ja-dark .dt-ilo-ad .ad-placeholder-desc { color: #a3a3a3 !important; }
html.ja-dark .dt-ilo-ad .ad-placeholder-icon {
    background: #2a2a2a !important;
    color: #a3a3a3 !important;
}
html.ja-dark .dt-ilo-ad .ad-placeholder-cta { color: #4ade80 !important; }

@media (max-width: 960px) {
    .dt-ilo-grid--ready {
        grid-template-columns: 1fr;
    }
    .dt-ilo-grid--ready .dt-ilo-side {
        width: 100%;
        min-width: 0;
        max-width: none;
        position: static;
        max-height: none;
        border-left: 0;
        border-top: 1px solid #d4d4d4;
    }
}
