.scan-tool-page {
    min-height: calc(100vh - 76px);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #0f172a;
}

.scan-tool-page [x-cloak] {
    display: none !important;
}

.scan-desktop {
    margin: 0 auto;
    max-width: 980px;
    padding: 0.75rem 1rem 1.25rem;
}

.scan-hero,
.scan-workbench,
.scan-preview-panel,
.scan-qr-card {
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.scan-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
}

.scan-kicker {
    margin-bottom: 0.35rem;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scan-hero h1 {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

.scan-hero p {
    margin-top: 0.35rem;
    max-width: 42rem;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.45;
}

.scan-hero-icon {
    display: grid;
    height: 3.2rem;
    width: 3.2rem;
    border-radius: 1rem;
    background: #0f172a;
    color: white;
}

.scan-hero-icon svg {
    height: 1.65rem;
    width: 1.65rem;
}

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

.scan-desktop-card {
    display: flex;
    min-height: 6.5rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: white;
    padding: 0.85rem;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.scan-desktop-card:hover {
    border-color: #0284c7;
    box-shadow: 0 18px 44px rgba(2, 132, 199, 0.14);
    transform: translateY(-2px);
}

.scan-desktop-card.is-dark {
    border-style: solid;
    background: #0f172a;
    color: white;
}

.scan-card-icon {
    display: inline-grid;
    height: 2.2rem;
    width: 2.2rem;
    place-items: center;
    border-radius: 0.7rem;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 900;
    font-size: 0.75rem;
}

.scan-desktop-card.is-dark .scan-card-icon {
    background: white;
    color: #0f172a;
}

.scan-desktop-card strong {
    font-size: 1rem;
}

.scan-desktop-card span:last-child {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.scan-desktop-card.is-dark span:last-child {
    color: #cbd5e1;
}

.scan-workbench {
    margin-top: 1rem;
    padding: 1rem;
}

.scan-workbench-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.scan-workbench h2 {
    font-size: 1.35rem;
    font-weight: 850;
}

.scan-workbench p {
    margin-top: 0.35rem;
    color: #64748b;
}

.scan-actions {
    display: flex;
    gap: 0.6rem;
}

.scan-actions button,
.scan-qr-actions button {
    border-radius: 0.9rem;
    background: #f1f5f9;
    padding: 0.7rem 1rem;
    font-weight: 750;
}

.scan-actions button.primary {
    background: #0f172a;
    color: white;
}

.scan-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
    gap: 0.8rem;
    max-height: 15rem;
    overflow: auto;
}

.scan-page-thumb {
    width: 100%;
    border: 2px solid transparent;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 0.5rem;
}

.scan-page-thumb.is-active {
    border-color: #0284c7;
}

.scan-page-thumb img {
    height: 6.5rem;
    width: 100%;
    border-radius: 0.7rem;
    object-fit: cover;
}

.scan-page-thumb span {
    margin-top: 0.4rem;
    display: block;
    font-size: 0.82rem;
    font-weight: 750;
}

.scan-preview-panel {
    margin-top: 0;
    padding: 0.75rem;
}

.scan-preview-panel img {
    margin: 0 auto;
    max-height: 58vh;
    max-width: 100%;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.scan-mobile-effects {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
}

.scan-mobile-effects button {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.65rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #475569;
}

.scan-mobile-effects button.is-active {
    background: #0284c7;
    color: white;
}

.scan-desktop-workarea {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.scan-desktop-left {
    min-width: 0;
}

.scan-desktop-settings {
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    background: #f8fafc;
    padding: 1rem;
}

.scan-desktop-settings h3 {
    font-size: 1rem;
    font-weight: 850;
}

.scan-desktop-settings p {
    margin: 0.35rem 0 0.85rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.6;
}

.scan-effect-list {
    display: grid;
    gap: 0.55rem;
}

.scan-effect-list button {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: white;
    padding: 0.75rem 0.85rem;
    text-align: left;
}

.scan-effect-list button.is-active {
    border-color: #0284c7;
    background: #e0f2fe;
}

.scan-effect-list strong {
    font-size: 0.9rem;
}

.scan-effect-list span {
    color: #64748b;
    font-size: 0.75rem;
}

.scan-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
}

.scan-qr-card {
    width: min(100%, 28rem);
    padding: 1.4rem;
}

.scan-qr-head,
.scan-qr-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.scan-qr-head h2 {
    font-size: 1.15rem;
    font-weight: 850;
}

.scan-qr-card img {
    margin: 1.25rem auto;
    height: 14rem;
    width: 14rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.scan-qr-url {
    overflow-wrap: anywhere;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 0.8rem;
    color: #475569;
    font-size: 0.78rem;
}

.scan-qr-card p {
    margin: 0.75rem 0;
    color: #64748b;
    font-size: 0.86rem;
}

.scan-mobile {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #020617;
    color: white;
}

.scan-camera-screen,
.scan-mobile-editor {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scan-mobile-top,
.scan-editor-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: calc(3rem + env(safe-area-inset-top));
    padding: calc(0.32rem + env(safe-area-inset-top)) 0.65rem 0.35rem;
    background: rgba(2, 6, 23, 0.9);
}

.scan-mobile-top button,
.scan-editor-top button,
.scan-side-btn,
.scan-mobile-pagebar button {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.42rem 0.62rem;
    color: white;
    font-size: 0.82rem;
    font-weight: 800;
}

.scan-mobile-top div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scan-mobile-top span {
    color: #cbd5e1;
    font-size: 0.68rem;
}

.scan-camera-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #0f172a;
    touch-action: none;
}

.scan-camera-stage video {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transform-origin: center;
    transition: transform 0.08s linear;
    touch-action: none;
}

.scan-frame {
    position: absolute;
    inset: 0;
    border-radius: 0;
    box-shadow: none;
}

.scan-frame span {
    position: absolute;
    height: 2rem;
    width: 2rem;
    border-color: #38bdf8;
}

.scan-frame span:nth-child(1) { left: 0; top: 0; border-left: 4px solid; border-top: 4px solid; border-top-left-radius: 1rem; }
.scan-frame span:nth-child(2) { right: 0; top: 0; border-right: 4px solid; border-top: 4px solid; border-top-right-radius: 1rem; }
.scan-frame span:nth-child(3) { left: 0; bottom: 0; border-left: 4px solid; border-bottom: 4px solid; border-bottom-left-radius: 1rem; }
.scan-frame span:nth-child(4) { right: 0; bottom: 0; border-right: 4px solid; border-bottom: 4px solid; border-bottom-right-radius: 1rem; }

.scan-frame.is-id-card,
.scan-frame.is-generic-doc {
    inset: auto;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    width: min(64vw, 21rem);
    aspect-ratio: 1.58 / 1;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.75rem;
    box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.56);
}

.scan-frame.is-id-photo {
    inset: 0;
    border: 0;
    box-shadow: none;
}

.scan-frame.is-id-photo span {
    border-color: rgba(255, 255, 255, 0.82);
}

.scan-frame.is-generic-doc {
    aspect-ratio: 1 / 1.414;
    width: min(58vw, 17rem);
    top: 48%;
}

.scan-frame.is-id-card span,
.scan-frame.is-generic-doc span {
    border-width: 3px;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 0.4rem;
}

.scan-id-photo-guide {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: min(78vw, 22rem);
    max-height: 76%;
    transform: translate(-50%, -50%);
    border-radius: 1.1rem;
    opacity: 0.48;
    mix-blend-mode: screen;
    pointer-events: none;
    object-fit: contain;
}


.scan-camera-tip {
    position: absolute;
    left: 50%;
    bottom: 0.8rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    padding: 0.42rem 0.72rem;
    color: #e2e8f0;
    font-size: 0.72rem;
    white-space: nowrap;
}

.scan-zoom-pill {
    position: absolute;
    left: 50%;
    top: 0.75rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    padding: 0.32rem 0.65rem;
    color: white;
    font-size: 0.72rem;
    font-weight: 850;
}

.scan-latest-thumb {
    position: absolute;
    right: calc(7% + 0.45rem);
    bottom: calc(12% + 0.45rem);
    height: 3.25rem;
    width: 2.65rem;
    overflow: visible;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

.scan-latest-thumb:disabled {
    opacity: 0.92;
}

.scan-latest-thumb img {
    height: 100%;
    width: 100%;
    border-radius: 0.55rem;
    object-fit: cover;
}

.scan-latest-thumb span {
    position: absolute;
    right: -0.45rem;
    top: -0.45rem;
    display: grid;
    min-width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border: 2px solid white;
    border-radius: 999px;
    background: #0284c7;
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
}

.scan-camera-bottom {
    flex: 0 0 auto;
    padding: 0.2rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    background: #020617;
}

.scan-mode-selector {
    display: flex;
    justify-content: flex-start;
    gap: clamp(0.65rem, 4vw, 1.8rem);
    padding: 0.2rem 1rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scan-mode-selector::-webkit-scrollbar {
    display: none;
}

.scan-mode-selector button {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    font-weight: 800;
    transition: color 0.2s;
    background: transparent;
    padding: 0.25rem;
}

.scan-mode-selector button.is-active {
    color: #38bdf8;
    position: relative;
}

.scan-mode-selector button.is-active::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: #38bdf8;
}

.scan-shutter-row {
    display: grid;
    grid-template-columns: 4rem 1fr 4rem;
    align-items: center;
}

.scan-shutter {
    justify-self: center;
    display: grid;
    height: 4rem;
    width: 4rem;
    place-items: center;
    border: 5px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
}

.scan-shutter:disabled {
    opacity: 0.55;
}

.scan-shutter span {
    height: 2.65rem;
    width: 2.65rem;
    border-radius: 999px;
    background: white;
}

.scan-count {
    margin-top: 0.35rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 750;
}

.scan-mobile-editor {
    background: #f1f5f9;
    color: #0f172a;
}

.scan-editor-top {
    background: white;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

.scan-editor-top button {
    background: #0f172a;
    color: white;
}

.scan-title-editor {
    display: flex;
    min-width: 0;
    flex: 1;
    justify-content: center;
}

.scan-title-display {
    display: inline-flex;
    max-width: min(52vw, 18rem);
    align-items: center;
    gap: 0.35rem;
    background: transparent !important;
    color: #0f172a !important;
    padding: 0.25rem 0.35rem !important;
}

.scan-title-display span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 900;
}

.scan-title-display svg {
    flex: 0 0 auto;
    height: 1rem;
    width: 1rem;
    color: #64748b;
}

.scan-title-editor input {
    width: min(52vw, 18rem);
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    background: #ffffff;
    padding: 0.38rem 0.5rem;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
    outline: none;
}

.scan-title-editor input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.scan-editor-main {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.65rem;
}

.scan-editor-main img {
    height: auto;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.18);
}

.scan-crop-stage {
    position: relative;
    display: block;
    margin: 0 auto;
    width: min(100%, 44rem);
    touch-action: pan-y;
}

.scan-crop-stage img {
    display: block;
    height: auto;
    width: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

.scan-preview-stage {
    max-height: 100%;
    max-width: 100%;
    width: auto;
}

.scan-preview-stage img {
    height: 100%;
    object-fit: contain;
}

.scan-crop-overlay {
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.22);
    overflow: hidden;
    touch-action: none;
}

.scan-crop-box {
    position: absolute;
    border: 2px solid #38bdf8;
    background:
        linear-gradient(rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.18)),
        repeating-linear-gradient(90deg, transparent 0 32%, rgba(255, 255, 255, 0.5) 32% 33%, transparent 33% 66%, rgba(255, 255, 255, 0.5) 66% 67%, transparent 67%),
        repeating-linear-gradient(0deg, transparent 0 32%, rgba(255, 255, 255, 0.5) 32% 33%, transparent 33% 66%, rgba(255, 255, 255, 0.5) 66% 67%, transparent 67%);
    box-shadow: 0 0 0 999rem rgba(2, 6, 23, 0.5);
    cursor: move;
    touch-action: none;
}

.scan-crop-box span {
    position: absolute;
    height: 1.05rem;
    width: 1.05rem;
    border: 2px solid white;
    border-radius: 999px;
    background: #0284c7;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.32);
}

.scan-crop-box .is-nw { left: -0.6rem; top: -0.6rem; cursor: nwse-resize; }
.scan-crop-box .is-ne { right: -0.6rem; top: -0.6rem; cursor: nesw-resize; }
.scan-crop-box .is-sw { left: -0.6rem; bottom: -0.6rem; cursor: nesw-resize; }
.scan-crop-box .is-se { right: -0.6rem; bottom: -0.6rem; cursor: nwse-resize; }

.scan-empty {
    color: #64748b;
    font-weight: 750;
}

.scan-mobile-pagebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    flex: 0 0 auto;
    padding: 0.4rem;
    font-size: 0.82rem;
}

.scan-mobile-pagebar button {
    background: #f1f5f9;
    color: #0f172a;
}

.scan-mobile-pagebar button.is-active {
    background: #0284c7;
    color: white;
}

.scan-editor-tools {
    flex: 0 0 auto;
    background: white;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom));
}

