/* HandAgeCheck live camera PNG mask v1.5 — tighter framing */
.hac-guidance-intro {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(139, 92, 246, .32);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(124, 58, 237, .13), rgba(15, 23, 42, .72));
}

.hac-guidance-intro strong,
.hac-guidance-intro span { display: block; }
.hac-guidance-intro strong { margin-bottom: 5px; font-size: 1.02rem; }
.hac-guidance-intro span { color: rgba(255,255,255,.76); line-height: 1.48; }

.hac-guide-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
}

.hac-guide-icon {
    display: grid;
    justify-items: center;
    gap: 5px;
    min-width: 0;
    padding: 10px 7px;
    border-radius: 13px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.78);
    font-size: .76rem;
    text-align: center;
}

.hac-guide-icon b { font-size: 1.3rem; line-height: 1; }

.hac-native-file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hac-camera-launch,
.hac-camera-action,
.hac-retake,
.hac-file-fallback {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(167,139,250,.52);
    background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(91,33,182,.95));
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.hac-camera-launch:hover,
.hac-camera-action:hover,
.hac-retake:hover { filter: brightness(1.08); }

.hac-camera-shell { margin-top: 14px; }

.hac-live-stage {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 4 / 5;
    margin: 0 auto 12px;
    overflow: hidden;
    border: 1px solid rgba(167,139,250,.58);
    border-radius: 22px;
    background: #050816;
    box-shadow: 0 18px 42px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.035);
}

.hac-live-stage[hidden] { display: none !important; }

.hac-live-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #050816;
    transform: none;
}

.hac-live-stage::after {
    content: '';
    position: absolute;
    inset: 2.5% 3%;
    z-index: 2;
    border: 2px dashed rgba(216,180,254,.50);
    border-radius: 24px;
    pointer-events: none;
}

.hac-live-mask {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: .68;
}

.hac-live-mask.is-mirrored { transform: scaleX(-1); }

.hac-live-mask img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 0 12px rgba(192,132,252,.72));
}

.hac-live-chip {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);
    max-width: calc(100% - 28px);
    padding: 7px 12px;
    border: 1px solid rgba(216,180,254,.58);
    border-radius: 999px;
    background: rgba(2,6,23,.78);
    backdrop-filter: blur(9px);
    color: #f5f3ff;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.hac-live-hint {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 13px;
    z-index: 4;
    margin: 0;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(2,6,23,.80);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,.90);
    font-size: .78rem;
    line-height: 1.35;
    text-align: center;
}

.hac-camera-controls {
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    gap: 9px;
    width: min(100%, 420px);
    margin: 0 auto;
}

.hac-camera-cancel {
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.07);
}

.hac-captured-wrap {
    width: min(100%, 420px);
    margin: 14px auto 0;
}

.hac-captured-wrap[hidden] { display: none !important; }

.hac-captured-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid rgba(167,139,250,.45);
    border-radius: 20px;
    background: #050816;
}

/* Explicitly no mask or overlay on the captured preview. */
.hac-captured-wrap .hac-live-mask,
.hac-captured-wrap .hac-live-chip,
.hac-captured-wrap .hac-live-hint { display: none !important; }

.hac-retake { margin-top: 9px; background: rgba(124,58,237,.28); }

.hac-quality-note {
    min-height: 1.5em;
    margin: 8px 0 2px;
    font-size: .84rem;
    line-height: 1.4;
}
.hac-quality-note.is-ok { color: #86efac; }
.hac-quality-note.is-warn { color: #fde68a; }
.hac-quality-note.is-error { color: #fca5a5; }

.hac-file-fallback {
    display: none;
    margin-top: 9px;
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.20);
}
.hac-file-fallback.is-visible { display: block; }
.hac-hand-required { outline: 3px solid rgba(251,191,36,.32); outline-offset: 3px; }

@media (max-width: 520px) {
    .hac-guidance-intro { padding: 14px; }
    .hac-guide-icons { gap: 6px; }
    .hac-guide-icon { padding: 9px 5px; font-size: .70rem; }
    .hac-live-stage, .hac-captured-preview { border-radius: 18px; }
    .hac-live-chip { font-size: .66rem; }
}
