body {
    margin: 0;
    text-align: center;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: white;
}


/* ==================================================
   Settings menu
   ================================================== */

#settings-container {
    position: fixed;
    top: max(clamp(8px, 2vw, 16px), env(safe-area-inset-top));
    left: max(clamp(8px, 2vw, 16px), env(safe-area-inset-left));
    z-index: 100002;
    text-align: left;
}

#settings-button {
    width: clamp(40px, 10vw, 52px);
    height: clamp(40px, 10vw, 52px);
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #173b68;
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

#settings-button.settings-dark {
    background: transparent;
    color: #f2f2f2;
    border: none;
    box-shadow: none;
}

#settings-menu.settings-dark {
    background: rgba(30, 30, 30, 0.98);
    border-color: #555555;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

#settings-menu.settings-dark .settings-item label {
    color: #f2f2f2;
}

#settings-menu.settings-dark #language-select {
    background: #242424;
    color: #f2f2f2;
    border-color: #555555;
}

#settings-menu {
    position: absolute;
    top: calc(clamp(40px, 10vw, 52px) + clamp(6px, 1.5vw, 10px));
    left: 0;
    width: clamp(220px, 72vw, 300px);
    padding: clamp(10px, 3vw, 16px);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #d9e4f2;
    border-radius: clamp(8px, 2.5vw, 12px);
    box-shadow: 0 6px 20px rgba(25, 55, 90, 0.18);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 3vw, 20px);
}

.settings-item label {
    color: #222;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: 600;
    white-space: nowrap;
}

#language-select {
    padding: clamp(6px, 1.5vw, 9px) clamp(7px, 2vw, 10px);
    border: 1px solid #cfd9e6;
    border-radius: clamp(6px, 2vw, 8px);
    background: white;
    color: #222;
    font-size: clamp(14px, 3.8vw, 17px);
    cursor: pointer;
}

#settings-emergency-item {
    margin-top: clamp(8px, 2vw, 12px);
    padding-top: clamp(8px, 2vw, 12px);
    border-top: 1px solid #e2e7ec;
}

#settings-emergency-button {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: #173b68;
    font-size: clamp(14px, 3.8vw, 17px);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

#settings-emergency-panel {
    margin-top: clamp(8px, 2vw, 12px);
}

#settings-emergency-panel label {
    display: block;
    margin: clamp(6px, 1.5vw, 9px) 0 clamp(4px, 1vw, 6px);
    color: #222;
    font-size: clamp(12px, 3.4vw, 15px);
    font-weight: 600;
}

#settings-emergency-country,
#settings-emergency-phone {
    width: 100%;
    padding: clamp(6px, 1.6vw, 9px);
    box-sizing: border-box;
    border: 1px solid #cfd9e6;
    border-radius: clamp(6px, 2vw, 8px);
    background: white;
    color: #222;
    font-size: 16px;
}

#settings-emergency-actions {
    display: flex;
    gap: clamp(6px, 2vw, 10px);
    margin-top: clamp(10px, 2.5vw, 14px);
}

#settings-emergency-cancel,
#settings-emergency-save {
    flex: 1;
    padding: clamp(7px, 1.8vw, 10px);
    border-radius: clamp(6px, 2vw, 8px);
    font-size: clamp(13px, 3.6vw, 16px);
    cursor: pointer;
}

#settings-emergency-cancel {
    border: 1px solid #cfd9e6;
    background: white;
    color: #555;
}

#settings-emergency-save {
    border: none;
    background: #1677ff;
    color: white;
}

#settings-emergency-message {
    min-height: 1.2em;
    margin-top: clamp(6px, 1.5vw, 8px);
    font-size: clamp(11px, 3.2vw, 14px);
}

#settings-menu.settings-dark #settings-emergency-item {
    border-top-color: #555;
}

#settings-menu.settings-dark #settings-emergency-button,
#settings-menu.settings-dark #settings-emergency-panel label {
    color: #f2f2f2;
}

#settings-menu.settings-dark #settings-emergency-country,
#settings-menu.settings-dark #settings-emergency-phone,
#settings-menu.settings-dark #settings-emergency-cancel {
    background: #242424;
    color: #f2f2f2;
    border-color: #555;
}


@media (max-width: 380px) {
    #settings-container {
        top: max(clamp(5px, 1.8vw, 7px), env(safe-area-inset-top));
        left: max(clamp(5px, 1.8vw, 7px), env(safe-area-inset-left));
    }

    #settings-button {
        width: clamp(30px, 9vw, 34px);
        height: clamp(30px, 9vw, 34px);
        border-radius: clamp(6px, 2vw, 7px);
        font-size: clamp(17px, 5vw, 20px);
    }

    #settings-menu {
        top: calc(clamp(30px, 9vw, 34px) + clamp(5px, 1.5vw, 7px));
        width: clamp(210px, 72vw, 250px);
        padding: clamp(7px, 2.5vw, 10px);
    }

    .settings-item {
        gap: clamp(6px, 2vw, 9px);
    }

    .settings-item label {
        font-size: clamp(12px, 3.6vw, 14px);
    }

    #language-select {
        padding: clamp(4px, 1.3vw, 6px) clamp(5px, 1.6vw, 7px);
        font-size: 16px;
    }
}

/* ==================================================
   设备方向错误提示页面
   ================================================== */

#orientation-block-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;

    display: none;
    align-items: flex-start;
    justify-content: center;

    padding: 24px;
    box-sizing: border-box;
    
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    background: #000000;
    color: #ffffff;

    z-index: 99999;
}

#orientation-block-screen p {
    margin: auto 0;

    color: #ffffff;
    font-size: clamp(26px, 7vw, 42px);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}


/* ==================================================
   Registration screen
   ================================================== */

#registration-screen {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}

#registration-screen h1 {
    font-size: 34px;
    margin-bottom: 40px;
}

.registration-box {
    max-width: 500px;
    margin: auto;
}

