.dcf-capture {
    --dcf-accent: #146c43;
    --dcf-accent-dark: #0f5132;
    --dcf-control-surface: #e8f3ed;
    --dcf-control-text: #173f2c;
    --dcf-aspect: 4 / 5;
    isolation: isolate;
    margin-inline: auto;
    max-width: 960px;
    position: relative;
}

.dcf-camera-shell {
    margin-inline: auto;
    position: relative;
    transition: max-width 180ms ease;
    width: 100%;
}

.dcf-camera-stage {
    aspect-ratio: var(--dcf-aspect);
    background: #111;
    border-radius: 12px;
    display: grid;
    overflow: hidden;
    place-items: center;
    position: relative;
    transition: aspect-ratio 180ms ease;
    width: 100%;
}

.dcf-video,
.dcf-frame-guide {
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.dcf-orientation-toggle {
    -webkit-appearance: none;
    align-items: center;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.35rem;
    left: 50%;
    margin: 0;
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    position: absolute;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    top: 0.65rem;
    transform: translateX(-50%);
    z-index: 7;
}

.dcf-orientation-toggle[hidden] {
    display: none !important;
}

.dcf-orientation-toggle[aria-pressed="true"] {
    background: var(--dcf-accent);
}

.dcf-video {
    transform-origin: center;
    z-index: 1;
}

.dcf-capture.is-front-camera .dcf-video {
    transform: scaleX(-1);
}

.dcf-frame-guide {
    object-fit: fill;
    pointer-events: none;
    z-index: 2;
}

.dcf-camera-placeholder {
    color: #fff;
    padding: 2rem;
    position: relative;
    text-align: center;
    z-index: 3;
}

.dcf-status {
    box-sizing: border-box;
    margin: 0;
    min-height: 1.5em;
    padding: 0.65rem 0.5rem 0.25rem;
    text-align: center;
}

.dcf-status.is-error {
    color: #b42318;
}

.dcf-controls {
    align-items: center;
    box-sizing: border-box;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.5rem auto 0;
    max-width: 620px;
    padding-inline: max(0.25rem, env(safe-area-inset-left));
    position: relative;
    z-index: 5;
}

.dcf-capture .dcf-button {
    -webkit-appearance: none;
    align-items: center;
    background: var(--dcf-accent);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    gap: 0.5rem;
    justify-content: center;
    margin: 0;
    min-height: 44px;
    min-width: 0;
    padding: 0.65rem 1rem;
    text-decoration: none;
    text-transform: none;
    touch-action: manipulation;
}

.dcf-capture .dcf-button:hover,
.dcf-capture .dcf-button:focus {
    background: var(--dcf-accent-dark);
    color: #fff;
}

.dcf-capture .dcf-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dcf-button-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.dcf-button-icon svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 22px;
}

.dcf-shutter-dot {
    background: currentColor;
    border-radius: 50%;
    display: block;
    height: 20px;
    width: 20px;
}

.dcf-button-label {
    overflow-wrap: anywhere;
}

.dcf-start {
    grid-column: 1;
}

.dcf-snap {
    grid-column: 2;
}

.dcf-switch {
    grid-column: 3;
}

.dcf-capture:not(.is-camera-active) .dcf-controls {
    grid-template-columns: 1fr;
}

.dcf-capture:not(.is-camera-active) .dcf-start {
    grid-column: 1;
    justify-self: center;
    max-width: 280px;
    width: 100%;
}

.dcf-capture:not(.is-camera-active) .dcf-snap,
.dcf-capture:not(.is-camera-active) .dcf-switch {
    display: none;
}

.dcf-switch[hidden] {
    display: none !important;
}

.dcf-capture.has-result .dcf-camera-shell {
    display: none;
}

.dcf-result {
    margin-top: 1rem;
    position: relative;
    text-align: center;
    z-index: 4;
}

.dcf-result-image {
    border-radius: 12px;
    display: block;
    height: auto;
    margin-bottom: 0.75rem;
    max-width: 100%;
}

.dcf-share-heading {
    font-weight: 600;
    margin: 1.15rem 0 0.25rem;
    text-align: center;
}

.dcf-share-guidance {
    color: #646970;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    text-align: center;
}

.dcf-share-guidance.is-ready {
    color: var(--dcf-accent-dark);
}

.dcf-post-capture-actions {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 420px;
    padding: 0.25rem 0.5rem 1rem;
    width: 100%;
}