.scan-editor-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
}

.scan-editor-tabs button,
.scan-crop-actions button,
.scan-watermark-panel button {
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.55rem 0.72rem;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 850;
}

.scan-editor-tabs button.is-active,
.scan-crop-actions button:active,
.scan-watermark-panel button.is-active {
    background: #0284c7;
    color: white;
}

.scan-mobile-effects {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.scan-mobile-effects button {
    flex: 0 0 auto;
    padding: 0.5rem 0.72rem;
    font-size: 0.78rem;
}

.scan-crop-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.scan-crop-actions .scan-crop-confirm {
    background: #0284c7;
    color: white;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.22);
}

.scan-watermark-preview {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    border-radius: 1rem;
}

.scan-watermark-preview.is-single {
    pointer-events: auto;
    cursor: move;
    touch-action: none;
}

.scan-watermark-tiles {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    height: 100%;
    width: 170%;
    align-content: space-around;
    justify-content: space-around;
    row-gap: 1.6rem;
    transform: scale(1.08);
    transform-origin: center;
    color: #6b7280;
    font-weight: 850;
    white-space: nowrap;
}

.scan-watermark-tiles span {
    display: inline-block;
    padding: 0.75rem 2.2rem;
    transform: rotate(var(--scan-watermark-angle, -28deg));
}