.registration-label {
    display: block;
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 10px;
}

#country {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    box-sizing: border-box;
}

#phone {
    width: 100%;
    padding: 15px;
    font-size: 22px;
    box-sizing: border-box;
}

#invitation-code-row {
    width: 100%;

    display: flex;
    align-items: stretch;

    gap: clamp(8px, 2vw, 12px);
}


#invitation-code {
    flex: 1;
    min-width: 0;

    padding: clamp(12px, 3vw, 15px);

    font-size: clamp(18px, 4.5vw, 22px);

    box-sizing: border-box;
}


#request-invitation-button {
    flex-shrink: 0;

    padding:
        0
        clamp(14px, 4vw, 22px);

    border: none;

    background: #1677ff;
    color: white;

    border-radius: 8px;

    font-size: clamp(16px, 4vw, 20px);

    white-space: nowrap;

    cursor: pointer;
}

#register-button {
    width: 100%;
    margin-top: 35px;
    padding: 18px;
    font-size: 24px;
    border: none;
    background: #1677ff;
    color: white;
    border-radius: 10px;
}

#registration-message {
    margin-top: 20px;
    font-size: 20px;
    color: red;
}


/* ==================================================
   Main screening screen
   Camera/video stays alive all the time
   ================================================== */

#screening-screen {
    display: none;
    padding-top: 10px;
}

#screening-title {
    font-size: clamp(24px, 5vw, 34px);
    margin:
        clamp(4px, 1.2vh, 10px)
        clamp(6px, 1.5vw, 10px);
}

body.phone-layout
#screening-title
.screening-title-ai {
    color: #1677ff;
}

/* ==================================================
   Screening progress
   ================================================== */
#screening-progress {
    display: none;
}

body.pad-layout #screening-progress {

    display: flex;
    align-items: center;
    justify-content: center;

    width: 82vw;

    margin: 20px auto 25px auto;
}


body.pad-layout .progress-step {

    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 90px;
}


body.pad-layout .progress-circle {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    border: 3px solid #d0d5d9;

    background: white;
    color: #777777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: bold;

    box-sizing: border-box;
}


body.pad-layout .progress-label {

    margin-top: 8px;

    font-size: 18px;
    color: #666666;

    white-space: nowrap;
}


body.pad-layout .progress-line {

    flex: 1;

    height: 3px;

    background: #d0d5d9;

    margin: 0 12px 28px 12px;
}

/* Current active step */

body.pad-layout .progress-step.active
.progress-circle {

    border-color: #22a447;

    background: #22a447;

    color: white;
}


body.pad-layout .progress-step.active
.progress-label {

    color: #17863a;

    font-weight: bold;
}


/* Completed step */

body.pad-layout .progress-step.completed
.progress-circle {

    border-color: #22a447;

    background: white;

    color: #22a447;
}


body.pad-layout .progress-step.completed
.progress-label {

    color: #17863a;
}


#instruction {
    font-size: 24px;
    min-height: 36px;
}

/* Phone only */
body.phone-layout #instruction {
    width: calc(100% - clamp(16px, 5vw, 28px));
    height: clamp(72px, 11dvh, 88px);
    margin: clamp(6px, 1.5dvh, 12px) auto;
    padding: 8px clamp(12px, 4vw, 18px);
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 1px solid #d9e4f2;
    border-radius: clamp(10px, 3vw, 14px);
    box-shadow: 0 3px 10px rgba(25, 55, 90, 0.10);

    color: #173b68;
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Phone arm instruction: three independent status items */
body.phone-layout #instruction .arm-instruction-status {

    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap:
        clamp(0.3rem, 1.5vw, 0.6rem)
        clamp(0.5rem, 2.5vw, 0.9rem);
}


body.phone-layout #instruction .arm-instruction-item {

    font-size:
        clamp(0.95rem, 4.5vw, 1.35rem);

    line-height: 1.3;

    color: #C98A2E;

    white-space: nowrap;
}


body.phone-layout #instruction .arm-instruction-item.correct {

    color: #17863a;
}


/* Phone top card: correct or normal result */
body.phone-layout #instruction.phone-result-success {
    color: #17863a;
    background: #effbf2;
    border-color: #22a447;
}

/* Phone top card: failed or abnormal result */
body.phone-layout #instruction.phone-result-error {
    color: #b42318;
    background: #fff1f0;
    border-color: #e5484d;
}

/* Phone: result text is already shown in the top card */
body.phone-layout #result {
    display: none;
}

/* Tablet and desktop only */        
body.pad-layout #instruction {

    min-height: 0;

    margin: 6px 0 10px 0;
}

#camera-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 640px;
}

#camera {
    width: 100%;
    display: block;
    transform: scaleX(-1);
}

body.phone-layout #camera {
    max-height: clamp(320px, 80dvh, 560px);
    object-fit: contain;
}

#face-guide {
    position: absolute;

    width: auto;
    height: 65%;
    aspect-ratio: 7/10;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    border: 5px solid red;
    border-radius: 50%;

    box-sizing: border-box;
    
    overflow: hidden;
    color: red;
    background: color-mix(in srgb, currentColor 10%, transparent);
}

#face-progress-svg {
    position: absolute;
    inset: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
}

#face-progress-ellipse {
    fill: none;
    stroke: #39FF6A;
    stroke-width: 6;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

#face-guide.face-progress-active #face-progress-svg {
    opacity: 1;
}

#face-guide.face-progress-active {
    border-color: transparent !important;
    overflow: visible;
}

#face-guide::after {
    content: "";

    position: absolute;

    left: 8%;
    width: 84%;

    height: clamp(2px, 0.6vw, 4px);

    top: 8%;

    background: currentColor;

    box-shadow:
        0 0 0.35rem currentColor,
        0 0 0.8rem currentColor;

    border-radius: 999px;

    opacity: 0.85;

    pointer-events: none;

    animation: face-guide-scan 2.2s linear infinite;
}