.dcf-save-actions,
.dcf-share-actions,
.dcf-secondary-actions {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1fr;
    margin: 0;
    width: 100%;
}

.dcf-share-actions {
    margin-bottom: 0.75rem;
}

.dcf-capture .dcf-platform-button {
    -webkit-appearance: none;
    align-items: center;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 600;
    gap: 0.65rem;
    justify-content: center;
    margin: 0;
    min-height: 52px;
    padding: 0.7rem 1rem;
    text-decoration: none;
    text-transform: none;
    touch-action: manipulation;
    width: 100%;
}

.dcf-platform-button[hidden] {
    display: none !important;
}

.dcf-capture .dcf-platform-button:disabled,
.dcf-capture .dcf-platform-button[aria-disabled="true"] {
    cursor: not-allowed;
    filter: grayscale(0.7);
    opacity: 0.48;
    pointer-events: none;
}

.dcf-capture .dcf-share-facebook {
    background: #1877f2;
    border: 1px solid #1877f2;
    color: #fff;
}

.dcf-capture .dcf-share-facebook:hover,
.dcf-capture .dcf-share-facebook:focus {
    background: #0f63d3;
    color: #fff;
}

.dcf-capture .dcf-google-review {
    background: #fff;
    border: 1px solid #dadce0;
    color: #3c4043;
}

.dcf-capture .dcf-google-review:hover,
.dcf-capture .dcf-google-review:focus {
    background: #f8f9fa;
    color: #202124;
}

.dcf-platform-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 1.25rem;
    height: 30px;
    justify-content: center;
}

.dcf-google-review .dcf-platform-icon {
    background: #4285f4;
    color: #fff;
}

.dcf-capture .dcf-download,
.dcf-capture .dcf-save-library,
.dcf-capture .dcf-retake {
    min-height: 52px;
    width: 100%;
}

.dcf-capture .dcf-save-library {
    background: #fff;
    border: 1px solid var(--dcf-accent);
    color: var(--dcf-accent-dark);
}

.dcf-capture .dcf-save-library[hidden] {
    display: none !important;
}

.dcf-capture .dcf-save-library:hover,
.dcf-capture .dcf-save-library:focus {
    background: var(--dcf-control-surface);
    color: var(--dcf-accent-dark);
}

.dcf-capture .dcf-retake {
    background: #fff;
    border: 1px solid var(--dcf-accent);
    color: var(--dcf-accent-dark);
}

.dcf-capture .dcf-retake:hover,
.dcf-capture .dcf-retake:focus {
    background: var(--dcf-control-surface);
    color: var(--dcf-accent-dark);
}

.dcf-browser-prompt[hidden] {
    display: none !important;
}

.dcf-browser-prompt {
    align-items: end;
    display: grid;
    inset: 0;
    position: fixed;
    z-index: 2147483000;
}

.dcf-browser-prompt-backdrop {
    background: rgba(0, 0, 0, 0.58);
    inset: 0;
    position: absolute;
}

.dcf-browser-sheet {
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-sizing: border-box;
    color: #1d2327;
    margin: 0 auto;
    max-width: 560px;
    padding: 1.25rem 1.15rem max(1.25rem, env(safe-area-inset-bottom));
    position: relative;
    text-align: center;
    width: 100%;
    z-index: 1;
}

.dcf-browser-sheet h2 {
    color: #1d2327;
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0.5rem 2rem 0.5rem;
}

.dcf-browser-sheet > p {
    color: #50575e;
    line-height: 1.5;
    margin: 0 auto 1rem;
    max-width: 440px;
}

.dcf-browser-close {
    -webkit-appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #50575e;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 1.6rem;
    height: 40px;
    justify-content: center;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 0.75rem;
    top: 0.65rem;
    width: 40px;
}

.dcf-browser-icon {
    align-items: center;
    background: #e8f3ed;
    border-radius: 50%;
    color: #146c43;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.dcf-browser-icon svg {
    fill: none;
    height: 24px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 24px;
}

.dcf-browser-instructions {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    color: #1d2327;
    line-height: 1.45;
    margin: 0 auto 0.75rem;
    max-width: 440px;
    padding: 0.75rem;
    text-align: left;
}

.dcf-browser-instructions[hidden] {
    display: none !important;
}

.dcf-browser-sheet .dcf-browser-copy-status {
    color: #146c43;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
    min-height: 1.35em;
}