.scan-watermark-tiles span:nth-child(6n + 4),
.scan-watermark-tiles span:nth-child(6n + 5),
.scan-watermark-tiles span:nth-child(6n + 6) {
    transform: translateX(38%) rotate(var(--scan-watermark-angle, -28deg));
}

.scan-watermark-single {
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--scan-watermark-angle, -28deg));
    transform-origin: center center;
    color: #6b7280;
    font-weight: 850;
    white-space: nowrap;
}

.scan-watermark-panel {
    display: grid;
    gap: 0.45rem;
}

.scan-watermark-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    align-items: center;
}

.scan-watermark-row:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-watermark-row input[type="text"] {
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: white;
    padding: 0.55rem 0.72rem;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 750;
}

.scan-watermark-row label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0.42rem 0.6rem;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 850;
}

.scan-watermark-row input[type="range"] {
    min-width: 0;
    width: 100%;
    accent-color: #0284c7;
}

.scan-watermark-panel .scan-watermark-confirm {
    background: #0284c7;
    color: white;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.22);
}

.scan-source-switch {
    display: grid;
    grid-column: span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

.scan-id-photo-editor .scan-editor-main {
    background: #eef2f7;
}

.scan-id-photo-preview {
    display: grid;
    max-height: 100%;
    width: min(68vw, 22rem);
    place-items: center;
}

.scan-id-photo-preview img {
    display: block;
    max-height: calc(100vh - 14rem);
    width: auto;
    max-width: 100%;
    border-radius: 0.4rem;
    object-fit: contain;
}

.scan-id-photo-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.scan-id-photo-panel button,
.scan-id-photo-categories button,
.scan-id-photo-specs button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.52rem 0.6rem;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 850;
}