@keyframes face-guide-scan {

    0% {
        top: 8%;
        opacity: 0.3;
    }

    10% {
        opacity: 0.9;
    }

    90% {
        opacity: 0.9;
    }

    100% {
        top: 92%;
        opacity: 0.3;
    }
}


/* ==================================================
   Phone arm-check face guide
   ================================================== */

#arm-face-guide {
    display: none;
}

body.phone-layout #arm-face-guide {
    position: absolute;

    left: 50%;
    transform: translateX(-50%);

    width: 30%;
    height: 38%;

    border:
        clamp(3px, 0.9vw, 5px)
        solid
        red;

    border-radius: 50%;

    box-sizing: border-box;

    background: rgba(255, 0, 0, 0.10);

    pointer-events: none;

    z-index: 30;
}

#arm-face-alignment-hint {
    display: none;
}

body.phone-layout #arm-face-alignment-hint {
    position: absolute;

    left: 50%;
    top: -2.2rem;
    transform: translateX(-50%);

    color: #ff3b30;
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
    font-weight: 700;
    white-space: nowrap;

    pointer-events: none;
    z-index: 2;
}




#phone-pitch-guide {
    display: none;
}

body.phone-layout #phone-pitch-guide {
    position: absolute;

    top: 1%;
    left: 50%;
    transform: translateX(-50%);

    width: clamp(190px, 58vw, 280px);
    height: auto;

    pointer-events: none;

    z-index: 45;
}



#arm-face-ghost-canvas {
    display: none;
}

body.phone-layout #arm-face-ghost-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 33;
}



body.phone-layout #phone-arm-guide-image {

    position: absolute;

    top: clamp(8px, 1.5dvh, 16px);
    right: clamp(8px, 2.5vw, 14px);

    width: clamp(90px, 26vw, 150px);
    height: auto;

    border-radius: clamp(8px, 2vw, 12px);

    z-index: 40;

    pointer-events: none;
}

.arm-box {
    position: absolute;
    border: 5px solid red;
    box-sizing: border-box;
    display: none;
}

body.phone-layout #phone-left-touch-area,
body.phone-layout #phone-right-touch-area {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(5.2rem, 27vw, 7.2rem);
    height: clamp(8rem, 40vw, 10.5rem);
    display: none;
    box-sizing: border-box;
    border: none;
    border-radius: 50%;
    background: transparent;
    --touch-color: rgba(255, 30, 30, 0.78);
    z-index: 35;
    touch-action: none;
}

body.phone-layout #phone-left-touch-area::before,
body.phone-layout #phone-right-touch-area::before {
    content: "";
    position: absolute;
    inset: 12%;
    background: var(--touch-color);
    -webkit-mask: var(--fingerprint-mask, none) center / contain no-repeat;
    mask: var(--fingerprint-mask, none) center / contain no-repeat;
    filter: drop-shadow(0 0 8px var(--touch-color)) drop-shadow(0 0 14px var(--touch-color));
    pointer-events: none;
}

body.phone-layout .phone-touch-label {
    position: absolute;
    left: 50%;
    top: 0.9rem;
    transform: translateX(-50%);
    color: var(--touch-color);
    font-size: clamp(1.2rem, 5.5vw, 1.5rem);
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

body.phone-layout #phone-left-touch-area::after,
body.phone-layout #phone-right-touch-area::after {
    content: "";
    position: absolute;
    top: 50%;
    width: clamp(3.4rem, 16vw, 4.4rem);
    height: clamp(2.1rem, 10vw, 2.8rem);
    box-shadow: inset 0 0 0 2px rgba(120, 70, 45, 0.18), 0 4px 12px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    z-index: 2;
}

body.phone-layout #phone-left-touch-area::after {
    left: -5rem;
    border-radius: 12% 55% 55% 12%;
    background:linear-gradient(#f7ddd0 0 0) right 12% center/clamp(1.15rem,5.5vw,1.45rem) clamp(1.15rem,5.5vw,1.45rem) no-repeat,linear-gradient(90deg,#d99b76,#f4c7a4);
    transform: translateY(-50%) rotate(-40deg);
    animation: left-thumb-press 1.8s ease-in-out infinite;
}

body.phone-layout #phone-right-touch-area::after {
    right: -5rem;
    border-radius: 55% 12% 12% 55%;
    background:linear-gradient(#f7ddd0 0 0) left 12% center/clamp(1.15rem,5.5vw,1.45rem) clamp(1.15rem,5.5vw,1.45rem) no-repeat,linear-gradient(90deg,#f4c7a4,#d99b76);
    transform: translateY(-50%) rotate(40deg);
    animation: right-thumb-press 1.8s ease-in-out infinite;
}

@keyframes left-thumb-press {
    0%, 18% {
        transform: translate(-1rem, calc(-50% + 2rem)) rotate(-40deg) scale(1);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    60%, 75% {
        transform: translate(5.4rem, calc(-50% - 0.8rem)) rotate(-40deg) scale(0.92);
        opacity: 1;
    }

    100% {
        transform: translate(-1rem, calc(-50% + 2rem)) rotate(-40deg) scale(1);
        opacity: 0;
    }
}

@keyframes right-thumb-press {
    0%, 18% {
        transform: translate(1rem, calc(-50% + 2rem)) rotate(40deg) scale(1);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    60%, 75% {
        transform: translate(-5.4rem, calc(-50% - 0.8rem)) rotate(40deg) scale(0.92);
        opacity: 1;
    }

    100% {
        transform: translate(1rem, calc(-50% + 2rem)) rotate(40deg) scale(1);
        opacity: 0;
    }
}

body.phone-layout #phone-left-touch-area.pressed::after,
body.phone-layout #phone-right-touch-area.pressed::after {
    animation: none;
    opacity: 0;
}

body.phone-layout #phone-left-touch-area.pressed .phone-touch-label,
body.phone-layout #phone-right-touch-area.pressed .phone-touch-label {
    display: none;
}

