/* =====================================================================
   Keypano Panorama Tools (Quick Preview, 2to6, 6to2, Mirror)
   Modern Workbench & Visual Alignment with Douhui VR Standards
   ===================================================================== */

.kp-tools [hidden],
.kp-tools .none {
    display: none !important;
}

/* ---------- Top Tabs Navigation ---------- */
.kp-tool-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid var(--kp-up-border, rgba(0, 0, 0, 0.06));
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
    margin: 18px 0 16px;
}

.kp-tool-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 600;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    background: transparent;
    color: #64748b;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.kp-tool-tabs a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.kp-tool-tabs a[aria-current="page"] {
    background: #e1ff15 !important;
    border-color: #d8f50c !important;
    color: #1a2e18 !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* ---------- Section Header with Green Indicator ---------- */
.kp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    line-height: 1.5;
    margin-bottom: 0;
}

.kp-card-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #25b66b, #169653);
    border-radius: 2px;
    margin-right: 9px;
    flex-shrink: 0;
}

/* ---------- Panels ---------- */
.kp-tools .kp-panel {
    background: #ffffff;
    border: 1px solid var(--kp-up-border, rgba(0, 0, 0, 0.06));
    border-radius: var(--kp-up-radius, 14px);
    box-shadow: var(--kp-up-shadow, 0 8px 28px rgba(20, 22, 28, 0.07));
    padding: 20px 24px;
    margin-top: 20px;
    transition: box-shadow 0.25s ease;
}

.kp-tools .kp-panel:hover {
    box-shadow: 0 10px 32px rgba(20, 22, 28, 0.09);
}

