html, body {
    overscroll-behavior: none;
    overflow: hidden;
    height: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

.camera-page {
    min-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 45px 16px 84px;
    background:
        linear-gradient(135deg, rgba(18, 14, 11, 0.8), rgba(35, 24, 16, 0.64)),
        url('/images/homepage/tvRoom.webp') no-repeat center center / cover;
    color: white;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

.camera-page.landing-mode {
    height: auto;
    overflow-y: auto;
    padding-bottom: calc(var(--ff-bottom-bar-height) + var(--ff-safe-bottom) + 20px);
}

.camera-page.landing-mode .camera-shell {
    height: auto;
    min-height: 100%;
}

.camera-page.review-mode {
    align-items: stretch;
    overflow-y: auto;
    padding-bottom: calc(var(--ff-bottom-bar-height) + var(--ff-safe-bottom) + 20px);
}

.camera-page.crop-mode {
    align-items: stretch;
    overflow-y: auto;
    padding-bottom: calc(var(--ff-safe-bottom) + 20px);
}

.camera-page.review-mode .camera-shell {
    height: auto;
    min-height: 100%;
    align-content: start;
}

.camera-page.crop-mode .camera-shell {
    height: auto;
    min-height: 100%;
    align-content: start;
}

.camera-page.has-image {
    background:
        linear-gradient(180deg, #f4f0e8 0%, #fbfaf7 100%);
    color: #181512;
}

.camera-shell {
    width: min(980px, 100%);
    height: 100%;
    display: grid;
    gap: 18px;
    align-content: start;
}

.camera-guide {
    display: grid;
    gap: 16px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}

.camera-guide .page-kicker {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ffd1b7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.camera-guide h2 {
    font-size: clamp(1.45rem, 4vw, 1.9rem);
    font-weight: 800;
    line-height: 1.15;
}

.camera-guide p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.65;
}

.camera-guide-actions {
    display: grid;
    gap: 12px;
}

.camera-guide .pill-row {
    gap: 8px;
}

.camera-guide .pill {
    background: rgba(255, 255, 255, 0.96);
    color: #8f3f16;
    border: 1px solid rgba(143, 63, 22, 0.12);
    box-shadow: 0 8px 18px rgba(20, 14, 8, 0.12);
    font-weight: 700;
}

.camera-intro {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.16);
    color: white;
    padding-top: 28px;
}

.camera-intro h1,
.camera-intro p,
.camera-intro .page-kicker {
    color: inherit;
}

.camera-intro p {
    color: rgba(255, 255, 255, 0.82);
}

.camera-intro .page-kicker {
    margin-bottom: 2px;
}

.camera-intro h1 {
    margin: 0;
}

.camera-intro .pill-row {
    justify-content: center;
    gap: 10px 12px;
    margin: 2px 0 10px;
}

.camera-intro .pill {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 213, 192, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 9px 14px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.camera-checklist {
    display: grid;
    gap: 12px;
}

.camera-check-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.camera-check-item span {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.camera-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 13px 18px;
    font-size: 0.98rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.camera-button.primary {
    background: linear-gradient(135deg, #ea6b2d, #ff955f);
    color: white;
    border: none;
}

.camera-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.camera-button.tertiary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: white;
}

.camera-page.has-image .camera-button.secondary {
    background: rgba(24, 21, 18, 0.04);
    border-color: rgba(24, 21, 18, 0.12);
}

.camera-page.has-image .camera-button.tertiary {
    border-color: rgba(24, 21, 18, 0.12);
    color: #181512;
}

.camera-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.camera-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.phones-positioner {
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.phones-overlay {
    width: min(80vw, 420px);
    height: auto;
    z-index: 5;
}

.camera-editor {
    margin-top: 12px;
    display: grid;
    gap: 16px;
    padding-top: 32px;
}

.camera-page.review-mode .camera-editor {
    margin-top: 8px;
    margin-bottom: 8px;
}

.crop-workspace {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    margin-top: 0;
    min-height: 0;
}

.crop-workspace-header {
    display: grid;
    gap: 4px;
}

.crop-workspace-header h2 {
    margin: 0;
    font-size: clamp(1.15rem, 3.2vw, 1.5rem);
    line-height: 1.2;
}

.crop-workspace-summary {
    margin: 0;
    color: #6f645c;
    line-height: 1.45;
    font-size: 0.95rem;
}

.crop-workspace-header .page-kicker {
    margin-bottom: 2px;
}

.crop-workspace .cropper-dashed,
.crop-workspace .cropper-center {
    display: none !important;
    opacity: 0 !important;
}

.cropper-container,
.cropper-container * {
    touch-action: none !important;
    -webkit-user-select: none;
    user-select: none;
}

.crop-workspace {
    -webkit-overflow-scrolling: touch;
}

.crop-workspace .cropper-container {
    width: 100% !important;
    height: 100% !important;
}

.editor-header {
    display: grid;
    gap: 14px;
}

.editor-summary {
    margin: 8px 0 0;
    color: #6f645c;
    line-height: 1.6;
}

.camera-editor .page-kicker {
    margin-bottom: 2px;
}

.camera-editor h2 {
    margin: 0;
}

.camera-actions.compact {
    margin: 0;
}

.image-container {
    position: relative;
    margin-top: 28px;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(24, 21, 18, 0.08);
    border: 1px solid rgba(24, 21, 18, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
    min-height: 320px;
    height: calc(100dvh - 300px);
}

.image-container.crop-active {
    min-height: clamp(420px, 58dvh, 720px);
    height: clamp(420px, 58dvh, 720px);
    border-radius: 28px;
}

.crop-workspace .cropper-crop-box {
    border-radius: 26px;
    box-shadow: 0 0 0 1px rgba(65, 154, 255, 0.2);
}

.crop-workspace .cropper-view-box {
    display: block !important;
    outline: 2px solid rgba(65, 154, 255, 0.92);
    outline-offset: 0;
    border-radius: 26px;
    background: rgba(65, 154, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(170, 215, 255, 0.28);
}

.crop-workspace .cropper-face {
    display: block !important;
    background: transparent;
}

.crop-workspace .cropper-line {
    display: none !important;
}

.crop-workspace .cropper-point {
    display: none !important;
    opacity: 0;
}

.crop-workspace .cropper-point.point-nw,
.crop-workspace .cropper-point.point-se {
    display: block !important;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid rgba(65, 154, 255, 0.96);
    box-shadow: 0 6px 16px rgba(20, 14, 8, 0.18);
    opacity: 1 !important;
}

.crop-workspace .cropper-point.point-nw {
    top: -11px;
    left: -11px;
}

.crop-workspace .cropper-point.point-se {
    right: -11px;
    bottom: -11px;
}

.crop-workspace .cropper-bg {
    background-image: none;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-container.crop-active img {
    object-position: center top;
}

.camera-status {
    margin: 0;
    color: #6f645c;
    font-weight: 600;
}

.crop-workspace-actions {
    margin: 0;
    padding-top: 0;
    padding-bottom: 4px;
    background: rgba(251, 250, 247, 0.96);
}

*:focus {
    outline: none !important;
}

@media (max-width: 640px) {
    .camera-button {
        width: 100%;
    }

    .camera-actions.compact {
        display: grid;
    }

    .image-container {
        min-height: 260px;
        height: calc(100dvh - 360px);
    }

    .image-container.crop-active {
        min-height: clamp(420px, 52dvh, 680px);
        height: clamp(420px, 52dvh, 680px);
    }

    .crop-workspace .cropper-point.point-nw,
    .crop-workspace .cropper-point.point-se {
        width: 20px;
        height: 20px;
    }

    .crop-workspace-header h2 {
        font-size: 1.05rem;
    }

    .crop-workspace-summary {
        font-size: 0.88rem;
    }
}