body.phone-layout #phone-left-touch-area {
    left: 0;
}

body.phone-layout #phone-right-touch-area {
    right: 0;
}

.landmark-point {

    position: absolute;

    width: clamp(8px, 0.75vw, 14px);
    height: clamp(8px, 0.75vw, 14px);

    border-radius: 50%;

    background: yellow;
    
    opacity: 1;

    transform: translate(
        -50%,
        -50%
    );

    display: none;

    z-index: 20;
}

/* Shoulder and elbow landmarks:
   solid centre point + large faint outer circle */
#left-shoulder-point,
#right-shoulder-point,
#left-elbow-point,
#right-elbow-point{
    width: clamp(0.5rem, 2.2vw, 0.8rem);
    height: clamp(0.5rem, 2.2vw, 0.8rem);
    opacity: 1;
    color: currentColor;
}


#left-shoulder-point::after,
#right-shoulder-point::after,
#left-elbow-point::after,
#right-elbow-point::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(1.8rem, 7vw, 3rem);
    height: clamp(1.8rem, 7vw, 3rem);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border:
        clamp(0.08rem, 0.35vw, 0.14rem)
        solid
        currentColor;

    background:
        color-mix(
            in srgb,
            currentColor 15%,
            transparent
        );

    opacity: 1;

    box-sizing: border-box;

    pointer-events: none;
}


.point-line {

    position: absolute;

    height: 0;

    border-top:
        clamp(2px, 0.22vw, 4px)
        dashed;
        
    opacity: 0.9;

    transform-origin: 0 50%;

    display: none;

    z-index: 15;
}


#result {
    font-size: clamp(20px, 1.6vw, 30px);
    margin: clamp(10px, 1.2vw, 20px);
    font-weight: bold;
    line-height: 1.4;
}

body.pad-layout #result:empty {
    display: none;
}


/* ==================================================
   Result card
   Pad / Tablet / Desktop only
   ================================================== */

#result-card-title {
    display: none;
}


body.pad-layout #result-card {

    width: 100%;
    min-height: 0;

    margin: 0;

    box-sizing: border-box;

    padding:
        clamp(18px, 1.8vw, 30px)
        clamp(16px, 1.6vw, 26px);

    background: white;

    border: 1px solid #e4e8eb;

    border-radius: 20px;

    box-shadow:
        0 8px 28px
        rgba(0, 0, 0, 0.08);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: space-between;

    text-align: center;
    
    overflow-y: auto;
    overflow-x: hidden;
}

body.pad-layout #result-card > * {
    flex-shrink: 0;
}


body.pad-layout #result-card-title {

    display: block;

    font-size: clamp(20px, 1.5vw, 28px);

    font-weight: 700;

    color: #222;

    margin-bottom: clamp(14px, 1.4vw, 24px);
}

#result-status-icon,
#result-medical-advice,
#result-complete-message,
#result-disclaimer,
#result-restart-message {
    display: none;
}

body.pad-layout #result-status-icon {

    width: clamp(68px, 6vw, 88px);
    height: clamp(68px, 6vw, 88px);

    border-radius: 50%;

    background: #22a447;

    color: white;

    align-items: center;
    justify-content: center;

    font-size: clamp(38px, 3.8vw, 50px);

    font-weight: 700;

    line-height: 1;

    margin-bottom: clamp(10px, 1vh, 16px);

    box-shadow:
        0 0 0 8px
        rgba(34, 164, 71, 0.12);
}

body.pad-layout #result-medical-advice {

    font-size: 18px;

    line-height: 1.6;

    color: #d32f2f;

    font-weight: 600;

    text-align: center;
}

/* ==================================================
   Position guide images
   Pad / Tablet / Desktop only
   ================================================== */

body.pad-layout #result-face-image {

    width: auto;
    height: 53%;

    max-height: 53%;

    object-fit: contain;

    flex: 1 1 0;
    min-height: 0;
}

body.pad-layout #result-arm-image {

    width: auto;
    height: 55%;

    max-width: 92%;
    max-height: 55%;

    object-fit: contain;

    align-self: center;

    flex-shrink: 1;

    margin:
        clamp(4px, 0.8vh, 10px)
        auto;
}
        

body.pad-layout #result-face-instruction {

    width: 100%;
    max-width: 100%;

    box-sizing: border-box;

    padding: clamp(8px, 0.8vw, 14px);

    background: #eef1ed;

    border-radius: clamp(10px, 0.8vw, 14px);

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.08);

    text-align: left;

    display: flex;
    flex-direction: column;

    gap: clamp(4px, 0.6vh, 8px);
}


body.pad-layout .face-instruction-item {

    display: flex;

    align-items: center;

    gap: 12px;

    margin: 0;

    font-size: clamp(16px, 1.35vw, 26px);

    line-height: 1.5;

    color: #2f2f2f;

    font-weight: 600;
    
    white-space: nowrap;
}


body.pad-layout .face-instruction-marker {

    color: #22a447;

    font-size: 28px;

    line-height: 1;

    flex-shrink: 0;
}

body.pad-layout #result-face-status {

    width: 88%;

    box-sizing: border-box;

    padding-top: 18px;

    border-top: 1px solid #e5e8ea;

    font-size: 17px;

    line-height: 1.6;

    color: #777;

    text-align: center;

    font-weight: 500;
}

body.pad-layout #result-arm-instruction {

    width: 88%;

    box-sizing: border-box;

    padding: 18px 16px;

    background: #eef1ed;

    border-radius: 14px;

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.06);

    font-size: 18px;

    line-height: 1.7;

    color: #2f2f2f;

    font-weight: 600;

    text-align: center;
}

body.pad-layout #result-arm-detail-instruction {

    width: 100%;
    max-width: 100%;

    box-sizing: border-box;

    padding:
        clamp(14px, 0.8vw, 24px);

    background: #eef1ed;

    border-radius:
        clamp(10px, 0.8vw, 14px);

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.08);

    text-align: left;
}


