/* Unified lite.css entry for lite html editor styles */
.lite-htmledit-enabled .lite-htmledit {
    cursor: pointer;
    transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.lite-htmledit-enabled .lite-htmledit:hover,
.lite-htmledit-enabled .lite-htmledit-hover {
    background-color: var(--lite-edit-hover-bg) !important;
    box-shadow: 0 0 0 2px var(--lite-edit-hover-ring);
}

.lite-htmledit-lock-scroll {
    overflow: hidden;
}

.lite-htmledit-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999997;
    background: var(--lite-edit-mask-bg);
    backdrop-filter: var(--lite-edit-mask-blur);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.lite-htmledit-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lite-htmledit-panel {
    --lite-htmledit-panel-scale: 0.8;
    --lite-htmledit-accent: var(--lite-edit-btn-bg);
    --lite-htmledit-accent-strong: var(--lite-edit-btn-bg-hover);
    --lite-htmledit-surface: var(--lite-edit-surface);
    --lite-htmledit-surface-soft: var(--lite-edit-surface-soft);
    --lite-htmledit-border: var(--lite-edit-border);
    --lite-htmledit-text: var(--lite-edit-text);
    --lite-htmledit-muted: var(--lite-edit-muted);
    --lite-htmledit-danger: #b91c1c;
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 999998;
    width: min(920px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--lite-htmledit-border);
    border-radius: 12px;
    background: var(--lite-htmledit-surface);
    box-shadow: var(--lite-edit-shadow);
    opacity: 0;
    pointer-events: none;
    transform-origin: top left;
    transform: translateY(10px) scale(calc(var(--lite-htmledit-panel-scale) - 0.02));
    overflow: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.lite-htmledit-panel.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(var(--lite-htmledit-panel-scale));
}

.lite-htmledit-panel.is-dragging {
    user-select: none;
    transition: none;
    will-change: transform;
}

.lite-htmledit-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lite-htmledit-border);
    background: var(--lite-htmledit-surface-soft);
    color: var(--lite-htmledit-text);
    cursor: move;
}

.lite-htmledit-panel-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lite-htmledit-panel-heading p {
    margin: 6px 0 0;
    color: var(--lite-htmledit-muted);
    font-size: 13px;
}

.lite-htmledit-panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lite-htmledit-btn-secondary,
.lite-htmledit-btn-icon,
.lite-htmledit-toolbar-btn,
.lite-htmledit-mode-btn,
.lite-htmledit-panel-footer button {
    appearance: none;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.lite-htmledit-btn-secondary {
    padding: 9px 14px;
    border-color: var(--lite-htmledit-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--lite-htmledit-text);
    font-size: 13px;
    cursor: pointer;
}

.lite-htmledit-btn-secondary:hover {
    border-color: #cbd5e1;
    background: var(--lite-htmledit-surface-soft);
    transform: translateY(-1px);
}

.lite-htmledit-btn-icon {
    width: 38px;
    height: 38px;
    border-color: var(--lite-htmledit-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--lite-htmledit-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.lite-htmledit-btn-icon:hover {
    border-color: #cbd5e1;
    background: var(--lite-htmledit-surface-soft);
}

.lite-htmledit-panel-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 16px 20px 0;
}

.lite-htmledit-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--lite-htmledit-border);
    border-radius: 16px;
    background: var(--lite-htmledit-surface-soft);
}

.lite-htmledit-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    height: 38px;
    padding: 0 12px;
    border-color: #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: var(--lite-htmledit-text);
    font-size: 13px;
    cursor: pointer;
}

.lite-htmledit-toolbar-btn-icon {
    min-width: 38px;
    width: 38px;
    padding: 0;
}

.lite-htmledit-icon-undo {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.lite-htmledit-toolbar-btn:hover,
.lite-htmledit-mode-btn:hover,
.lite-htmledit-panel-footer button:hover {
    transform: translateY(-1px);
}

.lite-htmledit-toolbar-btn:hover,
.lite-htmledit-mode-btn:hover {
    border-color: #9ca3af;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.lite-htmledit-toolbar-btn.is-disabled,
.lite-htmledit-toolbar-btn:disabled,
.lite-htmledit-mode-btn:disabled,
.lite-htmledit-btn-save.is-disabled,
.lite-htmledit-btn-save:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.lite-htmledit-toolbar-text-decoration {
    text-decoration: underline;
}

.lite-htmledit-toolbar-spacer {
    flex: 1;
    min-width: 12px;
}

.lite-htmledit-color-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: var(--lite-htmledit-text);
}

.lite-htmledit-color-label {
    color: var(--lite-htmledit-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.lite-htmledit-color-input {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.lite-htmledit-color-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lite-htmledit-color-preset {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.8),
        0 4px 10px rgba(15, 23, 42, 0.18);
    cursor: pointer;
}

.lite-htmledit-color-preset:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.9),
        0 6px 14px rgba(15, 23, 42, 0.3);
}

.lite-htmledit-color-preset:active {
    transform: translateY(0);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.9),
        0 2px 6px rgba(15, 23, 42, 0.3);
}

