@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.checkin-role-select:invalid,
.checkin-role-select.placeholder-select {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

        .unified-kiosk,
        .unified-kiosk button,
        .unified-kiosk input,
        .unified-kiosk select,
        .unified-kiosk textarea {
            font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
        }

        #step-form #nomorPerkaraList {
            background: #172522 !important;
            border: 1px solid #49645d !important;
            box-shadow: 0 18px 38px rgba(3, 20, 17, 0.28) !important;
        }

        #step-form #nomorPerkaraList > div {
            background: #172522 !important;
            border-bottom-color: #38534c !important;
            color: #eef8f4 !important;
            padding: 0.75rem 0.85rem !important;
            line-height: 1.45;
            transition: background-color 0.18s ease, transform 0.18s ease;
        }

        #step-form #nomorPerkaraList > div:hover {
            background: #fffaf0 !important;
            transform: translateX(2px);
        }

        #step-form #nomorPerkaraList > div:hover,
        #step-form #nomorPerkaraList > div:hover * {
            color: #17352e !important;
            font-weight: 400 !important;
        }

        #step-form #nomorPerkaraList > div:hover > div:first-child,
        #step-form #nomorPerkaraList > div:hover .text-amber-400,
        #step-form #nomorPerkaraList > div:hover .text-amber-300 {
            color: #17352e !important;
            font-weight: 400 !important;
        }

        #step-form #nomorPerkaraList > div:hover > div:nth-child(2) {
            color: #17352e !important;
            font-weight: 400 !important;
        }

        #step-form #nomorPerkaraList > div:hover > div:nth-child(3) {
            color: #35564d !important;
            font-weight: 400 !important;
        }

        #step-form #nomorPerkaraList > div > div:first-child {
            color: #f6ca58 !important;
            font-weight: 800;
        }

        #step-form #nomorPerkaraList > div > div:nth-child(2) {
            color: #e5f1ed !important;
        }

        #step-form #nomorPerkaraList > div > div:nth-child(3) {
            color: #a9c3bb !important;
        }

        .fade-in { animation: pageReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

        .identity-document-frame {
            position: relative;
            aspect-ratio: 1.586 / 1;
            overflow: hidden;
        }

        .identity-card-guide {
            position: absolute;
            z-index: 1;
            inset: 8% 4%;
            border: 2px dashed rgba(245, 158, 11, 0.9);
            border-radius: 0.75rem;
            pointer-events: none;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 0.5rem;
            color: #fff7ed;
            background: linear-gradient(to bottom, transparent 76%, rgba(15, 23, 42, 0.7));
            font-size: 0.65rem;
            font-weight: 700;
            text-align: center;
        }

        .identity-document-frame:has(#identityPreview:not(.hidden)) .identity-card-guide {
            display: none;
        }

        #identityPreview {
            position: relative;
            z-index: 2;
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #fff;
        }

        .identity-source-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.65rem;
            width: 100%;
        }

        .identity-file-button,
        .identity-camera-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            min-height: 3rem;
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            font-size: 0.75rem;
            font-weight: 800;
        }

        .identity-input-hidden {
            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;
        }

        .desktop-identity-upload-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.65rem;
            margin-top: 0.75rem;
        }

        .desktop-identity-upload-actions .identity-file-button,
        .desktop-identity-upload-actions .identity-camera-button {
            min-height: 2.75rem;
            padding: 0.65rem 0.75rem;
        }

        .identity-preview-button {
            position: relative;
            display: block;
            width: 100%;
            height: 100%;
            min-height: 12rem;
            padding: 0;
            overflow: hidden;
            background: #fff;
            cursor: zoom-in;
        }

        .identity-preview-button img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .identity-preview-button > span {
            position: absolute;
            right: 0.65rem;
            bottom: 0.65rem;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.65rem;
            border-radius: 999px;
            color: #fff;
            background: rgba(15, 23, 42, 0.82);
            font-size: 0.68rem;
            font-weight: 800;
        }

        .identity-zoom-modal {
            position: fixed;
            inset: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: rgba(2, 6, 23, 0.88);
        }

        .identity-zoom-panel {
            display: flex;
            flex-direction: column;
            width: min(96vw, 900px);
            max-height: 94vh;
            overflow: hidden;
            border: 1px solid rgba(245, 158, 11, 0.45);
            border-radius: 1rem;
            background: #f8fafc;
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
        }

        .identity-zoom-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.8rem 1rem;
            color: #17352e;
            background: #fff;
        }

        .identity-zoom-header h2 {
            margin: 0;
            font-size: 0.9rem;
            font-weight: 800;
        }

        .identity-zoom-header button {
            width: 2rem;
            height: 2rem;
            color: #475569;
            font-size: 1.5rem;
            line-height: 1;
        }

        .identity-zoom-stage {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 14rem;
            max-height: 78vh;
            overflow: auto;
            padding: 1rem;
            background: #0f172a;
        }

        .identity-zoom-stage img {
            display: block;
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 72vh;
            object-fit: contain;
        }

        .identity-zoom-panel > p {
            margin: 0;
            padding: 0.65rem 1rem;
            color: #64748b;
            background: #fff;
            font-size: 0.68rem;
            text-align: center;
        }

        .identity-file-button {
            color: #17352e;
            background: #fef3c7;
            border: 1px solid #f59e0b;
        }

        .identity-camera-button {
            color: #fff;
            background: #991b1b;
            border: 1px solid #ef4444;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pageReveal {
            from { opacity: 0; transform: translateY(14px) scale(0.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes logoFloat {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-4px) rotate(1deg); }
        }

        @keyframes softGlow {
            0%, 100% { box-shadow: 0 10px 22px rgba(183, 137, 35, 0.16); }
            50% { box-shadow: 0 14px 28px rgba(183, 137, 35, 0.3); }
        }
        
        :root {
            --forest: #0b2b26;
            --forest-soft: #12473d;
            --gold: #d5a537;
            --gold-soft: #f5e5b2;
            --surface: #ffffff;
            --page: #eef1f0;
            --ink: #20302d;
            --muted: #64736f;
        }

        body {
            user-select: none;
            -webkit-user-select: none;
            color: var(--ink);
            background: var(--page);
        }

        .public-shell {
            position: relative;
            overflow: hidden;
            background: linear-gradient(120deg, #08241f, #0b2b26 38%, #155244 68%, #0b2b26);
            background-size: 220% 220%;
            border-bottom: 1px solid rgba(213, 165, 55, 0.4);
            box-shadow: 0 8px 24px rgba(3, 25, 21, 0.28);
            animation: forestGradientShift 18s ease-in-out infinite alternate;
        }

        .public-shell::after {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: linear-gradient(105deg, transparent 22%, rgba(245, 229, 178, 0.08) 48%, transparent 72%);
            background-size: 220% 100%;
            animation: headerLightSweep 10s ease-in-out infinite;
        }

        .public-shell > * {
            position: relative;
            z-index: 1;
        }

        @keyframes forestGradientShift {
            0% { background-position: 0% 50%; }
            100% { background-position: 100% 50%; }
        }

        @keyframes headerLightSweep {
            0%, 35% { background-position: -120% 0; }
            70%, 100% { background-position: 120% 0; }
        }

        .page-atmosphere {
            animation: atmosphereDrift 28s ease-in-out infinite alternate;
            transform: scale(1.06);
        }

        @keyframes atmosphereDrift {
            0% { transform: scale(1.06) translate3d(-0.5%, 0, 0); }
            100% { transform: scale(1.1) translate3d(0.5%, -0.5%, 0); }
        }

        .public-card {
            background: #ffffff !important;
            border: 1px solid #d9e2df !important;
            color: var(--ink) !important;
            box-shadow: 0 18px 44px rgba(11, 43, 38, 0.14) !important;
            border-radius: 20px !important;
        }

        .public-card h1,
        .public-card h2,
        .public-card h3 {
            color: var(--forest) !important;
        }

        .public-card p,
        .public-card label {
            color: var(--muted) !important;
        }

        .public-input,
        .public-select {
            background: #f8fafc !important;
            border: 1px solid #cbd8d4 !important;
            color: var(--ink) !important;
        }

        .public-input:focus,
        .public-select:focus {
            border-color: var(--gold) !important;
            box-shadow: 0 0 0 3px rgba(213, 165, 55, 0.17) !important;
            outline: none;
        }

        .public-primary-button {
            background: linear-gradient(135deg, var(--gold), #b78923) !important;
            color: var(--forest) !important;
            border: 1px solid rgba(255, 225, 139, 0.5) !important;
            box-shadow: 0 10px 22px rgba(183, 137, 35, 0.2) !important;
        }

        .public-primary-button:hover {
            background: linear-gradient(135deg, #e5b94f, #c99527) !important;
        }

        .public-secondary-button {
            background: var(--forest) !important;
            color: #ffffff !important;
        }

        .public-logo {
            width: 40px;
            height: 40px;
            object-fit: contain;
            display: block;
            padding: 0;
            border: 0 !important;
            outline: 0 !important;
            border-radius: 0;
            background: transparent;
            filter: none;
        }

        .header-brand-copy {
            min-width: 0;
        }

        .header-presensi-label {
            display: block;
            margin-top: 0.15rem;
        }

        @media (min-width: 1025px) {
            .header-presensi-label {
                position: absolute;
                right: 1.25rem;
                top: 50%;
                margin-top: 0;
                transform: translateY(-50%);
            }
        }

        .home-logo {
            width: 68px;
            height: 68px;
            margin: 0 auto 1.15rem;
            object-fit: contain;
            animation: logoFloat 4.5s ease-in-out infinite;
        }

        .public-card,
        #step-camera,
        #step-form,
        #step-success {
            animation-duration: 0.45s;
            animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
        }

        .public-primary-button,
        #btnCapture,
        #step-form button[type="submit"] {
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        }

        .public-primary-button:hover,
        #btnCapture:hover,
        #step-form button[type="submit"]:hover {
            transform: translateY(-2px);
            filter: saturate(1.06);
        }

        .public-primary-button:active,
        #btnCapture:active,
        #step-form button[type="submit"]:active {
            transform: translateY(0) scale(0.985);
        }

        #step-camera,
        #step-form {
            background: rgba(255, 255, 255, 0.98) !important;
            border: 1px solid #d9e2df !important;
            color: var(--ink) !important;
            box-shadow: 0 18px 44px rgba(11, 43, 38, 0.14) !important;
        }

        #step-camera {
            width: min(100%, 34rem);
            max-width: min(100%, 34rem);
            max-height: calc(100vh - 6.5rem);
            box-sizing: border-box;
            overflow-y: auto;
            overflow-x: hidden;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: #b78923 #eef3f1;
            padding: 1.25rem !important;
            border-radius: 18px !important;
            box-shadow: 0 22px 55px rgba(11, 43, 38, 0.18) !important;
        }

        #step-camera::-webkit-scrollbar {
            width: 6px;
        }

        #step-camera::-webkit-scrollbar-track {
            margin: 0.8rem 0;
            background: #eef3f1;
            border-radius: 999px;
        }

        #step-camera::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #d5a537, #9b741d);
            border: 1px solid #eef3f1;
            border-radius: 999px;
        }

        #step-camera > div:first-child,
        #step-camera > div:nth-child(2),
        #step-camera > div:last-child {
            min-width: 0;
        }

        #step-camera > div:nth-child(2) {
            width: min(100%, 220px);
            max-width: 100%;
            aspect-ratio: 2 / 3 !important;
            display: grid !important;
        }

        #step-camera #webcam,
        #step-camera #photoCanvas {
            max-width: 100%;
        }

        #webcam {
            display: block;
            grid-area: 1 / 1;
            z-index: 1;
            width: 100%;
            height: 100%;
            min-height: 0;
            background: #0b2b26;
            padding: 0;
            border: 0 !important;
        }

        #photoCanvas {
            display: block;
            grid-area: 1 / 1;
            z-index: 2;
            width: 100%;
            height: 100%;
            background: #0b2b26;
            object-fit: cover;
        }

        #photoCanvas.hidden {
            display: none !important;
        }

        #cameraOverlay {
            z-index: 3;
        }

        #resPhoto {
            object-fit: contain !important;
            background: #0b2b26;
        }

        #step-form {
            width: min(100%, 34rem);
            max-width: min(100%, 34rem);
            max-height: calc(100vh - 6.5rem);
            box-sizing: border-box;
            overflow-y: auto;
            overflow-x: hidden;
            overscroll-behavior: contain;
            padding: 1.25rem !important;
            border-radius: 18px !important;
            box-shadow: 0 22px 55px rgba(11, 43, 38, 0.18) !important;
            background: rgba(255, 255, 255, 0.98) !important;
            border: 1px solid #d9e2df !important;
            color: #20302d !important;
        }

        #step-form::-webkit-scrollbar {
            width: 6px;
        }

        #step-form::-webkit-scrollbar-track {
            margin: 0.8rem 0;
            background: #eef3f1;
            border-radius: 999px;
        }

        #step-form::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #d5a537, #9b741d);
            border: 1px solid #eef3f1;
            border-radius: 999px;
        }

        #step-form #checkinForm {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.9rem;
        }

        #step-form #checkinForm > div {
            min-width: 0;
        }

        #step-form #checkinForm > div:nth-child(1),
        #step-form #checkinForm > div:nth-child(4),
        #step-form #checkinForm > div:nth-child(5),
        #step-form #checkinForm > div:nth-child(6),
        #step-form #checkinForm > div:nth-child(7) {
            grid-column: 1 / -1;
        }

        #step-form #checkinForm > div:nth-child(3) {
            padding: 0.75rem !important;
            border-radius: 12px;
        }

        #step-form #checkinForm > div:nth-child(2),
        #step-form #checkinForm > div:nth-child(3) {
            align-self: start;
        }

        #step-form #checkinForm > div:nth-child(1) { order: 1; }
        #step-form #checkinForm > div:nth-child(4) { order: 2; }
        #step-form #checkinForm > div:nth-child(2),
        #step-form #checkinForm > div:nth-child(3) { order: 3; }
        #step-form #checkinForm > div:nth-child(5) { order: 4; }
        #step-form #checkinForm > div:nth-child(6) { order: 5; }
        #step-form #checkinForm > div:nth-child(7) { order: 6; }

        #step-form #checkinForm label {
            display: block;
            margin-bottom: 0.35rem;
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            color: #64736f !important;
        }

        #step-form #checkinForm input,
        #step-form #checkinForm select {
            min-height: 42px;
            width: 100%;
            border-radius: 10px;
            padding: 0.65rem 0.75rem;
            font-size: 0.75rem;
            line-height: 1.2;
        }

        #step-form #pihakCheckboxContainer {
            min-height: 52px;
            max-height: 10rem;
            border-color: #cbd8d4 !important;
            background: #f8fafc !important;
            border-radius: 10px;
            scrollbar-width: thin;
            scrollbar-color: #b78923 #f1f5f3;
        }

        #step-form #pihakCheckboxContainer label {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            min-height: 26px;
            height: 26px;
            margin: 0;
            padding: 0.2rem 0.45rem;
            border-color: #d9e2df !important;
            background: #ffffff !important;
            border-radius: 6px;
            letter-spacing: 0;
            cursor: pointer;
            transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
        }

        #step-form #pihakCheckboxContainer label:hover,
        #step-form #pihakCheckboxContainer label:has(input:checked) {
            background: #fffaf0 !important;
            border-color: #d5a537 !important;
        }

        #step-form #pihakCheckboxContainer label:has(input:checked) {
            box-shadow: 0 4px 10px rgba(183, 137, 35, 0.1);
        }

        #step-form #pihakCheckboxContainer input[type="checkbox"] {
            appearance: none;
            -webkit-appearance: none;
            display: inline-grid;
            place-content: center;
            width: 0.78rem !important;
            min-width: 0.78rem !important;
            height: 0.78rem !important;
            min-height: 0.78rem !important;
            margin: 0 0.35rem 0 0;
            flex: 0 0 0.78rem;
            border: 1px solid #b7c5c0 !important;
            border-radius: 3px;
            background: #ffffff !important;
            cursor: pointer;
            pointer-events: auto;
            transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
        }

        #step-form #pihakCheckboxContainer input[type="checkbox"]::before {
            content: "";
            width: 0.38rem;
            height: 0.2rem;
            border-left: 1.5px solid #ffffff;
            border-bottom: 1.5px solid #ffffff;
            transform: rotate(-45deg) scale(0);
            transition: transform 0.12s ease;
        }

        #step-form #pihakCheckboxContainer input[type="checkbox"]:checked {
            border-color: #b78923 !important;
            background: #b78923 !important;
        }

        #step-form #pihakCheckboxContainer input[type="checkbox"]:checked::before {
            transform: rotate(-45deg) scale(1);
        }

        #step-form #pihakCheckboxContainer label span {
            pointer-events: none;
        }

        #step-form #pihakCheckboxContainer input[type="checkbox"]:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(213, 165, 55, 0.2);
        }

        #step-form #pihakCheckboxContainer label span {
            display: block;
            min-width: 0;
            color: #40514d !important;
            font-size: 0.72rem;
            font-weight: 650;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }

        #step-form #containerKuasa {
            padding: 0.75rem;
            border: 1px solid #ead59a;
            border-radius: 12px;
            background: #fffaf0;
        }

        #step-form #checkinForm > div:last-child {
            display: grid;
            grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
            gap: 0.65rem;
            padding-top: 0.2rem;
        }

        #step-form #checkinForm > div:last-child button {
            width: 100%;
            min-height: 42px;
            border-radius: 10px;
        }

        #step-form #checkinForm input,
        #step-form #checkinForm select {
            box-sizing: border-box;
            background: #f8fafc !important;
            border-color: #cbd8d4 !important;
            color: #20302d !important;
        }

        #step-form #checkinForm input:focus,
        #step-form #checkinForm select:focus {
            border-color: #d5a537 !important;
            box-shadow: 0 0 0 3px rgba(213, 165, 55, 0.17) !important;
            outline: none;
        }

        #step-form #checkinForm select.checkin-role-select.placeholder-select,
        #step-form #checkinForm select.checkin-role-select:invalid {
            color: #64736f !important;
            font-weight: 400 !important;
        }

        #step-form #checkinForm > div:last-child button:first-child {
            background: #20302d !important;
            color: #ffffff !important;
        }

        #step-form #checkinForm > div:last-child button:last-child {
            background: linear-gradient(135deg, #d5a537, #b78923) !important;
            border-color: rgba(255, 225, 139, 0.5) !important;
            color: #0b2b26 !important;
            box-shadow: 0 10px 22px rgba(183, 137, 35, 0.2) !important;
        }

        #step-form > div:first-child {
            margin-bottom: 1rem !important;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #d9e2df;
        }

        #step-form > div:first-child h3 {
            color: #0b2b26 !important;
            font-size: 0.9rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        #step-form > div:first-child h2 {
            color: #a87512 !important;
            font-size: 0.62rem;
            letter-spacing: 0.14em;
        }

        #step-form .case-change-action {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-top: 0.55rem;
            padding: 0.55rem 0.7rem;
            border: 1px solid #ead59a;
            border-radius: 0.75rem;
            background: #fffaf0;
            color: #64736f;
            font-size: 0.68rem;
            line-height: 1.3;
        }

        #step-form .case-change-action button {
            flex: 0 0 auto;
            min-height: 30px;
            padding: 0.38rem 0.65rem;
            border: 1px solid #d5a537;
            border-radius: 0.55rem;
            background: #ffffff;
            color: #7a5710;
            font-size: 0.68rem;
            font-weight: 800;
            cursor: pointer;
        }

        #step-form .autocomplete-items {
            max-height: min(38vh, 260px);
            overflow-y: auto;
            border: 1px solid #cbd8d4;
            border-radius: 10px;
            background: #ffffff;
            box-shadow: 0 14px 30px rgba(11, 43, 38, 0.16);
            scrollbar-width: thin;
            scrollbar-color: #b78923 #f1f5f3;
        }

        #step-form .autocomplete-items div {
            border-bottom: 1px solid #e1e8e5;
            color: #40514d;
            font-size: 0.75rem;
        }

        #step-form .autocomplete-items div:hover {
            background: #fffaf0;
            color: #7a5710;
        }

        @media (max-width: 520px) {
            #step-form {
                width: 100%;
                max-width: 100%;
                max-height: calc(100vh - 5.5rem);
                padding: 1rem !important;
                border-radius: 18px !important;
            }

            #step-camera {
                width: 100%;
                max-height: calc(100vh - 5.5rem);
                padding: 1rem !important;
                border-radius: 18px !important;
            }

            #step-form {
                max-height: calc(100vh - 5.5rem);
                padding: 1rem !important;
            }

            #step-form #checkinForm {
                display: flex;
                flex-direction: column;
                gap: 0.8rem;
            }

            #step-form #checkinForm > div:last-child {
                grid-template-columns: 1fr;
            }
        }

        #step-camera h3,
        #step-form h3 {
            color: var(--forest) !important;
        }

        #step-camera .text-slate-400,
        #step-form .text-slate-400,
        #step-form .text-slate-300 {
            color: var(--muted) !important;
        }

        #step-camera .bg-red-800,
        #step-form .bg-red-800,
        #step-form .from-red-800 {
            background: var(--forest) !important;
        }

        #step-form input,
        #step-form select {
            color: var(--ink) !important;
            background: #f8fafc !important;
            border-color: #cbd8d4 !important;
        }

        #step-form .bg-amber-500\/10 {
            background: #fffaf0 !important;
            border-color: #ead59a !important;
        }

        #step-success .print-card {
            animation: pageReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }

        @media (prefers-reduced-motion: reduce) {
            .fade-in,
            .home-logo,
            #step-success .print-card,
            .public-shell,
            .public-shell::after,
            .page-atmosphere {
                animation: none !important;
            }

            .public-primary-button,
            #btnCapture,
            #step-form button[type="submit"] {
                transition: none !important;
            }
        }

        .autocomplete-items {
            position: absolute;
            border: 1px solid #334155;
            border-top: none;
            z-index: 99;
            top: 100%;
            left: 0;
            right: 0;
            max-height: 220px;
            overflow-y: auto;
            border-bottom-left-radius: 0.75rem;
            border-bottom-right-radius: 0.75rem;
            background-color: #020617;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
        }

        .autocomplete-items div {
            padding: 10px 14px;
            cursor: pointer;
            border-bottom: 1px solid #1e293b;
            color: #f8fafc;
            font-size: 0.875rem;
            transition: background-color 0.15s ease;
        }

        .autocomplete-items div:hover {
            background-color: #1e293b;
            color: #fbbf24;
        }

        .locked-field {
            background-color: #0f172a !important;
            border-color: #059669 !important;
            color: #34d399 !important;
            cursor: not-allowed;
        }

        .case-change-action {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-top: 0.55rem;
            padding: 0.6rem 0.7rem;
            border: 1px solid rgba(213, 165, 55, 0.35);
            border-radius: 0.8rem;
            background: rgba(255, 250, 240, 0.92);
            color: #64736f;
            font-size: 0.68rem;
            line-height: 1.35;
        }

        .case-change-action button {
            flex: 0 0 auto;
            min-height: 32px;
            padding: 0.4rem 0.7rem;
            border: 1px solid #d5a537;
            border-radius: 0.6rem;
            background: #ffffff;
            color: #7a5710;
            font-size: 0.68rem;
            font-weight: 800;
            cursor: pointer;
            transition: background-color 0.18s ease, transform 0.18s ease;
        }

        .case-change-action button:hover,
        .case-change-action button:focus-visible {
            background: #fef0c7;
            outline: none;
            transform: translateY(-1px);
        }

        @media (max-width: 420px) {
            .case-change-action {
                align-items: stretch;
                flex-direction: column;
            }

            .case-change-action button {
                width: 100%;
            }
        }

        /* =========================================================
           PENGATURAN CETAK PRINTER THERMAL 80MM (8CM)
           ========================================================= */
        @media print {
            @page {
                size: 80mm 200mm; /* Ukuran tiket thermal 8cm */
                margin: 0;      /* Menghilangkan header/footer bawaan browser */
            }
            html {
                width: 80mm !important;
                min-width: 80mm !important;
            }
            body { 
                background: white !important; 
                padding: 0 !important;
                margin: 0 !important;
                width: 80mm !important;
                min-width: 80mm !important;
                font-family: Arial, Helvetica, sans-serif !important;
            }
            .no-print, #step-home, #step-camera, #step-form { 
                display: none !important; 
            }
            #step-success {
                display: block !important;
                width: 80mm !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            .print-card { 
                box-shadow: none !important; 
                border: none !important;
                max-width: 80mm !important;
                width: 80mm !important;
                border-radius: 0 !important;
                background: white !important;
                color: black !important;
                padding: 4mm !important;
                box-sizing: border-box !important;
                padding: 5mm 4mm 4mm !important;
                margin: 0 !important;
                font-family: Arial, Helvetica, sans-serif !important;
                font-size: 9px !important;
                line-height: 1.25 !important;
            }
            /* Garis putus-putus khas struk kasir/thermal */
            .receipt-divider {
                border-top: 1px dashed #000 !important;
                margin: 5px 0 !important;
            }

            .print-card .text-center {
                text-align: center !important;
            }

            .print-card #resPhoto {
                width: 16mm !important;
                height: 24mm !important;
                border-radius: 0 !important;
                border: 1px solid #999 !important;
            }

            .print-card #barcodeMain {
                width: 58mm !important;
                max-width: 58mm !important;
                height: 12mm !important;
                margin: 0 auto !important;
            }

            .print-card .text-slate-500,
            .print-card .text-slate-600 {
                color: #333 !important;
            }

            .print-card #printTimestamp {
                font-size: 8px !important;
                letter-spacing: 0.04em !important;
            }

            .print-card #resHeaderPihak,
            .print-card #resWA,
            .print-card .text-\[8px\] {
                font-size: 7px !important;
            }

            .print-card #resNamaUtama,
            .print-card #resNoPerkara {
                font-size: 10px !important;
                line-height: 1.2 !important;
            }

            .print-card #resJenisPerkara {
                font-size: 9px !important;
            }

            .print-card .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
                margin-top: 4px !important;
            }

            .print-card .space-y-3 > :not([hidden]) ~ :not([hidden]) {
                margin-top: 6px !important;
            }
        }

