.nature-tool {
    --nature-green-900: #173b2b;
    --nature-green-700: #286343;
    --nature-green-600: #347a52;
    --nature-green-100: #e8f4ec;
    --nature-green-50: #f4faf6;
    --nature-border: #cad9cf;
    --nature-text: #17231c;
    --nature-muted: #58665d;
    --nature-warning-bg: #fff7dc;
    --nature-warning-border: #d79b20;
    color: var(--nature-text);
}

.nature-tool *,
.nature-admin * {
    box-sizing: border-box;
}

.nature-tool .tool-heading {
    margin-bottom: 1.5rem;
}

.nature-tool .tool-title-line {
    align-items: flex-start;
}

.nature-tool .tool-title-icon {
    display: inline-grid;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    place-items: center;
    border-radius: 0.85rem;
    background: var(--nature-green-100);
    font-size: 1.7rem;
}

.nature-tool h1,
.nature-tool h2,
.nature-tool h3,
.nature-admin h2 {
    color: var(--nature-green-900);
}

.nature-tool .tool-heading h1,
.nature-tool .tool-heading p,
.nature-step-heading h2,
.nature-step-heading p,
.nature-result-heading h2,
.nature-result-heading p {
    margin-top: 0;
}

.nature-tool .tool-heading p,
.nature-step-heading p {
    color: var(--nature-muted);
    margin-bottom: 0;
}

.nature-announcer:empty {
    display: none;
}

.nature-announcer {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 2px solid #b42318;
    border-radius: 0.7rem;
    background: #fff1f0;
    color: #7a271a;
    font-weight: 700;
}

.nature-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.nature-controls {
    display: grid;
    gap: 1rem;
}