.lite-htmledit-mode-switch {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--lite-htmledit-border);
    border-radius: 14px;
    background: #e2e8f0;
}

.lite-htmledit-mode-btn {
    min-width: 86px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--lite-htmledit-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lite-htmledit-mode-btn.is-active {
    background: #ffffff;
    color: var(--lite-htmledit-text);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.lite-htmledit-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--lite-htmledit-muted);
    font-size: 13px;
}

.lite-htmledit-target-name {
    overflow: hidden;
    color: var(--lite-htmledit-text);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lite-htmledit-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.lite-htmledit-status.is-dirty {
    background: var(--lite-edit-selected-bg);
    color: var(--lite-edit-selected-text);
}

.lite-htmledit-editor-container {
    display: flex;
    flex: 1;
    min-height: 320px;
    max-height: calc(100vh - 300px);
    border: 1px solid var(--lite-htmledit-border);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
}

.lite-htmledit-editor-content {
    width: 100%;
    min-height: 100%;
    padding: 18px;
    color: var(--lite-htmledit-text);
    font-size: 14px;
    line-height: 1.7;
    overflow: auto;
}

.lite-htmledit-preview:focus,
.lite-htmledit-html-textarea:focus,
.lite-htmledit-color-input:focus {
    outline: none;
}

.lite-htmledit-preview {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.75), rgba(255, 255, 255, 0.98));
}

.lite-htmledit-preview-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100%;
    isolation: isolate;
    box-sizing: border-box;
}

.lite-htmledit-preview-parent {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.lite-htmledit-preview [contenteditable="true"] {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    border-radius: 10px;
    outline: none;
}

.lite-htmledit-preview-editable[contenteditable="true"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: var(--lite-htmledit-preview-font-size, inherit);
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: transparent !important;
    box-shadow: none !important;
}

.lite-htmledit-html-textarea {
    display: none;
    border: none;
    resize: none;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(255, 255, 255, 0.98));
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
}

.lite-htmledit-panel,
.lite-htmledit-preview [contenteditable="true"],
.lite-htmledit-html-textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.lite-htmledit-color-input {
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4) inset;
}

.lite-htmledit-color-inline:hover .lite-htmledit-color-input {
    box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.65) inset;
}

.lite-htmledit-panel-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--lite-htmledit-border);
    background: var(--lite-htmledit-surface-soft);
}

