* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    z-index: 49;
    pointer-events: none;
    background-color: #E10813;
}

.ptr-circle {
    margin-top: 20px;
    opacity: 0;
}

@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

.pull-to-refresh.refreshing .ptr-circle {
    animation: ptr-spin 0.8s linear infinite;
}

:root {
    --red-primary: #E10813;
    --teal-primary: #00A3AD;
    --teal-dark: #008891;
    --green: #75BA4F;
    --orange: #FF9800;
    --red: #E10813;
    --gray-light: #f5f5f5;
    --gray-medium: #999;
    --gray-dark: #333;
    --white: #ffffff;
    --bg-main: #E9E8E6;
    --footer-bg: #050505;
    --font-title: "museo-sans-rounded", "museo-sans", sans-serif;
    --font-body: "museo-sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-screen.hidden {
    display: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    opacity: 0;
    transform: scale(0.5);
    animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.splash-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: splashTextIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.splash-title-line1 {
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1.45rem;
    color: var(--white);
    letter-spacing: 1.5px;
    white-space: nowrap;
    line-height: 1.2;
}

.splash-title-line2 {
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 2.2rem;
    color: #050505;
    margin-top: 4px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 2px;
}

.wipe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--red-primary);
    z-index: 9998;
    transform: translateX(-100%);
    pointer-events: none;
    display: none;
}

.wipe-overlay.wipe-active {
    display: block;
    animation: wipeThrough 0.7s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes wipeThrough {
    0% { transform: translateX(-100%); }
    40% { transform: translateX(0); }
    60% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

@keyframes splashLogoIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes splashTextIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .splash-logo {
        width: 160px;
        height: 160px;
        border-radius: 32px;
    }
    
    .splash-title-line1 {
        font-size: 1.8rem;
    }
    
    .splash-title-line2 {
        font-size: 2.6rem;
    }
    
    .splash-content {
        gap: 35px;
    }
}

html {
    height: 100%;
    height: -webkit-fill-available;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow: hidden;
}

body {
    font-family: "museo-sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    background-color: var(--footer-bg);
    height: 100%;
    height: -webkit-fill-available;
    margin: 0;
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
}

.app-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    position: relative;
    z-index: 50;
    overflow: hidden;
    padding-top: var(--safe-area-inset-top);
}

.app-header {
    padding: 16px 24px 20px;
    text-align: center;
    background-color: var(--white);
    position: relative;
    z-index: 15;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: padding 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.app-header.expanded {
    padding: 16px 24px 30px;
    margin-bottom: 0;
}

.app-header h1 {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    color: var(--red-primary);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 0;
    padding: 2px 0;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 0;
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    padding-bottom: 60px;
}

#screen-welcome {
  padding-bottom: 0px;
}

.screen.active {
    display: flex;
}


@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-30%); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(30%); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(-30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


.content-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    padding: 28px;
    border-radius: 10px;
    margin-top: 60px;
}

#screen-step1 .content-card,
#screen-step2 .content-card,
#screen-step3 .content-card,
#screen-step4 .content-card,
#screen-results .content-card {
    margin-top: 0;
}



.content-card h2 {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    color: var(--red);
    font-size: 1.6em;
    font-weight: 900;
    margin-bottom: 20px;
    white-space: nowrap;
}

.content-card p {
    color: var(--gray-dark);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 15px !important;
}

.instruction-text {
    font-size: 1.2rem;
    margin-bottom: 12px !important;
}

.btn {
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1.0rem;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 2.2, 0.64, 1), background-color 0.2s ease, box-shadow 0.4s ease;
    margin-bottom: 10px;
    font-weight: 700;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    will-change: transform;
}

.btn.btn-pressed {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0, 0.2, 1), background-color 0.08s ease, color 0.08s ease;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background-color: #444 !important;
    color: var(--white) !important;
}

.btn-primary {
    background-color: var(--teal-primary);
    color: var(--white);
}