/* ---------- Flow Workbench (2to6 & 6to2) ---------- */
.kp-flow-workbench {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

.kp-flow-col-left {
    flex: 1 1 55%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kp-flow-arrow-wrap {
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kp-flow-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(37, 182, 107, 0.35);
    box-shadow: 0 4px 12px rgba(37, 182, 107, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #169653;
    font-size: 16px;
    transition: all 0.25s ease;
}

.kp-flow-arrow:hover {
    transform: scale(1.1);
    border-color: #25b66b;
    box-shadow: 0 6px 18px rgba(37, 182, 107, 0.25);
}

.kp-flow-col-right {
    flex: 1 1 42%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ---------- Upload Card / Dropzone ---------- */
.kp-upload-dropzone {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
    user-select: none;
}

.kp-upload-dropzone:hover,
.kp-upload-dropzone.dragover {
    border-color: #25b66b;
    background: #f0fdf4;
    box-shadow: 0 4px 16px rgba(37, 182, 107, 0.1);
}

.kp-upload-dropzone__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(37, 182, 107, 0.1);
    color: #169653;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.2s ease;
}

.kp-upload-dropzone:hover .kp-upload-dropzone__icon {
    transform: translateY(-2px) scale(1.05);
}

.kp-upload-dropzone__title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.kp-upload-dropzone__sub {
    font-size: 12px;
    color: #64748b;
}

/* Upload Preview Box */
.kp-upload-preview {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.kp-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kp-upload-preview .kp-reupload-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease;
}

.kp-upload-preview .kp-reupload-btn:hover {
    background: rgba(37, 182, 107, 0.9);
}

/* Format Switch Pills */
.kp-format-pills {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.kp-format-pill {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.18s ease;
}

.kp-format-pill.active {
    background: #ffffff;
    color: #169653;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ---------- Guidelines Card ---------- */
.kp-rules-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kp-rules-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e8f8f0;
    color: #169653;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kp-rules-badge-icon .kp-lucide {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.kp-rules-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kp-rules-list li {
    font-size: 12.5px;
    line-height: 1.6;
    color: #475569;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.kp-rules-list li .kp-rule-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8f8f0;
    color: #169653;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.kp-rules-list a {
    color: #169653;
    font-weight: 600;
    text-decoration: none;
}

.kp-rules-list a:hover {
    text-decoration: underline;
}

/* Limit & Quota Strip */
.kp-tool-info-strip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #64748b;
    margin-top: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

/* ---------- Action Bar ---------- */
.kp-action-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 22px 0 10px;
    flex-wrap: wrap;
}

.kp-btn-start {
    background: linear-gradient(135deg, #25b66b 0%, #169653 100%) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 11px 40px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 18px rgba(37, 182, 107, 0.32);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kp-btn-start:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 182, 107, 0.42);
    color: #ffffff !important;
}

.kp-btn-start.disabled,
.kp-btn-start:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.8;
    transform: none !important;
}

.kp-vip-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #b45309;
}

.kp-vip-pill .btn {
    border-radius: 999px !important;
    font-size: 11.5px !important;
    font-weight: 700;
    padding: 3px 12px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.kp-vip-pill .btn:hover {
    color: #fff;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.45);
}

/* ---------- Six Cube Faces Grid (Input & Output) ---------- */
.kp-six-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.kp-six-item {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.kp-six-item:hover {
    border-color: #25b66b;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(37, 182, 107, 0.12);
}

.kp-face-badge,
.kp-six-item .kp-face-badge,
.kp-six-output-card .kp-face-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.kp-six-item .kp-face-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    line-height: 20px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.kp-six-item .kp-face-remove-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}

.kp-six-item .kp-face-remove-btn.none {
    display: none !important;
}

.kp-six-item .kp-face-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.kp-six-item .kp-face-placeholder .kp-lucide {
    width: 24px;
    height: 24px;
    color: #cbd5e1;
}

.kp-six-item:hover .kp-face-placeholder .kp-lucide {
    color: #25b66b;
}

.kp-six-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Six Output Cards in 2to6 */
.kp-six-output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.kp-six-output-card {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.kp-six-output-card .kp-face-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.kp-six-output-card .kp-face-placeholder .kp-lucide {
    width: 26px;
    height: 26px;
    color: #cbd5e1;
}

.kp-six-output-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kp-six-output-card.has-image {
    border: 1px solid #e2e8f0;
    border-style: solid;
    background: #0f172a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.kp-six-output-card.has-image .kp-face-placeholder {
    display: none;
}

.kp-six-output-card.has-image:hover {
    border-color: #25b66b;
    box-shadow: 0 6px 18px rgba(37, 182, 107, 0.16);
}

.kp-six-output-card.has-image:hover img {
    transform: scale(1.04);
}

.kp-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.kp-btn-download:not(.disabled) {
    background: #25b66b;
    color: #ffffff;
    border-color: #25b66b;
    box-shadow: 0 4px 12px rgba(37, 182, 107, 0.25);
    cursor: pointer;
}

.kp-btn-download:not(.disabled):hover {
    background: #1fa45f;
    border-color: #1fa45f;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 182, 107, 0.35);
}

/* ---------- 2:1 Output Card in 6to2 ---------- */
.kp-pano-output-box {
    width: 100%;
    aspect-ratio: 2 / 1;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.kp-pano-output-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Preview Area (Quick & Mirror) ---------- */
.kp-preview-viewport {
    width: 100%;
    min-height: 480px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.kp-preview-placeholder {
    min-height: 480px;
    width: 100%;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
}

.kp-preview-placeholder .kp-lucide {
    width: 48px;
    height: 48px;
    color: #94a3b8;
}

.kp-preview-placeholder h4 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.kp-preview-placeholder p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.kp-preview-active iframe {
    width: 100%;
    height: 480px;
    border: 0;
    border-radius: 10px;
    background: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: block;
}

/* Mirror Dual View */
.kp-mirror-dual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.kp-mirror-dual iframe {
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Share & Action Toolbar */
.kp-tool-sharebar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex-wrap: wrap;
}

.kp-tool-sharebar input {
    flex: 1;
    min-width: 220px;
    font-size: 13px;
    border-radius: 6px;
}

/* ---------- Preview Action Card (Quick Preview Layout) ---------- */
.kp-preview-action-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kp-preview-action-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.kp-preview-share-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kp-preview-share-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

.kp-preview-share-group .input-group {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.kp-preview-url-input {
    font-size: 13px;
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.kp-preview-url-input:focus {
    border-color: #25b66b;
    box-shadow: 0 0 0 3px rgba(37, 182, 107, 0.15);
}

.kp-btn-copy {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #169653;
    background: #ffffff;
    border-color: #cbd5e1;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    transition: all 0.2s ease;
}

.kp-btn-copy:hover {
    background: #e8f8f0;
    border-color: #25b66b;
    color: #169653;
}

.kp-preview-btn-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kp-preview-btn-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kp-btn-create-tour {
    background: linear-gradient(135deg, #25b66b 0%, #169653 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(22, 150, 83, 0.24);
}

.kp-btn-create-tour:hover {
    background: linear-gradient(135deg, #22a762 0%, #138248 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 150, 83, 0.32);
}

.kp-btn-open-tab {
    border-color: #25b66b;
    color: #169653;
    background: #ffffff;
}

.kp-btn-open-tab:hover {
    background: #e8f8f0;
    border-color: #169653;
    color: #169653;
    transform: translateY(-1px);
}

.kp-preview-qrcode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kp-preview-qrcode-card .kp-tool-qrcode {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kp-preview-qrcode-card .kp-tool-qrcode img,
.kp-preview-qrcode-card .kp-tool-qrcode canvas {
    width: 78px;
    height: 78px;
    display: block;
}

.kp-qrcode-caption {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

/* ---------- Recent History Grid ---------- */
.kp-tool-history {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.kp-tool-history button {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    text-align: left;
    color: inherit;
    transition: all 0.22s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.kp-tool-history button:hover {
    border-color: #25b66b;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(37, 182, 107, 0.14);
}

.kp-tool-history img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #0f172a;
}

.kp-tool-history span {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.kp-tool-history time {
    display: block;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ---------- Responsive Rules ---------- */
@media (max-width: 991.98px) {
    .kp-flow-workbench {
        flex-direction: column;
    }
    .kp-flow-arrow-wrap {
        width: 100%;
        padding: 12px 0;
    }
    .kp-flow-arrow {
        transform: rotate(90deg);
    }
    .kp-mirror-dual {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .kp-tool-history {
        grid-template-columns: repeat(2, 1fr);
    }
    .kp-tool-tabs a {
        flex: 1 1 45%;
        text-align: center;
        justify-content: center;
    }
    .kp-preview-action-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }
    .kp-preview-qrcode-card {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 10px 14px;
    }
    .kp-qrcode-caption {
        margin-top: 0;
    }
    .kp-preview-btn-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .kp-preview-btn-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .kp-six-grid,
    .kp-six-output-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
 * Tool Progress Modal
 * ========================================================= */
#tool-progress-modal .modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 4px 16px rgba(15, 23, 42, 0.08) !important;
}
#tool-progress-modal .kp-progress-track {
    max-width: 260px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px auto 8px auto;
}
#tool-progress-modal .kp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 999px;
    transition: width 0.35s ease;
}
#tool-view-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