.dcf-browser-actions {
    display: grid;
    gap: 0.6rem;
    margin: 0 auto;
    max-width: 440px;
}

.dcf-browser-action {
    -webkit-appearance: none;
    align-items: center;
    background: #fff;
    border: 1px solid #146c43;
    border-radius: 8px;
    color: #0f5132;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 600;
    justify-content: center;
    margin: 0;
    min-height: 48px;
    padding: 0.7rem 1rem;
    text-decoration: none;
    text-transform: none;
    width: 100%;
}

.dcf-browser-open-guide {
    background: #146c43;
    color: #fff;
}

.dcf-browser-continue {
    border-color: transparent;
    color: #50575e;
    font-weight: 400;
}

@media (max-width: 600px) {
    .dcf-camera-stage,
    .dcf-result-image {
        border-radius: 10px;
    }

    .dcf-status {
        padding-inline: 4.75rem;
    }

    .dcf-controls {
        gap: 0.35rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0.25rem;
        max-width: 420px;
        padding: 0.35rem 3.25rem;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button {
        background: transparent;
        color: var(--dcf-control-text);
        flex-direction: column;
        font-size: 0.82rem;
        gap: 0.3rem;
        min-height: 74px;
        padding: 0.2rem;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button:hover,
    .dcf-capture.is-camera-active .dcf-controls .dcf-button:focus {
        background: transparent;
        color: var(--dcf-accent-dark);
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button-icon {
        background: var(--dcf-control-surface);
        border-radius: 50%;
        height: 44px;
        width: 44px;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-snap .dcf-button-icon {
        background: var(--dcf-accent);
        border: 4px solid #fff;
        box-shadow: 0 0 0 2px var(--dcf-accent), 0 3px 10px rgba(0, 0, 0, 0.2);
        color: #fff;
        height: 62px;
        width: 62px;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-snap {
        font-weight: 600;
        min-height: 92px;
    }

    .dcf-capture:not(.is-camera-active) .dcf-controls {
        padding-inline: 4.75rem;
    }

    .dcf-result {
        margin-top: 0.75rem;
    }

    .dcf-post-capture-actions {
        max-width: none;
        padding-left: 4.75rem;
        padding-right: 4.75rem;
    }

    .dcf-capture.has-result .dcf-camera-stage,
    .dcf-capture.has-result .dcf-controls {
        display: none;
    }
}

@media (max-width: 380px) {
    .dcf-status,
    .dcf-capture:not(.is-camera-active) .dcf-controls,
    .dcf-post-capture-actions {
        padding-left: 3.75rem;
        padding-right: 3.75rem;
    }

}

@media (max-width: 1024px), (pointer: coarse) {
    .dcf-capture.is-camera-active .dcf-controls {
        background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.72));
        bottom: 0;
        gap: 0.35rem;
        left: 0;
        margin: 0;
        max-width: none;
        padding: 2.5rem max(0.55rem, env(safe-area-inset-right)) max(0.55rem, env(safe-area-inset-bottom)) max(0.55rem, env(safe-area-inset-left));
        position: absolute;
        width: 100%;
        z-index: 6;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button {
        background: transparent;
        color: #fff;
        flex-direction: column;
        font-size: 0.78rem;
        gap: 0.25rem;
        min-height: 66px;
        padding: 0.15rem;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button:hover,
    .dcf-capture.is-camera-active .dcf-controls .dcf-button:focus {
        background: transparent;
        color: #fff;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-button-icon {
        background: rgba(255, 255, 255, 0.92);
        border-radius: 50%;
        color: var(--dcf-accent-dark);
        height: 42px;
        text-shadow: none;
        width: 42px;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-snap .dcf-button-icon {
        background: var(--dcf-accent);
        border: 4px solid #fff;
        box-shadow: 0 0 0 2px rgba(20, 108, 67, 0.95), 0 3px 12px rgba(0, 0, 0, 0.35);
        color: #fff;
        height: 58px;
        width: 58px;
    }

    .dcf-capture.is-camera-active .dcf-controls .dcf-snap {
        font-weight: 600;
        min-height: 78px;
    }

    .dcf-capture.is-compact-landscape .dcf-camera-stage {
        border-radius: 10px;
    }

    .dcf-capture.is-compact-landscape .dcf-controls .dcf-button-label {
        font-size: 0.72rem;
    }
}
