.hidden {
    display: none !important;
}

.id-photo-page {
    padding-top: calc(var(--header-height) + 16px);
    padding-bottom: 120px;
}

.id-photo-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.screen-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-hero-card,
.entry-card,
.flow-header,
.panel-card,
.wizard-footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.76));
}

.mobile-hero-card,
.flow-header,
.panel-card,
.wizard-footer {
    padding: 20px;
    border-radius: 24px;
}

.eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.mobile-hero-card h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3.1rem);
    line-height: 1.06;
    margin-bottom: 14px;
}

.mobile-hero-card p,
.wizard-subtitle {
    color: var(--color-text-muted);
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-chips span,
.step-badge,
.status-pill,
.entry-badge,
.lookup-result-card .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.8rem;
}

.entry-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.entry-card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 22px 20px;
    text-align: left;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.entry-card:hover,
.entry-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: 0 18px 32px rgba(6, 182, 212, 0.14);
}

.entry-card-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.entry-card strong {
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

.entry-card p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.entry-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-secondary);
    font-weight: 600;
}

.entry-cta::after {
    content: "→";
}

.flow-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flow-header h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
}

.flow-back-btn {
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-secondary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.wizard-progress-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.wizard-progress-wrap::-webkit-scrollbar {
    display: none;
}

.wizard-progress {
    display: flex;
    gap: 10px;
    min-width: max-content;
}

.wizard-progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 116px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    border-radius: 18px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-progress-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-weight: 700;
}

.wizard-progress-item small {
    font-size: 0.84rem;
    font-weight: 600;
}

.wizard-progress-item.is-active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(6, 182, 212, 0.85));
    border-color: transparent;
    color: white;
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.22);
}

.wizard-progress-item.is-done {
    border-color: rgba(6, 182, 212, 0.34);
    color: white;
}

.wizard-progress-item.is-done span {
    background: rgba(6, 182, 212, 0.2);
}

.wizard-step {
    display: block;
}

.panel-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel-head,
.detail-header,
.detail-actions-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.panel-head h2,
.detail-section-title {
    font-family: var(--font-heading);
    font-size: 1.24rem;
}

.form-grid,
.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    font-size: 0.92rem;
    color: rgba(248, 250, 252, 0.94);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.56);
    color: white;
    padding: 13px 14px;
    font: inherit;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.62);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.field-help,
.summary-label {
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.text-link {
    background: none;
    border: 0;
    color: var(--color-secondary);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.upload-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    padding: 28px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-drop-zone.is-dragging {
    border-color: rgba(6, 182, 212, 0.85);
    background: rgba(6, 182, 212, 0.08);
}

.upload-icon {
    font-size: 2.2rem;
}

.source-preview-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.source-preview-wrap img {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.source-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-box,
.mobile-summary-box,
.summary-item,
.detail-meta-item,
.lookup-result-card,
.generation-card {
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.analysis-head,
.lookup-actions,
.summary-footer,
.detail-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-status {
    font-weight: 600;
}

.analysis-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.analysis-checklist li {
    list-style: none;
    display: flex;
    gap: 8px;
    color: var(--color-text-muted);
}

.crop-stage {
    display: flex;
    justify-content: center;
}

.crop-frame {
    width: min(100%, 360px);
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.9)),
        radial-gradient(circle at center, rgba(139, 92, 246, 0.2), transparent 68%);
    touch-action: none;
    cursor: grab;
}

.crop-frame.is-dragging {
    cursor: grabbing;
}

.crop-frame img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    max-height: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    transform: translate(-50%, -50%);
    transform-origin: center center;
}

.crop-mask {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 24px;
    pointer-events: none;
    box-shadow: inset 0 0 0 999px rgba(15, 23, 42, 0.18);
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-inline {
    flex: 1;
}

.summary-grid,
.detail-meta-grid,
.generation-grid,
.lookup-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.summary-item strong,
.detail-meta-item strong {
    display: block;
    font-size: 1rem;
    margin-top: 4px;
}

.summary-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-top: 6px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.lookup-result-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.lookup-result-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-pill {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.25);
    color: white;
}

.generation-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generation-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.6);
    cursor: zoom-in;
}

.generation-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-progress-notice {
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.wizard-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wizard-step-label {
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.wizard-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.page-flash {
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    background: rgba(6, 182, 212, 0.12);
    color: white;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
}

.image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
}

.image-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.image-preview-dialog img {
    width: 100%;
    max-height: min(75vh, 760px);
    object-fit: contain;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 719px) {
    .id-photo-page {
        padding-bottom: 48px;
    }

    .wizard-progress-wrap {
        overflow: visible;
        padding-bottom: 0;
    }

    .wizard-progress {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        min-width: 0;
    }

    .wizard-progress-item {
        min-width: 0;
        padding: 10px 6px;
        justify-content: center;
        border-radius: 16px;
    }

    .wizard-progress-item small {
        display: none;
    }

    .wizard-progress-item span {
        width: 30px;
        height: 30px;
    }

    .wizard-footer {
        position: static;
        gap: 12px;
        padding: 16px;
        box-shadow: none;
    }

    .wizard-footer-copy {
        display: none;
    }
}

@media (min-width: 720px) {
    .id-photo-page {
        padding-top: calc(var(--header-height) + 24px);
    }

    .entry-actions,
    .summary-grid,
    .detail-meta-grid,
    .generation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .source-preview-wrap {
        grid-template-columns: 180px 1fr;
        align-items: center;
    }

    .source-preview-wrap img {
        max-width: 180px;
    }

    .crop-controls,
    .lookup-result-card,
    .summary-footer {
        flex-direction: row;
    }

    .wizard-footer {
        position: sticky;
        bottom: 16px;
        z-index: 20;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.32);
    }
}

@media (min-width: 1024px) {
    .entry-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .option-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
