.try-tool {
    padding: 0 0 72px;
    position: relative;
    z-index: 2;
    scroll-margin-top: 118px;
}

.try-tool [hidden] {
    display: none !important;
}

.try-tool .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.try-tool-card {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.34);
}

.try-tool-heading {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.try-tool-badge {
    display: inline-flex;
    margin: 0 0 12px;
    padding: 6px 10px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #8ff1c5;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.try-tool-lead,
.try-tool-note,
.try-tool-status {
    color: #b9c5dc;
    line-height: 1.55;
}

.try-tool-drop {
    display: grid;
    place-items: center;
    min-height: 150px;
    margin-top: 22px;
    padding: 24px;
    border: 2px dashed rgba(96, 165, 250, 0.5);
    border-radius: 18px;
    color: #dce7fb;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.try-tool-drop:hover,
.try-tool-drop.is-dragging {
    border-color: #60a5fa;
    background: rgba(59, 130, 246, 0.09);
}

.try-tool-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.try-tool-preview {
    display: none;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 18px;
    background: #070b16;
}

.try-tool-preview.is-visible {
    display: block;
}

.try-tool-preview img,
.try-tool-preview canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
}

.try-tool-preview canvas {
    margin: 0 auto;
}

.try-tool-preview canvas.is-editing {
    cursor: crosshair;
    touch-action: none;
}

.try-tool-manual-help {
    margin: 12px 0 0;
    padding: 10px 14px;
    border: 1px solid rgba(96, 165, 250, 0.32);
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.09);
    color: #dce7fb;
    line-height: 1.45;
}

.try-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.try-tool-actions .btn {
    cursor: pointer;
}

.try-tool-actions .btn[disabled] {
    cursor: wait;
    opacity: .65;
}

.try-tool-actions .btn.is-active {
    border-color: #60a5fa;
    background: rgba(59, 130, 246, 0.18);
    color: #fff;
}

.try-tool-status {
    min-height: 24px;
    margin: 14px 0 0;
}

.try-tool-status.is-error {
    color: #fca5a5;
}

.try-tool-note {
    margin: 14px 0 0;
    font-size: .88rem;
}

.try-slideshow-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.try-slideshow-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #070b16;
}

.try-slideshow-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.try-slideshow-item span {
    position: absolute;
    top: 7px;
    left: 7px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.82);
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
}

.try-slideshow-item small {
    display: block;
    overflow: hidden;
    padding: 8px 9px;
    color: #cbd5e1;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.try-slideshow-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.try-slideshow-settings label,
.try-slideshow-fixed {
    display: grid;
    gap: 7px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #dce7fb;
    font-size: .82rem;
}

.try-slideshow-settings select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 9px;
    background: #0b1224;
    color: #fff;
    font: inherit;
}

.try-slideshow-fixed strong {
    color: #fff;
    font-size: .95rem;
}

.try-slideshow-result {
    margin-top: 20px;
    padding: 14px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.07);
}

.try-slideshow-result video {
    display: block;
    width: 100%;
    max-height: 560px;
    border-radius: 12px;
    background: #020617;
}

.try-document-preview {
    margin-top: 18px;
}

.try-document-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(7, 11, 22, 0.82);
}

.try-document-file img {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
}

.try-document-file-icon {
    display: grid;
    width: 64px;
    height: 78px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: .86rem;
    font-weight: 800;
}

.try-document-file > span:last-child {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.try-document-file strong {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.try-document-file small {
    color: #94a3b8;
}

.try-document-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.try-document-settings label {
    display: grid;
    gap: 7px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #dce7fb;
    font-size: .82rem;
}

.try-document-settings select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 9px;
    background: #0b1224;
    color: #fff;
    font: inherit;
}

.try-document-result {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.07);
    color: #e2e8f0;
}

.try-document-result textarea {
    display: block;
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: #070b16;
    color: #e2e8f0;
    font: inherit;
    line-height: 1.55;
}

.try-ai-summary {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(167, 139, 250, 0.34);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.2), transparent 38%),
        rgba(76, 29, 149, 0.12);
}

.try-ai-summary-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.try-ai-summary-heading span {
    color: #ddd6fe;
    font-weight: 800;
}

.try-ai-summary-heading small {
    color: #a5b4fc;
}

.try-ai-summary textarea {
    min-height: 180px;
    border-color: rgba(167, 139, 250, 0.3);
}

.try-summary-title {
    display: grid;
    gap: 7px;
    margin-top: 22px;
    color: #cbd5e1;
    font-size: .86rem;
    font-weight: 600;
}

.try-summary-title input,
.try-summary-input textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: #070b16;
    color: #e2e8f0;
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.try-summary-title input {
    min-height: 46px;
    padding: 10px 13px;
}

.try-summary-input {
    display: block;
    margin-top: 12px;
}

.try-summary-input textarea {
    display: block;
    min-height: 300px;
    resize: vertical;
    padding: 16px;
    line-height: 1.58;
}

.try-summary-title input:focus,
.try-summary-input textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.try-summary-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
}

.try-summary-toolbar > span {
    color: #94a3b8;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.try-summary-toolbar .btn {
    cursor: pointer;
}

.try-summary-toolbar .btn[disabled] {
    cursor: not-allowed;
    opacity: .5;
}

.try-summary-result textarea {
    min-height: 230px;
}

.try-before-after-preview {
    --split: 50%;
    position: relative;
    margin-top: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: #070b16;
}

.try-before-after-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.try-before-after-preview img:last-of-type {
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.try-before-after-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    width: 3px;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 0 16px rgba(2, 6, 23, .72);
    pointer-events: none;
}

.try-before-after-divider::after {
    content: "↔";
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    border-radius: 999px;
    background: rgba(15, 23, 42, .88);
    color: #fff;
    font-size: 1.15rem;
}

.try-before-after-range {
    width: 100%;
    margin-top: 12px;
    accent-color: #60a5fa;
}

.try-before-after-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.try-before-after-settings label {
    display: grid;
    gap: 7px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #dce7fb;
    font-size: .82rem;
}

.try-before-after-settings input,
.try-before-after-settings select {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 9px;
    background: #0b1224;
    color: #fff;
    font: inherit;
}

.try-before-after-result {
    margin-top: 20px;
    padding: 14px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.07);
}

.try-before-after-result img {
    display: block;
    width: 100%;
    max-height: 560px;
    border-radius: 12px;
    background: #020617;
    object-fit: contain;
}

@media (max-width: 640px) {
    .try-tool {
        padding-bottom: 48px;
    }

    .try-tool-card {
        padding: 20px;
        border-radius: 18px;
    }

    .try-tool-actions {
        display: grid;
    }

    .try-slideshow-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .try-slideshow-settings {
        grid-template-columns: 1fr;
    }

    .try-document-settings {
        grid-template-columns: 1fr;
    }

    .try-ai-summary-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .try-summary-input textarea {
        min-height: 240px;
    }

    .try-summary-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .try-summary-toolbar .btn {
        width: 100%;
    }

    .try-before-after-settings {
        grid-template-columns: 1fr;
    }
}