body.pad-layout .arm-instruction-item {

    display: flex;

    align-items: center;

    gap: 12px;

    margin:
        clamp(1px, 0.5vh, 9px)
        0;

    font-size: clamp(16px, 1.35vw, 26px);

    line-height: 1.5;

    color: #2f2f2f;

    font-weight: 600;
    
    white-space: nowrap;
}


body.pad-layout .arm-instruction-marker {

    color: #e58a00;

    font-size: 28px;

    line-height: 1;

    flex-shrink: 0;
}


body.pad-layout #result-pending-note {

    width: 100%;

    box-sizing: border-box;

    padding-top: clamp(6px, 0.7vh, 10px);

    border-top: 1px solid #e5e8ea;

    font-size: clamp(14px, 1vw, 17px);

    line-height: 1.7;

    color: #777;

    text-align: center;
}


body.pad-layout #result-arm-status {

    font-size: 17px;

    line-height: 1.6;

    color: #e58a00;

    font-weight: 600;

    text-align: center;
}

body.pad-layout #result-complete-message {

    font-size: 18px;

    line-height: 1.7;

    color: #666;

    margin-top: 4px;
}


body.pad-layout #result-disclaimer {

    width: 100%;

    box-sizing: border-box;

    margin-top: 0;

    padding-top: 20px;

    border-top: 1px solid #e5e8ea;

    font-size: 16px;

    line-height: 1.7;

    color: #666;
}


body.pad-layout #result-restart-message {

    margin-top: 0;

    font-size: 17px;

    color: #22a447;

    font-weight: 600;
}

/* ==================================================
   Main screening layout
   Pad / Tablet / Desktop only
   ================================================== */

body.pad-layout #screening-main {

    width: 90vw;
    
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 2.6fr)
        minmax(280px, 1fr);

    gap: 24px;

    align-items: start;
}


body.pad-layout #camera-container {

    width: 100%;

    max-width: none;

    margin: 0;
}

/* Face status banner */

body.pad-layout #camera-face-banner {

    position: absolute;

    top: 18px;
    left: 50%;

    transform: translateX(-50%);

    width: auto;
    min-width: 58%;
    max-width: 82%;

    box-sizing: border-box;

    padding: 14px 24px;

    background: rgba(255, 235, 235, 0.95);

    border: 1px solid
        rgba(220, 60, 60, 0.30);

    border-radius: 14px;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.10);

    align-items: center;
    justify-content: center;

    gap: 12px;

    font-size: 28px;
    font-weight: 600;

    color: #a52222;

    text-align: center;

    white-space: nowrap;

    z-index: 30;
}

/* ==================================================
   Arm status banner inside camera
   Pad / Tablet / Desktop only
   ================================================== */

body.pad-layout #camera-arm-banner {

    position: absolute;

    top: 18px;
    left: 50%;

    transform: translateX(-50%);

    width: auto;
    min-width: 48%;
    max-width: 82%;

    box-sizing: border-box;

    padding: 14px 24px;

    background: rgba(255, 243, 220, 0.94);

    border: 1px solid
        rgba(229, 138, 0, 0.35);

    border-radius: 14px;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.10);

    align-items: center;
    justify-content: center;

    gap: 12px;

    font-size: 28px;
    font-weight: 600;
    
    white-space: nowrap;

    color: #8a5700;

    text-align: center;

    z-index: 30;
}


/* ==================================================
   Boot overlay
   Camera remains running underneath
   ================================================== */

#boot-screen {
    display: flex;
    position: fixed;
    inset: 0;

    background: black;
    color: white;

    z-index: 200;

    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#boot-title,
#boot-subtitle {
    visibility: visible;
}

#boot-title {
    font-size:
        clamp(30px, 8vw, 46px);

    font-weight: bold;
}


#boot-subtitle {
    margin-top:
        clamp(12px, 3vh, 25px);

    font-size:
        clamp(18px, 5vw, 24px);
}


/* ==================================================
   Standby overlay
   Camera remains running underneath
   ================================================== */

#standby-screen {
    display: none;

    position: fixed;
    inset: 0;

    background: black;

    z-index: 100;
}



/* ==================================================
   Emergency question
   ================================================== */

#emergency-panel {
    display: none;
    margin: 25px auto;
    max-width: 600px;
}

#emergency-question {
    font-size: 28px;
    font-weight: bold;
}

.emergency-button {
    width: 42%;
    margin: 20px 2%;
    padding: 25px;

    font-size: 30px;

    border: none;
    border-radius: 15px;
}

#yes-button {
    background: #d60000;
    color: white;
}

#no-button {
    background: #dddddd;
}

/* ==================================================
   Phone emergency actions
   ================================================== */

/* Keep the phone screening screen inside the viewport */
body.phone-layout #screening-screen {
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
}

/* On phones, show the emergency buttons at the bottom */
body.phone-layout #emergency-panel {
    position: fixed;

    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));

    width: auto;
    max-width: none;
    margin: 0;

    padding: 0;
    box-sizing: border-box;

    z-index: 100;
}

/* Hide the question text on phones only */
body.phone-layout #emergency-question {
    display: none;
}

/* Two responsive phone buttons */
body.phone-layout .emergency-button {
    width: 46%;

    margin: 0 1%;
    padding: clamp(14px, 2.5dvh, 20px);

    font-size: clamp(20px, 5.5vw, 26px);
    border-radius: 14px;
}

/* Pad / Tablet / Laptop / Desktop only */
body.pad-layout .emergency-button {
    font-size: clamp(14px, 1.5vw, 30px);
    white-space: nowrap;
}


/* ==================================================
   Phone speech test screen
   Phone only
   ================================================== */

#phone-speech-screen {
    display: none;
}


body.phone-layout #phone-speech-screen {

    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100dvh;

    box-sizing: border-box;

    background: #ffffff;

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 240;
}