#step-form:not(.hidden) {
            display: block;
            width: min(32rem, calc(100vw - 2rem));
            max-width: min(32rem, calc(100vw - 2rem));
            max-height: calc(100dvh - 6.5rem);
            margin-inline: auto;
            box-sizing: border-box;
            scroll-margin-top: 5.5rem;
            overflow-x: hidden;
            overflow-y: auto;
            padding: 1.25rem !important;
            background: rgba(255, 255, 255, 0.98) !important;
            border: 1px solid #d9e2df !important;
            border-radius: 18px !important;
            color: #20302d !important;
            box-shadow: 0 22px 55px rgba(11, 43, 38, 0.18) !important;
        }

        #step-form #checkinForm {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
            gap: 0.9rem;
        }

        #step-form #checkinForm > div,
        #step-form #checkinForm input,
        #step-form #checkinForm select,
        #step-form #checkinForm button {
            min-width: 0;
            box-sizing: border-box;
        }

        #step-form #checkinForm > div:nth-child(3) {
            background: #fffaf0 !important;
            border: 1px solid #ead59a !important;
        }

        #step-form #checkinForm > div:last-child {
            grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
        }

        #step-form #checkinForm > div:last-child button {
            min-height: 42px;
            padding: 0.65rem 0.75rem;
            white-space: normal;
        }

        #step-form #checkinForm > div:last-child button:first-child {
            background: #20302d !important;
            color: #ffffff !important;
        }

        #step-form #checkinForm > div:last-child button:last-child {
            background: linear-gradient(135deg, #d5a537, #b78923) !important;
            color: #0b2b26 !important;
            border-color: rgba(255, 225, 139, 0.5) !important;
        }

        @media (max-width: 640px) {
            body {
                align-items: stretch;
                justify-content: flex-start;
                min-height: 100dvh;
                padding: 0.75rem;
                padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
            }

            main {
                width: 100%;
                max-width: 100%;
                padding-top: 4.5rem !important;
                padding-bottom: 1rem;
            }

            #step-form:not(.hidden) {
                width: 100%;
                max-width: 100%;
                max-height: calc(100dvh - 5.75rem);
                padding: 1rem !important;
                border-radius: 18px !important;
            }

            #step-form > div:first-child {
                margin-bottom: 0.85rem !important;
                padding-bottom: 0.65rem;
            }

            #step-form #checkinForm {
                display: flex;
                flex-direction: column;
                gap: 0.8rem;
            }

            #step-form #checkinForm > div:nth-child(2),
            #step-form #checkinForm > div:nth-child(3) {
                width: 100%;
            }

            #step-form #checkinForm > div:last-child {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.65rem;
            }

            #step-form #checkinForm > div:last-child button {
                width: 100%;
            }
        }

        @media (max-width: 380px) {
            #step-form {
                padding: 0.85rem !important;
            }

            #step-form #checkinForm > div:last-child {
                grid-template-columns: 1fr;
            }
        }

        @media (min-width: 641px) and (max-width: 1024px) {
            #step-form:not(.hidden) {
                width: min(32rem, calc(100vw - 2rem));
                max-width: min(32rem, calc(100vw - 2rem));
                max-height: calc(100dvh - 6.5rem);
            }
        }