.scan-id-photo-panel button.is-active,
.scan-id-photo-categories button.is-active,
.scan-id-photo-specs button.is-active {
    background: #0284c7;
    color: white;
}

.scan-id-photo-swatch {
    display: inline-block;
    height: 1rem;
    width: 1rem;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.2);
    border-radius: 999px;
}

.scan-id-photo-size-panel {
    display: grid;
    gap: 0.5rem;
}

.scan-id-photo-categories,
.scan-id-photo-specs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.scan-id-photo-categories button,
.scan-id-photo-specs button {
    flex: 0 0 auto;
}

.scan-id-photo-specs button {
    flex-direction: column;
    align-items: flex-start;
    min-width: 7.2rem;
    border-radius: 0.8rem;
}

.scan-id-photo-specs button span {
    color: #64748b;
    font-size: 0.68rem;
}

.scan-id-photo-specs button.is-active span {
    color: rgba(255, 255, 255, 0.82);
}

.scan-id-photo-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.1rem;
}
.scan-id-photo-tabs::-webkit-scrollbar {
    display: none;
}
.scan-id-photo-tabs button {
    flex: 0 0 auto;
    min-width: 4rem;
}

.scan-id-photo-clothes-panel {
    display: grid;
    gap: 0.5rem;
}

.scan-id-photo-clothes-list {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.scan-id-photo-clothes-list button {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.8rem;
    background: #f1f5f9;
    padding: 0.4rem;
    min-width: 4.8rem;
    color: #0f172a;
}

.scan-id-photo-clothes-list button.is-active {
    background: #0284c7;
    color: white;
}

.scan-id-photo-clothes-list button img {
    height: 3rem;
    width: auto;
    border-radius: 0.3rem;
    object-fit: contain;
}

.scan-id-photo-clothes-list button span {
    font-size: 0.72rem;
    font-weight: 850;
}

.scan-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 120;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #0f172a;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.88rem;
    font-weight: 750;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
}

@media (max-width: 767px) {
    body:has(.scan-tool-page) > header,
    body:has(.scan-tool-page) > footer {
        display: none;
    }

    body:has(.scan-tool-page) > main {
        padding: 0;
        overflow: hidden;
    }

    body:has(.scan-tool-page) {
        overflow: hidden;
    }
}

@media (max-width: 900px) {
    .scan-desktop-grid {
        grid-template-columns: 1fr;
    }

    .scan-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .scan-workbench-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .scan-desktop-workarea {
        grid-template-columns: 1fr;
    }
}