@media (hover: hover) {
    .btn-primary:hover {
        background-color: var(--teal-dark);
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    .btn-primary.btn-pressed:hover {
        transform: scale(1.07);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
}

.btn-start {
    width: 50%;
    margin: auto auto 160px;
}

btn-secondary {
    width: 50%;
    margin: 0 auto;

}

.btn-teal {
    background-color: var(--teal-primary);
    color: var(--white);
    width: 100%;
}

@media (hover: hover) {
    .btn-teal:hover {
        background-color: var(--teal-dark);
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    .btn-teal.btn-pressed:hover {
        transform: scale(1.07);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
}

.btn-option {
    background-color: var(--teal-primary);
    color: var(--white);
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

@media (hover: hover) {
    .btn-option:hover {
        background-color: var(--teal-dark);
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    .btn-option.btn-pressed:hover {
        transform: scale(1.07);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
}

.btn-criteria {
    background-color: var(--red-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: auto auto 0;
    padding: 12px 25px;
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
}

.btn-criteria svg,
.btn-criteria img.criteria-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.score-circle-wrapper {
    position: relative;
    z-index: 30;
    margin-top: -40px;
    height: 0;
    overflow: visible;
}

.score-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background-color: var(--white);
    position: relative;
    z-index: 30;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--white);
    box-shadow: inset 0 0 0 5px #ccc, 0 6px 20px rgba(0, 0, 0, 0.25);
}

.score-circle-wrapper.visible .score-display {
    transform: scale(1);
}

.score-display .score-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: #ccc;
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
}

.colorbar-wrapper {
    position: relative;
    z-index: 5;
    margin-top: 0;
    padding-top: 0px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.3s ease;
}

.colorbar-wrapper.visible {
    height: 120px;
    opacity: 1;
    overflow: visible;
}

.risk-bar-container {
    padding: 0;
    margin-bottom: 10px;
    position: relative;
    margin-top: 0;
}


.risk-bar-modern {
    position: relative;
    height: 100px;
    width: 100%;
    border-radius: 0;
    overflow: visible;
}

.risk-gradient {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: linear-gradient(to right, 
        #75BA4F 0%, 
        #75BA4F 45%, 
        #FF9800 45%, 
        #FF9800 75%, 
        #E10813 75%, 
        #E10813 100%
    );
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.risk-indicator {
    position: absolute;
    bottom: -20px;
    top: auto;
    left: 0%;
    right: auto;
    transform: translateX(-50%);
    width: 33px;
    height: 45px;
    background: transparent;
    border: none;
    border-radius: 0;
    opacity: 0;
    transition: left 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.4s ease;
    will-change: left, opacity;
    z-index: 10;
}

.risk-indicator img {
    width: 100%;
    height: 100%;
    display: block;
}



.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 0 60px 0;
    height: 70px;
    background-color: var(--bg-main);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.step {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background-color: #D5D5D5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-weight: 900;
    color: #A0A0A0;
    font-size: 1.4rem;
    cursor: default;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active {
    color: var(--gray-dark);
}

.step.current {
    background-color: var(--red-primary);
    color: var(--white);
    transform: scale(1.3);
    box-shadow: 0 0 0 10px var(--teal-primary);
}

.step.completed {
    background-color: var(--teal-primary);
    color: var(--white);
    cursor: pointer;
}

@media (hover: hover) {
    .step.completed:hover {
        background-color: var(--teal-dark);
        transform: scale(1.1);
    }
}

.step.disabled {
    background-color: #D5D5D5;
    color: #A0A0A0;
    cursor: not-allowed;
    opacity: 1;
}

.step-line {
    width: 40px;
    height: 16px;
    background-color: var(--teal-primary);
    margin: 0 -2px;
    z-index: 1;
}

.step-line.disabled {
    background-color: #D5D5D5;
}

.step-line.completed {
    background-color: var(--teal-primary);
}

.completed-all .step {
    background-color: var(--teal-primary);
    color: var(--white);
}

.completed-all .step-line {
    background-color: var(--teal-primary);
}

.results-card {
    text-align: center;
    padding: 20px;
}

.results-card p {
    font-size: 1.6rem;
}

.risk-level {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-size: 2.0rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.risk-level.low {
    color: var(--green);
}

.risk-level.intermediate {
    color: var(--orange);
}

.risk-level.high {
    color: var(--red);
}

.score-label {
    font-family: "museo-sans", sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: #333;
    line-height: 1.0;
    margin-bottom: 0;
}

.score-range {
    font-family: "museo-sans", sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: #333;
    line-height: 1.0;
    margin-bottom: 10px;
}

.score-range.low {
    color: #333;
}

.score-range.intermediate {
    color: #333;
}

.score-range.high {
    color: #333;
}

.score-summary {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.results-card h2.risk-level {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.risk-description {
    font-size: 1.05rem;
    line-height: 1.45;
}

.results-card {
    text-align: center;
    padding: 14px 20px;
}

.results-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.btn-score-overview,
.btn-reset {
    background-color: var(--teal-primary);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    letter-spacing: 0.5px;
    flex: 1;
    max-width: 180px;
}

.btn-score-overview,
.btn-reset {
    transition: transform 0.5s cubic-bezier(0.34, 2.2, 0.64, 1), background-color 0.2s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.btn-score-overview.btn-pressed,
.btn-reset.btn-pressed {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0, 0.2, 1), background-color 0.08s ease, color 0.08s ease;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background-color: #444 !important;
    color: var(--white) !important;
}

@media (hover: hover) {
    .btn-score-overview:hover,
    .btn-reset:hover {
        background-color: var(--teal-dark);
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    .btn-score-overview.btn-pressed:hover,
    .btn-reset.btn-pressed:hover {
        transform: scale(1.07);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
}

.app-footer {
    display: flex;
    justify-content: space-around;
    padding: 8px;
    padding-bottom: calc(8px + var(--safe-area-inset-bottom));
    background-color: var(--footer-bg);
    border-top: none;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.footer-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

.footer-btn {
    transition: transform 0.5s cubic-bezier(0.34, 2.2, 0.64, 1), opacity 0.2s ease;
    will-change: transform;
}

.footer-btn.btn-pressed {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.2s ease;
    transform: scale(1.25);
    opacity: 0.7;
}

.footer-btn svg,
.footer-btn img {
    width: 32px;
    height: 32px;
    fill: var(--bg-main);
    filter: brightness(0) invert(1);
}

@media (hover: hover) {
    .footer-btn:hover {
        opacity: 0.85;
        transform: scale(1.12);
    }
    .footer-btn.btn-pressed:hover {
        transform: scale(1.25);
        opacity: 0.7;
    }
}


.modal-title {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    color: var(--red-primary);
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

/* Help Modal - Slide In */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
}

.help-modal.active {
    display: block;
    pointer-events: auto;
}

.help-modal-content {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    padding: 25px 30px 30px;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    border-radius: 16px 16px 0 0;
    -webkit-overflow-scrolling: touch;
}

.help-modal-content.dragging {
    transition: none;
}

.help-modal.visible .help-modal-content {
    transform: translateY(0);
}

.help-drag-handle {
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
    cursor: grab;
    touch-action: none;
}

.help-drag-handle span {
    width: 40px;
    height: 5px;
    background-color: #ccc;
    border-radius: 3px;
}

.help-modal-content .modal-title {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
}

.help-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray-dark);
    line-height: 1;
    z-index: 1;
}

.help-modal-content p {
    color: var(--gray-dark);
    font-size: 1.2rem;
    line-height: 1.65;
    margin-bottom: 18px;
}

.help-image-label {
    font-weight: 700;
}

.help-image {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    margin-top: 4px;
    cursor: zoom-in;
}

.score-summary {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.summary-row {
    display: flex;
    flex-direction: column;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row.summary-na .summary-choice,
.summary-row.summary-na .summary-value {
    opacity: 0.45;
}

.summary-step {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 4px;
}

.summary-choice {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.4;
}

.summary-value {
    font-family: "museo-sans-rounded", "museo-sans", sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--teal-primary);
    margin-top: 4px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 4px;
    margin-top: 4px;
    border-top: 2px solid var(--red-primary);
}

.summary-total .summary-step {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.summary-total .total-value {
    font-size: 1.4rem;
    color: var(--red-primary);
}

.score-categories {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

.category-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    opacity: 0.45;
}

.category-row.category-active {
    opacity: 1;
    font-weight: 700;
}

.category-label {
    font-family: var(--font-body);
    font-size: 0.95rem;
    min-width: 120px;
}

.category-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-align: right;
}

/* Image Lightbox */
.xray-images {
    border: 4px solid #ffffff;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
    margin-bottom: 16px;
}

.xray-images img {
    width: 100%;
    display: block;
}

.xray-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.xray-lightbox.active {
    display: flex;
    opacity: 1;
}

.xray-lightbox-images {
    display: flex;
    max-width: 95vw;
    max-height: 90vh;
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.xray-lightbox.active .xray-lightbox-images {
    transform: scale(1);
}

.xray-lightbox-images .xray-combined {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.xray-lightbox-images .xray-separate {
    display: none;
}

@media (max-width: 600px) {
    .xray-lightbox-images {
        flex-direction: column;
        align-items: center;
        max-height: 95vh;
        overflow-y: auto;
    }
    .xray-lightbox-images .xray-combined {
        display: none;
    }
    .xray-lightbox-images .xray-separate {
        display: block;
        width: 95vw;
        max-height: 47vh;
        object-fit: contain;
    }
}

.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(233, 232, 230, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.image-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--gray-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.exclusion-list {
    list-style: disc;
    padding-left: 20px;
}

.app-install-list {
	padding-left: 20px;
}

.exclusion-list li, .app-install-list li {
    margin-bottom: 10px;
    color: var(--gray-dark);
    font-size: 1.2rem;
    line-height: 1.5;
}

.exclusion-sublist {
    list-style: circle;
    padding-left: 20px;
    margin-top: 8px;
}

.exclusion-sublist li {
    margin-bottom: 6px;
    font-size: 1.2rem;
}


#step4-content .bmi-options {
    margin-top: 20px;
}

@media (max-height: 860px) and (max-width: 767px) {
    .app-header {
        padding: 10px 24px 14px;
    }
    
    .app-header.expanded {
        padding: 10px 24px 20px;
    }
    
    .colorbar-wrapper.visible {
        height: 90px;
    }
    
    .risk-bar-modern {
        height: 70px;
    }
    
    .content-card {
        padding: 16px 28px;
    }
    
    .content-card p,
    .question-text,
    .instruction-text {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }
    
    .content-card h2 {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }
    
    .results-card h2.risk-level {
        font-size: 2.6rem;
    }
    
    .btn {
        padding: 10px 24px;
        margin-bottom: 7px;
        min-height: 40px;
    }
    
    .step-indicator {
        padding: 0px 0 50px 0;
        height: 60px;
    }
    
    .screen {
        padding-bottom: 50px;
    }
    
    .score-display {
        width: 60px;
        height: 60px;
    }
    
    .score-display .score-value {
        font-size: 1.4rem;
    }
    
    .score-circle-wrapper {
        margin-top: -25px;
    }
    
    .risk-indicator {
        height: 38px;
        width: 28px;
    }
}

@media (max-height: 700px) and (max-width: 767px) {
    .app-header {
        padding: 8px 24px 10px;
    }
    
    .app-header.expanded {
        padding: 8px 24px 14px;
    }
    
    .colorbar-wrapper.visible {
        height: 80px;
    }
    
    .risk-bar-modern {
        height: 60px;
    }
    
    .content-card {
        padding: 12px 24px;
        margin-top: 40px;
    }
    
    .content-card p,
    .question-text,
    .instruction-text {
        font-size: 0.95rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    .content-card h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .results-card h2.risk-level {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 9px 20px;
        margin-bottom: 5px;
        min-height: 38px;
        font-size: 0.9rem;
    }
    
    .btn-option {
        padding: 9px 16px;
    }
    
    .btn-criteria {
        padding: 9px 20px;
        font-size: 1rem;
    }
    
    .step-indicator {
        padding: 0px 0 40px 0;
        height: 50px;
    }
    
    .step {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .step.current {
        transform: scale(1.2);
    }
    
    .step-line {
        width: 20px;
    }
    
    .screen {
        padding-bottom: 40px;
    }
    
    .score-display {
        width: 55px;
        height: 55px;
    }
    
    .score-display .score-value {
        font-size: 1.3rem;
    }
    
    .score-circle-wrapper {
        margin-top: -22px;
    }
    
    .risk-indicator {
        height: 34px;
        width: 24px;
    }
    
    .result-buttons {
        margin-top: 12px;
    }
    
    .btn-score-overview,
    .btn-reset {
        padding: 9px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .app-header h1 {
        font-size: 1.25rem;
    }
    
    .app-content {
        padding: 0 16px 0;
    }
    
    
    .btn {
        padding: 10px 20px;
        font-size: 1.05rem;
        min-height: 40px;
    }
    
    .step {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    .step.current {
        transform: scale(1.25);
    }
    
    .step-line {
        width: 20px;
    }
    
    .score-display {
        width: 60px;
        height: 60px;
    }
    
    .score-display .score-value {
        font-size: 1.4rem;
    }
    
    .content-card h2 {
        font-size: 1.4rem;
    }
    
    .results-card h2.risk-level {
        font-size: 2.6rem;
    }
}

@media (min-width: 480px) {
    .app-content {
        padding: 0 28px 0;
    }
    
    
    .content-card {
        padding: 24px;
    }
    
    .app-header {
        padding: 16px 24px 10px;
    }
    
    .app-header.expanded {
        padding: 16px 24px 30px;
    }
    
    .app-header h1 {
        font-size: 1.4rem;
    }
    
    .content-card h2 {
        font-size: 1.6em;
    }
    
    .results-card h2.risk-level {
        font-size: 2.6rem;
        white-space: nowrap;
    }
    
    .btn {
        font-size: 1.2rem;
        padding: 18px 36px;
    }
}

@media (min-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start;
    }
    
    .app-container {
        max-width: 100%;
        min-height: 780px;
        border-radius: 0;
        overflow: hidden;
    }
    
    .xray-images {
        max-height: 35vh;
        overflow: hidden;
    }
    
    .xray-images img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .help-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
        pointer-events: none;
    }
    
    .help-modal.active {
        display: block;
        pointer-events: auto;
    }
    
    .help-modal-content {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        padding-left: calc((100% - 480px) / 2);
        padding-right: calc((100% - 480px) / 2);
    }
    
    .help-modal.visible .help-modal-content {
        transform: translateY(0);
    }
    
    .help-modal-content.dragging {
        transition: none;
    }
    
    .app-header {
        border-radius: 0;
    }
    
    .app-content {
        padding: 0;
        flex: 1;
        overflow: visible;
    }
    
    .content-card {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        padding: 28px;
    }
    
    .btn-start {
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .btn-criteria {
        max-width: 220px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .app-footer {
        border-radius: 0;
        justify-content: center;
        gap: calc(480px * 0.5);
    }
    
    .step {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
    
    .step.current {
        transform: scale(1.3);
    }
    
    .step-line {
        width: 50px;
    }
}

@media (min-width: 1024px) {
    body {
        padding: 0;
    }
    
    .app-container {
        max-width: 100%;
        min-height: 820px;
    }
    
    .help-modal-content {
        width: 100%;
        max-width: 100%;
        padding-left: calc((100% - 650px) / 2);
        padding-right: calc((100% - 650px) / 2);
    }
    
    .app-header h1 {
        font-size: 1.85rem;
    }
    
    .content-card {
        max-width: 650px;
    }
    
    .app-footer {
        gap: calc(650px * 0.5);
    }
    
    .btn-start {
        max-width: 250px;
    }
    
    .content-card h2 {
        font-size: 1.6em;
    }
    
    .results-card h2.risk-level {
        font-size: 2.6rem;
    }
    
    .content-card p {
        font-size: 1.2rem;
    }

    .results-card p {
        font-size: 1.6rem;
    }
    
    .btn {
        font-size: 1.2rem;
        padding: 18px 40px;
    }
    
    .btn-option {
        white-space: normal;
    }
    
    @media (hover: hover) {
        .btn:hover {
            transform: scale(1.03);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }
        .btn.btn-pressed:hover {
            transform: scale(1.07);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        }
    }
    
    .step {
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }
    
    .step.current {
        transform: scale(1.3);
    }
    
    .step-line {
        width: 60px;
    }
}

@media (min-width: 1200px) {
    .app-container {
        max-width: 100%;
        min-height: 850px;
    }
    
    .help-modal-content {
        width: 100%;
        max-width: 100%;
        padding-left: calc((100% - 750px) / 2);
        padding-right: calc((100% - 750px) / 2);
    }
    
    .content-card {
        max-width: 750px;
    }
    
    .app-footer {
        gap: calc(750px * 0.5);
    }
    
    .btn-start {
        max-width: 280px;
    }
    
    .xray-images {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .btn-option {
        white-space: normal;
    }
}