.nature-card,
.nature-placeholder,
.nature-result,
.nature-admin-section,
.nature-admin-status {
    border: 1px solid var(--nature-border, #cad9cf);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 59, 43, 0.06);
}

.nature-card {
    padding: 1.1rem;
}

.nature-step-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.nature-step-heading > span {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: 50%;
    background: var(--nature-green-700);
    color: #fff;
    font-weight: 800;
}

.nature-step-heading h2 {
    margin-bottom: 0.2rem;
    font-size: 1.12rem;
}

.nature-step-heading p {
    font-size: 0.92rem;
}

.nature-dropzone {
    display: flex;
    min-height: 13rem;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.25rem;
    border: 2px dashed #78a98a;
    border-radius: 0.9rem;
    background: var(--nature-green-50);
    text-align: center;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nature-dropzone:hover,
.nature-dropzone.is-dragging {
    border-color: var(--nature-green-600);
    background: var(--nature-green-100);
}

.nature-dropzone.is-dragging {
    transform: scale(1.01);
}

.nature-drop-icon {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border-radius: 50%;
    background: var(--nature-green-700);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
}

.nature-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.nature-dropzone:focus-within {
    outline: 3px solid #1f6feb;
    outline-offset: 3px;
}

.nature-local-preview {
    display: grid;
    grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.nature-local-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    object-fit: cover;
    background: #e7ece8;
}

.nature-local-preview > div {
    display: grid;
    min-width: 0;
    gap: 0.4rem;
}

.nature-local-preview strong {
    overflow-wrap: anywhere;
}

.nature-local-preview span {
    color: var(--nature-muted);
}

.nature-local-preview .button {
    justify-self: start;
    margin-top: 0.3rem;
}

.nature-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.nature-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.nature-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.nature-choice-card {
    position: relative;
    display: flex;
    min-height: 5.2rem;
    cursor: pointer;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 2px solid var(--nature-border);
    border-radius: 0.8rem;
    background: #fff;
}

.nature-choice-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.nature-choice-card input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.nature-choice-card:has(input:checked) {
    border-color: var(--nature-green-700);
    background: var(--nature-green-100);
    box-shadow: inset 0 0 0 1px var(--nature-green-700);
}

.nature-choice-card:has(input:checked)::after {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    content: "✓";
    color: var(--nature-green-900);
    font-weight: 900;
}

.nature-choice-card:focus-within {
    outline: 3px solid #1f6feb;
    outline-offset: 2px;
}

.nature-choice-icon {
    flex: 0 0 auto;
    font-size: 1.7rem;
}

.nature-choice-card > span:last-child {
    display: grid;
    gap: 0.2rem;
    padding-right: 0.5rem;
}

.nature-choice-card small {
    color: var(--nature-muted);
    line-height: 1.35;
}

.nature-segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

.nature-segmented label {
    position: relative;
    cursor: pointer;
}

.nature-segmented input {
    position: absolute;
    opacity: 0;
}

.nature-segmented span {
    display: grid;
    min-height: 2.9rem;
    place-items: center;
    border: 2px solid var(--nature-border);
    border-radius: 0.7rem;
    background: #fff;
    font-weight: 750;
}

.nature-segmented input:checked + span {
    border-color: var(--nature-green-700);
    background: var(--nature-green-100);
    color: var(--nature-green-900);
}

.nature-segmented input:focus-visible + span {
    outline: 3px solid #1f6feb;
    outline-offset: 2px;
}

.nature-text-label {
    display: grid;
    gap: 0.2rem;
    margin-top: 1rem;
    font-weight: 750;
}

.nature-text-label span {
    color: var(--nature-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

.nature-tool textarea,
.nature-admin textarea,
.nature-admin input,
.nature-admin select {
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.45rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #8da197;
    border-radius: 0.6rem;
    background: #fff;
    color: #17231c;
    font: inherit;
}

.nature-tool textarea:focus,
.nature-admin textarea:focus,
.nature-admin input:focus,
.nature-admin select:focus,
.nature-tool .button:focus-visible,
.nature-tool a:focus-visible,
.nature-tool input:focus-visible,
.nature-admin input:focus-visible,
.nature-admin select:focus-visible,
.nature-admin textarea:focus-visible {
    outline: 3px solid #1f6feb;
    outline-offset: 2px;
}

.nature-character-count {
    margin-top: 0.25rem;
    color: var(--nature-muted);
    text-align: right;
    font-size: 0.82rem;
}

.nature-consent {
    border-left: 4px solid #397e55;
    background: var(--nature-green-50);
}

.nature-consent h2 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.nature-consent p {
    margin-top: 0;
    color: var(--nature-muted);
}

.nature-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 650;
    line-height: 1.45;
}

.nature-check input {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    margin: 0.12rem 0 0;
    accent-color: var(--nature-green-700, #286343);
}

.nature-generate {
    width: 100%;
    min-height: 3.2rem;
    font-size: 1.05rem;
}

.nature-generate:disabled {
    cursor: wait;
    opacity: 0.65;
}

.nature-submit-note {
    margin: -0.45rem 0 0;
    color: var(--nature-muted);
    text-align: center;
    font-size: 0.85rem;
}

.nature-preview-column {
    min-width: 0;
}

.nature-placeholder {
    display: grid;
    min-height: 22rem;
    place-items: center;
    align-content: center;
    padding: 2rem;
    background: linear-gradient(145deg, #f5faf6, #e9f3ec);
    text-align: center;
}

.nature-placeholder > span {
    font-size: 3.2rem;
}

.nature-placeholder strong {
    margin-top: 0.7rem;
    color: var(--nature-green-900);
    font-size: 1.1rem;
}

.nature-placeholder p {
    max-width: 25rem;
    color: var(--nature-muted);
}

.nature-result {
    padding: 1rem;
}

.nature-result-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.nature-eyebrow {
    margin-bottom: 0.2rem;
    color: var(--nature-green-700);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nature-result-heading h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.nature-result-badge {
    flex: 0 0 auto;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: var(--nature-green-100);
    color: var(--nature-green-900);
    font-size: 0.8rem;
    font-weight: 800;
}

.nature-compare {
    position: relative;
    overflow: hidden;
    min-height: 16rem;
    border-radius: 0.85rem;
    background: #18221c;
    isolation: isolate;
}

.nature-before-image,
.nature-after-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 16rem;
    max-height: 72vh;
    object-fit: contain;
}

.nature-after-wrap {
    position: absolute;
    z-index: 2;
    inset: 0 auto 0 0;
    width: var(--nature-position);
    overflow: hidden;
    background: #18221c;
}

.nature-after-image {
    width: calc(100vw - 2rem);
    max-width: none;
}

.nature-divider {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: var(--nature-position);
    width: 3px;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.nature-divider::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    content: "↔";
    transform: translate(-50%, -50%);
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #173b2b;
    font-weight: 900;
}

.nature-compare-label {
    position: absolute;
    z-index: 5;
    top: 0.65rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    pointer-events: none;
}

.nature-label-before {
    left: 0.65rem;
}

.nature-label-after {
    right: 0.65rem;
}

.nature-slider-label {
    display: block;
    margin-top: 0.85rem;
    color: var(--nature-green-900);
    font-weight: 750;
}

.nature-slider {
    width: 100%;
    min-height: 2.2rem;
    accent-color: var(--nature-green-700);
}

.nature-view-buttons,
.nature-result-actions,
.nature-secondary-actions,
.nature-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.nature-view-buttons .button,
.nature-result-actions .button,
.nature-secondary-actions .button,
.nature-share-actions .button {
    min-height: 2.7rem;
}

.nature-result-actions {
    margin-top: 1rem;
}

.nature-secondary-actions {
    margin-top: 0.65rem;
}

.nature-share-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--nature-border);
}

.nature-share-panel h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.nature-share-panel p {
    color: var(--nature-muted);
    font-size: 0.9rem;
}

.nature-expiry {
    margin-bottom: 0;
}

.nature-inline-status {
    min-height: 1.5rem;
    margin-top: 0.4rem;
    color: var(--nature-green-900);
    font-weight: 750;
}

.nature-notice {
    padding: 0.85rem 1rem;
    border: 1px solid #9aaca1;
    border-radius: 0.7rem;
    background: #f5f8f6;
}

.nature-notice-warning {
    border-color: var(--nature-warning-border, #d79b20);
    background: var(--nature-warning-bg, #fff7dc);
    color: #5d4100;
}

.nature-notice-success {
    border-color: #4d9167;
    background: #eaf7ee;
    color: #173b2b;
}

.nature-notice ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.nature-progress-overlay {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(10, 24, 16, 0.72);
    backdrop-filter: blur(3px);
}

.nature-progress-card {
    width: min(100%, 30rem);
    padding: 2rem;
    border-radius: 1rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.nature-progress-card .spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border: 4px solid #cfe0d4;
    border-top-color: var(--nature-green-700);
    border-radius: 50%;
    animation: nature-spin 0.9s linear infinite;
}

.nature-progress-card h2 {
    margin-bottom: 0.5rem;
}

.nature-progress-card .tool-progress {
    position: relative;
    height: 0.5rem;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8df;
}

.nature-progress-card .tool-progress span {
    position: absolute;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: var(--nature-green-600);
    animation: nature-progress 1.5s ease-in-out infinite;
}

.nature-progress-note {
    color: var(--nature-muted);
    font-size: 0.86rem;
}

.nature-is-processing {
    overflow: hidden;
}

.nature-admin {
    --nature-border: #cad9cf;
    color: #17231c;
}

.nature-admin > header p,
.nature-admin small,
.nature-admin-privacy {
    color: #58665d;
}

.nature-admin-status {
    display: grid;
    gap: 0;
    margin: 1rem 0;
    overflow: hidden;
}

.nature-admin-status-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--nature-border);
}

.nature-admin-status-row:last-child {
    border-bottom: 0;
}

.nature-status-icon {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 1.7rem;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.nature-status-icon.is-ready {
    background: #d9f0df;
    color: #185b32;
}

.nature-status-icon.is-warning {
    background: #fff0bd;
    color: #714c00;
}

.nature-admin-status-row div {
    display: grid;
    gap: 0.15rem;
}

.nature-admin-status-row span:last-child {
    color: #58665d;
}

.nature-admin-section {
    margin: 1rem 0;
    padding: 1rem;
}

.nature-admin-section legend {
    padding: 0 0.4rem;
    color: #173b2b;
    font-weight: 800;
}

.nature-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.nature-admin-grid label,
.nature-admin-wide {
    display: grid;
    align-content: start;
    font-weight: 700;
}

.nature-admin-grid small,
.nature-admin-wide small {
    margin-top: 0.3rem;
    font-weight: 400;
    line-height: 1.4;
}

.nature-admin-wide {
    margin-top: 1rem;
}

@keyframes nature-spin {
    to { transform: rotate(360deg); }
}

@keyframes nature-progress {
    0% { left: -50%; }
    100% { left: 105%; }
}

@media (min-width: 960px) {
    .nature-workspace {
        grid-template-columns: minmax(21rem, 0.88fr) minmax(25rem, 1.12fr);
        gap: 1.5rem;
    }

    .nature-preview-column {
        position: sticky;
        top: 1rem;
    }

    .nature-after-image {
        width: min(57vw, 52rem);
    }
}

@media (max-width: 680px) {
    .nature-card,
    .nature-result {
        padding: 0.85rem;
        border-radius: 0.8rem;
    }

    .nature-preset-grid,
    .nature-admin-grid {
        grid-template-columns: 1fr;
    }

    .nature-choice-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .nature-local-preview {
        grid-template-columns: 1fr;
    }

    .nature-local-preview img {
        max-height: 16rem;
    }

    .nature-result-actions .button,
    .nature-secondary-actions .button,
    .nature-share-actions .button {
        flex: 1 1 9rem;
        justify-content: center;
    }

    .nature-after-image {
        width: calc(100vw - 3.7rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nature-dropzone,
    .nature-progress-card .spinner,
    .nature-progress-card .tool-progress span {
        transition: none;
        animation-duration: 2.5s;
    }

    html {
        scroll-behavior: auto;
    }
}