.lite-htmledit-panel-footer button {
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.lite-htmledit-btn-outline {
    border-color: var(--lite-htmledit-border) !important;
    background: #ffffff;
    color: var(--lite-htmledit-text);
}

.lite-htmledit-btn-cancel {
    margin-left: auto;
    border-color: transparent !important;
    background: #e2e8f0;
    color: #334155;
}

.lite-htmledit-btn-save {
    border-color: transparent !important;
    background: var(--lite-htmledit-accent);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.lite-htmledit-btn-save:hover {
    background: var(--lite-htmledit-accent-strong);
}

.lite-htmledit-footer-tip {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--lite-htmledit-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .lite-htmledit-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        --lite-htmledit-panel-scale: 1;
    }

    .lite-htmledit-panel.is-visible {
        transform: translateY(0) scale(1);
    }

    .lite-htmledit-editor-container {
        max-height: calc(100vh - 320px);
    }

    .lite-htmledit-toolbar {
        gap: 8px;
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .lite-htmledit-panel {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 14px;
        --lite-htmledit-panel-scale: 1;
    }

    .lite-htmledit-panel.is-visible {
        transform: translateY(0) scale(1);
    }

    .lite-htmledit-panel-header,
    .lite-htmledit-panel-body,
    .lite-htmledit-panel-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .lite-htmledit-panel-header {
        position: relative;
        gap: 8px;
        padding: 8px 38px 24px 12px;
        cursor: default;
    }

    .lite-htmledit-panel-heading h3 {
        font-size: 15px;
    }

    .lite-htmledit-panel-heading p {
        display: none;
    }

    .lite-htmledit-panel-actions {
        position: absolute;
        top: 6px;
        right: 6px;
        z-index: 5;
    }

    .lite-htmledit-btn-icon {
        width: 26px;
        height: 26px;
        font-size: 14px;
        border-radius: 6px;
    }

    .lite-htmledit-btn-secondary {
        flex: 1;
        text-align: center;
    }

    .lite-htmledit-toolbar {
        gap: 6px;
        padding: 8px;
    }

    .lite-htmledit-toolbar-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
    }

    .lite-htmledit-toolbar-btn-icon {
        min-width: 34px;
        width: 34px;
        padding: 0;
    }

    .lite-htmledit-color-inline {
        gap: 4px;
        height: 34px;
        padding: 0 6px;
    }

    .lite-htmledit-color-label {
        font-size: 11px;
    }

    .lite-htmledit-color-input {
        width: 26px;
        height: 26px;
    }

    .lite-htmledit-color-preset {
        width: 22px;
        height: 22px;
    }

    .lite-htmledit-toolbar-spacer {
        display: none;
    }

    .lite-htmledit-mode-switch {
        width: 100%;
    }

    .lite-htmledit-mode-btn {
        flex: 1;
        min-width: 0;
        height: 34px;
        font-size: 12px;
    }

    .lite-htmledit-editor-meta {
        position: absolute;
        top: 28px;
        left: 12px;
        right: 38px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        font-size: 11px;
    }

    .lite-htmledit-target-name {
        max-width: 55%;
    }

    .lite-htmledit-status {
        padding: 2px 7px;
        font-size: 10px;
    }

    .lite-htmledit-panel-body {
        gap: 10px;
    }

    .lite-htmledit-editor-container {
        min-height: 200px;
        max-height: calc(100vh - 280px);
    }

    .lite-htmledit-editor-content {
        padding: 12px;
        font-size: 13px;
    }

    .lite-htmledit-panel-footer {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px 12px;
    }

    .lite-htmledit-panel-footer button {
        height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .lite-htmledit-footer-tip {
        order: 4;
        width: 100%;
        font-size: 11px;
    }

    .lite-htmledit-btn-outline {
        flex: 1 1 calc(50% - 4px);
        margin-left: 0;
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .lite-htmledit-btn-cancel,
    .lite-htmledit-btn-save {
        flex: 1 1 calc(50% - 4px);
        margin-left: 0;
    }
}

@media (max-width: 420px) {
    .lite-htmledit-color-label {
        display: none;
    }

    .lite-htmledit-color-inline {
        padding: 0 4px;
    }

    .lite-htmledit-btn-outline {
        flex: 1 1 calc(50% - 4px);
        font-size: 11px;
    }

    .lite-htmledit-panel-footer button {
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .lite-htmledit-editor-meta {
        right: 38px;
        font-size: 10px;
    }

    .lite-htmledit-target-name {
        max-width: 50%;
    }

    .lite-htmledit-status {
        padding: 2px 6px;
        font-size: 9px;
    }

    .lite-htmledit-editor-container {
        min-height: 180px;
        max-height: calc(100vh - 300px);
    }
}

@media (max-width: 360px) {
    .lite-htmledit-panel {
        width: calc(100vw - 10px);
        max-height: calc(100vh - 10px);
        border-radius: 10px;
    }

    .lite-htmledit-panel-header,
    .lite-htmledit-panel-body,
    .lite-htmledit-panel-footer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .lite-htmledit-panel-header {
        gap: 6px;
        padding: 6px 34px 22px 10px;
    }

    .lite-htmledit-panel-heading h3 {
        font-size: 14px;
    }

    .lite-htmledit-panel-actions {
        top: 4px;
        right: 4px;
    }

    .lite-htmledit-btn-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
        border-radius: 5px;
    }

    .lite-htmledit-editor-meta {
        top: 24px;
        left: 10px;
        right: 34px;
        gap: 6px;
        font-size: 10px;
    }

    .lite-htmledit-target-name {
        max-width: 50%;
    }

    .lite-htmledit-status {
        padding: 2px 5px;
        font-size: 9px;
    }

    .lite-htmledit-toolbar {
        gap: 4px;
        padding: 6px;
    }

    .lite-htmledit-toolbar-btn {
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
        font-size: 11px;
        border-radius: 8px;
    }

    .lite-htmledit-toolbar-btn-icon {
        min-width: 30px;
        width: 30px;
    }

    .lite-htmledit-color-inline {
        height: 30px;
    }

    .lite-htmledit-color-input {
        width: 22px;
        height: 22px;
    }

    .lite-htmledit-color-preset {
        width: 18px;
        height: 18px;
    }

    .lite-htmledit-mode-switch {
        border-radius: 8px;
        padding: 3px;
    }

    .lite-htmledit-mode-btn {
        height: 30px;
        font-size: 11px;
    }

    .lite-htmledit-editor-container {
        min-height: 150px;
        max-height: calc(100vh - 260px);
    }

    .lite-htmledit-editor-content {
        padding: 10px;
        font-size: 12px;
    }

    .lite-htmledit-panel-footer {
        gap: 6px;
        padding: 8px 10px 10px;
    }

    .lite-htmledit-panel-footer button {
        height: 34px;
        padding: 0 10px;
        font-size: 11px;
    }

    .lite-htmledit-btn-outline {
        flex: 1 1 calc(50% - 3px);
        height: 34px;
        font-size: 11px;
    }
}

/* lite shared popup styles */
:root {
    --lite-font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --lite-symbol-family: "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --lite-panel-width: min(560px, calc(100vw - 32px));
    --lite-panel-width-mobile: calc(100vw - 24px);
    --lite-panel-max-width: calc(100vw - 32px);
    --lite-panel-max-height: calc(100vh - 32px);
    --lite-panel-padding: 18px 18px 16px;
    --lite-panel-padding-mobile: 14px;
    --lite-panel-border: 1px solid var(--lite-edit-border);
    --lite-panel-radius: 12px;
    --lite-panel-shadow: var(--lite-edit-shadow);
    --lite-mask-bg: var(--lite-edit-mask-bg);
    --lite-mask-blur: var(--lite-edit-mask-blur);
    --lite-input-height: 58px;
    --lite-input-height-mobile: 52px;
    --lite-input-font-size-mobile: 14px;
    --lite-action-size: 58px;
    --lite-action-size-mobile: 52px;
    --lite-action-font-size-mobile: 22px;
    --lite-ok-bg: var(--lite-edit-btn-bg);
    --lite-ok-bg-hover: var(--lite-edit-btn-bg-hover);
    --lite-cancel-bg: #e2e8f0;
    --lite-cancel-bg-hover: #cbd5e1;
    --lite-error-color: #dc2626;
    --lite-edit-surface: rgba(255, 255, 255, 0.88);
    --lite-edit-surface-soft: #f8fafc;
    --lite-edit-border: #e5e7eb;
    --lite-edit-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --lite-edit-text: #1f2937;
    --lite-edit-muted: #475569;
    --lite-edit-btn-bg: #1f2937;
    --lite-edit-btn-bg-hover: #111827;
    --lite-edit-selected-border: #86efac;
    --lite-edit-selected-bg: #f0fdf4;
    --lite-edit-selected-text: #166534;
    --lite-edit-hover-bg: rgba(31, 41, 55, 0.08);
    --lite-edit-hover-ring: rgba(31, 41, 55, 0.22);
    --lite-edit-mask-bg: rgba(15, 23, 42, 0.16);
    --lite-edit-mask-blur: blur(6px);
}

.lite-overlay-lock-scroll {
    overflow: hidden !important;
}

.lite-overlay-no-select,
.lite-overlay-no-select * {
    user-select: none !important;
}

.lite-overlay-container {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
}

.lite-overlay-container.is-visible {
    display: flex;
}

.lite-overlay-container.is-selector-mode {
    align-items: stretch;
    justify-content: stretch;
}

.lite-overlay-dialog {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    outline: none !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-width: 100%;
    max-height: 100%;
}

.lite-overlay-container.is-selector-mode .lite-overlay-dialog {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
}

.lite-overlay-viewport {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    outline: none !important;
    background: transparent;
    touch-action: none;
}

.lite-overlay-container.is-selector-mode .lite-overlay-viewport {
    width: 100% !important;
    height: 100% !important;
}

.lite-overlay-selector {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 24px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.04));
    backdrop-filter: blur(10px);
}

.lite-overlay-selector.is-hidden {
    display: none;
}

.lite-overlay-selector-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    color: var(--lite-edit-text);
    font: 600 14px/1 var(--lite-font-family);
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.lite-overlay-selector-close:hover {
    transform: translateY(-1px);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.lite-overlay-selector-close:focus {
    outline: none;
}

.lite-overlay-selector-close:focus-visible {
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.12), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lite-overlay-selector-list {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(640px, 100%);
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: 4px;
    overflow: auto;
    overflow-x: hidden;
    align-content: start;
}

.lite-overlay-selector-list .lite-overlay-selector-close {
    position: sticky;
    top: 0;
    z-index: 3;
    justify-self: end;
    align-self: start;
    grid-column: 1 / -1;
}

.lite-overlay-selector-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
    color: var(--lite-edit-text);
    text-align: left;
    font-family: var(--lite-font-family);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.lite-overlay-selector-item:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.lite-overlay-selector-item:active {
    transform: translateY(0);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.lite-overlay-selector-item:focus {
    outline: none;
}

.lite-overlay-selector-item:focus-visible {
    border-color: rgba(148, 163, 184, 0.78);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.12), 0 22px 44px rgba(15, 23, 42, 0.16);
}

.lite-overlay-selector-item[data-sortable="true"] {
    cursor: grab;
}

.lite-overlay-selector-list.is-sorting .lite-overlay-selector-item[data-sortable="true"] {
    cursor: grabbing;
}

.lite-overlay-selector-list.is-sorting .lite-overlay-selector-item {
    opacity: 0.62;
    transform: scale(0.98);
}

.lite-overlay-selector-item[data-thumbnail-status="loading"] {
    border-color: rgba(148, 163, 184, 0.45);
}

.lite-overlay-selector-item[data-thumbnail-status="fallback"] {
    border-color: rgba(226, 232, 240, 0.82);
}

.lite-overlay-selector-item.lite-overlay-selector-item-dragging {
    opacity: 1 !important;
    transform: scale(1.04) rotate(-1.1deg) !important;
    border-color: rgba(31, 41, 55, 0.65);
    box-shadow: 0 0 0 5px rgba(31, 41, 55, 0.14), 0 30px 54px rgba(15, 23, 42, 0.25);
    background: linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.96));
    animation: lite-overlay-drag-pulse 0.95s ease-in-out infinite;
    z-index: 2;
}