body.phone-layout #phone-speech-content {

    width: 100%;
    min-height: 100dvh;

    box-sizing: border-box;

    padding:
        max(
            clamp(10px, 1.5dvh, 18px),
            env(safe-area-inset-top)
        )
        0
        max(
            clamp(16px, 2.5dvh, 24px),
            env(safe-area-inset-bottom)
        );

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Title */

body.phone-layout #phone-speech-title {

    margin:
        clamp(4px, 1dvh, 10px)
        auto
        clamp(6px, 1.2dvh, 12px);

    font-size:
        clamp(24px, 5vw, 34px);

    line-height: 1.25;

    font-weight: 700;

    color: #222222;

    text-align: center;
}


body.phone-layout
#phone-speech-title
.phone-speech-title-ai {

    color: #1677ff;
}


/* Instruction card */

body.phone-layout #phone-speech-instruction {

    width:
        calc(
            100% - clamp(16px, 5vw, 28px)
        );

    min-height:
        clamp(72px, 11dvh, 88px);

    margin:
        clamp(6px, 1.5dvh, 12px)
        auto;

    padding:
        clamp(8px, 1.5dvh, 12px)
        clamp(12px, 4vw, 18px);

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border:
        1px solid #d9e4f2;

    border-radius:
        clamp(10px, 3vw, 14px);

    box-shadow:
        0 3px 10px
        rgba(25, 55, 90, 0.10);

    color: #173b68;

    font-size:
        clamp(18px, 5vw, 22px);

    font-weight: 600;

    line-height: 1.35;

    text-align: center;
}


/* Main speech card */

body.phone-layout #phone-speech-main-card {

    width:
        calc(
            100% - clamp(24px, 8vw, 40px)
        );

    margin:
        clamp(12px, 2dvh, 20px)
        auto
        0;

    padding:
        clamp(20px, 3dvh, 30px)
        clamp(16px, 5vw, 24px);

    box-sizing: border-box;

    background: #f7faff;

    border:
        1px solid #e1eaf5;

    border-radius:
        clamp(16px, 4vw, 22px);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}


body.phone-layout #phone-speech-sentence {

    font-size:
        clamp(22px, 6vw, 30px);

    line-height: 1.6;

    font-weight: 700;

    color: #202b38;

    margin-bottom:
        clamp(24px, 4dvh, 36px);
}


/* Record button */

body.phone-layout #phone-speech-record-button {

    width:
        clamp(76px, 21vw, 96px);

    height:
        clamp(76px, 21vw, 96px);

    padding: 0;

    border: none;

    border-radius: 50%;

    background: #1677ff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 0 0
        clamp(7px, 2vw, 10px)
        rgba(22, 119, 255, 0.12);
}


body.phone-layout #phone-speech-mic-icon {

    font-size:
        clamp(30px, 8vw, 42px);

    line-height: 1;
}


/* Live speech waveform */

body.phone-layout #phone-speech-waveform {

    display: none;

    width:
        min(78vw, 26rem);

    height:
        clamp(3.4rem, 9dvh, 5rem);

    margin-top:
        clamp(0.8rem, 1.8dvh, 1.3rem);

    box-sizing: border-box;

    border: none;

    border-radius:
        clamp(1rem, 4vw, 1.5rem);

    background:
        linear-gradient(
            135deg,
            rgba(22, 119, 255, 0.08),
            rgba(22, 119, 255, 0.03)
        );

    box-shadow:
        inset 0 0 0 0.06rem
            rgba(22, 119, 255, 0.10);

    overflow: hidden;
}



body.phone-layout #phone-speech-record-label {

    margin-top:
        clamp(14px, 2dvh, 20px);

    font-size:
        clamp(18px, 5vw, 22px);

    line-height: 1.4;

    font-weight: 600;

    color: #1677ff;
}


body.phone-layout #phone-speech-status {

    margin-top:
        clamp(18px, 3dvh, 28px);

    font-size:
        clamp(14px, 3.8vw, 18px);

    line-height: 1.5;

    color: #788491;
}


/* ==================================================
   Phone final result screen
   Phone only
   ================================================== */

#phone-result-screen {
    display: none;
}


body.phone-layout #phone-result-screen {

    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100dvh;

    box-sizing: border-box;

    background: #f6f8fb;

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 250;
}


body.phone-layout #phone-result-content {

    width: calc(100% - clamp(24px, 8vw, 40px));
    max-width: 560px;

    min-height: 100dvh;

    margin: 0 auto;

    padding:
        max(
            clamp(18px, 3dvh, 30px),
            env(safe-area-inset-top)
        )
        0
        max(
            clamp(22px, 4dvh, 36px),
            env(safe-area-inset-bottom)
        );

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: stretch;
}


body.phone-layout #phone-result-title {

    margin:
        0
        0
        clamp(16px, 2.5dvh, 24px);

    font-size:
        clamp(24px, 6.5vw, 32px);

    line-height: 1.25;

    font-weight: 700;

    color: #222222;

    text-align: center;
}


/* --------------------------------------------------
   Overall result
   -------------------------------------------------- */

body.phone-layout #phone-overall-result {

    width: 100%;

    padding:
        clamp(18px, 3dvh, 28px)
        clamp(14px, 4vw, 22px);

    box-sizing: border-box;

    background: #effbf2;

    border:
        clamp(1px, 0.35vw, 2px)
        solid
        #22a447;

    border-radius:
        clamp(14px, 4vw, 20px);

    box-shadow:
        0
        clamp(4px, 1dvh, 8px)
        clamp(16px, 4vw, 24px)
        rgba(25, 55, 90, 0.08);

    text-align: center;

    margin-bottom:
        clamp(14px, 2.2dvh, 22px);
}