.unified-kiosk {
            background: #080f1c !important;
        }

        .unified-kiosk::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.14), transparent 30rem), radial-gradient(circle at 86% 78%, rgba(245, 158, 11, 0.1), transparent 26rem);
        }

        .unified-workspace {
            display: grid;
            grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
            gap: 2rem;
            align-items: stretch;
            height: calc(100dvh - 7rem);
            margin: 4.25rem auto 0;
            padding-top: 0 !important;
            min-height: 0;
        }

        .unified-workspace > #step-home:not(.hidden) { display: block !important; width: 100%; max-width: 980px; height: auto; margin: 0 auto; }
        .unified-workspace > #step-home.hidden { display: none !important; }
        .unified-workspace:has(> #step-home:not(.hidden)) {
            grid-template-columns: minmax(0, 1fr) !important;
        }
        .unified-workspace > #step-camera.hidden,
        .unified-workspace > #step-form.hidden,
        .unified-workspace > #step-success.hidden { display: none !important; }
        .unified-workspace > #step-camera:not(.hidden),
        .unified-workspace > #step-form:not(.hidden) { display: block !important; width: 100%; max-width: none; height: 100%; min-height: 0; margin: 0; overflow: hidden !important; }
        .unified-workspace > #step-form { display: flex !important; flex-direction: column; padding: 0.9rem 1.1rem 1rem !important; }
        .unified-workspace > #step-form > div:first-child { flex: 0 0 auto; }
        .unified-workspace #step-form > div:first-child { margin-bottom: 0.65rem !important; padding-bottom: 0.55rem; }
        .unified-workspace #step-form #checkinForm { flex: 1 1 auto; min-height: 0; gap: 0.4rem; grid-auto-rows: max-content; align-content: start; overflow-y: auto; overflow-x: hidden; padding-right: 0.45rem; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, 0.55) transparent; }
        .unified-workspace #step-form #checkinForm::-webkit-scrollbar { width: 5px; }
        .unified-workspace #step-form #checkinForm::-webkit-scrollbar-track { background: transparent; }
        .unified-workspace #step-form #checkinForm::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.55); border-radius: 999px; }
        .unified-workspace #step-form #checkinForm > div { min-height: 0; }
        .unified-workspace #step-form #checkinForm label { margin-bottom: 0.2rem; font-size: 0.6rem; }
        .unified-workspace #step-form #checkinForm input,
        .unified-workspace #step-form #checkinForm select { min-height: 36px; padding: 0.45rem 0.65rem; }
        .unified-workspace #step-form #checkinForm > div:nth-child(3) { padding: 0.55rem !important; }
        .unified-workspace #step-form #checkinForm > div:nth-child(3) { background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
        .unified-workspace #step-form #containerKuasa { background: transparent; border: 0; border-radius: 0; padding: 0.35rem 0 0; }
        .unified-workspace #step-form #containerKuasa > div:first-child { border-bottom: 1px solid rgba(203, 216, 212, 0.8); padding-bottom: 0.3rem; }
        .unified-workspace #step-form #checkinForm > div:nth-child(4) { min-height: 6.8rem; position: relative; z-index: 2; }
        .unified-workspace #step-form #checkinForm > div:last-child { display: block !important; grid-template-columns: none; padding-top: 0; padding-bottom: 0.75rem; margin-top: 0; }
        .unified-workspace #step-form #checkinForm > div:last-child label { display: block; width: 100%; }
        .unified-workspace #step-form #checkinForm > div:last-child input { display: block; width: 100%; }
        .unified-workspace #step-camera #btnCapture { width: min(100%, 280px); margin-inline: auto; }
        .unified-workspace #step-form #pihakCheckboxContainer { height: 5.25rem; min-height: 5.25rem; max-height: 5.25rem; box-sizing: border-box; padding: 0.45rem; overflow-y: auto !important; position: relative; z-index: 3; }
        .unified-workspace #step-form #pihakCheckboxContainer label { min-height: 25px; height: auto; padding: 0.25rem 0.4rem; }
        .unified-workspace #step-form #checkinForm > div:last-child { padding-bottom: 0.75rem; }
        .form-action-footer { flex: 0 0 auto; margin-top: 0.8rem; padding-top: 0.75rem !important; }
        .form-action-footer button { min-height: 42px; padding: 0.55rem 0.65rem; }
        .form-action-footer button { background: linear-gradient(135deg, #f3b735, #c88717) !important; color: #172033 !important; box-shadow: 0 8px 18px rgba(200, 135, 23, 0.28); transition: transform 0.2s ease, box-shadow 0.2s ease; }
        .form-action-footer button:hover { transform: scale(1.01); box-shadow: 0 12px 24px rgba(200, 135, 23, 0.38); }
        .form-action-footer #submitCheckinButton:not(:disabled) { background: linear-gradient(135deg, #f7c948, #d69a24) !important; color: #172033 !important; border-color: #f7d477 !important; text-shadow: none; }
        .form-action-footer #submitCheckinButton:disabled { background: #d2c5a9 !important; color: #26323a !important; border-color: #e0d6c2 !important; opacity: 1 !important; text-shadow: none; }
        .unified-workspace #step-form #subtextNamaPihak { display: none; }
        .unified-workspace #step-form > #checkinForm > div:first-child > .case-change-action { position: absolute; top: 1.55rem; right: 0.45rem; z-index: 4; display: flex; align-items: center; margin: 0; padding: 0; border: 0; background: transparent; }
        .unified-workspace #step-form > #checkinForm > div:first-child > .case-change-action span { display: none; }
        .unified-workspace #step-form > #checkinForm > div:first-child > .case-change-action button { min-height: 28px; padding: 0.3rem 0.55rem; border: 1px solid #d5a537; border-radius: 0.55rem; background: #ffffff; color: #7a5710; font-size: 0.62rem; font-weight: 800; white-space: nowrap; }
        .unified-workspace #step-form > #checkinForm > div:first-child > #nomorPerkara { padding-right: 9rem !important; }
        .unified-workspace #step-camera > div:nth-child(2) { width: min(100%, 230px); height: 300px; max-height: 300px; aspect-ratio: 2 / 3 !important; }

        .camera-console-header { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; align-items: start; }
        .camera-step-label { margin: 0 0 0.15rem; color: #fbbf24; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
        .camera-console-header > p { grid-column: 1 / -1; }
        .camera-status-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.65rem; border: 1px solid rgba(52, 211, 153, 0.35); border-radius: 999px; color: #a7f3d0; background: rgba(16, 185, 129, 0.1); font-size: 0.65rem; font-weight: 800; white-space: nowrap; }
        .camera-status-pill.is-standby { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); background: rgba(148, 163, 184, 0.1); }
        .camera-status-pill.is-standby span { background: #94a3b8; box-shadow: none; }
        .camera-status-pill span, .idle-countdown-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12); }
        .viewfinder { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 20px 44px rgba(0,0,0,0.28); }
        .face-scan-overlay { z-index: 10; }
        .hud-corner { position: absolute; width: 2rem; height: 2rem; border-color: #10b981; border-style: solid; filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8)); animation: hudPulse 2s ease-in-out infinite alternate; }
        .hud-corner-tl { top: 0.75rem; left: 0.75rem; border-width: 3px 0 0 3px; border-radius: 0.45rem 0 0 0; }
        .hud-corner-tr { top: 0.75rem; right: 0.75rem; border-width: 3px 3px 0 0; border-radius: 0 0.45rem 0 0; }
        .hud-corner-bl { bottom: 0.75rem; left: 0.75rem; border-width: 0 0 3px 3px; border-radius: 0 0 0 0.45rem; }
        .hud-corner-br { right: 0.75rem; bottom: 0.75rem; border-width: 0 3px 3px 0; border-radius: 0 0 0.45rem 0; }
        .face-guide { width: 42%; height: 68%; border: 2px solid rgba(52, 211, 153, 0.62); border-radius: 50%; box-shadow: 0 0 18px rgba(52, 211, 153, 0.14); animation: faceGuidePulse 2.8s ease-in-out infinite; }
        .face-guide > span { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 0.65rem); width: max-content; color: rgba(209, 250, 229, 0.75); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
        .scan-line { position: absolute; left: 0.75rem; right: 0.75rem; height: 3px; background: linear-gradient(90deg, transparent, #10b981, #06b6d4, #10b981, transparent); box-shadow: 0 0 15px #10b981, 0 0 8px #06b6d4; z-index: 20; animation: scanAnimation 2.5s ease-in-out infinite alternate; }
        .scan-line::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5rem; transform: translateY(-0.2rem); background: linear-gradient(180deg, rgba(16, 185, 129, 0.28), transparent); filter: blur(2px); }
        #step-camera:not(.camera-ready) .scan-line { display: none; }
        #step-camera:not(.camera-ready) .face-guide { animation-play-state: paused; opacity: 0.35; }
        .viewfinder.flash::after { content: ""; position: absolute; inset: 0; z-index: 5; background: #fff; pointer-events: none; animation: cameraFlash 0.35s ease-out both; }
        @keyframes cameraFlash { from { opacity: 0.9; } to { opacity: 0; } }
        @keyframes faceGuidePulse { 0%, 100% { opacity: 0.62; transform: translate(-50%, -50%) scale(0.98); box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.08), 0 0 18px rgba(52, 211, 153, 0.12); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08), 0 0 30px rgba(52, 211, 153, 0.28); } }
        @keyframes hudPulse { from { filter: drop-shadow(0 0 2px rgba(16,185,129,0.5)); } to { filter: drop-shadow(0 0 10px rgba(16,185,129,0.9)); } }
        @keyframes scanAnimation { 0% { top: 5%; opacity: 0.3; } 50% { opacity: 1; } 100% { top: 90%; opacity: 0.3; } }
        @keyframes scanFace { 0%, 100% { top: 1rem; opacity: 0.35; } 50% { top: calc(100% - 1rem); opacity: 1; } }
        .biometric-checklist { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.9rem; color: #a7f3d0; font-size: 0.7rem; font-weight: 700; }
        .biometric-checklist span { display: inline-flex; align-items: center; gap: 0.35rem; }
        .biometric-checklist b { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; color: #06281d; background: #34d399; }
        .biometric-checklist .is-pending { color: #94a3b8; }
        .biometric-checklist .is-pending b { color: #64748b; background: #334155; }
        .sipp-search-status { float: right; color: #fbbf24; font-size: 0.65rem; font-weight: 700; }
        #pihakCheckboxContainer label { transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease; }
        #pihakCheckboxContainer label:hover { transform: translateY(-1px); }
        .idle-countdown-banner { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.55rem; margin-left: auto; padding: 0.5rem 0.75rem; border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 0.8rem; color: #fde68a; background: rgba(15, 23, 42, 0.68); backdrop-filter: blur(16px); font-size: 0.68rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,0.16); }
        .header-brand-copy { display: grid; grid-template-columns: auto; gap: 0.12rem; align-content: center; min-width: 0; line-height: 1; }
        .header-brand-copy p:first-child { white-space: nowrap; color: #f8fafc !important; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1.15; }
        .header-brand-copy p:nth-child(2) { width: max-content; padding: 0 !important; border: 0 !important; border-radius: 0 !important; color: #fcd34d !important; background: transparent !important; box-shadow: none !important; font-size: 0.63rem; font-weight: 900; letter-spacing: 0.14em; line-height: 1; }
        .header-presensi-label { position: static !important; margin-top: 0.08rem; color: #cbd5e1 !important; transform: none !important; font-size: 0.57rem !important; font-weight: 700 !important; letter-spacing: 0.12em !important; line-height: 1 !important; }
        @media (max-width: 640px) { .public-shell { padding-inline: 1rem; } .public-logo { width: 36px; height: 36px; border-radius: 0; } .header-brand-copy p:first-child { font-size: 0.57rem; } .header-brand-copy p:nth-child(2) { font-size: 0.55rem; } .header-presensi-label { font-size: 0.49rem !important; } .idle-countdown-banner { font-size: 0.58rem; padding: 0.4rem 0.55rem; } }
        #submitCheckinButton:disabled { cursor: not-allowed; opacity: 1; background: #d2c5a9 !important; color: #26323a !important; border-color: #e0d6c2 !important; filter: none; transform: none; box-shadow: none; text-shadow: none; }
        .back-to-camera { display: none !important; }
        #retakeGroup > button:last-child { display: block !important; }
        #retakeGroup:not(.hidden) { display: flex !important; justify-content: center; gap: 0; }
        #retakeGroup:not(.hidden) #retakeButton { width: min(100%, 240px); }
        @media (min-width: 1025px) { #retakeGroup > button:last-child { display: none !important; } }
        #pihakCheckboxContainer label:has(input:checked) { border-color: #34d399 !important; background: rgba(16, 185, 129, 0.12) !important; box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2); }
        #pihakCheckboxContainer label:has(input:checked)::after { content: "✓"; margin-left: auto; color: #34d399; font-weight: 900; }
        @media (max-width: 900px) { body.unified-kiosk { overflow-y: auto; } .unified-workspace { grid-template-columns: 1fr; height: auto; gap: 1rem; margin-top: 4.25rem; } .unified-workspace > #step-camera, .unified-workspace > #step-form { height: auto; overflow: visible !important; } .unified-workspace > #step-form #checkinForm { overflow: visible; padding-right: 0; } .unified-workspace > #step-camera { max-width: 34rem; margin-inline: auto; } }
        @media print { html, body { width: 80mm !important; min-width: 80mm !important; margin: 0 auto !important; background: #fff !important; } .unified-kiosk, .unified-workspace { display: block !important; width: 80mm !important; min-height: 0 !important; height: auto !important; margin: 0 auto !important; padding: 0 !important; background: #fff !important; } .unified-workspace > *:not(#step-success), header, .idle-countdown-banner { display: none !important; } #step-success { display: block !important; width: 80mm !important; margin: 0 auto !important; } #step-success .print-card { width: 80mm !important; max-width: 80mm !important; margin: 0 auto !important; box-sizing: border-box !important; } #step-success .print-card > div.text-center.pt-1 p { white-space: nowrap !important; font-size: 8px !important; letter-spacing: -0.01em !important; } }
        @media screen { .printing-ticket #step-success { display: none !important; } }
        .success-print-toast { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; background: rgba(2, 6, 23, 0.58); backdrop-filter: blur(8px); }
        .success-print-toast[hidden] { display: none; }

        .identity-capture-card {
            width: min(100%, 42rem);
            color: #172033;
            background: rgba(248, 250, 252, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 1.25rem;
        }
        .identity-step-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #dbe4e3; }
        .identity-step-header h3 { margin: 0.2rem 0; color: #102c32; font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 900; letter-spacing: -0.01em; }
        .identity-step-header p:last-child { margin: 0; color: #607277; font-size: 0.75rem; line-height: 1.5; }
        .identity-step-eyebrow { margin: 0; color: #b27a0b; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
        .identity-security-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; padding: 0.45rem 0.65rem; border: 1px solid #b7e4d2; border-radius: 999px; color: #08744f; background: #ecfdf5; font-size: 0.62rem; font-weight: 900; white-space: nowrap; }
        .identity-document-frame { position: relative; display: grid; place-items: center; width: 100%; min-height: 13rem; margin: 1rem 0 0.7rem; overflow: hidden; border: 1px dashed #a8c1be; border-radius: 1rem; background: linear-gradient(145deg, #f8fafc, #e9f3f0); }
        .identity-document-frame::before { content: ""; position: absolute; inset: 1rem; border: 1px solid rgba(9, 122, 89, 0.25); border-radius: 0.7rem; pointer-events: none; }
        #identityPreview { width: 100%; max-height: 18rem; object-fit: contain; padding: 1rem; }
        .identity-placeholder { display: grid; position: relative; z-index: 1; place-items: center; gap: 0.5rem; padding: 2rem; color: #607277; text-align: center; }
        .identity-placeholder i { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; color: #08744f; background: #d7f5e8; font-size: 1.35rem; }
        .identity-placeholder strong { color: #18383c; font-size: 0.85rem; }
        .identity-placeholder span, .identity-file-status { color: #718287; font-size: 0.68rem; }
        .identity-processing { position: absolute; z-index: 2; inset: 0; place-items: center; gap: 0.5rem; color: #08744f; background: rgba(248, 250, 252, 0.88); font-size: 0.75rem; font-weight: 800; }
        .identity-processing:not(.hidden) { display: grid; }
        .identity-file-status { min-height: 1.1rem; margin: 0 0 0.8rem; text-align: center; }
        .identity-action-row, .identity-ready-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0.65rem; }
        .identity-source-actions { display: flex; align-items: center; }
        .identity-file-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; width: 100%; min-height: 2.8rem; padding: 0.65rem 1rem; border: 0; border-radius: 0.75rem; color: #fff; background: linear-gradient(135deg, #08744f, #075e54); box-shadow: 0 0.6rem 1.4rem rgba(8, 116, 79, 0.2); font-size: 0.75rem; font-weight: 900; transition: transform 0.2s ease, box-shadow 0.2s ease; }
        .identity-file-button:hover, .identity-file-button:focus-visible { box-shadow: 0 0.75rem 1.5rem rgba(8, 116, 79, 0.28); transform: translateY(-1px); outline: none; }
        .identity-ready-actions:not(.hidden) { display: grid; }
        .identity-secondary-button, .identity-primary-button, .identity-final-button { min-height: 2.8rem; border-radius: 0.75rem; font-size: 0.72rem; font-weight: 900; transition: transform 0.2s ease, box-shadow 0.2s ease; }
        .identity-secondary-button { border: 1px solid #c6d4d3; color: #496064; background: #fff; }
        .identity-primary-button { color: #fff; background: linear-gradient(135deg, #08744f, #075e54); box-shadow: 0 0.6rem 1.4rem rgba(8, 116, 79, 0.2); }
        .identity-final-button { color: #172033; background: linear-gradient(135deg, #f7c948, #d69a24); box-shadow: 0 0.6rem 1.4rem rgba(200, 135, 23, 0.24); }
        .identity-secondary-button:hover, .identity-primary-button:hover, .identity-final-button:hover { transform: translateY(-1px); }
        .mobile-submit-label { display: none; }
            .desktop-identity-upload { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0.75rem; border: 1px solid rgba(148, 163, 184, 0.32); border-radius: 0.8rem; background: rgba(241, 245, 249, 0.72); }
            .desktop-identity-upload-copy { min-width: 0; }
            .desktop-identity-upload-title { display: flex; align-items: center; gap: 0.4rem; color: #18383c; font-size: 0.68rem; font-weight: 900; }
            .desktop-identity-upload-title i { color: #08744f; }
            .desktop-identity-upload-title span { padding: 0.16rem 0.4rem; border-radius: 999px; color: #718287; background: #e2e8f0; font-size: 0.53rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
            .desktop-identity-upload p { margin: 0.2rem 0 0; color: #718287; font-size: 0.59rem; line-height: 1.35; }
            .desktop-identity-upload > button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; min-height: 2.15rem; padding: 0.45rem 0.7rem; border: 1px solid rgba(8, 116, 79, 0.28); border-radius: 0.65rem; color: #075e54; background: #ecfdf5; font-size: 0.63rem; font-weight: 900; }
            .desktop-identity-upload > button:hover { border-color: #08744f; background: #d7f5e8; }
        @media (max-width: 640px) {
            .identity-capture-card { width: 100%; padding: 1rem !important; border-radius: 1rem; }
            .identity-step-header { display: block; }
            .identity-security-badge { margin-top: 0.75rem; }
            .identity-document-frame { min-height: 11rem; }
            .identity-action-row, .identity-ready-actions { grid-template-columns: 1fr; }
            .identity-source-actions { display: flex; }
            .identity-file-button { min-height: 3rem; }
        }
        @media (max-width: 1024px) {
            .desktop-identity-upload { display: none; }
            .desktop-submit-label { display: none; }
            .mobile-submit-label { display: inline; }
        }
        .success-print-toast-card { width: min(100%, 380px); padding: 1.5rem; border: 1px solid rgba(52, 211, 153, 0.4); border-radius: 1.25rem; color: #ecfdf5; background: #0f2f2b; box-shadow: 0 24px 70px rgba(2, 6, 23, 0.35); text-align: center; }
        .success-print-toast-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin: 0 auto 0.75rem; border-radius: 50%; color: #064e3b; background: #6ee7b7; font-size: 1.3rem; font-weight: 900; }
        .success-print-toast-card h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
        .success-print-toast-card p { margin: 0.45rem 0 0; color: #a7f3d0; font-size: 0.75rem; line-height: 1.5; }
        .success-print-toast-card strong { color: #fcd34d; }

        .onboarding-screen {
            width: min(100%, 980px);
            margin: 0 auto;
            padding: clamp(1.25rem, 4vw, 2.5rem);
            border: 1px solid rgba(213, 165, 55, 0.28);
            border-radius: 24px;
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 247, 0.96));
            box-shadow: 0 26px 70px rgba(3, 25, 21, 0.24);
            position: relative;
            overflow: hidden;
        }

        .onboarding-screen::before {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: 4px;
            background: linear-gradient(90deg, #0b2b26, #d5a537 48%, #2b806d);
        }

        .onboarding-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            width: 100%;
            padding-bottom: 1rem;
            border-bottom: 1px solid #e4ebe8;
        }

        .onboarding-tenant { display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; }
        .onboarding-tenant-logo { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; object-fit: contain; }
        .onboarding-tenant-name { color: var(--forest); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
        .onboarding-tenant-system { margin-top: 0.12rem; color: #a87512; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
        .onboarding-online { display: inline-flex; align-items: center; gap: 0.4rem; flex: 0 0 auto; padding: 0.42rem 0.65rem; border: 1px solid #b7dfd0; border-radius: 999px; color: #08734f; background: #effcf6; font-size: 0.62rem; font-weight: 800; }
        .onboarding-online::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #16a36f; box-shadow: 0 0 0 4px rgba(22, 163, 111, 0.12); }

        .onboarding-eyebrow {
            color: #a87512;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.18em;
            text-transform: uppercase;
        }

        .onboarding-title {
            max-width: 720px;
            margin: 0.45rem auto 0;
            color: var(--forest);
            font-size: clamp(1.6rem, 4vw, 2.6rem);
            font-weight: 800;
            line-height: 1.08;
        }

        .onboarding-subtitle {
            max-width: 620px;
            margin: 0.75rem auto 0;
            color: var(--muted);
            font-size: 0.82rem;
            line-height: 1.65;
            white-space: normal;
            overflow: visible;
        }

        .onboarding-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.8rem;
            margin-top: 1.6rem;
        }

        .onboarding-card {
            position: relative;
            min-width: 0;
            padding: 1rem;
            border: 1px solid #d9e2df;
            border-radius: 14px;
            background: #ffffff;
            text-align: left;
            box-shadow: 0 8px 20px rgba(11, 43, 38, 0.06);
            transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .onboarding-card:hover { transform: translateY(-3px); border-color: #c9a64c; box-shadow: 0 14px 28px rgba(11, 43, 38, 0.1); }
        .onboarding-card::before { content: attr(data-step); position: absolute; top: 0.7rem; right: 0.75rem; color: #a87512; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.1em; }
        .onboarding-card:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -0.8rem; z-index: 2; width: 0.8rem; border-top: 1px dashed #c9a64c; }

        .onboarding-card-icon {
            display: grid;
            place-items: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 12px;
            color: #0b2b26;
            background: #f5e5b2;
        }

        .onboarding-card strong {
            display: block;
            margin-top: 0.75rem;
            color: var(--forest);
            font-size: 0.8rem;
            font-weight: 700;
        }

        .onboarding-card span {
            display: block;
            margin-top: 0.35rem;
            color: var(--muted);
            font-size: 0.7rem;
            line-height: 1.5;
        }

        .onboarding-start {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            min-height: 56px;
            width: min(100%, 320px);
            margin-top: 1.5rem;
            border-radius: 11px;
            font-size: 0.76rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        }

        .onboarding-start:hover,
        .onboarding-start:focus-visible { transform: translateY(-3px) scale(1.01); filter: saturate(1.08); box-shadow: 0 16px 30px rgba(183, 137, 35, 0.3) !important; outline: none; }

        .sos-launcher {
            position: fixed;
            right: clamp(0.75rem, 2vw, 1.5rem);
            bottom: clamp(0.75rem, 2vw, 1.5rem);
            z-index: 40;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            min-height: 44px;
            padding: 0.7rem 0.9rem;
            border: 1px solid #f0a39b;
            border-radius: 999px;
            color: #ffffff;
            background: #a63d32;
            box-shadow: 0 12px 28px rgba(72, 24, 20, 0.3);
            font-size: 0.7rem;
            font-weight: 900;
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
        }

        .sos-launcher:hover,
        .sos-launcher:focus-visible { background: #8f342d; box-shadow: 0 15px 32px rgba(72, 24, 20, 0.38); outline: none; transform: translateY(-2px); }

        .sos-launcher { animation: sosHalo 2.4s ease-in-out infinite; }
        @keyframes sosHalo {
            0%, 100% { box-shadow: 0 12px 28px rgba(72, 24, 20, 0.3), 0 0 0 0 rgba(166, 61, 50, 0.35); }
            50% { box-shadow: 0 15px 32px rgba(72, 24, 20, 0.38), 0 0 0 10px rgba(166, 61, 50, 0.08); }
        }

        .sos-panel {
            position: fixed;
            right: clamp(0.75rem, 2vw, 1.5rem);
            bottom: 4.5rem;
            z-index: 41;
            width: min(calc(100vw - 1.5rem), 320px);
            padding: 1rem;
            border: 1px solid #f0c8c5;
            border-radius: 16px;
            background: #ffffff;
            box-shadow: 0 20px 50px rgba(3, 25, 21, 0.24);
        }

        .sos-panel h2 { color: #7f241d; font-size: 0.9rem; font-weight: 900; }
        .sos-panel p { margin-top: 0.35rem; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
        .sos-panel button { margin-top: 0.8rem; width: 100%; min-height: 38px; border-radius: 9px; background: #a63d32; color: #ffffff; font-size: 0.7rem; font-weight: 800; }

        .sos-waiting-card,
        .sos-ack-card { width: min(92vw, 480px); padding: 1.75rem; border-radius: 22px; background: #ffffff; text-align: center; box-shadow: 0 28px 80px rgba(3, 25, 21, 0.32); }
        .sos-waiting-card { border: 1px solid #f0c8c5; }
        .sos-ack-card { border: 1px solid #a7f3d0; border-top: 5px solid #059669; }
        .sos-status-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(3, 15, 13, 0.72); backdrop-filter: blur(10px); }
        .sos-status-overlay.hidden { display: none; }
        .sos-status-icon { display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 50%; font-size: 1.6rem; }
        .sos-waiting-card .sos-status-icon { color: #a63d32; background: #fff0ef; animation: sosPulse 1.4s ease-in-out infinite; }
        .sos-ack-card .sos-status-icon { color: #047857; background: #d1fae5; }
        .sos-status-overlay h2 { color: #0b2b26; font-size: 1.2rem; font-weight: 900; }
        .sos-status-overlay p { margin-top: 0.55rem; color: #64736f; font-size: 0.78rem; line-height: 1.6; }
        .sos-ack-card > p {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: clamp(0.56rem, 1.45vw, 0.72rem);
            line-height: 1.35;
        }
        .sos-ack-card button { width: 100%; min-height: 44px; margin-top: 1.25rem; border-radius: 10px; background: #059669; color: #ffffff; font-size: 0.76rem; font-weight: 900; }
        @keyframes sosPulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(166, 61, 50, 0.08); } }

        @media print {
            #step-success.hidden,
            #step-success.print-only-ticket { display: block !important; visibility: visible !important; }
            #step-success .print-card { display: block !important; visibility: visible !important; }
        }

        @media (max-width: 700px) {
            .onboarding-screen { border-radius: 18px; }
            .onboarding-grid { grid-template-columns: 1fr; }
            .onboarding-card { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; }
            .onboarding-card strong { margin-top: 0; }
            .onboarding-card span { grid-column: 2; }
            .onboarding-card:not(:last-child)::after { top: auto; right: auto; bottom: -0.7rem; left: 1.25rem; width: 0; height: 0.7rem; border-top: 0; border-left: 1px dashed #c9a64c; }
            .onboarding-topbar { align-items: flex-start; }
            .onboarding-tenant-name { font-size: 0.64rem; }
            .onboarding-online { font-size: 0.56rem; }
        }

        @media (prefers-reduced-motion: reduce) {
            .sos-launcher, .onboarding-card, .onboarding-start { animation: none; transition: none; }
        }

        @media (min-width: 480px) {
            .onboarding-screen {
                display: grid;
                grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
                grid-template-areas:
                    "topbar topbar"
                    "eyebrow steps"
                    "title steps"
                    "subtitle steps"
                    "start steps";
                column-gap: clamp(1.25rem, 4vw, 3.25rem);
                align-items: center;
                text-align: left;
                padding: clamp(1.25rem, 4vw, 2.5rem);
                width: min(calc(100vw - 2rem), 1120px);
                box-sizing: border-box;
                min-height: 420px;
            }

            .onboarding-screen > .onboarding-topbar { grid-area: topbar; }
            .onboarding-screen > .onboarding-eyebrow { grid-area: eyebrow; }
            .onboarding-screen > .onboarding-title { grid-area: title; }
            .onboarding-screen > .onboarding-subtitle { grid-area: subtitle; }
            .onboarding-screen > .onboarding-start { grid-area: start; }

            .onboarding-title,
            .onboarding-subtitle { margin-left: 0; margin-right: 0; }
            .onboarding-eyebrow,
            .onboarding-title,
            .onboarding-subtitle {
                width: 100%;
                margin-left: auto;
                margin-right: auto;
                text-align: center !important;
                justify-self: stretch;
            }
            .onboarding-title { font-size: clamp(1.45rem, 4vw, 2.35rem); }
            .onboarding-grid {
                grid-area: steps;
                display: grid;
                grid-template-columns: 1fr;
                gap: 0.7rem;
                width: 100%;
                margin-top: 0;
            }
            .onboarding-card {
                display: grid;
                grid-template-columns: 2.5rem minmax(0, 1fr);
                column-gap: 0.75rem;
                align-items: start;
                padding: 0.8rem;
            }
            .onboarding-card strong { margin-top: 0; }
            .onboarding-card span { grid-column: 2; }
            .onboarding-start {
                width: min(100%, 260px);
                margin-top: 1.15rem;
            }
        }

        @media (min-width: 900px) {
            .onboarding-screen {
                min-height: 430px;
                grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
                grid-template-areas:
                    "topbar topbar"
                    "eyebrow steps"
                    "title steps"
                    "subtitle steps"
                    "start steps";
            }
            .onboarding-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
            .onboarding-card { display: block; padding: 1rem; }
            .onboarding-card strong { margin-top: 0.75rem; }
            .onboarding-card span { grid-column: auto; }
            .onboarding-start { margin-left: auto; margin-right: auto; }
        }

        @media (max-width: 479px) {
            .onboarding-screen { padding: 1.1rem 0.9rem; }
            .onboarding-title { font-size: 1.55rem; }
        }

        @media (min-width: 480px) {
            .onboarding-screen {
                display: block;
                text-align: center;
                min-height: 0;
            }

            .onboarding-screen > .onboarding-topbar,
            .onboarding-screen > .onboarding-eyebrow,
            .onboarding-screen > .onboarding-title,
            .onboarding-screen > .onboarding-subtitle,
            .onboarding-screen > .onboarding-grid,
            .onboarding-screen > .onboarding-start {
                width: 100%;
                max-width: none;
                margin-left: auto;
                margin-right: auto;
            }

            .onboarding-screen > .onboarding-eyebrow { margin-top: 1.4rem; }
            .onboarding-screen > .onboarding-subtitle { margin-top: 0.75rem; }
            .onboarding-screen > .onboarding-grid {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 0.8rem;
                margin-top: 1.35rem;
            }

            .onboarding-screen > .onboarding-start {
                width: min(100%, 260px);
                margin-top: 1.35rem;
            }
        }

        @media (min-width: 480px) and (max-width: 700px) {
            .onboarding-screen > .onboarding-grid {
                grid-template-columns: 1fr;
            }
        }

        body.unified-kiosk {
            min-height: 100dvh;
            overflow-x: hidden !important;
            overflow-y: auto !important;
            justify-content: flex-start;
        }

        .unified-kiosk .unified-workspace {
            height: auto !important;
            min-height: calc(100dvh - 7rem);
            overflow: visible !important;
        }

        .unified-kiosk .unified-workspace > #step-camera:not(.hidden),
        .unified-kiosk .unified-workspace > #step-form:not(.hidden) {
            height: auto !important;
            min-height: 0;
            max-height: none !important;
            overflow: visible !important;
        }

        .unified-kiosk .unified-workspace > #step-form:not(.hidden) {
            display: block !important;
        }

        .unified-kiosk .unified-workspace #step-form #checkinForm {
            overflow: visible !important;
            min-height: 0;
        }

@media print {
    @page { size: 80mm 200mm; margin: 0; }
    * { box-sizing: border-box; }
    body { width: 80mm; margin: 0; padding: 5mm 4mm 4mm; color: #111827; background: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 9px; line-height: 1.25; }
    .receipt { width: 100%; }
    .center { text-align: center; }
    .eyebrow { display: block; color: #374151; font-size: 8px; font-weight: 700; letter-spacing: .03em; }
    h1 { margin: 2px 0 0; font-size: 11px; letter-spacing: .02em; }
    .timestamp { margin-top: 5px; color: #4b5563; font: 700 8px monospace; }
    .divider { border-top: 1px dashed #111827; margin: 6px 0; }
    .identity { display: flex; align-items: flex-start; gap: 8px; text-align: left; }
    .person-photo { width: 16mm; height: 24mm; flex: 0 0 auto; object-fit: cover; border: 1px solid #9ca3af; }
    .person-photo-empty { display: flex; align-items: center; justify-content: center; color: #9ca3af; background: #f3f4f6; }
    .identity-copy { min-width: 0; flex: 1; }
    .label { display: block; color: #6b7280; font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
    .party-name { margin-top: 2px; font-size: 10px; font-weight: 800; line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
    .role { margin-top: 4px; font-size: 8px; font-weight: 700; }
    .phone { margin-top: 4px; color: #374151; font: 700 7px monospace; }
    .detail { text-align: left; font-family: monospace; }
    .detail-row { margin: 4px 0; }
    .detail-value { display: block; margin-top: 1px; font-size: 9px; font-weight: 700; overflow-wrap: anywhere; }
    .barcode { display: flex; justify-content: center; padding: 2px 0; }
    .barcode svg { width: 58mm; max-width: 58mm; height: 12mm; }
    .notice { margin-top: 5px; color: #374151; font-size: 8px; line-height: 1.3; text-align: center; }
    .muted { margin: 4px 0 0; color: #6b7280; font-size: 7px; text-align: center; }
}

/* Compact SaaS header for tablet and mobile screens. */
@media screen and (max-width: 1024px) {
    .public-shell {
        min-height: 4.25rem;
        padding: 0.65rem 1rem !important;
        gap: 0.75rem !important;
        align-items: center !important;
    }
    .public-shell > div:first-child {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 0.65rem !important;
    }
    .public-shell > div:first-child > div:first-child {
        padding: 0.35rem !important;
        border-radius: 0.75rem !important;
    }
    .public-shell > div:first-child img {
        width: 2.25rem;
        height: 2.25rem;
    }
    .header-brand-copy {
        min-width: 0;
        gap: 0.18rem !important;
    }
    .header-brand-copy > div:first-child {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
    }
    .header-brand-copy > div:first-child span:first-child {
        flex: 0 0 auto;
        font-size: 0.82rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.07em !important;
    }
    .header-brand-copy > div:first-child span:nth-child(2) {
        overflow: hidden;
        max-width: 7.5rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0.22rem 0.45rem !important;
        font-size: 0.5rem !important;
        letter-spacing: 0.07em !important;
    }
    .header-brand-copy > p {
        max-width: 16rem;
        overflow: hidden;
        color: #fcd34d !important;
        font-size: 0.55rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.11em !important;
        line-height: 1.1 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .idle-countdown-banner {
        min-width: 0;
        max-width: 12rem;
        margin-left: auto;
        padding: 0.45rem 0.6rem !important;
        border-radius: 0.7rem;
        font-size: 0.59rem !important;
        line-height: 1.15;
        white-space: nowrap;
    }
    #idleCountdownText {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media screen and (max-width: 639px) {
    .public-shell {
        min-height: 3.9rem;
        padding: 0.55rem 0.75rem !important;
        gap: 0.45rem !important;
    }
    .public-shell > div:first-child {
        gap: 0.5rem !important;
    }
    .public-shell > div:first-child > div:first-child {
        padding: 0.3rem !important;
    }
    .public-shell > div:first-child img {
        width: 2rem;
        height: 2rem;
    }
    .header-brand-copy > div:first-child span:first-child {
        font-size: 0.72rem !important;
        letter-spacing: 0.05em !important;
    }
    .header-brand-copy > div:first-child span:nth-child(2) {
        max-width: 6.4rem;
        padding: 0.18rem 0.35rem !important;
        font-size: 0.44rem !important;
    }
    .header-brand-copy > p {
        max-width: 12.5rem;
        font-size: 0.47rem !important;
        letter-spacing: 0.08em !important;
    }
    .idle-countdown-banner {
        max-width: 7.8rem;
        padding: 0.38rem 0.45rem !important;
        font-size: 0.51rem !important;
    }
    .idle-countdown-banner .idle-countdown-dot {
        width: 0.38rem;
        height: 0.38rem;
    }
}

/* Final onboarding presentation layer: four-up desktop process, two-up tablet, stacked mobile. */
.onboarding-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 1.75rem !important;
}
.onboarding-card {
    min-height: 12.25rem;
    padding: 1.25rem !important;
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    border-radius: 1.1rem !important;
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.035), 0 1px 3px rgba(15, 23, 42, 0.025) !important;
    backdrop-filter: blur(12px);
    transition: transform 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out, background-color 300ms ease-out;
}
.onboarding-card:hover {
    transform: translateY(-0.375rem);
    border-color: rgba(202, 156, 42, 0.6) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), 0 3px 8px rgba(15, 23, 42, 0.035) !important;
}
.onboarding-card::before {
    top: 1rem;
    right: 1rem;
    color: #a87512;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.onboarding-card:not(:last-child)::after {
    top: 50%;
    right: -1.5rem;
    width: 1.5rem;
    border: 0;
    border-top: 1px dashed rgba(202, 156, 42, 0.58);
    background: linear-gradient(90deg, rgba(202, 156, 42, 0.15), rgba(202, 156, 42, 0.65), rgba(202, 156, 42, 0.15));
}
.onboarding-card-icon {
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(202, 156, 42, 0.18);
    border-radius: 0.9rem;
    color: #0b3b33;
    background: rgba(245, 190, 48, 0.16);
}
.onboarding-card strong {
    margin-top: 1rem !important;
    color: #102c32 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}
.onboarding-card span {
    margin-top: 0.45rem !important;
    color: #64747a !important;
    font-size: 0.75rem !important;
    line-height: 1.65 !important;
}
@media (min-width: 701px) and (max-width: 1024px) {
    .onboarding-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .onboarding-card:nth-child(2)::after { top: auto; right: auto; bottom: -1.5rem; left: 50%; width: 0; height: 1.5rem; border-top: 0; border-left: 1px dashed rgba(202, 156, 42, 0.58); }
    .onboarding-card:nth-child(3)::after { display: none; }
}
@media (max-width: 700px) {
    .onboarding-grid { grid-template-columns: 1fr !important; gap: 0.85rem !important; }
    .onboarding-card { min-height: 0; padding: 1rem !important; }
    .onboarding-card:not(:last-child)::after { top: auto; right: auto; bottom: -0.85rem; left: 1.5rem; width: 0; height: 0.85rem; border-top: 0; border-left: 1px dashed rgba(202, 156, 42, 0.58); }
}