.lite-overlay-selector-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #ffffff 45%, #e2e8f0);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    pointer-events: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.lite-overlay-selector-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8fafc;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.lite-overlay-selector-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lite-overlay-selector-label-row>.lite-overlay-selector-label {
    flex: 1 1 auto;
    width: 100%;
}

.lite-overlay-selector-label-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 32px;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
}

.lite-overlay-selector-label-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.lite-overlay-selector-label-controls.is-button-trigger-controls {
    position: absolute;
    top: -28px;
    left: -4px;
    z-index: 3;
    margin-left: 0;
    justify-content: flex-start;
    pointer-events: none;
}

.lite-overlay-selector-label-edit-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lite-edit-text);
    font: inherit;
    cursor: pointer;
    transition: all 0.16s ease;
}

.lite-overlay-selector-label-edit-trigger:focus {
    outline: none;
}

.lite-overlay-selector-label-edit-trigger:not(.is-button-trigger) {
    justify-content: flex-start;
    align-self: flex-start;
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-align: left;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-color: rgba(31, 41, 55, 0.8);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: color 0.16s ease, text-decoration-color 0.16s ease, transform 0.16s ease;
}

.lite-overlay-selector-label-edit-trigger:not(.is-button-trigger) .lite-overlay-selector-label {
    width: auto;
    max-width: 100%;
}