body.phone-layout #phone-overall-icon {

    width:
        clamp(58px, 16vw, 76px);

    height:
        clamp(58px, 16vw, 76px);

    margin:
        0
        auto
        clamp(10px, 1.6dvh, 16px);

    border-radius: 50%;

    background: #22a447;
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size:
        clamp(34px, 9vw, 46px);

    font-weight: 700;

    line-height: 1;

    box-shadow:
        0 0 0
        clamp(6px, 1.8vw, 9px)
        rgba(34, 164, 71, 0.12);
}


body.phone-layout #phone-overall-text {

    font-size:
        clamp(21px, 5.7vw, 28px);

    line-height: 1.4;

    font-weight: 700;

    color: #17863a;

    overflow-wrap: anywhere;
}


body.phone-layout #phone-overall-label {

    margin-top:
        clamp(5px, 1dvh, 9px);

    font-size:
        clamp(14px, 3.8vw, 18px);

    line-height: 1.4;

    color: #65756a;
}


/* --------------------------------------------------
   Arm / face result cards
   -------------------------------------------------- */

body.phone-layout .phone-result-detail-card {

    width: 100%;

    padding:
        clamp(14px, 2.2dvh, 20px)
        clamp(14px, 4vw, 20px);

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e2e7ec;

    border-radius:
        clamp(12px, 3.5vw, 18px);

    box-shadow:
        0
        clamp(2px, 0.7dvh, 5px)
        clamp(10px, 3vw, 18px)
        rgba(25, 55, 90, 0.07);

    text-align: left;

    margin-bottom:
        clamp(10px, 1.7dvh, 16px);
}


body.phone-layout .phone-result-detail-header {

    display: flex;
    align-items: center;

    gap:
        clamp(7px, 2vw, 10px);

    font-size:
        clamp(18px, 4.8vw, 23px);

    line-height: 1.4;

    font-weight: 700;

    color: #222222;
}


body.phone-layout .phone-result-role {

    padding:
        clamp(2px, 0.5dvh, 4px)
        clamp(7px, 2vw, 10px);

    border-radius: 999px;

    background: #edf2f7;

    color: #5b6875;

    font-size:
        clamp(11px, 3vw, 14px);

    line-height: 1.4;

    font-weight: 600;
}


body.phone-layout .phone-result-detail-text {

    margin-top:
        clamp(8px, 1.3dvh, 12px);

    font-size:
        clamp(17px, 4.5vw, 21px);

    line-height: 1.45;

    font-weight: 700;

    color: #17863a;

    overflow-wrap: anywhere;
}


body.phone-layout .phone-result-detail-description {

    margin-top:
        clamp(4px, 0.8dvh, 8px);

    font-size:
        clamp(14px, 3.8vw, 18px);

    line-height: 1.55;

    color: #66717c;

    overflow-wrap: anywhere;
}


/* --------------------------------------------------
   Disclaimer
   -------------------------------------------------- */

body.phone-layout #phone-result-disclaimer {

    width: 100%;

    box-sizing: border-box;

    margin:
        clamp(4px, 1dvh, 10px)
        0
        clamp(14px, 2.2dvh, 22px);

    padding-top:
        clamp(12px, 2dvh, 18px);

    border-top: 1px solid #dfe5ea;

    font-size:
        clamp(13px, 3.6vw, 17px);

    line-height: 1.6;

    color: #66717c;

    text-align: center;
}


/* --------------------------------------------------
   Result action buttons
   -------------------------------------------------- */

body.phone-layout #phone-retest-button,
body.phone-layout #phone-help-button {

    width: 100%;

    min-height:
        clamp(52px, 8dvh, 64px);

    padding:
        clamp(12px, 2dvh, 18px)
        clamp(14px, 4vw, 20px);

    box-sizing: border-box;

    border: none;

    border-radius:
        clamp(12px, 3.5vw, 16px);

    font-size:
        clamp(18px, 5vw, 23px);

    line-height: 1.3;

    font-weight: 700;

    cursor: pointer;
}


body.phone-layout #phone-retest-button {

    background: #1677ff;
    color: white;
}


body.phone-layout #phone-help-button {

    display: none;

    order: 10;

    margin-bottom:
        clamp(10px, 1.6dvh, 16px);

    background: #d32f2f;
    color: white;
}


body.phone-layout #phone-retest-button {

    order: 11;
}


/*
    When the overall result is abnormal,
    help is the primary action and
    retest becomes a secondary action.
*/

body.phone-layout
#phone-result-screen.result-abnormal
#phone-retest-button {

    background: #ffffff;

    color: #4f5963;

    border:
        clamp(1px, 0.35vw, 2px)
        solid
        #cfd6dd;
}


/* --------------------------------------------------
   Phone result states
   -------------------------------------------------- */

/* Overall abnormal result */

body.phone-layout
#phone-result-screen.result-abnormal
#phone-overall-result {

    background: #fff1f0;
    border-color: #d32f2f;
}


body.phone-layout
#phone-result-screen.result-abnormal
#phone-overall-icon {

    background: #d32f2f;

    box-shadow:
        0 0 0
        clamp(6px, 1.8vw, 9px)
        rgba(211, 47, 47, 0.12);
}


body.phone-layout
#phone-result-screen.result-abnormal
#phone-overall-text {

    color: #b42318;
}


body.phone-layout
#phone-result-screen.result-abnormal
#phone-overall-label {

    color: #8d5c58;
}


/* --------------------------------------------------
   Individual normal result
   -------------------------------------------------- */

body.phone-layout
.phone-result-detail-card.detail-normal
.phone-result-detail-text {

    color: #17863a;
}


body.phone-layout
.phone-result-detail-card.detail-normal {

    border-color: #cfe8d5;
}


/* --------------------------------------------------
   Individual abnormal result
   -------------------------------------------------- */

body.phone-layout
.phone-result-detail-card.detail-abnormal {

    background: #fff7f6;
    border-color: #efc5c1;
}

body.phone-layout
.phone-result-detail-card.detail-abnormal
.phone-result-detail-text {

    color: #b42318;
}



/* Overall invalid result */

body.phone-layout #phone-result-screen.result-invalid #phone-overall-result {
    background: #FFFBEB;
    border-color: #D97706;
}

