/**
 * SaveEditor 手机端增强
 */

@media (max-width: 768px) {
    html.is-mobile.save-editor-page {
        font-size: 14px;
    }

    body.save-editor-body {
        padding: 0 !important;
        min-height: 100dvh;
        background: linear-gradient(160deg, #eef1fb 0%, #faf5ff 50%, #f0f9ff 100%) !important;
    }

    .save-editor-body .fx-bg {
        opacity: 0.85;
    }

    .save-editor-shell {
        min-height: 100dvh;
        padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
    }

    .save-editor-theme-toggle {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        z-index: 120;
        background: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(99, 102, 241, 0.15) !important;
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    }

    .save-editor-body .login-card,
    .save-editor-body .save-page,
    .save-editor-body .detail-page,
    .save-editor-body .page {
        border-radius: 18px !important;
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.9) !important;
        overflow: hidden;
    }

    .save-editor-body .login-header,
    .save-editor-body .save-header,
    .save-editor-body .detail-header,
    .save-editor-body .hdr {
        padding: 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .save-editor-body .login-header h1,
    .save-editor-body .save-header h1,
    .save-editor-body .detail-header h1,
    .save-editor-body .hdr h1 {
        font-size: 1rem !important;
        line-height: 1.35;
    }

    .save-editor-body .login-header p,
    .save-editor-body .hdr p {
        font-size: 0.78rem !important;
    }

    .save-editor-body .back-btn,
    .save-editor-body .page-back {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        margin-bottom: 12px;
        border-radius: 10px;
        background: rgba(99, 102, 241, 0.1);
        color: #6366f1 !important;
        font-size: 0.82rem;
        font-weight: 700;
        text-decoration: none;
        border: 1px solid rgba(99, 102, 241, 0.15);
    }

    .save-editor-body .login-body,
    .save-editor-body .save-body,
    .save-editor-body .body {
        padding: 1rem !important;
    }

    .save-editor-body .input-group input,
    .save-editor-body .input-group select,
    .save-editor-body .input-group textarea,
    .save-editor-body input[type="text"],
    .save-editor-body input[type="password"],
    .save-editor-body textarea {
        min-height: 46px;
        font-size: 16px !important;
        border-radius: 12px !important;
    }

    .save-editor-body .btn,
    .save-editor-body .btn-primary,
    .save-editor-body .btn-p,
    .save-editor-body .btn-s,
    .save-editor-body .btn-outline,
    .save-editor-body .btn-secondary,
    .save-editor-body .quick-btn {
        min-height: 44px;
        border-radius: 12px !important;
        font-size: 0.88rem !important;
    }

    .save-editor-body .login-mode-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }

    .save-editor-body .drop-zone {
        padding: 28px 16px !important;
        border-radius: 14px !important;
        border: 2px dashed rgba(99, 102, 241, 0.35) !important;
        background: rgba(99, 102, 241, 0.06) !important;
    }

    .save-editor-body .player-tabs,
    .save-editor-body .tab-nav,
    .save-editor-body .sub-nav,
    .save-editor-body .grp-nav {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
        margin: 0 -0.75rem;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .save-editor-body .player-tab-btn,
    .save-editor-body .tab-btn {
        padding: 0.65rem 0.9rem !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
    }

    .save-editor-body .player-info-bar,
    .save-editor-body .info-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .save-editor-body .info-item {
        padding: 10px !important;
        border-radius: 10px !important;
        background: rgba(248, 250, 252, 0.9) !important;
    }

    .save-editor-body .quick-actions {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0.75rem 0;
    }

    .save-editor-body .quick-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 0.55rem 0.5rem !important;
        font-size: 0.78rem !important;
    }

    .save-editor-body .data-table-wrap,
    .save-editor-body .tbl-wrap {
        border-radius: 12px;
        border: 1px solid rgba(99, 102, 241, 0.12);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .save-editor-body .detail-header {
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .save-editor-body .modal-overlay {
        align-items: flex-end;
    }

    .save-editor-body .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 88dvh;
    }

    [data-theme="dark"] body.save-editor-body {
        background: linear-gradient(160deg, #0f1117 0%, #151922 100%) !important;
    }

    [data-theme="dark"] .save-editor-body .login-card,
    [data-theme="dark"] .save-editor-body .save-page,
    [data-theme="dark"] .save-editor-body .detail-page,
    [data-theme="dark"] .save-editor-body .page {
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    [data-theme="dark"] .save-editor-body .player-tabs,
    [data-theme="dark"] .save-editor-body .tab-nav {
        background: rgba(15, 17, 23, 0.92) !important;
    }
}