.lite-overlay-selector-label-edit-trigger:not(.is-button-trigger):hover {
    color: #111827;
    text-decoration-color: rgba(17, 24, 39, 0.96);
    transform: translateY(-1px);
}

.lite-overlay-selector-label-edit-trigger:not(.is-button-trigger):focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
    border-radius: 6px;
}

.lite-overlay-selector-label-edit-trigger.is-button-trigger {
    min-width: 44px;
    height: 24px;
    padding: 0 10px;
    border: 1px solid rgba(100, 116, 139, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    font: 600 11px/1 var(--lite-font-family);
    letter-spacing: 0.01em;
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
}

.lite-overlay-selector-label-edit-trigger.is-button-trigger:hover {
    border-color: rgba(31, 41, 55, 0.38);
    color: #111827;
    background: #f8fafc;
}

.lite-overlay-selector-label-edit-trigger.is-button-trigger:active {
    background: #e2e8f0;
    border-color: rgba(31, 41, 55, 0.52);
}

.lite-overlay-selector-label-edit-trigger.is-button-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.lite-overlay-selector-item:hover .lite-overlay-selector-label-controls.is-button-trigger-controls,
.lite-overlay-selector-item:focus-within .lite-overlay-selector-label-controls.is-button-trigger-controls {
    pointer-events: auto;
}

.lite-overlay-selector-item:hover .lite-overlay-selector-label-controls.is-button-trigger-controls .lite-overlay-selector-label-edit-trigger.is-button-trigger,
.lite-overlay-selector-item:focus-within .lite-overlay-selector-label-controls.is-button-trigger-controls .lite-overlay-selector-label-edit-trigger.is-button-trigger {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (hover: none),
(pointer: coarse) {
    .lite-overlay-selector-label-controls.is-button-trigger-controls {
        pointer-events: auto;
    }

    .lite-overlay-selector-label-controls.is-button-trigger-controls .lite-overlay-selector-label-edit-trigger.is-button-trigger {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.lite-overlay-selector-delete-btn,
.lite-loading-close {
    appearance: none;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--lite-edit-muted);
    font: 700 14px/1 var(--lite-font-family);
    cursor: pointer;
    transition: all 0.16s ease;
}

.lite-overlay-selector-delete-btn:hover,
.lite-loading-close:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

.lite-overlay-selector-delete-btn:focus,
.lite-loading-close:focus {
    outline: none;
}

.lite-overlay-selector-delete-btn:focus-visible,
.lite-loading-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

@media (hover: hover) and (pointer: fine) {
    .lite-overlay-selector-delete-btn {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.92);
    }

    .lite-overlay-selector-item:hover .lite-overlay-selector-delete-btn,
    .lite-overlay-selector-item:focus-within .lite-overlay-selector-delete-btn {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }
}

/* ===== lite-dropdown ===== */
.lite-dropdown-menu {
    position: fixed;
    z-index: 2147483100;
    display: none;
    flex-direction: column;
    min-width: 120px;
    max-width: min(280px, calc(100vw - 16px));
    padding: 4px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(148, 163, 184, 0.08);
    box-sizing: border-box;
    font-family: var(--lite-font-family);
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    pointer-events: none;
}

.lite-dropdown-menu.is-open {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.lite-dropdown-menu.is-flip-up {
    transform: scale(0.96) translateY(4px);
}

.lite-dropdown-menu.is-flip-up.is-open {
    transform: scale(1) translateY(0);
}

.lite-dropdown-item {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #334155;
    font: 500 13px/1 var(--lite-font-family);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.lite-dropdown-item:hover {
    background: #f1f5f9;
}

.lite-dropdown-item:active {
    background: #e2e8f0;
}

.lite-dropdown-item:focus {
    outline: none;
}

.lite-dropdown-item:focus-visible {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.lite-dropdown-item.is-danger {
    color: #b91c1c;
}

.lite-dropdown-item.is-danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

.lite-dropdown-item.is-danger:active {
    background: #fee2e2;
}

.lite-dropdown-item.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lite-dropdown-item.is-disabled:hover {
    background: transparent;
}

.lite-dropdown-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1;
}

.lite-dropdown-item-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lite-dropdown-divider {
    height: 1px;
    margin: 4px 8px;
    background: #e2e8f0;
}

/* --- More menu ("...") button for selector items --- */
.lite-overlay-selector-more-btn {
    appearance: none;
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #475569;
    font: 700 16px/1 var(--lite-font-family);
    letter-spacing: 1px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: all 0.16s ease;
}

.lite-overlay-selector-more-btn:hover {
    background: #f1f5f9;
    border-color: rgba(100, 116, 139, 0.5);
    color: #1e293b;
}

.lite-overlay-selector-more-btn.is-active {
    background: #e2e8f0;
    border-color: rgba(100, 116, 139, 0.6);
    color: #0f172a;
}

.lite-overlay-selector-more-btn:focus {
    outline: none;
}

.lite-overlay-selector-more-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .lite-overlay-selector-more-btn {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-50%) scale(0.92);
    }

    .lite-overlay-selector-item:hover .lite-overlay-selector-more-btn,
    .lite-overlay-selector-item:focus-within .lite-overlay-selector-more-btn {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }
}

.lite-overlay-selector-drag-handle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 30px;
    padding: 0 10px;
    border: 1px dashed rgba(100, 116, 139, 0.5);
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font: 600 12px/1 var(--lite-font-family);
    cursor: grab;
    touch-action: none;
    transition: all 0.16s ease;
}

.lite-overlay-selector-list.is-sorting .lite-overlay-selector-drag-handle {
    cursor: grabbing;
}

.lite-overlay-selector-drag-handle:hover {
    border-color: rgba(31, 41, 55, 0.38);
    color: #111827;
    background: #f8fafc;
}

.lite-overlay-selector-drag-handle:active {
    cursor: grabbing;
    background: #e2e8f0;
    border-color: rgba(31, 41, 55, 0.52);
}

.lite-overlay-selector-drag-handle:focus {
    outline: none;
}

.lite-overlay-selector-drag-handle:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.lite-overlay-selector-label-editor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: var(--lite-mask-bg);
    backdrop-filter: var(--lite-mask-blur);
}