body.phone-layout #phone-result-screen.result-invalid #phone-overall-icon {
    background: #D97706;
    box-shadow: 0 0 0 clamp(6px, 1.8vw, 9px) rgba(217, 119, 6, 0.12);
}

body.phone-layout #phone-result-screen.result-invalid #phone-overall-text {
    color: #92400E;
}

body.phone-layout #phone-result-screen.result-invalid #phone-overall-label {
    color: #92400E;
}

/* Individual invalid result */

body.phone-layout .phone-result-detail-card.detail-invalid {
    background: #FFFBEB;
    border-color: #FCD34D;
}

body.phone-layout .phone-result-detail-card.detail-invalid .phone-result-detail-text {
    color: #92400E;
}

/* Retest is secondary when result is invalid */

body.phone-layout #phone-result-screen.result-invalid #phone-retest-button {
    background: #FFFFFF;
    color: #4F5963;
    border: 2px solid #CFD6DD;
}


@media (max-height: 620px) and (max-width: 600px) {

    #registration-screen {
        padding:
            clamp(8px, 2vh, 16px)
            clamp(10px, 4vw, 18px);
    }


    #registration-screen h1 {
        font-size:
            clamp(22px, 4.5vh, 28px);

        margin-bottom:
            clamp(10px, 3vh, 20px);
    }


    .registration-label {
        font-size:
            clamp(16px, 3.2vh, 19px);

        margin-top:
            clamp(6px, 2vh, 12px);

        margin-bottom:
            clamp(4px, 1vh, 7px);
    }


    #country,
    #phone,
    #invitation-code {
        padding:
            clamp(7px, 1.5vh, 11px);

        font-size:
            clamp(16px, 3vh, 19px);
    }


    #request-invitation-button {
        font-size:
            clamp(14px, 2.8vh, 17px);

        padding:
            0 clamp(8px, 3vw, 14px);
    }


    #register-button {
        margin-top:
            clamp(10px, 2.5vh, 18px);

        padding:
            clamp(8px, 1.8vh, 13px);

        font-size:
            clamp(17px, 3.2vh, 20px);
    }


    #registration-message {
        margin-top:
            clamp(6px, 1.5vh, 12px);

        font-size:
            clamp(14px, 2.7vh, 17px);
    }
    
    #screening-title {
        font-size:
            clamp(18px, 3.5vh, 22px);

        margin:
            clamp(1px, 0.4vh, 3px)
            auto;
    }


    body.phone-layout #instruction {
        height:
            clamp(46px, 7.5dvh, 58px);

        margin:
            clamp(2px, 0.5dvh, 4px)
            auto;

        padding:
            clamp(3px, 0.7dvh, 5px)
            clamp(8px, 2.5vw, 12px);

        font-size:
            clamp(15px, 3.6vw, 18px);
    }

}

/* ==================================================
   Phone result page - compact responsive layout
   ================================================== */

body.phone-layout #phone-result-content {

    height: 100dvh;
    min-height: 0;

    padding:
        max(6px, env(safe-area-inset-top))
        0
        max(6px, env(safe-area-inset-bottom));

    box-sizing: border-box;
}


body.phone-layout #phone-result-title {

    margin:
        0
        0
        clamp(3px, 0.9dvh, 12px);

    font-size:
        clamp(18px, 3.2dvh, 36px);
}


body.phone-layout #phone-overall-result {

    padding:
        clamp(8px, 1.8dvh, 24px)
        clamp(10px, 4vw, 24px);

    margin-bottom:
        clamp(4px, 1dvh, 14px);
}


body.phone-layout #phone-overall-icon {

    width:
        clamp(40px, 7dvh, 76px);

    height:
        clamp(40px, 7dvh, 76px);

    margin:
        0
        auto
        clamp(3px, 0.8dvh, 12px);

    font-size:
        clamp(24px, 4.5dvh, 48px);
}


body.phone-layout #phone-overall-text {

    font-size:
        clamp(17px, 2.8dvh, 32px);

    line-height: 1.2;
}


body.phone-layout #phone-overall-label {

    margin-top:
        clamp(1px, 0.4dvh, 7px);

    font-size:
        clamp(10px, 1.8dvh, 20px);
}


body.phone-layout .phone-result-detail-card {

    padding:
        clamp(4px, 1.05dvh, 16px)
        clamp(8px, 4vw, 22px);

    margin-bottom:
        clamp(3px, 0.75dvh, 11px);
}


body.phone-layout .phone-result-detail-header {

    gap:
        clamp(3px, 1.5vw, 10px);

    font-size:
        clamp(14px, 2.4dvh, 25px);

    line-height: 1.15;
}


body.phone-layout .phone-result-detail-text {

    margin-top:
        clamp(2px, 0.55dvh, 8px);

    font-size:
        clamp(13px, 2.2dvh, 23px);

    line-height: 1.2;
}


body.phone-layout .phone-result-detail-description {

    margin-top:
        clamp(1px, 0.4dvh, 7px);

    font-size:
        clamp(10px, 1.8dvh, 19px);

    line-height: 1.25;
}


body.phone-layout #phone-result-disclaimer {

    margin:
        clamp(1px, 0.4dvh, 7px)
        0
        clamp(4px, 0.8dvh, 12px);

    padding-top:
        clamp(4px, 0.8dvh, 12px);

    font-size:
        clamp(10px, 1.6dvh, 17px);

    line-height: 1.3;
}


body.phone-layout #phone-retest-button,
body.phone-layout #phone-help-button {

    min-height:
        clamp(38px, 6dvh, 62px);

    padding:
        clamp(6px, 1.2dvh, 14px)
        clamp(10px, 4vw, 22px);

    font-size:
        clamp(14px, 2.5dvh, 25px);
}


body.phone-layout #phone-help-button {

    margin-bottom:
        clamp(4px, 0.8dvh, 12px);
}