.lite-overlay-selector-label-editor {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 31;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: var(--lite-panel-width);
    max-width: var(--lite-panel-max-width);
    max-height: var(--lite-panel-max-height);
    padding: var(--lite-panel-padding);
    border: var(--lite-panel-border);
    border-radius: var(--lite-panel-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--lite-panel-shadow);
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    overflow: auto;
}

.lite-overlay-selector-label-editor-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.lite-overlay-selector-label-input {
    flex: 1 1 auto;
    min-width: 0;
    height: var(--lite-input-height);
    padding: 0 14px;
    border: 1px solid var(--lite-edit-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--lite-edit-text);
    font: 500 15px/1.4 var(--lite-font-family);
    box-sizing: border-box;
}

.lite-overlay-selector-label-input::placeholder {
    color: rgba(71, 85, 105, 0.65);
}

.lite-overlay-selector-label-input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.lite-overlay-selector-label-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.lite-overlay-selector-label-save,
.lite-overlay-selector-label-cancel {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--lite-action-size);
    height: var(--lite-action-size);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    font: 700 22px/1 var(--lite-symbol-family);
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, background-color 0.16s ease;
}

.lite-overlay-selector-label-save {
    background: var(--lite-ok-bg);
    color: #ffffff;
}

.lite-overlay-selector-label-save:hover {
    background: var(--lite-ok-bg-hover);
    transform: translateY(-1px);
}

.lite-overlay-selector-label-cancel {
    background: var(--lite-cancel-bg);
    color: #334155;
}

.lite-overlay-selector-label-cancel:hover {
    background: var(--lite-cancel-bg-hover);
    transform: translateY(-1px);
}

.lite-overlay-selector-label-error {
    display: block;
    color: var(--lite-error-color);
    font: 500 12px/1.45 var(--lite-font-family);
}

.lite-overlay-selector-empty {
    padding: 20px 22px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.88));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    color: var(--lite-edit-muted);
    font: 400 14px/1.6 var(--lite-font-family);
    grid-column: 1 / -1;
}

.lite-overlay-frame {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none !important;
    background: transparent;
    overflow: hidden !important;
}

.lite-overlay-frame.is-hidden {
    display: none;
}

.lite-overlay-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 24px;
    height: 24px;
    cursor: nwse-resize;
    touch-action: none;
    background: transparent;
}

.lite-overlay-container.is-selector-mode .lite-overlay-resize-handle {
    display: none !important;
}

.lite-edit-lock-mask {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    pointer-events: auto;
    background: rgba(15, 23, 42, var(--lite-edit-lock-alpha, 0));
    backdrop-filter: var(--lite-edit-lock-blur, none);
}

.lite-edit-lock-mask.is-visible {
    display: block;
}

@keyframes lite-overlay-drag-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(31, 41, 55, 0.2), 0 22px 44px rgba(15, 23, 42, 0.16);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(31, 41, 55, 0.08), 0 28px 50px rgba(15, 23, 42, 0.2);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(31, 41, 55, 0.2), 0 22px 44px rgba(15, 23, 42, 0.16);
    }
}

@media (max-width: 900px) {
    .lite-overlay-selector {
        padding: 20px;
        gap: 16px;
    }

    .lite-overlay-selector-list {
        width: min(640px, 100%);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .lite-overlay-selector {
        padding: 16px 14px;
    }

    .lite-overlay-selector-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 2px;
    }

    .lite-overlay-selector-label-editor {
        width: var(--lite-panel-width-mobile);
        max-width: var(--lite-panel-width-mobile);
        padding: var(--lite-panel-padding-mobile);
    }

    .lite-overlay-selector-label-editor-row {
        gap: 10px;
    }

    .lite-overlay-selector-label-input {
        height: var(--lite-input-height-mobile);
        font-size: var(--lite-input-font-size-mobile);
    }

    .lite-overlay-selector-label-save,
    .lite-overlay-selector-label-cancel {
        width: var(--lite-action-size-mobile);
        height: var(--lite-action-size-mobile);
        font-size: var(--lite-action-font-size-mobile);
    }
}

.lite-input-mask,
.lite-confirm-mask {
    position: fixed;
    inset: 0;
    background: var(--lite-mask-bg);
    backdrop-filter: var(--lite-mask-blur);
}

.lite-input-mask {
    z-index: 2147483550;
}

.lite-confirm-mask {
    z-index: 2147483500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lite-input-box {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2147483551;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: var(--lite-panel-width);
    max-width: var(--lite-panel-max-width);
    max-height: var(--lite-panel-max-height);
    padding: var(--lite-panel-padding);
    border: var(--lite-panel-border);
    border-radius: var(--lite-panel-radius);
    background: var(--lite-edit-surface);
    box-shadow: var(--lite-panel-shadow);
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    overflow: auto;
}

.lite-confirm-box {
    width: min(420px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 16px 16px 14px;
    border: var(--lite-panel-border);
    border-radius: var(--lite-panel-radius);
    background: var(--lite-edit-surface);
    box-shadow: var(--lite-panel-shadow);
    box-sizing: border-box;
    font-family: var(--lite-font-family);
}

.lite-input-title,
.lite-confirm-title {
    margin: 0;
    color: var(--lite-edit-text);
    font: 600 16px/1.35 var(--lite-font-family);
}

.lite-confirm-title {
    margin-bottom: 8px;
}

.lite-confirm-text {
    margin: 0 0 14px;
    color: var(--lite-edit-muted);
    font: 400 14px/1.6 var(--lite-font-family);
    word-break: break-word;
}

.lite-input-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.lite-input-field {
    flex: 1 1 auto;
    min-width: 0;
    height: var(--lite-input-height);
    padding: 0 14px;
    border: 1px solid var(--lite-edit-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--lite-edit-text);
    font: 500 15px/1.4 var(--lite-font-family);
    box-sizing: border-box;
}

.lite-input-field:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.lite-input-ok,
.lite-input-cancel {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--lite-action-size);
    height: var(--lite-action-size);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    font: 700 24px/1 var(--lite-symbol-family);
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, background-color 0.16s ease;
}

.lite-input-ok {
    background: var(--lite-ok-bg);
    color: #fff;
}

.lite-input-ok:hover {
    background: var(--lite-ok-bg-hover);
    transform: translateY(-1px);
}

.lite-input-cancel {
    background: var(--lite-cancel-bg);
    color: #334155;
}

.lite-input-cancel:hover {
    background: var(--lite-cancel-bg-hover);
    transform: translateY(-1px);
}

.lite-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.lite-confirm-cancel,
.lite-confirm-ok {
    appearance: none;
    min-width: 74px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 600 14px/1 var(--lite-font-family);
    cursor: pointer;
}

.lite-confirm-cancel {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.lite-confirm-cancel:hover {
    background: #cbd5e1;
}

.lite-confirm-ok {
    background: var(--lite-ok-bg);
    color: #fff;
}

.lite-confirm-ok:hover {
    background: var(--lite-ok-bg-hover);
}

.lite-confirm-ok.is-danger {
    background: #dc2626;
}

.lite-confirm-ok.is-danger:hover {
    background: #b91c1c;
}

.lite-edit-actions {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100001;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--lite-edit-border);
    border-radius: 12px;
    background: var(--lite-edit-surface);
    box-shadow: var(--lite-edit-shadow);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.lite-edit-actions.is-lock-top {
    z-index: 100001;
}

.lite-edit-actions.is-ready {
    display: flex;
}

.lite-edit-actions.is-no-transition {
    transition: none;
}

.lite-edit-actions.is-visible {
    opacity: 1;
}

.lite-edit-actions.is-hidden {
    opacity: 0;
}

.lite-edit-actions-current {
    display: block;
    max-width: 220px;
    overflow: hidden;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--lite-edit-surface-soft);
    color: var(--lite-edit-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 500 12px/1.3 var(--lite-font-family);
}

.lite-edit-actions-current.is-selected {
    border-color: var(--lite-edit-selected-border);
    background: var(--lite-edit-selected-bg);
    color: var(--lite-edit-selected-text);
}

.lite-edit-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.lite-edit-actions-hover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    pointer-events: none;
}

.lite-edit-actions.is-hidden .lite-edit-actions-hover {
    display: block;
    pointer-events: auto;
}

@media (hover: none),
(pointer: coarse) {
    .lite-edit-actions.is-hidden .lite-edit-actions-hover {
        display: block;
        pointer-events: auto;
        border: 1px dashed rgba(148, 163, 184, 0.4);
        border-radius: 12px;
        cursor: pointer;
    }
}

.lite-edit-actions.is-hidden .lite-edit-actions-current,
.lite-edit-actions.is-hidden .lite-edit-actions-row {
    pointer-events: none;
}

.lite-edit-actions-btn {
    appearance: none;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--lite-edit-btn-bg);
    color: #fff;
    font: 500 14px/1 var(--lite-font-family);
    cursor: pointer;
    transition: opacity 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

.lite-edit-actions-btn:hover {
    background: var(--lite-edit-btn-bg-hover);
    transform: translateY(-1px);
}

.lite-edit-actions-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.lite-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 2147483600;
    min-width: 160px;
    max-width: min(520px, calc(100vw - 24px));
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #fff;
    font: 500 14px/1.45 var(--lite-font-family);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
    word-break: break-word;
    transform: translate(-50%, 14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lite-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.lite-toast.is-success {
    background: rgba(5, 150, 105, 0.94);
}

.lite-toast.is-error {
    background: rgba(220, 38, 38, 0.94);
}

.lite-toast.is-info {
    background: rgba(15, 23, 42, 0.92);
}

.lite-loading-mask {
    position: fixed;
    inset: 0;
    z-index: 2147483650;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lite-mask-bg);
    backdrop-filter: var(--lite-mask-blur);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.lite-loading-mask.is-show {
    opacity: 1;
    pointer-events: auto;
}

.lite-loading-box {
    position: relative;
    min-width: 220px;
    max-width: min(520px, calc(100vw - 28px));
    padding: 18px 18px 16px;
    border: var(--lite-panel-border);
    border-radius: 12px;
    background: var(--lite-edit-surface);
    box-shadow: var(--lite-panel-shadow);
    box-sizing: border-box;
    font-family: var(--lite-font-family);
}

.lite-loading-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lite-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(148, 163, 184, 0.42);
    border-top-color: var(--lite-edit-btn-bg);
    border-radius: 999px;
    animation: lite-loading-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

@keyframes lite-loading-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.lite-loading-text {
    color: var(--lite-edit-muted);
    font: 500 14px/1.5 var(--lite-font-family);
    word-break: break-word;
}

.lite-loading-close {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
}

.lite-loading-mask.is-closable .lite-loading-close {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

@media (max-width: 640px) {
    .lite-input-box {
        width: var(--lite-panel-width-mobile);
        max-width: var(--lite-panel-width-mobile);
        padding: var(--lite-panel-padding-mobile);
    }

    .lite-input-row {
        gap: 10px;
    }

    .lite-input-field {
        height: var(--lite-input-height-mobile);
        font-size: var(--lite-input-font-size-mobile);
    }

    .lite-input-ok,
    .lite-input-cancel {
        width: var(--lite-action-size-mobile);
        height: var(--lite-action-size-mobile);
        font-size: var(--lite-action-font-size-mobile);
    }

    .lite-loading-box {
        max-width: calc(100vw - 24px);
        padding: 14px;
    }
}