:root {
    --gold: #ffa900;
    --gold-dark: #e09600;
    --gold-soft: #ffe9bd;
    --ink: #101010;
    --muted: #626262;
    --card: linear-gradient(180deg, rgba(242, 242, 242, 0.98) 0%, rgba(255, 255, 255, 0.97) 100%);
    --app-page-max-width: 1400px;
}

html {
    background-color: #dcdcdc;
}

@font-face {
    font-family: "DB Heavent";
    src: url("../font/DBHeaventMed.ttf") format("truetype");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DB Heavent";
    src: url("../font/DBHeaventBd.ttf") format("truetype");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DB Adman X";
    src: url("../font/DBAdmanX.TTF") format("truetype");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DB Adman X";
    src: url("../font/DBAdmanXBd.ttf") format("truetype");
    font-weight: 800 900;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    width: 100%;
    max-width: var(--app-page-max-width);
    margin: 0 auto;
    position: relative;
    overflow-x: clip;
    font-family: "DB Heavent", "DBHeavent", "Noto Sans Thai", "Sarabun", Arial, sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background-image: var(--page-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

html:has(body.step-main),
html:has(body.step-welcome) {
    height: 100%;
    overflow: hidden;
}

body.step-main,
body.step-welcome {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.step-main {
    background-color: #f29819;
    background-image: var(--page-bg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
    background-size: auto 100dvh;
}

@media (orientation: landscape) {
    body.step-main,
    html.is-ipad-like body.step-main {
        background-image: var(--page-bg-landscape, var(--page-bg));
        background-size: cover;
        background-position: center center;
    }

    body.step-welcome,
    html.is-ipad-like body.step-welcome {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }
}

/* PC/Desktop home: full-bleed background (landscape only — portrait uses tablet art) */
@media (min-width: 1024px) and (orientation: landscape) {
    body.step-main {
        background-image: var(--page-bg-desktop, var(--page-bg-landscape, var(--page-bg)));
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }
}

/* Large portrait (iPad Pro etc.): keep tablet background, not desktop stretch */
@media (min-width: 1024px) and (orientation: portrait) {
    body.step-main {
        background-image: var(--page-bg-ipad, var(--page-bg));
        background-size: auto 100%;
        background-size: auto 100dvh;
        background-position: center center;
        background-repeat: no-repeat;
    }

    body.step-welcome {
        background-image: var(--page-bg-base-ipad, var(--page-bg-base));
        background-size: auto 100dvh;
        background-position: center center;
    }
}

body.step-welcome {
    background-color: transparent;
    background-image: var(--page-bg-base);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
    background-size: auto 100dvh;
    background-attachment: scroll;
}

body.step-question {
    background-color: transparent;
    background-image: var(--page-bg), var(--page-bg-base);
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center center;
    background-size: cover, cover;
    background-attachment: scroll, scroll;
}

body.step-summary {
    background-color: transparent;
    background-image: var(--page-bg), var(--page-bg-base);
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center top;
    background-size: 100% 100%, 100% 100%;
    background-attachment: scroll, scroll;
}

body.step-plan {
    background-color: transparent;
    background-image: var(--page-bg), var(--page-bg-base);
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center top;
    background-size: 100% 100%, 100% 100%;
    background-attachment: scroll, scroll;
}

body.step-result {
    background-color: transparent;
    background-image: var(--page-bg), var(--page-bg-base);
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center center;
    background-size: cover, cover;
    background-attachment: scroll, scroll;
}

html:has(body.step-question.question-first) {
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
}

body.step-question.question-first {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background-image: var(--page-bg-base);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: scroll;
}

@media (orientation: landscape) {
    body.step-question.question-first,
    html.is-ipad-like body.step-question.question-first {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }
}

body.step-question .app-shell,
body.step-summary .app-shell,
body.step-plan .app-shell,
body.step-result .app-shell {
    background: transparent;
    box-shadow: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.step-main .app-shell,
    body.step-welcome .app-shell,
    body.step-question .app-shell,
    body.step-summary .app-shell,
    body.step-plan .app-shell,
    body.step-result .app-shell {
        width: min(800px, 100%);
        max-width: none;
    }

    body.step-main {
        background-image: var(--page-bg-ipad);
    }

    body.step-main .lang-grid {
        transform: translateY(16px);
    }

    body.step-welcome {
        background-image: var(--page-bg-base-ipad);
        background-size: auto 100dvh;
        background-position: center center;
    }

    body.step-question {
        background-image: var(--page-bg-ipad);
        background-size: 100% 100dvh;
        background-position: center top;
    }

    body.step-question .question-card {
        width: 80%;
    }

    body.step-question .question-heading {
        grid-template-columns: auto 1fr;
        column-gap: 20px;
    }

    body.step-question .question-card .session,
    body.step-question .question-subtitle {
        font-size: clamp(17px, 5.06vw, 26px);
    }

    body.step-question .question-card h2 {
        font-size: clamp(36px, 9.66vw, 47px);
    }

    body[lang="th"].step-question .question-card h2 {
        font-size: clamp(39px, 10.6vw, 52px);
    }

    body.step-question .age-choices .choice > span {
        font-size: 31px;
    }

    body.step-question .age-choices .choice.is-selected > span {
        font-size: 40px;
        min-height: 74px;
        padding: 0 12px;
    }

    body.step-question .option-label {
        font-size: 23px;
    }

    body.step-question .score-dot {
        font-size: 28px;
    }

    body.step-question .thumb-label {
        font-size: 16px;
    }

    body.step-question .score-mini {
        font-size: 14px;
    }

    body.step-question .scale-choices .choice span {
        font-size: 20px;
    }

    body.step-question .question-actions .btn {
        font-size: 23px;
    }

    body.step-summary .summary-actions .btn {
        font-size: 23px;
    }

    body.step-summary {
        background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
        background-size: 100% 100dvh, 100% 100dvh;
        background-position: center top, center top;
    }

    body.step-summary .summary-card {
        width: 88%;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 30px;
    }

    body.step-summary .summary-panel {
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 30px;
    }

    body.step-summary .summary-note {
        width: min(420px, 100%);
    }

    body.step-plan {
        background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
        background-size: 100% 100dvh, 100% 100dvh;
        background-position: center top, center top;
    }

    body.step-plan .plan-card {
        width: 80%;
    }

    body.step-plan .plan-card h2 {
        font-size: clamp(46px, 12.65vw, 53px);
    }

    body[lang="en"].step-plan .plan-card h2 {
        font-size: clamp(37px, 11vw, 48px);
    }

    body.step-plan .plan-subtitle {
        font-size: calc(23px * 1.1);
    }

    body[lang="en"].step-plan .plan-subtitle {
        font-size: calc(18px * 1.1);
    }

    body.step-plan .plan-lines {
        font-size: calc(46px * 1.1);
    }

    body.step-plan .plan-lines.is-lines-or-more {
        font-size: calc(46px * 1.1 * 0.9);
    }

    body.step-plan .plan-choice > .plan-choice-text {
        font-size: calc(28px * 1.1 * 0.9);
    }

    body[lang="en"].step-plan .plan-choice > .plan-choice-text {
        font-size: calc(22px * 1.1 * 0.9);
    }

    body.step-plan .plan-focus-areas {
        font-size: calc(20px * 1.1 * 0.9);
    }

    body[lang="en"].step-plan .plan-focus-areas {
        font-size: calc(17px * 1.1 * 0.9);
    }

    body.step-plan .plan-note {
        font-size: calc(11px * 1.1);
    }

    body.step-plan .plan-actions .btn {
        font-size: calc(20px * 1.1);
    }

    body.step-result {
        background-image: var(--page-bg-base-ipad);
        background-size: cover;
        background-position: center center;
    }
}

html.is-ipad-like body.is-email-open.step-result {
    width: 100dvw;
    min-width: 100dvw;
    overflow: hidden;
}

html.is-ipad-like body.is-email-open.step-result .app-shell {
    width: min(800px, 100%) !important;
    max-width: none !important;
    min-height: 100dvh !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    filter: none !important;
}

html.is-ipad-like body.is-email-open.step-result .result-page-card {
    width: calc(100% - 18px) !important;
    min-height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

html.is-ipad-like body.step-result .email-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100dvw !important;
    height: 100dvh !important;
    max-width: none !important;
    margin: 0 !important;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
    zoom: 1 !important;
    z-index: 10000;
}

html.is-ipad-like body.step-result .email-dialog {
    width: min(380px, 52dvw);
}

html.is-ipad-like body.step-question .logo,
html.is-ipad-like body.step-summary .logo,
html.is-ipad-like body.step-plan .logo,
html.is-ipad-like body.step-result .logo,
html.is-ipad-like body[lang="th"].step-result .logo {
    width: min(calc(344px * 1.21), calc(80vw * 1.21));
}

html.is-ipad-like body.step-result .result-page-card h2 {
    font-size: clamp(calc(28px * 1.1), calc(8.2vw * 1.1), calc(40px * 1.1));
}

html.is-ipad-like body.step-result .result-score-title {
    gap: calc(10px * 1.1);
    font-size: clamp(calc(58px * 1.1), calc(17vw * 1.1), calc(84px * 1.1));
}

html.is-ipad-like body.step-result .result-score-title strong {
    min-width: calc(52px * 1.1);
    min-height: calc(48px * 1.1);
    font-size: clamp(calc(46px * 1.1), calc(13vw * 1.1), calc(64px * 1.1));
}

html.is-ipad-like body.step-result .result-level-label,
html.is-ipad-like body.step-result .result-treatment-title {
    font-size: calc(24px * 1.1);
}

html.is-ipad-like body.step-result .result-level {
    font-size: calc(28px * 1.1);
}

html.is-ipad-like body.step-result .result-lines {
    min-width: calc(170px * 1.1);
    min-height: 0;
    font-size: calc(52px * 1.1);
}

html.is-ipad-like body.step-result .result-lines.is-lines-or-more {
    font-size: calc(52px * 1.1 * 0.9);
}

html.is-ipad-like body.step-result .result-note {
    font-size: calc(17px * 1.1);
}

html.is-ipad-like body.step-result .result-plan h3 {
    font-size: calc(29px * 1.1);
}

html.is-ipad-like body.step-result .result-radio {
    width: calc(18px * 1.1);
    height: calc(18px * 1.1);
    justify-self: center;
    align-self: start;
}

html.is-ipad-like body.step-result .result-plan-choice {
    grid-template-columns: calc(30px * 1.1) 1fr;
    gap: calc(8px * 1.1);
}

html.is-ipad-like body.step-result .result-plan-choice strong {
    font-size: calc(26px * 1.1);
}

html.is-ipad-like body.step-result .result-choice-sub {
    font-size: calc(17px * 1.1);
}

html.is-ipad-like body.step-result .result-plan-choice p,
html.is-ipad-like body.step-result .result-plan-choice b {
    font-size: calc(17px * 1.1);
}

html.is-ipad-like body.step-result .result-plan-note {
    width: 80%;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: calc(9px * 1.1) calc(10px * 1.1);
    font-size: calc(11px * 1.1);
}

html.is-ipad-like body.step-result .result-sharebar {
    width: 74%;
    max-width: 580px;
    min-height: calc(66px * 1.1);
    gap: 22px;
    padding: calc(10px * 1.1) calc(18px * 1.1);
    justify-content: center;
}

html.is-ipad-like body.step-result .result-action-icon {
    width: 46px;
    height: 46px;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(180, 129, 0, 0.34);
}

html.is-ipad-like body.step-result .result-action-icon svg {
    width: 25px;
    height: 25px;
}

html.is-ipad-like body.step-result .result-share-action {
    flex: 0 0 auto;
    min-width: 74px;
    max-width: 86px;
}

html.is-ipad-like body.step-main .app-shell,
html.is-ipad-like body.step-welcome .app-shell,
html.is-ipad-like body.step-question .app-shell,
html.is-ipad-like body.step-summary .app-shell,
html.is-ipad-like body.step-plan .app-shell,
html.is-ipad-like body.step-result .app-shell {
    width: min(800px, 100%);
    max-width: none;
}

html.is-ipad-like body.step-main {
    background-image: var(--page-bg-ipad);
}

html.is-ipad-like body.step-main .lang-grid {
    transform: translateY(16px);
}

html.is-ipad-like body.step-welcome {
    background-image: var(--page-bg-base-ipad);
    background-size: auto 100dvh;
    background-position: center center;
}

html.is-ipad-like body.step-question {
    background-image: var(--page-bg-ipad);
    background-size: 100% 100dvh;
    background-position: center top;
}

html.is-ipad-like body.step-question .question-card {
    width: 80%;
}

html.is-ipad-like body.step-question .question-heading {
    grid-template-columns: auto 1fr;
    column-gap: 20px;
}

html.is-ipad-like body.step-question .question-card .session,
html.is-ipad-like body.step-question .question-subtitle {
    font-size: clamp(17px, 5.06vw, 26px);
}

html.is-ipad-like body.step-question .question-card h2 {
    font-size: clamp(36px, 9.66vw, 47px);
}

html.is-ipad-like body[lang="th"].step-question .question-card h2 {
    font-size: clamp(39px, 10.6vw, 52px);
}

html.is-ipad-like body.step-question .age-choices .choice > span {
    font-size: 31px;
}

html.is-ipad-like body.step-question .age-choices .choice.is-selected > span {
    font-size: 40px;
    min-height: 74px;
    padding: 0 12px;
}

html.is-ipad-like body.step-question .option-label {
    font-size: 23px;
}

html.is-ipad-like body.step-question .score-dot {
    font-size: 28px;
}

html.is-ipad-like body.step-question .thumb-label {
    font-size: 16px;
}

html.is-ipad-like body.step-question .score-mini {
    font-size: 14px;
}

html.is-ipad-like body.step-question .scale-choices .choice span {
    font-size: 20px;
}

html.is-ipad-like body.step-question .question-actions .btn {
    font-size: 23px;
}

html.is-ipad-like body.step-summary .summary-actions .btn {
    font-size: 23px;
}

html.is-ipad-like body.step-summary {
    background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
    background-size: 100% 100dvh, 100% 100dvh;
    background-position: center top, center top;
}

html.is-ipad-like body.step-summary .summary-card {
    width: 88%;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 30px;
}

html.is-ipad-like body.step-summary .summary-panel {
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 30px;
}

html.is-ipad-like body.step-summary .summary-note {
    width: min(420px, 100%);
}

html.is-ipad-like body.step-summary .summary-level {
    font-size: 29.4px;
}

html.is-ipad-like body.step-summary .summary-note {
    font-size: 20.6px;
}

html.is-ipad-like body.step-summary .summary-table-btn {
    margin-top: 12px;
}

html.is-ipad-like body.step-summary .summary-actions {
    margin-top: 40px;
}

html.is-ipad-like body.step-plan {
    background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
    background-size: 100% 100dvh, 100% 100dvh;
    background-position: center top, center top;
}

html.is-ipad-like body.step-plan .plan-card {
    width: 80%;
}

html.is-ipad-like body.step-plan .plan-card h2 {
    font-size: clamp(46px, 12.65vw, 53px);
}

html.is-ipad-like body[lang="en"].step-plan .plan-card h2 {
    font-size: clamp(37px, 11vw, 48px);
}

html.is-ipad-like body.step-plan .plan-subtitle {
    font-size: calc(23px * 1.1);
}

html.is-ipad-like body[lang="en"].step-plan .plan-subtitle {
    font-size: calc(18px * 1.1);
}

html.is-ipad-like body.step-plan .plan-lines {
    font-size: calc(46px * 1.1);
}

html.is-ipad-like body.step-plan .plan-lines.is-lines-or-more {
    font-size: calc(46px * 1.1 * 0.9);
}

html.is-ipad-like body.step-plan .plan-choice > .plan-choice-text {
    font-size: calc(28px * 1.1 * 0.9);
}

html.is-ipad-like body[lang="en"].step-plan .plan-choice > .plan-choice-text {
    font-size: calc(22px * 1.1 * 0.9);
}

html.is-ipad-like body.step-plan .plan-focus-areas {
    font-size: calc(20px * 1.1 * 0.9);
}

html.is-ipad-like body[lang="en"].step-plan .plan-focus-areas {
    font-size: calc(17px * 1.1 * 0.9);
}

html.is-ipad-like body.step-plan .plan-note {
    font-size: calc(11px * 1.1);
}

html.is-ipad-like body.step-plan .plan-actions .btn {
    font-size: calc(20px * 1.1);
}

html.is-ipad-like body.step-result {
    background-image: var(--page-bg-base-ipad);
    background-size: cover;
    background-position: center center;
}

.app-shell {
    animation: page-in 260ms ease-out both;
    transition: opacity 240ms ease, transform 240ms ease, filter 240ms ease;
}

body.is-page-leaving .app-shell {
    opacity: 0.32;
    transform: translateY(6px) scale(0.992);
    filter: blur(1.5px);
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
        filter: blur(1px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.page-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    transition: opacity 120ms ease;
}

body.is-page-leaving .page-loading {
    opacity: 1;
}

.page-loading-card {
    width: 86px;
    height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(8px) scale(0.94);
    transition: transform 180ms ease;
}

body.is-page-leaving .page-loading-card {
    transform: translateY(0) scale(1);
}

.page-loading-ring {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 169, 0, 0.24);
    border-top-color: var(--gold);
    border-right-color: var(--gold);
    border-radius: 50%;
    animation: loading-spin 720ms linear infinite;
}

.page-loading-dots {
    display: inline-flex;
    gap: 4px;
}

.page-loading-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.42;
    animation: loading-dot 800ms ease-in-out infinite;
}

.page-loading-dots i:nth-child(2) {
    animation-delay: 120ms;
}

.page-loading-dots i:nth-child(3) {
    animation-delay: 240ms;
}

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

@keyframes loading-dot {
    0%,
    100% {
        opacity: 0.34;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.app-shell {
    width: min(430px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(14px, env(safe-area-inset-top)) 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.app-shell-bottom {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.app-shell-bottom .footer-actions {
    margin-top: 0;
    margin-bottom: 0;
}

.app-header,
.app-footer {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.logo {
    width: min(172px, 56vw);
    height: auto;
}

.app-footer {
    margin-top: 0;
    padding-top: 0;
}

.app-footer img {
    width: min(152px, 50vw);
    height: auto;
}

.app-footer-ipad {
    display: none;
}

.age-footer-logo {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 12;
    transform: translateX(-50%);
}

.age-footer-logo img {
    width: min(180px, 44vw);
    height: auto;
    display: block;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.step-question .age-footer-logo {
        display: none;
    }
}

html.is-ipad-like body.step-question .age-footer-logo {
    display: none;
}

.card {
    background: var(--card);
    border-radius: 14px;
    padding: 15px 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.center {
    text-align: center;
}

h1,
h2 {
    margin: 0;
    line-height: 1.2;
}

.screen-title {
    font-size: clamp(17px, 4.6vw, 22px);
    font-weight: 700;
    margin: 3px 0 10px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.main-card {
    background: transparent;
    box-shadow: none;
    padding: 8px 10px 6px;
}

.hero {
    width: min(78%, 272px);
    margin: 5px auto 6px;
    display: block;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 4px auto 0;
    width: min(222px, 88%);
}

.btn {
    appearance: none;
    border: 0;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    min-width: 88px;
    min-height: 28px;
    box-shadow: 0 3px 7px rgba(180, 129, 0, 0.18);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease, background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.summary-table-btn:hover,
.result-share-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn:active,
.summary-table-btn:active,
.result-share-action:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.98);
}

.btn:disabled,
.result-share-action:disabled,
.result-share-action.is-busy {
    cursor: wait;
    opacity: 0.7;
}

.result-share-action.is-busy .result-action-icon {
    animation: result-action-pulse 900ms ease-in-out infinite;
}

@keyframes result-action-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.btn-primary {
    background: #ffa900;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.btn-link {
    background: #efefef;
}

.welcome-card {
    min-height: calc(100vh - 112px);
    min-height: calc(100dvh - 112px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    background: transparent;
    box-shadow: none;
    padding: 74px 12px 20px;
}

.welcome-copy {
    text-align: center;
    width: 100%;
}

.welcome-text-image {
    width: min(330px, 88vw);
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.welcome-en-copy {
    width: min(360px, 86vw);
    margin: 0 auto;
    text-align: left;
}

.welcome-en-copy h1 {
    margin: 0 0 18px;
    color: #050505;
    font-size: clamp(56px, 15vw, 84px);
    line-height: 0.78;
    font-weight: 800;
    letter-spacing: -1.6px;
}

.welcome-en-copy p {
    margin: 0;
    color: #777;
    font-size: clamp(17px, 4.4vw, 24px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.welcome-en-copy strong {
    color: var(--gold);
}

.welcome-start-form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 70px;
}

.welcome-start {
    width: auto;
    min-width: 148px;
    min-height: 46px;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 17px;
    color: #fff;
    box-shadow: 0 4px 8px rgba(201, 137, 0, 0.25);
    cursor: pointer;
}

.question-card {
    position: relative;
    width: calc(100% - 12px);
    margin: 42px auto 18px;
    border-radius: 14px;
    padding: 14px 14px 16px;
}

.question-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    width: 100%;
}

body.step-question .app-shell,
body.step-summary .app-shell,
body.step-result .app-shell {
    gap: 0;
    padding-top: max(6px, env(safe-area-inset-top));
}

body.step-question.question-first .app-shell {
    height: 100dvh;
    min-height: 100dvh;
}

body.step-question.question-first .question-stack {
    flex: 1;
    justify-content: center;
    min-height: 0;
    width: 100%;
}

.step-question .question-card {
    margin-top: 16px;
    margin-bottom: 0;
}

.step-question .question-actions {
    margin-top: 0;
    margin-bottom: max(12px, env(safe-area-inset-bottom));
}

.step-question .question-card-age {
    min-height: 0;
    padding-bottom: 8px;
}

.step-question .question-card-age::after {
    content: "";
    display: block;
    height: 112px;
}

.question-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    align-items: center;
    min-height: 108px;
}

.question-heading-two-line {
    align-items: end;
}

.question-heading-two-line > div:last-child {
    transform: translateY(-22px);
}

.question-heading.no-session-number {
    grid-template-columns: 1fr;
}

.question-heading > div {
    min-width: 0;
}

.question-card .session {
    margin: 0 0 -1px;
    color: #111;
    font-size: clamp(15px, 4.4vw, 23px);
    font-weight: 700;
    line-height: 0.95;
}

body[lang="th"].step-question .question-card:not(.question-card-age) .session {
    margin-bottom: 3px;
}

body[lang="th"].step-question .question-card h2 {
    font-size: clamp(34px, 9.24vw, 45px);
}

.question-card h2 {
    font-size: clamp(31px, 8.4vw, 41px);
    margin: 0;
    line-height: 0.9;
    font-weight: 800;
    white-space: nowrap;
    max-width: 100%;
}

.question-subtitle {
    margin: -4px 0 0;
    font-size: clamp(15px, 4.4vw, 23px);
    font-weight: 300;
    line-height: 0.95;
    color: #111;
}

.progress {
    position: static;
    color: var(--gold);
    font-size: clamp(99px, 28vw, 135px);
    font-weight: 400;
    line-height: 0.9;
    opacity: 0.9;
    letter-spacing: -10px;
}

.progress-total {
    display: none;
}

.main-image-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    width: 72%;
    height: 30dvh;
    margin: 0px auto 5px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 20px;
    object-fit: contain;
}

.score-dot.is-hidden {
    display: none;
}

.score-dot {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.option-label {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin: 5px 0 11px;
    color: #323232;
}

.thumb-row {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    padding: 2px 0 6px;
}

.thumb-row::-webkit-scrollbar {
    display: none;
}

.thumb-choice {
    min-width: 0;
    width: 19%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
}

.thumb-choice input {
    display: none;
}

.thumb-choice img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    border: 2px solid #dadada;
}

.thumb-choice input:checked ~ img {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold);
}

.score-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: -7px;
    z-index: 1;
}

.thumb-label {
    font-size: 14px;
    font-weight: 600;
    color: #bb8600;
    line-height: 1.1;
    white-space: nowrap;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.age-picker-label {
    width: min(330px, 100%);
    margin: 16px auto 8px;
    color: #6a6a6a;
    text-align: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
}

.question-card-age {
    position: relative;
    min-height: 260px;
}

.question-card-age .question-heading {
    padding-right: 258px;
}

.age-choices {
    position: absolute;
    top: 22px;
    right: 6px;
    width: 248px;
    height: 192px;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 68px 0;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

.age-choices::-webkit-scrollbar {
    display: none;
}

.age-choices .choice {
    position: relative;
    flex: 0 0 56px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    scroll-snap-align: center;
}

.age-choices .choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.age-choices .choice > span {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #b3b3b3;
    background: transparent;
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.3px;
    white-space: nowrap;
    padding: 0 10px;
    transition: color 0.18s ease, background 0.18s ease, font-size 0.18s ease, box-shadow 0.18s ease;
}

.age-choices .choice.is-selected > span {
    color: #fff;
    font-size: calc(42px * 0.95);
    min-height: 64px;
    background: #ffa900;
    box-shadow: 0 8px 18px rgba(201, 137, 0, 0.28);
    text-shadow: 0 1px 1px rgba(93, 55, 0, 0.24);
}

.age-choices .choice > span.age-label-extended {
    gap: 0.22em;
}

.age-choices .choice > span .age-label-prefix,
.age-choices .choice > span .age-label-value {
    display: inline;
    width: auto;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-shadow: inherit;
}

.age-choices .choice > span .age-label-prefix {
    font-size: 0.65em;
    letter-spacing: -0.02em;
}

.age-choices .choice > span .age-label-value {
    font-size: 1em;
}

/* Mobile only: smaller yellow age pill without changing font size */
@media (max-width: 767px) {
    body.step-question.question-first .question-card-age {
        min-height: 228px;
    }

    body.step-question.question-first .question-card-age .question-heading {
        padding-right: min(196px, calc(100% - 126px));
    }

    body.step-question.question-first .question-card-age .progress {
        font-size: clamp(92px, 25vw, 112px);
        letter-spacing: -7px;
    }

    body.step-question.question-first .question-card-age h2 {
        font-size: clamp(36px, 10vw, 44px);
    }

    body.step-question.question-first .question-card-age::after {
        height: 96px;
    }

    body.step-question.question-first .age-choices {
        top: 20px;
        right: 4px;
        width: min(196px, calc(100% - 118px));
        height: 170px;
        padding: 56px 0;
    }

    body.step-question.question-first .age-choices .choice {
        flex: 0 0 48px;
    }

    body.step-question.question-first .age-choices .choice > span {
        min-height: 48px;
    }

    body.step-question.question-first .age-choices .choice.is-selected > span {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        min-height: 52px;
        padding: 0 8px;
        box-shadow: 0 6px 14px rgba(201, 137, 0, 0.24);
    }
}

.choice {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 8px 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.choice input {
    margin: 0;
}

.choice span {
    font-size: 17px;
    line-height: 1.25;
}

.scale-choices {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.footer-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
}

.footer-actions .btn {
    flex: 1 1 0;
    font-size: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
    max-width: 96px;
}

.result-page-card > .footer-actions:last-child {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(204px, calc(100vw - 54px));
    z-index: 10;
}

.step-question .logo {
    width: min(344px, 80vw);
}

.step-summary .logo {
    width: min(344px, 80vw);
}

.step-question .question-actions,
.step-summary .summary-actions,
.step-plan .plan-actions {
    width: min(330px, calc(100% - 30px));
    margin-left: auto;
    margin-right: auto;
    gap: 18px;
}

.step-question .question-actions .btn,
.step-summary .summary-actions .btn,
.step-plan .plan-actions .btn {
    max-width: 156px;
    min-height: 50px;
    padding: 14px 24px;
    font-size: 20px;
}

.step-summary .summary-actions {
    margin-top: 20px;
    margin-bottom: max(12px, env(safe-area-inset-bottom));
}

.plan-card h2,
.result-page-card h2 {
    font-size: clamp(20px, 7.2vw, 33px);
    margin-bottom: 8px;
    font-weight: 800;
    text-align: center;
}

.summary-score-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: -8px 0 12px;
    color: #050505;
    font-size: clamp(53px, 15.4vw, 76px);
    line-height: 1;
    font-weight: 800;
}

.summary-score-title strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 45px;
    padding: 0 10px;
    border-radius: 7px;
    background: var(--gold);
    color: #fff;
    font-size: clamp(45px, 12.6vw, 59px);
    line-height: 1;
}

.summary-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e6e6e6 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 11px 10px 10px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 16px 34px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 0 28px rgba(255, 255, 255, 0.42);
}

.summary-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 6%;
    right: 6%;
    height: 42%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

.summary-panel > * {
    position: relative;
    z-index: 1;
}

.summary-age-row {
    display: grid;
    grid-template-columns: 35px 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 21px;
    font-weight: 800;
}

.summary-age-row strong {
    justify-self: start;
    min-width: 64px;
    padding: 1px 14px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: #fff;
    font-size: 48px;
    line-height: 1;
    text-align: center;
}

.summary-age-row strong.is-summary-age-extended {
    min-width: 0;
    padding: 2px 10px;
    font-size: 36px;
    white-space: nowrap;
}

body[lang="en"] .summary-age-row strong.is-summary-age-extended {
    font-size: 32px;
}

.summary-age-row small {
    font-size: 21px;
    font-weight: 800;
}

.summary-group {
    margin-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-group + .summary-group {
    margin-top: 16px;
}

.summary-group-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1px;
    color: #111;
    font-size: 21px;
    line-height: 1.12;
    font-weight: 800;
}

.summary-group-head span {
    white-space: nowrap;
}

.summary-item {
    display: grid;
    grid-template-columns: 1fr 17px;
    gap: 8px;
    align-items: center;
    padding-left: 5px;
    font-size: 18px;
    line-height: 1.19;
}

.summary-item > span::before {
    content: "•";
    display: inline-block;
    width: 14px;
}

.summary-item-sub {
    display: block;
    padding-left: 14px;
    font: inherit;
    color: inherit;
}

.summary-item b {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: var(--gold);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
}

.summary-recommendation {
    margin-top: 10px;
    text-align: center;
}

.summary-level-label {
    margin: 0 0 2px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.05;
}

.summary-level {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 24.3px;
    line-height: 1.08;
    font-weight: 800;
}

.summary-treatment-title {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.05;
}

.summary-lines {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 20px;
    margin: 0 0 5px;
    padding: 2px 12px;
    border-radius: 6px;
    background: var(--gold);
    color: #fff;
    font-size: 40px;
    font-weight: 400;
    line-height: 0.95;
}

.summary-lines.is-lines-or-more {
    font-size: calc(40px * 0.9);
}

.summary-note {
    width: min(340px, 100%);
    margin: 0 auto 7px;
    color: #777;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.15;
    white-space: pre-line;
}

.summary-table-btn {
    appearance: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    text-decoration: none;
    min-width: 170px;
    min-height: 30px;
    padding: 7px 18px;
    font-family: "DB Adman X", "DB Heavent", "Noto Sans Thai", "Sarabun", Arial, sans-serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 1.5px;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}

.score-table-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    z-index: 100;
}

.score-table-modal.is-open {
    display: flex;
}

.score-table-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.score-table-dialog {
    position: relative;
    width: 90%;
    max-width: 90vw;
    max-height: min(88vh, 760px);
    padding: 12px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fff6dc 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transform: translateY(10px) scale(0.96);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

.score-table-modal.is-open .score-table-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.score-table-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    z-index: 2;
}

.score-table-image-wrap {
    max-height: calc(min(88vh, 760px) - 24px);
    overflow: auto;
    border-radius: 16px;
    background: #fff;
}

.score-table-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

body.is-score-table-open {
    overflow: hidden;
}

.email-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    z-index: 100;
}

.email-modal.is-open {
    display: flex;
}

.email-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.email-dialog {
    position: relative;
    width: min(380px, 94vw);
    padding: 26px 22px 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fff6dc 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(10px) scale(0.96);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
}

.email-modal.is-open .email-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.email-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.email-title {
    margin: 0 0 6px;
    color: #1a1a1a;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;
}

.email-desc {
    margin: 0 0 16px;
    color: #555;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e3d6b0;
    border-radius: 14px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.email-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 169, 0, 0.2);
}

.email-status {
    margin: 0;
    min-height: 20px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #555;
}

.email-status.is-error {
    color: #d23b3b;
}

.email-status.is-success {
    color: #1f9d55;
}

.email-status.is-pending {
    color: #b07d00;
}

.email-submit {
    width: 100%;
    margin-top: 2px;
}

.email-submit:disabled {
    opacity: 0.6;
    cursor: progress;
}

body.is-email-open {
    overflow: hidden;
}

.result-card {
    text-align: center;
    background: #fff;
    border: 1px solid #f0dfac;
    border-radius: 18px;
    padding: 14px 12px;
}

.mini {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.big-score {
    font-size: 58px;
    line-height: 1;
    font-weight: 700;
    color: #111;
}

.level {
    margin: 8px 0 2px;
    font-weight: 600;
    font-size: 17px;
}

.lines {
    margin: 0;
    font-size: 33px;
    color: #fff;
    font-weight: 700;
    display: inline-block;
    padding: 4px 15px;
    border-radius: 12px;
    background: var(--gold);
}

.note {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.35;
}

.step-result .app-footer {
    display: none;
}

.step-result .logo {
    width: min(344px, 80vw);
}

.result-page-card {
    position: relative;
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    padding: 2px 12px 72px;
    background: transparent;
    box-shadow: none;
}

.result-capture {
    position: relative;
}

.result-page-card h2,
.result-capture h2 {
    margin: 4px 0 8px;
    text-align: center;
    color: #050505;
    font-size: clamp(28px, 8.2vw, 40px);
    line-height: 0.95;
    font-weight: 800;
}

.result-score-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 6px;
    color: #050505;
    font-size: clamp(58px, 17vw, 84px);
    line-height: 1;
    font-weight: 800;
}

.result-score-title strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 48px;
    padding: 0 10px;
    border-radius: 7px;
    background: var(--gold);
    color: #fff;
    font-size: clamp(46px, 13vw, 64px);
    line-height: 1;
}

.result-recommendation {
    text-align: center;
}

.result-level-label,
.result-treatment-title {
    margin: 0 0 3px;
    color: #050505;
    font-size: 24px;
    line-height: 0.95;
    font-weight: 800;
}

.result-level {
    margin: 0 0 7px;
    color: var(--gold);
    font-size: 28px;
    line-height: 0.98;
    font-weight: 800;
}

.result-lines {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 0;
    margin: 0 0 5px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--gold);
    color: #fff;
    font-size: 52px;
    font-weight: 800;
    line-height: 0.88;
}

.result-lines.is-lines-or-more {
    font-size: calc(52px * 0.9);
}

.result-note {
    width: min(350px, 100%);
    margin: 0 auto 10px;
    color: #777;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    white-space: pre-line;
}

.result-plan {
    width: min(252px, 100%);
    margin: 0 auto 7px;
    text-align: left;
}

.result-plan h3 {
    margin: 0 0 3px;
    text-align: center;
    color: #050505;
    font-size: 29px;
    font-weight: 800;
    line-height: 0.95;
}

.result-plan-choice {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    align-items: start;
}

.result-radio {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    justify-self: center;
    align-self: start;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}

.result-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%);
}

.result-plan-choice strong {
    display: block;
    color: #111;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.result-choice-muted {
    margin-left: 3px;
    color: #777;
    font-size: 0.82em;
    font-weight: 800;
}

.result-choice-sub {
    display: block;
    margin: 2px 0 1px;
    color: #777;
    font-size: 17px;
    line-height: 1;
    font-weight: 800;
}

body[lang="en"] .result-choice-sub {
    color: #111;
}

.result-plan-choice p,
.result-plan-choice b {
    display: block;
    margin: 0;
    color: #111;
    font-size: 17px;
    line-height: 1.05;
    font-weight: 800;
}

.result-plan-note {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(255, 169, 0, 0.16);
    color: #111;
    text-align: left;
    font-size: 11px;
    line-height: 1.12;
    font-weight: 800;
}

.result-plan-note p {
    margin: 0 0 2px;
}

.result-plan-note-title {
    display: block;
    margin-bottom: 2px;
    font-size: calc(1.22em * 1.1);
    line-height: 1;
}

.result-plan-note ol,
.result-plan-note ul {
    margin: 0;
    padding-left: 14px;
}

.result-plan-note ul {
    padding-left: 0;
    list-style: none;
}

.result-plan-note li {
    margin: 0;
    line-height: 1.22;
}

.result-plan-note ul li::before {
    content: "- ";
}

.result-plan-note-footer {
    margin-top: 9px !important;
    line-height: 1.24 !important;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-break: auto;
}

.result-plan-note-phrase {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: baseline;
}

body[lang="th"].step-result .app-header {
    margin-top: 6px;
}

body[lang="th"].step-result .logo {
    width: min(300px, 74vw);
}

body[lang="th"].step-result .result-page-card {
    padding: 4px 16px 72px;
}

body[lang="th"].step-result .result-page-card h2,
body[lang="th"].step-result .result-capture h2 {
    margin: 14px 0 20px;
    font-size: clamp(28px, 8.2vw, 40px);
    line-height: 0.92;
    text-align: center;
}

body[lang="th"].step-result .result-score-title {
    gap: 7px;
    margin-bottom: 28px;
    font-size: clamp(66px, 18.5vw, 92px);
    letter-spacing: -1px;
}

body[lang="th"].step-result .result-score-title strong {
    min-width: 62px;
    min-height: 56px;
    font-size: clamp(46px, 12.5vw, 64px);
}

body[lang="th"].step-result .result-level-label,
body[lang="th"].step-result .result-treatment-title {
    font-size: 24px;
    line-height: 1.32;
    margin-bottom: 7px;
}

body[lang="th"].step-result .result-level {
    margin-bottom: 28px;
    font-size: 28px;
    line-height: 1.32;
}

body[lang="th"].step-result .result-lines {
    min-width: 205px;
    min-height: 0;
    margin-bottom: 22px;
    font-size: 52px;
}

body[lang="th"].step-result .result-note {
    width: min(345px, 100%);
    margin-bottom: 42px;
    font-size: 16px;
    line-height: 1.35;
}

body[lang="th"].step-result .result-plan {
    width: min(300px, 100%);
    margin-bottom: 34px;
}

body[lang="th"].step-result .result-plan h3 {
    margin-bottom: 12px;
    font-size: 32px;
    line-height: 1.18;
}

body[lang="th"].step-result .result-radio {
    width: 22px;
    height: 22px;
    margin-top: 3px;
}

body[lang="th"].step-result .result-plan-choice {
    grid-template-columns: 26px 1fr;
    gap: 8px;
}

body[lang="th"].step-result .result-plan-choice strong {
    font-size: 29px;
    line-height: 1.18;
}

body[lang="th"].step-result .result-plan-choice p,
body[lang="th"].step-result .result-plan-choice b {
    font-size: 18px;
    line-height: 1.28;
}

body[lang="th"].step-result .result-plan-note {
    width: calc(100% - 4px);
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.45;
}

body[lang="th"].step-result .result-plan-note p {
    margin-bottom: 5px;
}

.result-sharebar {
    width: min(310px, 100%);
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 12px auto 0;
    padding: 8px 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.result-save-form {
    margin: 0;
}

.result-share-action {
    appearance: none;
    border: 0;
    background: transparent;
    color: #555;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-family: inherit;
    cursor: pointer;
    min-width: 66px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.result-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffa900;
    color: #fff;
    box-shadow: 0 8px 16px rgba(180, 129, 0, 0.28);
}

.result-action-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

.result-share-action small {
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}

.result-capture-stage.is-capturing-result {
    height: auto !important;
    overflow: visible !important;
}

.result-capture-stage.is-capturing-result .result-sharebar {
    display: none;
}

.is-capturing-result .app-shell,
.result-capture-stage.is-capturing-result .app-shell {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 6px 14px 0 !important;
    gap: 2px !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body.is-capturing-result.step-result .app-header,
html.is-ipad-like body.is-capturing-result.step-result .app-header,
.result-capture-stage.is-capturing-result .app-header {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}

body.is-capturing-result.step-result .logo,
html.is-ipad-like body.is-capturing-result.step-result .logo,
.result-capture-stage.is-capturing-result .logo {
    position: static !important;
    display: block !important;
    width: min(344px, 80vw) !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 8px !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

body.is-capturing-result[lang="th"].step-result .logo,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .logo {
    width: min(300px, 74vw) !important;
}

.is-capturing-result .result-page-card {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.is-capturing-result .result-capture,
.result-capture-stage.is-capturing-result .result-capture {
    overflow: visible !important;
}

.is-capturing-result .result-plan-note {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Result PNG capture always uses portrait/mobile layout (430px), even on landscape devices. */
body.is-capturing-result.step-result .app-shell,
html.is-ipad-like body.is-capturing-result.step-result .app-shell,
.result-capture-stage.is-capturing-result .app-shell {
    display: block !important;
    width: 430px !important;
    max-width: 430px !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 6px 14px 0 !important;
    gap: 2px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

body.is-capturing-result.step-result .result-page-card,
html.is-ipad-like body.is-capturing-result.step-result .result-page-card,
.result-capture-stage.is-capturing-result .result-page-card {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 2px 12px 32px !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body.is-capturing-result[lang="th"].step-result .result-page-card,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-page-card {
    padding: 4px 16px 32px !important;
}

body.is-capturing-result.step-result .result-capture,
html.is-ipad-like body.is-capturing-result.step-result .result-capture,
.result-capture-stage.is-capturing-result .result-capture {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

body.is-capturing-result.step-result .result-plan,
html.is-ipad-like body.is-capturing-result.step-result .result-plan,
.result-capture-stage.is-capturing-result .result-plan {
    display: block !important;
    width: min(300px, 100%) !important;
    max-width: 100% !important;
    margin: 0 auto 14px !important;
    text-align: left !important;
}

body.is-capturing-result[lang="en"].step-result .result-plan,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-plan {
    width: fit-content !important;
    max-width: 100% !important;
}

body.is-capturing-result.step-result .result-plan-choice,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice,
.result-capture-stage.is-capturing-result .result-plan-choice {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    grid-template-columns: 30px 1fr !important;
    gap: 8px !important;
    align-items: start !important;
    text-align: left !important;
}

body.is-capturing-result.step-result .result-radio,
html.is-ipad-like body.is-capturing-result.step-result .result-radio,
.result-capture-stage.is-capturing-result .result-radio {
    justify-self: center !important;
    align-self: start !important;
    margin-top: 3px !important;
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
    box-sizing: border-box !important;
}

html[lang="th"] .result-capture-stage.is-capturing-result .result-radio,
.result-capture-stage.is-capturing-result[lang="th"] .result-radio {
    width: 22px !important;
    height: 22px !important;
}

.result-capture-stage.is-capturing-result .result-plan-choice:has(.result-choice-sub) .result-radio {
    margin-top: 3px !important;
}

body.is-capturing-result[lang="th"].step-result .result-radio,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-radio {
    width: 22px !important;
    height: 22px !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-choice,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice {
    grid-template-columns: 30px 1fr !important;
    gap: 8px !important;
}

body.is-capturing-result[lang="en"].step-result .result-radio,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-radio {
    width: 18px !important;
    height: 18px !important;
    justify-self: center !important;
    align-self: start !important;
    margin-top: 3px !important;
}

body.is-capturing-result[lang="en"].step-result .result-plan-choice,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-plan-choice {
    grid-template-columns: 30px 1fr !important;
    gap: 8px !important;
}

body.is-capturing-result.step-result .result-plan-choice:has(.result-choice-sub) .result-radio,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice:has(.result-choice-sub) .result-radio {
    margin-top: 3px !important;
}

body.is-capturing-result.step-result .result-lines,
html.is-ipad-like body.is-capturing-result.step-result .result-lines,
.result-capture-stage.is-capturing-result .result-lines {
    display: inline-flex !important;
    min-width: 170px !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 5px !important;
    padding: 0 18px !important;
    font-size: 52px !important;
    line-height: 0.88 !important;
    vertical-align: baseline !important;
}

body.is-capturing-result.step-result .result-lines.is-lines-or-more,
html.is-ipad-like body.is-capturing-result.step-result .result-lines.is-lines-or-more,
.result-capture-stage.is-capturing-result .result-lines.is-lines-or-more {
    font-size: calc(52px * 0.9) !important;
}

body.is-capturing-result[lang="th"].step-result .result-lines,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-lines {
    min-width: 205px !important;
    margin-bottom: 22px !important;
    font-size: 52px !important;
}

body.is-capturing-result[lang="en"].step-result .result-lines,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-lines {
    margin-bottom: 20px !important;
}

body.is-capturing-result.step-result .result-plan-note,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-note,
.result-capture-stage.is-capturing-result .result-plan-note {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 9px 10px !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    border-radius: 8px !important;
}

body.is-capturing-result .capture-note-nowrap,
html.is-ipad-like body.is-capturing-result .capture-note-nowrap,
.result-capture-stage.is-capturing-result .capture-note-nowrap {
    white-space: nowrap !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-note,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-note,
.result-capture-stage.is-capturing-result[lang="th"] .result-plan-note {
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    line-height: 0 !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-note-image,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-note-image,
.result-capture-stage.is-capturing-result[lang="th"] .result-plan-note-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.is-capturing-result.step-result .result-plan-note-footer,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-note-footer,
.result-capture-stage.is-capturing-result .result-plan-note-footer {
    margin-top: 9px !important;
    line-height: 1.24 !important;
    text-align: left !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-note-footer,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-note-footer,
.result-capture-stage.is-capturing-result[lang="th"] .result-plan-note-footer {
    line-height: 1.24 !important;
}

body.is-capturing-result.step-result .result-footer-logo,
html.is-ipad-like body.is-capturing-result.step-result .result-footer-logo,
.result-capture-stage.is-capturing-result .result-footer-logo {
    display: none !important;
}

body.is-capturing-result.step-result .result-page-card h2,
body.is-capturing-result.step-result .result-capture h2,
html.is-ipad-like body.is-capturing-result.step-result .result-page-card h2,
html.is-ipad-like body.is-capturing-result.step-result .result-capture h2,
.result-capture-stage.is-capturing-result .result-page-card h2,
.result-capture-stage.is-capturing-result .result-capture h2 {
    width: 100% !important;
    margin: 4px 0 8px !important;
    font-size: 35px !important;
    line-height: 0.95 !important;
    text-align: center !important;
}

body.is-capturing-result[lang="th"].step-result .result-page-card h2,
body.is-capturing-result[lang="th"].step-result .result-capture h2,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-page-card h2,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-capture h2 {
    margin: 14px 0 20px !important;
    line-height: 0.92 !important;
    text-align: center !important;
}

body.is-capturing-result.step-result .result-score-title,
html.is-ipad-like body.is-capturing-result.step-result .result-score-title,
.result-capture-stage.is-capturing-result .result-score-title {
    margin: 0 0 6px !important;
    font-size: 73px !important;
    line-height: 1 !important;
}

body.is-capturing-result[lang="th"].step-result .result-score-title,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-score-title {
    gap: 7px !important;
    margin-bottom: 28px !important;
    font-size: 80px !important;
    letter-spacing: -1px !important;
}

body.is-capturing-result[lang="en"].step-result .result-score-title,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-score-title {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    font-size: 41px !important;
}

body.is-capturing-result.step-result .result-score-title strong,
html.is-ipad-like body.is-capturing-result.step-result .result-score-title strong,
.result-capture-stage.is-capturing-result .result-score-title strong {
    min-width: 52px !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    font-size: 56px !important;
    line-height: 1 !important;
}

body.is-capturing-result[lang="th"].step-result .result-score-title strong,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-score-title strong {
    min-width: 62px !important;
    min-height: 56px !important;
    font-size: 54px !important;
}

body.is-capturing-result[lang="en"].step-result .result-score-title strong,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-score-title strong {
    font-size: 35px !important;
}

body.is-capturing-result.step-result .result-recommendation,
html.is-ipad-like body.is-capturing-result.step-result .result-recommendation,
.result-capture-stage.is-capturing-result .result-recommendation {
    width: 100% !important;
    text-align: center !important;
}

body.is-capturing-result.step-result .result-level-label,
body.is-capturing-result.step-result .result-treatment-title,
html.is-ipad-like body.is-capturing-result.step-result .result-level-label,
html.is-ipad-like body.is-capturing-result.step-result .result-treatment-title {
    margin: 0 0 3px !important;
    font-size: 24px !important;
    line-height: 0.95 !important;
}

body.is-capturing-result[lang="th"].step-result .result-level-label,
body.is-capturing-result[lang="th"].step-result .result-treatment-title,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-level-label,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-treatment-title {
    margin-bottom: 7px !important;
    line-height: 1.32 !important;
}

body.is-capturing-result.step-result .result-level,
html.is-ipad-like body.is-capturing-result.step-result .result-level {
    margin: 0 0 7px !important;
    font-size: 28px !important;
    line-height: 0.98 !important;
}

body.is-capturing-result[lang="th"].step-result .result-level,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-level {
    margin-bottom: 28px !important;
    line-height: 1.32 !important;
}

body.is-capturing-result.step-result .result-note,
html.is-ipad-like body.is-capturing-result.step-result .result-note {
    width: min(350px, 100%) !important;
    margin: 0 auto 10px !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
}

body.is-capturing-result[lang="th"].step-result .result-note,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-note {
    width: min(345px, 100%) !important;
    margin-bottom: 42px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
}

body.is-capturing-result.step-result .result-plan h3,
html.is-ipad-like body.is-capturing-result.step-result .result-plan h3 {
    margin: 0 0 3px !important;
    font-size: 29px !important;
    line-height: 0.95 !important;
    text-align: center !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan h3,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan h3 {
    margin-bottom: 12px !important;
    font-size: 32px !important;
    line-height: 1.18 !important;
}

body.is-capturing-result[lang="en"].step-result .result-plan h3,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-plan h3 {
    margin-bottom: 18px !important;
    font-size: 28px !important;
    white-space: nowrap !important;
}

body.is-capturing-result.step-result .result-plan-choice strong,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice strong {
    font-size: 26px !important;
    line-height: 1 !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-choice strong,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice strong {
    font-size: 29px !important;
    line-height: 1.18 !important;
}

body.is-capturing-result[lang="en"].step-result .result-plan-choice strong,
html.is-ipad-like body.is-capturing-result[lang="en"].step-result .result-plan-choice strong {
    font-size: 24px !important;
    line-height: 1.05 !important;
}

body.is-capturing-result.step-result .result-choice-sub,
html.is-ipad-like body.is-capturing-result.step-result .result-choice-sub {
    font-size: 17px !important;
    line-height: 1 !important;
}

body.is-capturing-result.step-result .result-plan-choice p,
body.is-capturing-result.step-result .result-plan-choice b,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice p,
html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice b {
    font-size: 17px !important;
    line-height: 1.05 !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-choice p,
body.is-capturing-result[lang="th"].step-result .result-plan-choice b,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice p,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice b {
    font-size: 18px !important;
    line-height: 1.28 !important;
}

body.is-capturing-result[lang="th"].step-result .result-plan-choice,
html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice {
    grid-template-columns: 26px 1fr !important;
    gap: 8px !important;
}

.message {
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.message.ok {
    background: #e8ffe8;
    border: 1px solid #98d698;
}

.message.error {
    background: #ffeaea;
    border: 1px solid #f2a7a7;
}

.step-main .app-shell,
.step-welcome .app-shell {
    width: min(430px, 100vw);
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    box-sizing: border-box;
    padding: max(14px, env(safe-area-inset-top)) 10px calc(10dvh + env(safe-area-inset-bottom, 0px));
    gap: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.step-main .app-header,
.step-welcome .app-header {
    display: none;
}

.step-main .app-footer,
.step-welcome .app-footer {
    display: none;
}

.step-main .main-card,
.step-welcome .welcome-card {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
    padding: 0;
    flex: 0 0 auto;
    background: transparent;
    box-shadow: none;
}

.step-welcome .welcome-card {
    min-height: 0;
    gap: 0;
}

.step-main .main-body-image,
.step-welcome .welcome-body-image {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: auto;
    height: 100%;
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.step-main .main-body-image img,
.step-welcome img.welcome-body-image {
    display: block;
    width: auto;
    height: 100%;
    max-width: none;
}

@media (max-width: 767px) and (orientation: portrait) {
    .step-welcome .welcome-body-image {
        width: 100%;
        height: auto;
        max-width: 800px;
    }

    .step-welcome img.welcome-body-image {
        width: 100%;
        height: auto;
        max-width: 800px;
    }
}

.step-main .main-card,
.step-welcome .welcome-card {
    z-index: 2;
}

.step-main .lang-grid,
.step-welcome .welcome-start-form {
    position: static;
    transform: none;
    width: min(clamp(240px, 78vw, 360px), 92vw);
    margin: 0 auto;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(14px, 4.5vw, 24px);
}

.step-main .lang-grid .btn,
.step-welcome .welcome-start {
    min-width: 0;
    width: 100%;
    min-height: clamp(40px, 11.2vw, 52px);
    padding: clamp(10px, 2.8vw, 14px) clamp(16px, 5.1vw, 24px);
    font-size: clamp(15px, 4.2vw, 20px);
    line-height: 1;
}

.step-main .lang-grid .btn {
    color: var(--gold-dark);
    background: #fff;
    box-shadow: 0 2px 5px rgba(122, 78, 0, 0.12);
}

.step-welcome .welcome-start {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - clamp(14px, 4.5vw, 24px)) / 2);
    max-width: 100%;
}

.summary-card,
.plan-card,
.result-page-card {
    margin: 22px auto 74px;
    width: calc(100% - 18px);
}

.step-summary .summary-card {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 6px 12px;
    background: transparent;
    box-shadow: none;
}

.step-result .result-page-card {
    margin-top: 0;
}

.plan-card {
    margin-top: 18px;
    margin-bottom: 0;
    padding: 22px 24px 18px;
    text-align: center;
    border-radius: 26px;
    background: linear-gradient(180deg, #e6e6e6 0%, #ffffff 100%);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.11);
}

.plan-card h2 {
    font-size: clamp(42px, 11.5vw, 48px);
    line-height: 0.9;
    margin-bottom: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.plan-subtitle {
    width: min(315px, 100%);
    margin: 0 auto 10px;
    font-size: 23px;
    line-height: 0.95;
    font-weight: 800;
}

.plan-lines {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 164px;
    min-height: 42px;
    margin: 0 0 20px;
    padding: 6px 24px;
    border-radius: 6px;
    background: var(--gold);
    color: #fff;
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
}

.plan-lines.is-lines-or-more {
    font-size: calc(46px * 0.9);
}

.plan-card .choices {
    width: min(330px, 100%);
    margin: 0 auto;
    text-align: left;
    gap: 5px;
}

.plan-choice {
    display: grid;
    grid-template-columns: 27px 1fr;
    align-items: center;
    min-height: auto;
    padding: 1px 0;
    gap: 8px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.plan-choice:has(.plan-choice-sub) {
    align-items: start;
}

.plan-choice input {
    appearance: none;
    width: 27px;
    height: 27px;
    margin: 0;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: #fff;
    justify-self: center;
    align-self: center;
}

.plan-choice:has(.plan-choice-sub) input {
    align-self: start;
}

.plan-choice input:checked {
    box-shadow: inset 0 0 0 4px #fff;
    background: var(--gold);
}

.plan-choice > .plan-choice-text {
    color: #333;
    font-size: calc(28px * 0.9);
    font-weight: 700;
    line-height: 0.9;
}

.plan-choice-text strong {
    font: inherit;
    color: #111;
}

.plan-choice-muted {
    margin-left: 4px;
    color: #777;
    font-size: 0.9em;
    font-weight: 700;
}

.plan-choice-sub {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 0.68em;
    line-height: 0.95;
    font-weight: 800;
}

.plan-focus-areas {
    margin: -1px 0 10px 39px;
    color: #111;
    font-size: calc(20px * 0.9);
    line-height: 1.08;
    font-weight: 800;
}

.plan-focus-areas p,
.plan-focus-areas strong {
    display: block;
    margin: 0;
}

.plan-note {
    position: static;
    width: min(360px, calc(100% - 36px));
    margin: 14px auto 22px;
    color: #111;
    text-align: left;
    font-size: 11px;
    line-height: 1.32;
    font-weight: 800;
}

.plan-note-row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 4px;
    align-items: start;
}

.plan-note-row > strong {
    white-space: nowrap;
}

.plan-note ol,
.plan-note ul {
    margin: 0;
    padding-left: 13px;
}

.plan-note ul {
    padding-left: 0;
    list-style: none;
}

.plan-note li {
    margin: 0;
    line-height: 1.22;
}

.plan-note ul li::before {
    content: "- ";
}

body[lang="en"] .plan-card h2 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 0.92;
}

body[lang="en"] .summary-score-title {
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: clamp(38px, 11.5vw, 60px);
}

body[lang="en"] .summary-score-title span {
    white-space: nowrap;
}

body[lang="en"] .summary-score-title strong {
    font-size: clamp(34px, 10.2vw, 52px);
}

body[lang="en"] .question-heading,
body[lang="en"] .summary-score-title,
body[lang="en"] .summary-age-row,
body[lang="en"] .summary-group-head,
body[lang="en"] .summary-item,
body[lang="en"] .summary-item-sub,
body[lang="en"] .summary-level-label,
body[lang="en"] .summary-treatment-title,
body[lang="en"] .plan-card h2,
body[lang="en"] .plan-subtitle,
body[lang="en"] .result-page-card h2,
body[lang="en"] .result-level-label,
body[lang="en"] .result-treatment-title,
body[lang="en"] .result-plan h3 {
    text-transform: uppercase;
}

body[lang="en"].step-question .question-card,
body[lang="en"].step-question .question-actions {
    text-transform: uppercase;
}

body[lang="en"].step-question.question-first .question-actions .btn-back {
    text-transform: none;
}

body[lang="en"].step-result .result-page-card h2 {
    white-space: nowrap;
    font-size: clamp(26px, 6.2vw, 30px);
}

body[lang="en"].step-result .result-treatment-title {
    margin-bottom: 16px;
}

body[lang="en"].step-result .result-lines {
    margin-bottom: 20px;
}

body[lang="en"].step-result .result-score-title {
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: clamp(34px, 9.5vw, 46px);
}

body[lang="en"].step-result .result-score-title span {
    white-space: nowrap;
}

body[lang="en"].step-result .result-score-title strong {
    font-size: clamp(30px, 8.2vw, 40px);
}

body[lang="en"].step-result .result-plan {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
}

body[lang="en"].step-result .result-plan h3 {
    margin: 0 0 18px;
    font-size: clamp(22px, 6.6vw, 29px);
    white-space: nowrap;
    text-align: center;
}

body[lang="en"].step-result .result-plan-choice {
    grid-template-columns: 30px 1fr;
    gap: 8px;
}

body[lang="en"].step-result .result-radio {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    justify-self: center;
    align-self: start;
}

body[lang="en"].step-result .result-plan-choice strong {
    font-size: clamp(20px, 5.6vw, 26px);
    line-height: 1.05;
}

body[lang="en"] .plan-subtitle {
    font-size: 18px;
    letter-spacing: 0.1px;
}

body[lang="en"] .plan-choice > .plan-choice-text {
    font-size: calc(22px * 0.9);
    line-height: 0.95;
    text-transform: uppercase;
}

body[lang="en"] .plan-focus-areas {
    font-size: calc(17px * 0.9);
    text-transform: uppercase;
}

body[lang="en"] .plan-focus-areas p {
    text-transform: none;
}

.plan-note p {
    margin: 0 0 2px;
}

.step-plan .logo {
    width: min(344px, 80vw);
}

body.step-plan .app-shell {
    gap: 0;
}

.step-plan .plan-actions {
    margin-top: 20px;
    margin-bottom: max(12px, env(safe-area-inset-bottom));
}

.step-plan .plan-note {
    margin-bottom: 0;
}

body.step-plan .plan-lines {
    min-height: 0;
    height: auto;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1;
}

body.step-result .result-lines {
    display: inline-block;
    min-height: 0;
    height: auto;
    padding: 0 18px;
    line-height: 0.85;
    vertical-align: middle;
}

body.step-plan .plan-choice {
    grid-template-columns: 27px 1fr;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
}

body.step-plan .plan-choice:has(.plan-choice-sub) {
    align-items: start;
}

body.step-plan .plan-choice input {
    margin: 0;
    justify-self: center;
    align-self: center;
}

body.step-plan .plan-choice:has(.plan-choice-sub) input {
    align-self: start;
}

body.step-plan .plan-choice > .plan-choice-text {
    min-width: 0;
}

body.step-plan .plan-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

body.step-plan .plan-footer .plan-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 24px);
    font-size: 12px;
    line-height: 1.25;
    box-sizing: border-box;
}

body.step-plan .plan-footer .plan-note-row,
body.step-plan .plan-footer .plan-note-copy {
    width: fit-content;
    max-width: min(92vw, 880px);
    margin: 0 auto;
    text-align: left;
}

body.step-plan .plan-footer .plan-note {
    margin-bottom: clamp(12px, 1.8vh, 18px);
    margin-top: clamp(16px, 2.5vh, 24px);
}

body.step-plan .plan-footer .plan-actions {
    margin-top: 0;
}

body.step-plan .plan-footer .plan-note ol,
body.step-plan .plan-footer .plan-note ul {
    margin: 0;
    padding-left: 12px;
}

body.step-plan .plan-footer .plan-note li {
    line-height: 1.18;
}

html.is-ipad-like body.step-plan .plan-footer .plan-note {
    font-size: 12px !important;
}

@media (orientation: portrait) {
    body.step-plan .plan-body {
        display: flex;
        flex-direction: column;
    }
}

.result-page-card {
    background: transparent;
    box-shadow: none;
}

.result-page-card h2 {
    text-align: center;
}

.result-page-card .footer-actions:first-of-type {
    flex-wrap: wrap;
}

.result-page-card .footer-actions:first-of-type .btn {
    max-width: none;
}

@media (max-width: 380px) {
    .btn {
        font-size: 16px;
        min-width: 96px;
    }

    body.step-question .question-card .session,
    body.step-question .question-subtitle {
        font-size: 18px;
    }

    .question-card h2 {
        font-size: 30px;
    }

    body.step-question.question-first .question-card-age h2 {
        font-size: clamp(34px, 9.5vw, 40px);
    }

    body[lang="th"].step-question .question-card h2 {
        font-size: 34px;
    }

    body[lang="th"].step-question.question-first .question-card-age h2 {
        font-size: clamp(36px, 10vw, 42px);
    }

    .footer-actions .btn {
        font-size: 22px;
    }

    .summary-card h2,
    .plan-card h2 {
        font-size: 31px;
    }

    .result-page-card h2 {
        font-size: 24px;
    }
}

@media (min-width: 461px) {
    body {
        display: flex;
        justify-content: center;
        background-color: #dcdcdc;
    }

    body.step-question {
        background-color: transparent;
        background-size: cover, cover;
        background-position: center center, center center;
    }

    body.step-question.question-first {
        background-size: cover;
        background-position: center center;
    }

    body.step-summary {
        background-color: transparent;
        background-size: 100% 100dvh, 100% 100dvh;
        background-position: center top, center top;
    }

    body.step-plan {
        background-color: transparent;
        background-size: 100% 100dvh, 100% 100dvh;
        background-position: center top, center top;
    }

    body.step-result {
        background-color: transparent;
        background-size: cover, cover;
        background-position: center center, center center;
    }

    .app-shell {
        background: transparent;
        box-shadow: none;
    }

    body.step-main {
        background-color: #f29819;
        background-size: auto 100%;
        background-size: auto 100dvh;
        background-position: center center;
    }

    body.step-welcome {
        background-color: transparent;
        background-size: auto 100dvh;
        background-position: center center;
    }

    body.step-main .app-shell,
    body.step-welcome .app-shell {
        background: transparent;
        box-shadow: none;
    }
}

/* Desktop: full-bleed rear background; content column capped at 1400px */
@media (min-width: 1024px) {
    html:has(body.step-main),
    html:has(body.step-welcome) {
        background-color: transparent;
    }

    body {
        max-width: none;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .app-shell {
        width: 100%;
        max-width: var(--app-page-max-width);
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.step-main {
        background-color: #f29819;
        background-image: var(--page-bg-desktop, var(--page-bg-landscape, var(--page-bg)));
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }

    body.step-welcome {
        background-size: cover;
        background-position: center center;
    }
}

@media (min-width: 1024px) and (orientation: portrait) {
    body.step-main {
        background-color: #f29819;
        background-image: var(--page-bg-ipad, var(--page-bg));
        background-size: auto 100%;
        background-size: auto 100dvh;
        background-position: center center;
        background-repeat: no-repeat;
    }

    body.step-welcome {
        background-image: var(--page-bg-base-ipad, var(--page-bg-base));
        background-size: auto 100dvh;
        background-position: center center;
    }

    body.step-main .app-shell,
    body.step-welcome .app-shell {
        width: min(800px, 100%);
        max-width: none;
    }
}

.step-question .question-actions .btn,
.step-summary .summary-actions .btn,
.step-plan .plan-actions .btn {
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
}

/* Thai result: equal vertical rhythm (tight) */
body[lang="th"].step-result .result-page-card {
    min-height: auto;
    padding: 0 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

body[lang="th"].step-result .app-shell {
    padding: 6px 10px 60px;
    gap: 2px;
}

body[lang="th"].step-result .app-header {
    margin-top: 0;
}

body[lang="th"].step-result .logo {
    width: min(260px, 66vw);
}

body[lang="th"].step-result .result-capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
}

body[lang="th"].step-result .result-page-card h2,
body[lang="th"].step-result .result-capture h2 {
    margin: 0;
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.1;
}

body[lang="th"].step-result .result-score-title {
    gap: 8px;
    margin: 0;
    font-size: clamp(58px, 16.5vw, 78px);
    line-height: 1;
}

body[lang="th"].step-result .result-score-title strong {
    min-width: 58px;
    min-height: 52px;
    font-size: clamp(40px, 11vw, 54px);
}

body[lang="th"].step-result .result-recommendation {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    gap: 5px;
}

body[lang="th"].step-result .result-recommendation > * {
    margin: 0;
}

body[lang="th"].step-result .result-level-label,
body[lang="th"].step-result .result-treatment-title {
    font-size: 23px;
    line-height: 1.15;
}

body[lang="th"].step-result .result-treatment-title {
    font-size: 27px;
}

body[lang="th"].step-result .result-level {
    font-size: 24.3px;
    line-height: 1.15;
}

body[lang="th"].step-result .result-lines {
    min-width: 220px;
    min-height: 0;
    margin: 0;
    font-size: 50px;
}

body[lang="th"].step-result .result-note {
    width: min(355px, 100%);
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

body[lang="th"].step-result .result-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    gap: 5px;
}

body[lang="th"].step-result .result-plan h3 {
    margin: 0;
    font-size: 35px;
    line-height: 1.1;
}

body[lang="th"].step-result .result-plan-choice {
    grid-template-columns: 25px 1fr;
    gap: 10px;
    margin: 0;
}

body[lang="th"].step-result .result-radio {
    width: 21px;
    height: 21px;
}

body[lang="th"].step-result .result-plan-choice strong {
    margin: 0;
    font-size: 31px;
    line-height: 1.1;
}

body[lang="th"].step-result .result-choice-sub {
    font-size: 19px;
    line-height: 1.15;
}

body[lang="th"].step-result .result-plan-choice p,
body[lang="th"].step-result .result-plan-choice b {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

body[lang="th"].step-result .result-plan-note {
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 169, 0, 0.18);
    font-size: 11px;
    line-height: 1.2;
}

body[lang="th"].step-result .result-plan-note p {
    margin: 0 0 4px;
    line-height: 1.2;
}

body[lang="th"].step-result .result-plan-note p:last-child {
    margin-bottom: 0;
}

body[lang="th"].step-result .result-plan-note-title {
    display: block;
    margin: 0 0 4px;
    line-height: 1.2;
}

body[lang="th"].step-result .result-plan-note ol,
body[lang="th"].step-result .result-plan-note ul {
    margin: 0 0 4px;
    padding-left: 16px;
}

body[lang="th"].step-result .result-plan-note li {
    margin: 0 0 3px;
    line-height: 1.2;
}

body[lang="th"].step-result .result-plan-note li:last-child {
    margin-bottom: 0;
}

body[lang="th"].step-result .result-plan-note-footer {
    margin: 4px 0 0 !important;
    line-height: 1.2 !important;
}

body[lang="th"].step-result .result-sharebar {
    margin: 0 auto;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.is-email-open.step-result {
        width: 100dvw;
        min-width: 100dvw;
        overflow: hidden;
    }

    body.is-email-open.step-result .app-shell {
        width: 100% !important;
        max-width: none !important;
        min-height: 100dvh !important;
        height: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transform: none !important;
        filter: none !important;
    }

    body.is-email-open.step-result .result-page-card {
        width: calc(100% - 18px) !important;
        min-height: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.step-result .email-modal {
        position: fixed !important;
        inset: 0 !important;
        width: 100dvw !important;
        height: 100dvh !important;
        max-width: none !important;
        margin: 0 !important;
        padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
        transform: none !important;
        zoom: 1 !important;
        z-index: 10000;
    }

    body.step-result .email-dialog {
        width: min(380px, 52dvw);
    }

    body.step-question .logo,
    body.step-summary .logo,
    body.step-plan .logo,
    body.step-result .logo,
    body[lang="th"].step-result .logo {
        width: min(calc(344px * 1.21), calc(80vw * 1.21));
    }

    body.step-result .result-page-card h2 {
        font-size: clamp(calc(28px * 1.1), calc(8.2vw * 1.1), calc(40px * 1.1));
    }

    body.step-result .result-score-title {
        gap: calc(10px * 1.1);
        font-size: clamp(calc(58px * 1.1), calc(17vw * 1.1), calc(84px * 1.1));
    }

    body.step-result .result-score-title strong {
        min-width: calc(52px * 1.1);
        min-height: calc(48px * 1.1);
        font-size: clamp(calc(46px * 1.1), calc(13vw * 1.1), calc(64px * 1.1));
    }

    body.step-result .result-level-label,
    body.step-result .result-treatment-title {
        font-size: calc(24px * 1.1);
    }

    body.step-result .result-level {
        font-size: calc(28px * 1.1);
    }

    body.step-result .result-lines {
        min-width: calc(170px * 1.1);
        min-height: 0;
        font-size: calc(52px * 1.1);
    }

    body.step-result .result-lines.is-lines-or-more {
        font-size: calc(52px * 1.1 * 0.9);
    }

    body.step-result .result-note {
        font-size: calc(17px * 1.1);
    }

    body.step-result .result-plan h3 {
        font-size: calc(29px * 1.1);
    }

    body.step-result .result-radio {
        width: calc(18px * 1.1);
        height: calc(18px * 1.1);
        justify-self: center;
        align-self: start;
    }

    body.step-result .result-plan-choice {
        grid-template-columns: calc(30px * 1.1) 1fr;
        gap: calc(8px * 1.1);
    }

    body.step-result .result-plan-choice strong {
        font-size: calc(26px * 1.1);
    }

    body.step-result .result-choice-sub {
        font-size: calc(17px * 1.1);
    }

    body.step-result .result-plan-choice p,
    body.step-result .result-plan-choice b {
        font-size: calc(17px * 1.1);
    }

    body.step-result .result-plan-note {
        width: 80%;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
        padding: calc(9px * 1.1) calc(10px * 1.1);
        font-size: calc(11px * 1.1);
    }

    body.step-result .result-sharebar {
        width: 74%;
        max-width: 580px;
        min-height: calc(66px * 1.1);
        gap: 22px;
        padding: calc(10px * 1.1) calc(18px * 1.1);
        justify-content: center;
    }

    body.step-result .result-action-icon {
        width: 46px;
        height: 46px;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(180, 129, 0, 0.34);
    }

    body.step-result .result-action-icon svg {
        width: 25px;
        height: 25px;
    }

    body.step-result .result-share-action {
        flex: 0 0 auto;
        min-width: 74px;
        max-width: 86px;
        gap: calc(4px * 1.1);
    }

    body.step-result .result-share-action small {
        font-size: calc(12px * 1.1);
    }

    body[lang="en"].step-result .result-page-card h2 {
        font-size: clamp(calc(26px * 1.1), calc(6.2vw * 1.1), calc(30px * 1.1));
    }

    body[lang="en"].step-result .result-score-title {
        font-size: clamp(calc(34px * 1.1), calc(9.5vw * 1.1), calc(46px * 1.1));
    }

    body[lang="en"].step-result .result-score-title strong {
        font-size: clamp(calc(30px * 1.1), calc(8.2vw * 1.1), calc(40px * 1.1));
    }

    body[lang="en"].step-result .result-plan h3 {
        font-size: clamp(calc(22px * 1.1), calc(6.6vw * 1.1), calc(29px * 1.1));
    }

    body[lang="en"].step-result .result-plan-choice strong {
        font-size: clamp(calc(20px * 1.1), calc(5.6vw * 1.1), calc(26px * 1.1));
    }

    body[lang="th"].step-result .result-page-card h2 {
        font-size: clamp(calc(28px * 1.1), calc(8vw * 1.1), calc(38px * 1.1));
    }

    body[lang="th"].step-result .result-score-title {
        font-size: clamp(calc(58px * 1.1), calc(16.5vw * 1.1), calc(78px * 1.1));
    }

    body[lang="th"].step-result .result-score-title strong {
        min-width: calc(58px * 1.1);
        min-height: calc(52px * 1.1);
        font-size: clamp(calc(40px * 1.1), calc(11vw * 1.1), calc(54px * 1.1));
    }

    body[lang="th"].step-result .result-level-label {
        font-size: calc(23px * 1.1);
    }

    body[lang="th"].step-result .result-treatment-title {
        font-size: calc(27px * 1.1);
    }

    body[lang="th"].step-result .result-level {
        font-size: calc(24.3px * 1.1);
    }

    body[lang="th"].step-result .result-lines {
        min-width: calc(220px * 1.1);
        min-height: 0;
        font-size: calc(50px * 1.1);
    }

    body[lang="th"].step-result .result-note {
        font-size: calc(17px * 1.1);
    }

    body[lang="th"].step-result .result-plan h3 {
        font-size: calc(35px * 1.1);
    }

    body[lang="th"].step-result .result-radio {
        width: calc(21px * 1.1);
        height: calc(21px * 1.1);
    }

    body[lang="th"].step-result .result-plan-choice {
        grid-template-columns: calc(25px * 1.1) 1fr;
        gap: calc(8px * 1.1);
    }

    body[lang="th"].step-result .result-plan-choice strong {
        font-size: calc(31px * 1.1);
    }

    body[lang="th"].step-result .result-choice-sub {
        font-size: calc(19px * 1.1);
    }

    body[lang="th"].step-result .result-plan-choice p,
    body[lang="th"].step-result .result-plan-choice b {
        font-size: calc(20px * 1.1);
    }

    body[lang="th"].step-result .result-plan-note {
        width: 80%;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
        padding: calc(13px * 1.1) calc(14px * 1.1);
        font-size: calc(11px * 1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    body.is-page-leaving .app-shell {
        filter: none;
        transform: none;
    }

    body.is-page-leaving .page-loading {
        opacity: 0;
    }
}

@supports (-webkit-touch-callout: none) {
    @media (min-width: 768px) and (max-width: 1023px) {
        body.step-main .app-shell,
        body.step-welcome .app-shell,
        body.step-question .app-shell,
        body.step-summary .app-shell,
        body.step-plan .app-shell,
        body.step-result .app-shell {
            width: 100%;
            max-width: 100%;
        }

        body.step-main {
            background-image: var(--page-bg-ipad);
        }

        body.step-main .lang-grid {
            transform: translateY(16px);
        }

        body.step-welcome {
            background-image: var(--page-bg-base-ipad);
            background-size: auto 100dvh;
            background-position: center center;
        }

        body.step-question {
            background-image: var(--page-bg-ipad);
            background-size: 100% 100dvh;
            background-position: center top;
        }

        body.step-question .question-card {
            width: 80%;
        }

        body.step-question .question-heading {
            grid-template-columns: auto 1fr;
            column-gap: 20px;
        }

        body.step-question .question-card .session,
        body.step-question .question-subtitle {
            font-size: clamp(17px, 5.06vw, 26px);
        }

        body.step-question .question-card h2 {
            font-size: clamp(36px, 9.66vw, 47px);
        }

        body[lang="th"].step-question .question-card h2 {
            font-size: clamp(39px, 10.6vw, 52px);
        }

        body.step-question .age-choices .choice > span {
            font-size: 31px;
        }

        body.step-question .age-choices .choice.is-selected > span {
            font-size: 40px;
            min-height: 74px;
            padding: 0 12px;
        }

        body.step-question .option-label {
            font-size: 23px;
        }

        body.step-question .score-dot {
            font-size: 28px;
        }

        body.step-question .thumb-label {
            font-size: 16px;
        }

        body.step-question .score-mini {
            font-size: 14px;
        }

        body.step-question .scale-choices .choice span {
            font-size: 20px;
        }

        body.step-question .question-actions .btn {
            font-size: 23px;
        }

        body.step-summary .summary-actions .btn {
            font-size: 23px;
        }

        body.step-summary {
            background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
            background-size: 100% 100dvh, 100% 100dvh;
            background-position: center top, center top;
        }

        body.step-summary .summary-card {
            width: 88%;
            padding-left: 20px;
            padding-right: 20px;
            padding-bottom: 30px;
        }

        body.step-summary .summary-panel {
            padding-left: 24px;
            padding-right: 24px;
            padding-bottom: 30px;
        }

        body.step-summary .summary-note {
            width: min(420px, 100%);
        }

        body.step-summary .summary-level {
            font-size: 29.4px;
        }

        body.step-summary .summary-note {
            font-size: 20.6px;
        }

        body.step-summary .summary-table-btn {
            margin-top: 12px;
        }

        body.step-summary .summary-actions {
            margin-top: 40px;
        }

        body.step-plan {
            background-image: var(--page-bg-ipad), var(--page-bg-base-ipad);
            background-size: 100% 100dvh, 100% 100dvh;
            background-position: center top, center top;
        }

        body.step-plan .plan-card {
            width: 80%;
        }

        body.step-plan .plan-card h2 {
            font-size: clamp(46px, 12.65vw, 53px);
        }

        body[lang="en"].step-plan .plan-card h2 {
            font-size: clamp(37px, 11vw, 48px);
        }

        body.step-plan .plan-subtitle {
            font-size: calc(23px * 1.1);
        }

        body[lang="en"].step-plan .plan-subtitle {
            font-size: calc(18px * 1.1);
        }

        body.step-plan .plan-lines {
            font-size: calc(46px * 1.1);
        }

        body.step-plan .plan-lines.is-lines-or-more {
            font-size: calc(46px * 1.1 * 0.9);
        }

        body.step-plan .plan-choice > .plan-choice-text {
            font-size: calc(28px * 1.1 * 0.9);
        }

        body[lang="en"].step-plan .plan-choice > .plan-choice-text {
            font-size: calc(22px * 1.1 * 0.9);
        }

        body.step-plan .plan-focus-areas {
            font-size: calc(20px * 1.1 * 0.9);
        }

        body[lang="en"].step-plan .plan-focus-areas {
            font-size: calc(17px * 1.1 * 0.9);
        }

        body.step-plan .plan-note {
            font-size: calc(11px * 1.1);
        }

        body.step-plan .plan-actions .btn {
            font-size: calc(20px * 1.1);
        }

        body.step-result {
            background-image: var(--page-bg-base-ipad);
            background-size: cover;
            background-position: center center;
        }

        body.step-question .age-footer-logo {
            display: none;
        }

        body.step-question .logo,
        body.step-summary .logo,
        body.step-plan .logo,
        body.step-result .logo,
        body[lang="th"].step-result .logo {
            width: min(calc(344px * 1.21), calc(80vw * 1.21));
        }

        body.step-result .result-plan-note,
        body.step-result .result-sharebar {
            width: 80%;
            max-width: 80%;
            margin-left: auto;
            margin-right: auto;
        }
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.step-summary .summary-card {
        width: 88% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body.step-summary .summary-panel {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    body.step-summary .summary-note {
        width: min(420px, 100%) !important;
    }

    body.step-summary .summary-recommendation .summary-level {
        font-size: 29.4px !important;
    }

    body.step-summary .summary-recommendation .summary-note {
        font-size: 20.6px !important;
    }

    body.step-summary .summary-recommendation .summary-table-btn {
        position: relative;
        top: 20px;
    }

    body.step-summary .summary-actions {
        margin-top: 52px !important;
    }
}

html.is-ipad-like body.step-summary .summary-card {
    width: 88% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

html.is-ipad-like body.step-summary .summary-panel {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

html.is-ipad-like body.step-summary .summary-note {
    width: min(420px, 100%) !important;
}

html.is-ipad-like body.step-summary .summary-recommendation .summary-level {
    font-size: 29.4px !important;
}

html.is-ipad-like body.step-summary .summary-recommendation .summary-note {
    font-size: 20.6px !important;
}

html.is-ipad-like body.step-summary .summary-recommendation .summary-table-btn {
    position: relative;
    top: 20px;
}

html.is-ipad-like body.step-summary .summary-actions {
    margin-top: 52px !important;
}

@media (orientation: landscape) {
    body.step-main .app-shell,
    html.is-ipad-like body.step-main .app-shell {
        width: 100dvw;
        max-width: 100dvw;
        overflow: visible;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: max(32px, env(safe-area-inset-bottom)) !important;
    }

    body.step-main .main-body-image,
    .step-main .main-body-image {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        height: 100%;
        max-width: none;
    }

    body.step-main .lang-grid,
    html.is-ipad-like body.step-main .lang-grid {
        transform: translateY(-64px) !important;
        width: min(clamp(240px, 40vw, 360px), 92vw);
    }

    body.step-welcome .app-shell,
    html.is-ipad-like body.step-welcome .app-shell {
        width: 100dvw;
        max-width: 100dvw;
        overflow: visible;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
    }

    body.step-welcome .welcome-body-image,
    .step-welcome .welcome-body-image {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        height: 100%;
        height: 100dvh;
        max-width: none;
    }

    body.step-welcome.is-welcome-landscape-anchor .welcome-card,
    html.is-ipad-like body.step-welcome.is-welcome-landscape-anchor .welcome-card {
        position: absolute;
        inset: 0;
        display: block;
        pointer-events: none;
        z-index: 2;
    }

    body.step-welcome.is-welcome-landscape-anchor .welcome-start-form,
    html.is-ipad-like body.step-welcome.is-welcome-landscape-anchor .welcome-start-form {
        display: block;
        position: absolute;
        margin: 0 !important;
        transform: translate(-50%, -50%) !important;
        pointer-events: auto;
        z-index: 3;
    }

    body.step-welcome.is-welcome-landscape-anchor .welcome-start,
    html.is-ipad-like body.step-welcome.is-welcome-landscape-anchor .welcome-start {
        width: 100%;
        max-width: 100%;
    }

    body.step-question .app-shell,
    html.is-ipad-like body.step-question .app-shell {
        width: 100dvw;
        max-width: 100dvw;
        overflow: visible;
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    body.step-question .app-header,
    body.step-summary .app-header,
    body.step-plan .app-header,
    body.step-result .app-header,
    html.is-ipad-like body.step-question .app-header,
    html.is-ipad-like body.step-summary .app-header,
    html.is-ipad-like body.step-plan .app-header,
    html.is-ipad-like body.step-result .app-header {
        position: static;
        height: 0;
        min-height: 0;
        overflow: visible;
        margin: 0;
        padding: 0;
        z-index: 20;
    }

    body.step-question .logo,
    body.step-summary .logo,
    body.step-plan .logo,
    body.step-result .logo,
    body[lang="th"].step-plan .logo,
    body[lang="th"].step-result .logo,
    html.is-ipad-like body.step-question .logo,
    html.is-ipad-like body.step-summary .logo,
    html.is-ipad-like body.step-plan .logo,
    html.is-ipad-like body.step-result .logo,
    html.is-ipad-like body[lang="th"].step-plan .logo,
    html.is-ipad-like body[lang="th"].step-result .logo {
        position: fixed !important;
        top: max(6px, env(safe-area-inset-top)) !important;
        left: calc(env(safe-area-inset-left, 0px) + 28px) !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: none !important;
        width: min(260px, 32vw) !important;
        max-width: none !important;
        z-index: 20;
    }

    body.step-question .age-footer-logo,
    body.step-summary .age-footer-logo,
    body.step-plan .age-footer-logo,
    body.step-result .age-footer-logo,
    html.is-ipad-like body.step-question .age-footer-logo,
    html.is-ipad-like body.step-summary .age-footer-logo,
    html.is-ipad-like body.step-plan .age-footer-logo,
    html.is-ipad-like body.step-result .age-footer-logo {
        display: block !important;
        position: fixed !important;
        top: max(6px, env(safe-area-inset-top)) !important;
        right: calc(env(safe-area-inset-right, 0px) + 28px) !important;
        left: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: none !important;
        z-index: 20;
    }

    body.step-question .age-footer-logo img,
    body.step-summary .age-footer-logo img,
    body.step-plan .age-footer-logo img,
    body.step-result .age-footer-logo img,
    html.is-ipad-like body.step-plan .age-footer-logo img,
    html.is-ipad-like body.step-result .age-footer-logo img {
        width: min(260px, 32vw) !important;
        max-width: none !important;
        height: auto;
        display: block;
    }

    body.step-summary,
    html.is-ipad-like body.step-summary {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }

    body.step-summary .app-shell,
    html.is-ipad-like body.step-summary .app-shell {
        width: 100dvw;
        max-width: 100dvw;
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 0;
        gap: 0;
        overflow: visible;
    }

    body.step-summary .summary-card {
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: min(94dvw, var(--app-page-max-width)) !important;
        max-width: min(94dvw, var(--app-page-max-width)) !important;
        margin: 0 auto;
        padding: clamp(48px, 10vh, 60px) clamp(12px, 2vw, 24px) max(12px, env(safe-area-inset-bottom)) !important;
        min-height: 0;
        background: transparent;
        box-shadow: none;
    }

    body.step-summary .summary-score-title {
        flex-shrink: 0;
        margin: 0 0 clamp(8px, 1.4vh, 14px);
        font-size: clamp(34px, 5vw, 54px);
        gap: clamp(8px, 1.2vw, 14px);
    }

    body.step-summary .summary-score-title strong {
        min-width: clamp(42px, 5.8vw, 58px);
        min-height: clamp(38px, 5.2vw, 50px);
        padding: 0 clamp(8px, 1.2vw, 12px);
        font-size: clamp(30px, 4.2vw, 46px);
        border-radius: 8px;
    }

    body[lang="en"].step-summary .summary-score-title {
        font-size: clamp(30px, 4.5vw, 48px);
    }

    body[lang="en"].step-summary .summary-score-title strong {
        font-size: clamp(28px, 3.8vw, 42px);
    }

    body.step-summary .summary-body {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: clamp(14px, 2.4vw, 28px);
        width: 100%;
        min-height: 0;
    }

    body.step-summary .summary-panel {
        flex: 0 0 50%;
        max-width: 50%;
        align-self: center;
        height: auto;
        overflow: visible;
        padding: clamp(14px, 2vw, 20px) clamp(16px, 2.4vw, 24px) clamp(12px, 1.6vw, 16px) !important;
        border-radius: 16px;
    }

    body.step-summary .summary-age-row {
        margin-bottom: clamp(8px, 1.2vh, 12px);
        font-size: clamp(16px, 2vw, 21px);
        grid-template-columns: auto 1fr auto;
        gap: clamp(8px, 1.2vw, 12px);
    }

    body.step-summary .summary-age-row strong {
        min-width: clamp(52px, 7vw, 68px);
        padding: 0 clamp(12px, 1.6vw, 16px);
        font-size: clamp(32px, 4.4vw, 44px);
    }

    body.step-summary .summary-age-row strong.is-summary-age-extended {
        min-width: 0;
        padding: 0 clamp(8px, 1.2vw, 12px);
        font-size: clamp(26px, 3.4vw, 34px);
    }

    body[lang="en"].step-summary .summary-age-row strong.is-summary-age-extended {
        font-size: clamp(24px, 3vw, 30px);
    }

    body.step-summary .summary-age-row small {
        font-size: clamp(16px, 2vw, 21px);
    }

    body.step-summary .summary-group {
        margin-top: clamp(6px, 1vh, 10px);
        gap: clamp(2px, 0.35vh, 4px);
    }

    body.step-summary .summary-group + .summary-group {
        margin-top: clamp(8px, 1.2vh, 12px);
    }

    body.step-summary .summary-group-head {
        font-size: clamp(15px, 1.9vw, 20px);
        line-height: 1.15;
        margin-bottom: clamp(1px, 0.25vh, 3px);
    }

    body.step-summary .summary-item {
        font-size: clamp(14px, 1.7vw, 18px);
        grid-template-columns: 1fr auto;
        gap: clamp(8px, 1.2vw, 12px);
        padding-left: 4px;
        line-height: 1.21;
    }

    body.step-summary .summary-item b {
        width: clamp(18px, 2.2vw, 22px);
        height: clamp(18px, 2.2vw, 22px);
        font-size: clamp(14px, 1.7vw, 17px);
        border-radius: 4px;
    }

    body.step-summary .summary-recommendation {
        flex: 0 0 50%;
        max-width: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0;
        min-width: 0;
        align-self: center;
        padding: clamp(4px, 1vh, 8px) clamp(8px, 1.2vw, 16px);
    }

    body.step-summary .summary-recommendation .summary-level-label,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-level-label {
        width: 100%;
        max-width: clamp(360px, 48vw, 540px);
        font-size: clamp(20px, 2.5vw, 28px) !important;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    body.step-summary .summary-recommendation .summary-level,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-level {
        width: 100%;
        max-width: clamp(240px, 32vw, 380px) !important;
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(16px, 2vw, 22px) !important;
        line-height: 1.12 !important;
        margin-bottom: clamp(6px, 1vh, 10px);
    }

    body.step-summary .summary-treatment-title {
        font-size: clamp(13px, 1.6vw, 18px);
        margin-bottom: clamp(4px, 0.8vh, 8px);
    }

    body.step-summary .summary-recommendation .summary-lines,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-lines {
        font-size: clamp(36px, 4.8vw, 52px) !important;
        min-width: clamp(200px, 28vw, 320px);
        min-height: clamp(32px, 4.5vh, 48px);
        padding: clamp(4px, 0.8vh, 8px) clamp(24px, 3.2vw, 40px);
        margin-bottom: clamp(6px, 1vh, 10px);
        border-radius: 8px;
    }

    body.step-summary .summary-recommendation .summary-lines.is-lines-or-more,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-lines.is-lines-or-more {
        font-size: clamp(32.4px, 4.32vw, 46.8px) !important;
    }

    body.step-summary .summary-recommendation .summary-note,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-note {
        width: 100% !important;
        max-width: clamp(210px, 27vw, 310px) !important;
        font-size: clamp(12px, 1.45vw, 16px) !important;
        line-height: 1.2 !important;
        margin-bottom: clamp(10px, 1.6vh, 16px);
    }

    body.step-summary .summary-recommendation .summary-table-btn,
    html.is-ipad-like body.step-summary .summary-recommendation .summary-table-btn {
        position: static !important;
        top: auto !important;
        margin-top: clamp(4px, 0.6vh, 8px) !important;
        min-width: clamp(200px, 26vw, 300px);
        min-height: clamp(36px, 5vh, 46px);
        padding: clamp(8px, 1.2vh, 12px) clamp(22px, 3vw, 36px);
        font-size: clamp(18px, 2.2vw, 26px);
        letter-spacing: 1px;
    }

    body.step-summary .summary-actions {
        flex-shrink: 0;
        width: min(360px, 44dvw) !important;
        margin: clamp(10px, 1.6vh, 16px) auto 0 !important;
        gap: clamp(12px, 2vw, 20px);
    }

    body.step-summary .summary-actions .btn {
        max-width: none;
        flex: 1 1 0;
        min-height: clamp(42px, 7.5vh, 50px);
        padding: 12px 20px;
        font-size: clamp(15px, 2vw, 19px);
    }

    body.step-question.question-first,
    html.is-ipad-like body.step-question.question-first {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }

    body.step-question.question-first .app-shell,
    html.is-ipad-like body.step-question.question-first .app-shell {
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        padding-top: 0;
        gap: 0;
    }

    body.step-question.question-first .question-stack {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: clamp(10px, 2.2vh, 18px);
        width: min(88dvw, 960px);
        margin: 0 auto;
        padding-top: clamp(52px, 11vh, 68px);
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        min-height: 0;
    }

    body.step-question.question-first .question-card-age {
        width: 100%;
        margin: 0;
        min-height: 0;
        padding: clamp(14px, 2.4vw, 22px) clamp(16px, 3vw, 28px);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: clamp(14px, 2.8vw, 28px);
        border-radius: 18px;
        background: var(--card);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    }

    body.step-question.question-first .question-card-age::after {
        display: none;
    }

    body.step-question.question-first .question-card-age .question-heading {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        margin: 0;
        padding-right: 0;
        align-items: center;
        column-gap: clamp(10px, 1.8vw, 18px);
        grid-template-columns: auto 1fr;
    }

    body.step-question.question-first .question-card-age .question-heading.question-heading-two-line {
        align-items: center;
    }

    body.step-question.question-first .question-card-age .question-heading.question-heading-two-line > div:last-child {
        transform: none;
    }

    body.step-question.question-first .question-card-age .progress {
        font-size: clamp(68px, 12vw, 108px);
        letter-spacing: -6px;
        line-height: 0.85;
    }

    body.step-question.question-first .question-card-age .session {
        font-size: clamp(10px, 1.45vw, 15px);
        line-height: 1.05;
        margin-bottom: 2px;
    }

    body.step-question.question-first .question-card-age h2 {
        font-size: clamp(26px, 4.2vw, 46px);
        line-height: 0.92;
        white-space: normal;
    }

    body.step-question.question-first .question-card-age #question-form,
    body.step-question.question-first .question-card-age form {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
    }

    body.step-question.question-first .question-card-age .age-choices {
        position: static;
        top: auto;
        right: auto;
        transform: none;
        width: clamp(132px, 20vw, 248px);
        height: clamp(120px, 22vh, 192px);
        padding: clamp(44px, 8vh, 68px) 0;
        margin: 0;
    }

    body.step-question.question-first .age-choices .choice {
        flex: 0 0 clamp(40px, 6vh, 56px);
    }

    body.step-question.question-first .age-choices .choice > span {
        font-size: clamp(18px, 2.4vw, 27px);
        min-height: clamp(40px, 6vh, 56px);
    }

    body.step-question.question-first .age-choices .choice.is-selected > span {
        font-size: clamp(24px, 3.2vw, 40px);
        min-height: clamp(44px, 6.5vh, 64px);
    }

    body.step-question.question-first .question-actions {
        width: min(360px, 44dvw);
        gap: clamp(12px, 2vw, 20px);
        margin-top: clamp(4px, 1vh, 10px);
        margin-bottom: max(10px, env(safe-area-inset-bottom));
        flex-shrink: 0;
    }

    body.step-question.question-first .question-actions .btn {
        max-width: none;
        flex: 1 1 0;
        min-height: clamp(42px, 7.5vh, 50px);
        padding: 12px 20px;
        font-size: clamp(15px, 2vw, 19px);
    }

    body.step-question.question-scale,
    html.is-ipad-like body.step-question.question-scale {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }

    body.step-question.question-scale .app-shell,
    html.is-ipad-like body.step-question.question-scale .app-shell {
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        padding-top: 0;
        gap: 0;
    }

    body.step-question.question-scale .question-stack {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: clamp(10px, 2.2vh, 18px);
        width: min(88dvw, 960px);
        margin: 0 auto;
        padding-top: clamp(52px, 11vh, 68px);
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        min-height: 0;
    }

    body.step-question.question-scale .question-card-scale {
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    body.step-question.question-scale .question-card-hero {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: clamp(14px, 2.8vw, 28px);
        width: 100%;
        padding: clamp(14px, 2.4vw, 22px) clamp(16px, 3vw, 28px);
        border-radius: 18px;
        background: var(--card);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    }

    body.step-question.question-scale .question-heading {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        margin: 0;
        align-items: center;
        column-gap: clamp(10px, 1.8vw, 18px);
    }

    body.step-question.question-scale .question-heading-two-line {
        align-items: center;
    }

    body.step-question.question-scale .question-heading-two-line > div:last-child {
        transform: none;
    }

    body.step-question.question-scale .progress {
        font-size: clamp(68px, 12vw, 108px);
        letter-spacing: -6px;
        line-height: 0.85;
    }

    body.step-question.question-scale .question-card .session {
        font-size: clamp(10px, 1.45vw, 15px);
        line-height: 1.05;
        margin-bottom: 2px;
    }

    body.step-question.question-scale .question-card h2 {
        font-size: clamp(26px, 4.2vw, 46px);
        line-height: 0.92;
        white-space: normal;
    }

    body.step-question.question-scale .question-preview {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: clamp(132px, 20vw, 210px);
    }

    body.step-question.question-scale .main-image-wrap {
        width: 100%;
        height: auto;
        max-height: clamp(120px, 22vh, 200px);
        margin: 0;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.step-question.question-scale .main-image {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: clamp(120px, 22vh, 200px);
        object-fit: contain;
        border-radius: 16px;
    }

    body.step-question.question-scale .score-dot {
        width: clamp(28px, 4vw, 38px);
        height: clamp(28px, 4vw, 38px);
        font-size: clamp(16px, 2.4vw, 22px);
        right: 6px;
        top: 6px;
    }

    body.step-question.question-scale .option-label {
        margin: 6px 0 0;
        font-size: clamp(13px, 1.8vw, 19px);
        font-weight: 700;
        line-height: 1.1;
    }

    body[lang="en"].step-question.question-scale .option-label,
    body[lang="en"].step-question.question-scale .thumb-label {
        text-transform: uppercase;
    }

    body.step-question.question-scale .question-scale-form {
        width: 100%;
        margin: 0;
    }

    @media (min-width: 1024px) {
        body.step-question.question-scale .question-card-scale {
            display: flex;
            flex-direction: column;
            gap: clamp(32px, 5dvh, 52px) !important;
        }

        body.step-question.question-scale .question-scale-form {
            margin-top: 0 !important;
        }
    }

    body.step-question.question-scale .thumb-row {
        justify-content: center;
        gap: clamp(6px, 1.1vw, 12px);
        padding: 0;
        margin: 0;
        overflow: visible;
    }

    body.step-question.question-scale .thumb-choice {
        width: clamp(54px, 8.8vw, 88px);
        flex: 0 0 auto;
        gap: 4px;
    }

    body.step-question.question-scale .thumb-choice img {
        border-radius: 10px;
        border-width: 2px;
    }

    body.step-question.question-scale .score-mini {
        width: clamp(18px, 2.4vw, 24px);
        height: clamp(18px, 2.4vw, 24px);
        font-size: clamp(10px, 1.3vw, 13px);
        margin-bottom: -5px;
    }

    body.step-question.question-scale .thumb-label {
        font-size: clamp(8px, 1.1vw, 11px);
        font-weight: 700;
        color: var(--gold);
        line-height: 1.05;
    }

    body.step-question.question-scale .question-actions {
        width: min(360px, 44dvw);
        gap: clamp(12px, 2vw, 20px);
        margin-top: clamp(4px, 1vh, 10px);
        margin-bottom: max(10px, env(safe-area-inset-bottom));
        flex-shrink: 0;
    }

    body.step-question.question-scale .question-actions .btn {
        max-width: none;
        flex: 1 1 0;
        min-height: clamp(42px, 7.5vh, 50px);
        padding: 12px 20px;
        font-size: clamp(15px, 2vw, 19px);
    }

    body.step-plan,
    html.is-ipad-like body.step-plan {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
        min-height: 100dvh;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.step-plan .app-shell,
    html.is-ipad-like body.step-plan .app-shell {
        width: 100dvw !important;
        max-width: 100dvw !important;
        min-height: 100dvh;
        height: auto;
        max-height: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        padding-top: 0;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        gap: 0;
        overflow: visible;
    }

    body.step-plan .plan-stack,
    html.is-ipad-like body.step-plan .plan-stack {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        max-width: none;
        min-height: calc(100dvh - max(12px, env(safe-area-inset-bottom)));
        padding: max(calc(env(safe-area-inset-top) + 58px), clamp(56px, 10vh, 72px)) clamp(12px, 2vw, 28px) clamp(48px, 10vh, 60px);
        box-sizing: border-box;
        overflow: visible;
    }

    body.step-plan .plan-card,
    html.is-ipad-like body.step-plan .plan-card {
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0;
        text-align: center;
        min-height: 0;
    }

    body.step-plan .plan-footer,
    html.is-ipad-like body.step-plan .plan-footer {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 0;
        padding-top: clamp(8px, 1.2vh, 14px);
    }

    body.step-plan .plan-body,
    html.is-ipad-like body.step-plan .plan-body {
        position: relative;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-height: clamp(220px, 40vh, 360px);
    }

    body.step-plan .plan-left-panel,
    html.is-ipad-like body.step-plan .plan-left-panel {
        position: static;
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        height: auto;
        transform: none;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: clamp(8px, 1.5vw, 18px) clamp(12px, 2vw, 24px);
        box-sizing: border-box;
    }

    body.step-plan .plan-right-panel,
    html.is-ipad-like body.step-plan .plan-right-panel {
        position: static;
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        height: auto;
        transform: none;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: clamp(8px, 1.5vw, 18px) clamp(12px, 2vw, 24px);
        box-sizing: border-box;
    }

    body.step-plan .plan-intro,
    html.is-ipad-like body.step-plan .plan-intro {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: min(86%, 480px);
        max-width: min(86%, 480px);
        margin: 0 auto;
    }

    body.step-plan .plan-card h2,
    html.is-ipad-like body.step-plan .plan-card h2 {
        font-size: clamp(38px, 5.4vw, 58px) !important;
        line-height: 0.92;
        margin-bottom: clamp(10px, 1.4vh, 14px);
        white-space: normal;
    }

    body[lang="en"].step-plan .plan-card h2,
    html.is-ipad-like body[lang="en"].step-plan .plan-card h2 {
        font-size: clamp(36px, 5vw, 54px) !important;
    }

    body.step-plan .plan-subtitle,
    html.is-ipad-like body.step-plan .plan-subtitle {
        width: 100%;
        max-width: none;
        margin: 0 auto clamp(12px, 1.6vh, 16px);
        font-size: clamp(17px, 2.2vw, 24px) !important;
        line-height: 1.12;
    }

    body[lang="en"].step-plan .plan-subtitle,
    html.is-ipad-like body[lang="en"].step-plan .plan-subtitle {
        font-size: clamp(16px, 2vw, 22px) !important;
    }

    body.step-plan .plan-lines,
    html.is-ipad-like body.step-plan .plan-lines {
        font-size: clamp(38px, 5.2vw, 56px) !important;
        min-width: clamp(170px, 22vw, 260px);
        min-height: 0;
        height: auto;
        margin: 0;
        padding: clamp(4px, 0.7vh, 7px) clamp(24px, 3vw, 38px);
        line-height: 1;
        border-radius: 8px;
    }

    body.step-plan .plan-lines.is-lines-or-more,
    html.is-ipad-like body.step-plan .plan-lines.is-lines-or-more {
        font-size: clamp(34.2px, 4.68vw, 50.4px) !important;
    }

    body.step-plan .plan-choices-wrap,
    html.is-ipad-like body.step-plan .plan-choices-wrap {
        width: min(88%, 500px);
        max-width: min(88%, 500px);
        margin: 0 auto;
        padding: clamp(14px, 1.9vw, 22px) clamp(16px, 2.1vw, 26px);
        border-radius: 16px;
        background: linear-gradient(180deg, #e6e6e6 0%, #ffffff 100%);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        text-align: left;
        box-sizing: border-box;
    }

    body.step-plan .plan-card .choices,
    html.is-ipad-like body.step-plan .plan-card .choices {
        width: 100%;
        margin: 0;
        gap: clamp(5px, 0.9vh, 9px);
    }

    body.step-plan .plan-choice,
    html.is-ipad-like body.step-plan .plan-choice {
        display: grid !important;
        grid-template-columns: clamp(26px, 3.1vw, 32px) 1fr !important;
        align-items: center !important;
        gap: clamp(10px, 1.2vw, 14px);
    }

    body.step-plan .plan-choice:has(.plan-choice-sub),
    html.is-ipad-like body.step-plan .plan-choice:has(.plan-choice-sub) {
        align-items: start !important;
    }

    body.step-plan .plan-choice > .plan-choice-text,
    html.is-ipad-like body.step-plan .plan-choice > .plan-choice-text {
        font-size: clamp(19.8px, 2.43vw, 28.8px) !important;
        line-height: 1.05;
        padding-top: 0;
    }

    body[lang="en"].step-plan .plan-choice > .plan-choice-text,
    html.is-ipad-like body[lang="en"].step-plan .plan-choice > .plan-choice-text {
        font-size: clamp(18.9px, 2.25vw, 27px) !important;
        line-height: 1.05;
    }

    body.step-plan .plan-choice input,
    html.is-ipad-like body.step-plan .plan-choice input {
        width: clamp(26px, 3.1vw, 32px);
        height: clamp(26px, 3.1vw, 32px);
        border-width: 2px;
        margin: 0 !important;
        justify-self: center !important;
        align-self: center !important;
    }

    body.step-plan .plan-choice:has(.plan-choice-sub) input,
    html.is-ipad-like body.step-plan .plan-choice:has(.plan-choice-sub) input {
        align-self: start !important;
    }

    body.step-plan .plan-focus-areas,
    html.is-ipad-like body.step-plan .plan-focus-areas {
        margin: clamp(4px, 0.6vh, 6px) 0 clamp(10px, 1.4vh, 14px) clamp(34px, 4.2vw, 46px);
        font-size: clamp(15.3px, 1.85vw, 20.7px) !important;
        line-height: 1.15;
    }

    body[lang="en"].step-plan .plan-focus-areas,
    html.is-ipad-like body[lang="en"].step-plan .plan-focus-areas {
        font-size: clamp(14.4px, 1.71vw, 18.9px) !important;
    }

    body.step-plan .plan-footer .plan-note,
    html.is-ipad-like body.step-plan .plan-footer .plan-note {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: min(800px, 100%);
        max-width: none;
        margin: clamp(12px, 2vh, 20px) auto clamp(14px, 2vh, 22px);
        padding: 0 clamp(12px, 1.8vw, 20px);
        font-size: clamp(13px, 1.55vw, 17px) !important;
        line-height: 1.25;
        text-align: left;
        box-sizing: border-box;
    }

    body.step-plan .plan-footer .plan-note-row,
    body.step-plan .plan-footer .plan-note-copy,
    html.is-ipad-like body.step-plan .plan-footer .plan-note-row,
    html.is-ipad-like body.step-plan .plan-footer .plan-note-copy {
        width: fit-content;
        max-width: min(88vw, 860px);
        margin: 0 auto;
        text-align: left;
    }

    body.step-plan .plan-footer .plan-note-copy p,
    html.is-ipad-like body.step-plan .plan-footer .plan-note-copy p {
        margin: 0 0 2px;
    }

    body.step-plan .plan-footer .plan-actions,
    html.is-ipad-like body.step-plan .plan-footer .plan-actions {
        flex-shrink: 0;
        align-self: center;
        width: min(420px, 46dvw);
        margin: 0 auto max(8px, env(safe-area-inset-bottom));
        gap: clamp(12px, 2vw, 20px);
        justify-content: center;
    }

    body.step-plan .plan-actions .btn,
    html.is-ipad-like body.step-plan .plan-actions .btn {
        max-width: none;
        flex: 1 1 0;
        min-height: clamp(44px, 7.5vh, 52px);
        padding: 12px 20px;
        font-size: clamp(18px, 2.4vw, 24px) !important;
    }

    body.step-result,
    html.is-ipad-like body.step-result {
        background-image: var(--page-bg-base-landscape, var(--page-bg-base));
        background-size: cover;
        background-position: center center;
    }

    body.step-result .app-shell,
    html.is-ipad-like body.step-result .app-shell {
        width: 100dvw !important;
        max-width: 100dvw !important;
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        padding-top: 0;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        gap: 0;
        overflow: visible;
    }

    body.step-result .result-page-card,
    html.is-ipad-like body.step-result .result-page-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: clamp(48px, 10vh, 60px) clamp(16px, 2.5vw, 32px) clamp(12px, 1.8vh, 20px) !important;
        background: transparent !important;
        box-shadow: none !important;
        box-sizing: border-box;
    }

    body.step-result .result-capture,
    html.is-ipad-like body.step-result .result-capture {
        flex: 0 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: min(92%, 820px);
        max-width: 820px;
        margin: 0 auto;
    }

    body.step-result .result-page-card h2,
    body.step-result .result-capture h2,
    html.is-ipad-like body.step-result .result-page-card h2,
    html.is-ipad-like body.step-result .result-capture h2 {
        width: 100% !important;
        margin: 0 0 clamp(8px, 1.2vh, 12px) !important;
        font-size: clamp(22px, 2.8vw, 32px) !important;
        line-height: 0.95;
        text-align: center !important;
    }

    body[lang="th"].step-result .result-page-card h2,
    body[lang="th"].step-result .result-capture h2,
    html.is-ipad-like body[lang="th"].step-result .result-page-card h2,
    html.is-ipad-like body[lang="th"].step-result .result-capture h2 {
        margin: 0 0 clamp(8px, 1.2vh, 12px) !important;
        text-align: center !important;
    }

    body.step-result .result-score-title,
    html.is-ipad-like body.step-result .result-score-title {
        gap: clamp(8px, 1.2vw, 12px);
        margin: 0 0 clamp(10px, 1.4vh, 14px) !important;
        font-size: clamp(28px, 4vw, 44px) !important;
    }

    body.step-result .result-score-title strong,
    html.is-ipad-like body.step-result .result-score-title strong {
        min-width: clamp(44px, 5.5vw, 58px);
        min-height: clamp(38px, 4.8vw, 50px);
        padding: 0 clamp(8px, 1vw, 12px);
        font-size: clamp(26px, 3.6vw, 40px) !important;
        border-radius: 8px;
    }

    body[lang="th"].step-result .result-score-title,
    html.is-ipad-like body[lang="th"].step-result .result-score-title {
        margin-bottom: clamp(10px, 1.4vh, 14px) !important;
        font-size: clamp(28px, 4vw, 44px) !important;
        letter-spacing: 0;
    }

    body[lang="th"].step-result .result-score-title strong,
    html.is-ipad-like body[lang="th"].step-result .result-score-title strong {
        min-width: clamp(44px, 5.5vw, 58px);
        min-height: clamp(38px, 4.8vw, 50px);
        font-size: clamp(26px, 3.6vw, 40px) !important;
    }

    body.step-result .result-recommendation,
    html.is-ipad-like body.step-result .result-recommendation {
        width: 100%;
        text-align: center;
    }

    body.step-result .result-level-label,
    body.step-result .result-treatment-title,
    html.is-ipad-like body.step-result .result-level-label,
    html.is-ipad-like body.step-result .result-treatment-title {
        margin: 0 0 clamp(4px, 0.6vh, 6px) !important;
        font-size: clamp(14px, 1.7vw, 20px) !important;
        line-height: 1.2;
    }

    body.step-result .result-level,
    html.is-ipad-like body.step-result .result-level {
        margin: 0 0 clamp(8px, 1.1vh, 12px) !important;
        font-size: clamp(16px, 2vw, 24px) !important;
        line-height: 1.2;
    }

    body[lang="th"].step-result .result-level-label,
    body[lang="th"].step-result .result-treatment-title,
    html.is-ipad-like body[lang="th"].step-result .result-level-label,
    html.is-ipad-like body[lang="th"].step-result .result-treatment-title {
        margin-bottom: clamp(4px, 0.6vh, 6px) !important;
        font-size: clamp(14px, 1.7vw, 20px) !important;
        line-height: 1.25;
    }

    body[lang="th"].step-result .result-level,
    html.is-ipad-like body[lang="th"].step-result .result-level {
        margin-bottom: clamp(8px, 1.1vh, 12px) !important;
        font-size: clamp(16px, 2vw, 24px) !important;
        line-height: 1.25;
    }

    body.step-result .result-lines,
    html.is-ipad-like body.step-result .result-lines {
        display: inline-block;
        min-width: clamp(200px, 26vw, 320px);
        min-height: 0;
        height: auto;
        margin: 0 0 clamp(6px, 0.9vh, 10px) !important;
        padding: 0 clamp(24px, 3vw, 38px);
        font-size: clamp(32px, 4.5vw, 48px) !important;
        line-height: 0.85;
        vertical-align: middle;
        border-radius: 8px;
    }

    body.step-result .result-lines.is-lines-or-more,
    html.is-ipad-like body.step-result .result-lines.is-lines-or-more {
        font-size: clamp(28.8px, 4.05vw, 43.2px) !important;
    }

    body[lang="th"].step-result .result-lines,
    html.is-ipad-like body[lang="th"].step-result .result-lines {
        min-width: clamp(200px, 26vw, 320px);
        min-height: 0;
        margin-bottom: clamp(6px, 0.9vh, 10px) !important;
        font-size: clamp(32px, 4.5vw, 48px) !important;
    }

    body[lang="th"].step-result .result-lines.is-lines-or-more,
    html.is-ipad-like body[lang="th"].step-result .result-lines.is-lines-or-more {
        font-size: clamp(28.8px, 4.05vw, 43.2px) !important;
    }

    body.step-result .result-note,
    html.is-ipad-like body.step-result .result-note {
        width: min(92%, 680px);
        margin: 0 auto clamp(10px, 1.4vh, 14px) !important;
        font-size: clamp(12px, 1.4vw, 16px) !important;
        line-height: 1.25;
        color: #777;
    }

    body[lang="th"].step-result .result-note,
    html.is-ipad-like body[lang="th"].step-result .result-note {
        width: min(92%, 680px);
        margin-bottom: clamp(10px, 1.4vh, 14px) !important;
        font-size: clamp(12px, 1.4vw, 16px) !important;
        line-height: 1.3;
    }

    body.step-result .result-plan,
    html.is-ipad-like body.step-result .result-plan {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: min(92%, 480px);
        max-width: 480px;
        margin: 0 auto clamp(10px, 1.4vh, 14px) !important;
        text-align: center;
    }

    body[lang="th"].step-result .result-plan,
    html.is-ipad-like body[lang="th"].step-result .result-plan {
        width: min(92%, 480px);
        margin-bottom: clamp(10px, 1.4vh, 14px) !important;
    }

    body.step-result .result-plan h3,
    html.is-ipad-like body.step-result .result-plan h3 {
        margin: 0 0 clamp(6px, 0.9vh, 10px) !important;
        font-size: clamp(16px, 2vw, 24px) !important;
        line-height: 1.15;
        text-align: center;
    }

    body[lang="th"].step-result .result-plan h3,
    html.is-ipad-like body[lang="th"].step-result .result-plan h3 {
        margin-bottom: clamp(6px, 0.9vh, 10px) !important;
        font-size: clamp(16px, 2vw, 24px) !important;
        line-height: 1.18;
    }

    body.step-result .result-plan-choice,
    html.is-ipad-like body.step-result .result-plan-choice {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        grid-template-columns: clamp(30px, 3.6vw, 36px) 1fr !important;
        gap: clamp(8px, 1vw, 12px) !important;
        align-items: start;
        text-align: left;
    }

    body.step-result .result-radio,
    html.is-ipad-like body.step-result .result-radio {
        width: clamp(20px, 2.4vw, 26px) !important;
        height: clamp(20px, 2.4vw, 26px) !important;
        margin-top: clamp(3px, 0.35vw, 5px) !important;
        border-width: 2px;
        justify-self: center !important;
        align-self: start !important;
        flex-shrink: 0;
    }

    body.step-result .result-plan-choice:has(.result-choice-sub) .result-radio,
    html.is-ipad-like body.step-result .result-plan-choice:has(.result-choice-sub) .result-radio {
        margin-top: 0 !important;
    }

    body[lang="th"].step-result .result-radio,
    html.is-ipad-like body[lang="th"].step-result .result-radio {
        width: clamp(22px, 2.6vw, 28px) !important;
        height: clamp(22px, 2.6vw, 28px) !important;
    }

    body[lang="en"].step-result .result-radio,
    html.is-ipad-like body[lang="en"].step-result .result-radio {
        width: clamp(18px, 2.2vw, 22px) !important;
        height: clamp(18px, 2.2vw, 22px) !important;
        justify-self: center !important;
        align-self: start !important;
        margin-top: clamp(3px, 0.35vw, 5px) !important;
    }

    body[lang="en"].step-result .result-plan-choice,
    html.is-ipad-like body[lang="en"].step-result .result-plan-choice {
        grid-template-columns: clamp(30px, 3.6vw, 36px) 1fr !important;
        gap: clamp(8px, 1vw, 12px) !important;
    }

    body.step-result .result-plan-choice strong,
    html.is-ipad-like body.step-result .result-plan-choice strong {
        font-size: clamp(18px, 2.2vw, 26px) !important;
        line-height: 1.15;
    }

    body[lang="th"].step-result .result-plan-choice strong,
    html.is-ipad-like body[lang="th"].step-result .result-plan-choice strong {
        font-size: clamp(18px, 2.2vw, 26px) !important;
        line-height: 1.18;
    }

    body.step-result .result-choice-sub,
    html.is-ipad-like body.step-result .result-choice-sub {
        font-size: clamp(13px, 1.55vw, 18px) !important;
        line-height: 1.1;
    }

    body.step-result .result-plan-choice p,
    body.step-result .result-plan-choice b,
    html.is-ipad-like body.step-result .result-plan-choice p,
    html.is-ipad-like body.step-result .result-plan-choice b {
        font-size: clamp(13px, 1.55vw, 18px) !important;
        line-height: 1.2;
    }

    body[lang="th"].step-result .result-plan-choice p,
    body[lang="th"].step-result .result-plan-choice b,
    html.is-ipad-like body[lang="th"].step-result .result-plan-choice p,
    html.is-ipad-like body[lang="th"].step-result .result-plan-choice b {
        font-size: clamp(13px, 1.55vw, 18px) !important;
        line-height: 1.25;
    }

    body.step-result .result-plan-note,
    html.is-ipad-like body.step-result .result-plan-note {
        width: min(84%, 580px) !important;
        max-width: 580px !important;
        margin: 0 auto !important;
        padding: clamp(5px, 0.7vh, 8px) clamp(8px, 1.1vw, 11px) !important;
        font-size: clamp(9px, 1vw, 11px) !important;
        line-height: 1.22;
        border-radius: 6px;
    }

    body.step-result .result-plan-note-footer,
    html.is-ipad-like body.step-result .result-plan-note-footer {
        margin-top: clamp(4px, 0.6vh, 6px) !important;
        line-height: 1.2 !important;
    }

    body.step-result .result-plan-note ol,
    body.step-result .result-plan-note ul,
    html.is-ipad-like body.step-result .result-plan-note ol,
    html.is-ipad-like body.step-result .result-plan-note ul {
        padding-left: 12px;
    }

    body[lang="th"].step-result .result-plan-note,
    html.is-ipad-like body[lang="th"].step-result .result-plan-note {
        width: min(84%, 580px) !important;
        padding: clamp(5px, 0.7vh, 8px) clamp(8px, 1.1vw, 11px) !important;
        font-size: clamp(9px, 1vw, 11px) !important;
        line-height: 1.25;
    }

    body.step-result .result-sharebar,
    html.is-ipad-like body.step-result .result-sharebar {
        flex-shrink: 0;
        width: min(520px, 58dvw) !important;
        max-width: 520px !important;
        min-height: clamp(56px, 8vh, 66px);
        margin: clamp(10px, 1.4vh, 14px) auto max(8px, env(safe-area-inset-bottom)) !important;
        padding: clamp(8px, 1.2vh, 10px) clamp(14px, 2vw, 20px);
        gap: clamp(14px, 2vw, 22px);
        border-radius: 22px;
        justify-content: center;
    }

    body.step-result .result-action-icon,
    html.is-ipad-like body.step-result .result-action-icon {
        width: clamp(38px, 4.5vw, 44px);
        height: clamp(38px, 4.5vw, 44px);
        transform: none;
    }

    body.step-result .result-action-icon svg,
    html.is-ipad-like body.step-result .result-action-icon svg {
        width: clamp(20px, 2.4vw, 24px);
        height: clamp(20px, 2.4vw, 24px);
    }

    body.step-result .result-share-action,
    html.is-ipad-like body.step-result .result-share-action {
        min-width: clamp(58px, 7vw, 72px);
        max-width: none;
        flex: 0 0 auto;
    }

    body.step-result .result-share-action small,
    html.is-ipad-like body.step-result .result-share-action small {
        font-size: clamp(11px, 1.3vw, 14px) !important;
    }

    /* PNG capture in landscape: keep portrait radio alignment (html2canvas uses 430px width) */
    body.is-capturing-result.step-result .result-plan-choice,
    body.is-capturing-result[lang="en"].step-result .result-plan-choice,
    body.is-capturing-result[lang="th"].step-result .result-plan-choice,
    html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice {
        grid-template-columns: 30px 1fr !important;
        gap: 8px !important;
        align-items: start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    body.is-capturing-result.step-result .result-radio,
    body.is-capturing-result.step-result .result-plan-choice:has(.result-choice-sub) .result-radio,
    body.is-capturing-result[lang="en"].step-result .result-radio,
    body.is-capturing-result[lang="en"].step-result .result-plan-choice:has(.result-choice-sub) .result-radio,
    html.is-ipad-like body.is-capturing-result.step-result .result-radio,
    html.is-ipad-like body.is-capturing-result.step-result .result-plan-choice:has(.result-choice-sub) .result-radio {
        width: 18px !important;
        height: 18px !important;
        margin-top: 3px !important;
        justify-self: center !important;
        align-self: start !important;
    }

    body.is-capturing-result[lang="th"].step-result .result-radio,
    body.is-capturing-result[lang="th"].step-result .result-plan-choice:has(.result-choice-sub) .result-radio,
    html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-radio,
    html.is-ipad-like body.is-capturing-result[lang="th"].step-result .result-plan-choice:has(.result-choice-sub) .result-radio {
        width: 22px !important;
        height: 22px !important;
    }
}

body.step-question.question-scale .age-footer-logo {
    display: none;
}

body.step-summary .summary-footer-logo {
    display: none;
}

body.step-plan .plan-footer-logo {
    display: none;
}

body.step-result .result-footer-logo {
    display: none;
}

@media (min-width: 1024px) {
    body.step-question.question-scale .question-card-scale {
        display: flex !important;
        flex-direction: column !important;
        gap: clamp(32px, 5dvh, 52px) !important;
    }

    body.step-question.question-scale .question-scale-form {
        margin-top: 0 !important;
    }

    body.step-question.question-scale .thumb-row {
        justify-content: center;
        gap: clamp(6px, 0.75vw, 12px);
        padding: 0;
        margin: 0;
        overflow: visible;
    }

    body.step-question.question-scale .thumb-choice {
        position: relative;
        width: clamp(74px, 7.56dvw, 90px);
        flex: 0 0 auto;
        align-items: center;
        gap: 7px;
        padding-top: 15px;
        overflow: visible;
    }

    body.step-question.question-scale .thumb-choice img {
        width: 100%;
        border-radius: 11px;
        border: 2px solid #dadada;
        object-fit: cover;
        object-position: center center;
    }

    body.step-question.question-scale .thumb-choice input:checked ~ img {
        border-color: var(--gold);
        border-width: 3px;
        box-shadow: none;
    }

    body.step-question.question-scale .score-mini {
        position: absolute;
        top: 15px;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: clamp(25px, 2.7dvw, 31px);
        height: clamp(25px, 2.7dvw, 31px);
        margin: 0;
        font-size: clamp(13.5px, 1.485dvw, 16.2px);
        z-index: 2;
        border: none;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
    }

    body.step-question.question-scale .question-preview {
        overflow: visible;
    }

    body.step-question.question-scale .main-image-wrap {
        overflow: visible;
    }

    body.step-question.question-scale .score-dot {
        right: 0;
        top: 0;
        transform: translate(30%, -30%);
    }

    body.step-question.question-scale .thumb-label {
        font-size: clamp(16.2px, 1.71dvw, 21.6px);
        font-weight: 700;
        color: var(--gold);
        line-height: 1.05;
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.step-question {
        background-image: url("img/bg_02_full.jpg") !important;
        background-size: 100% 100% !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }

    body.step-question .app-shell {
        align-items: center;
        justify-content: center;
    }

    body.step-question .question-stack {
        justify-content: center;
        width: min(79dvw, 980px);
        min-height: 100dvh;
        padding-top: clamp(68px, 9dvh, 88px);
        padding-bottom: clamp(28px, 4dvh, 42px);
        box-sizing: border-box;
    }

    body.step-question.question-scale .logo {
        top: clamp(24px, 3.6vw, 36px) !important;
        left: 32px !important;
        width: min(260px, 26vw) !important;
    }

    body.step-question.question-scale .age-footer-logo {
        display: block !important;
        top: clamp(24px, 3.6vw, 36px) !important;
        right: 30px !important;
    }

    body.step-question.question-scale .age-footer-logo img {
        width: min(250px, 25vw) !important;
    }

    body.step-question.question-scale .question-stack {
        width: min(79dvw, 980px);
        padding-top: clamp(68px, 9dvh, 88px);
        padding-bottom: clamp(28px, 4dvh, 42px);
        gap: clamp(14px, 2dvh, 20px);
        justify-content: center;
    }

    body.step-question.question-scale .question-card-hero {
        min-height: clamp(330px, 49dvh, 390px);
        padding: clamp(28px, 3.2dvh, 42px) clamp(28px, 5dvw, 58px);
        border-radius: 18px;
        gap: clamp(36px, 6dvw, 86px);
    }

    body.step-question.question-scale .question-heading {
        flex: 1 1 48%;
        column-gap: clamp(12px, 1.8dvw, 20px);
    }

    body.step-question.question-scale .progress {
        font-size: clamp(80px, 10dvw, 108px);
    }

    body.step-question.question-scale .question-card .session {
        font-size: clamp(17.19px, 1.85dvw, 21.16px);
    }

    body.step-question.question-scale .question-card h2 {
        font-size: clamp(44.97px, 5.55dvw, 60.84px);
    }

    body.step-question.question-scale .question-subtitle {
        font-size: clamp(19.84px, 5.82dvw, 30.42px);
    }

    body.step-question.question-scale .question-preview {
        width: clamp(240px, 27.5dvw, 285px);
    }

    body.step-question.question-scale .main-image-wrap,
    body.step-question.question-scale .main-image {
        max-height: clamp(240px, 36.8dvh, 285px);
        border-radius: 18px;
    }

    body.step-question.question-scale .main-image-wrap {
        overflow: visible;
    }

    body.step-question.question-scale .question-preview {
        overflow: visible;
    }

    body.step-question.question-scale .score-dot {
        width: clamp(36px, 4.2dvw, 42px);
        height: clamp(36px, 4.2dvw, 42px);
        font-size: clamp(22px, 2.4dvw, 28px);
        right: 0;
        top: 0;
        transform: translate(30%, -30%);
    }

    body.step-question.question-scale .option-label {
        margin-top: 12px;
        font-size: clamp(23.81px, 2.51dvw, 29.1px);
    }

    body.step-question.question-scale .question-actions {
        width: min(300px, 32dvw);
        gap: clamp(14px, 1.8dvw, 18px);
        margin-top: 0;
    }

    body.step-question.question-scale .question-actions .btn {
        min-height: 34px;
        padding: 8px 18px;
        font-size: clamp(17px, 1.8dvw, 20px);
    }

    body.step-question.question-first .logo {
        top: clamp(24px, 3.6vw, 36px) !important;
        left: 32px !important;
        width: min(260px, 26vw) !important;
    }

    body.step-question.question-first .age-footer-logo {
        display: block !important;
        top: clamp(24px, 3.6vw, 36px) !important;
        right: 30px !important;
    }

    body.step-question.question-first .age-footer-logo img {
        width: min(250px, 25vw) !important;
    }

    body.step-question.question-first .question-stack {
        width: min(79dvw, 980px);
        padding-top: clamp(68px, 9dvh, 88px);
        padding-bottom: clamp(28px, 4dvh, 42px);
        gap: clamp(14px, 2dvh, 20px);
        justify-content: center;
    }

    body.step-question.question-first .question-card-age {
        min-height: clamp(330px, 49dvh, 390px);
        padding: clamp(28px, 3.2dvh, 42px) clamp(28px, 5dvw, 58px);
        border-radius: 18px;
        gap: clamp(36px, 6dvw, 86px);
    }

    body.step-question.question-first .question-card-age .question-heading {
        flex: 1 1 48%;
        column-gap: clamp(12px, 1.8dvw, 20px);
    }

    body.step-question.question-first .question-card-age .progress {
        font-size: clamp(80px, 10dvw, 108px);
    }

    body.step-question.question-first .question-card-age .session {
        font-size: clamp(17.19px, 1.85dvw, 21.16px);
    }

    body.step-question.question-first .question-card-age h2 {
        font-size: clamp(44.97px, 5.55dvw, 60.84px);
    }

    body.step-question.question-first .question-card-age #question-form,
    body.step-question.question-first .question-card-age form {
        flex: 0 0 auto;
        width: clamp(240px, 27.5dvw, 285px);
    }

    body.step-question.question-first .question-card-age .age-choices {
        width: 100%;
        height: clamp(240px, 36.8dvh, 285px);
        padding: clamp(88px, 13dvh, 108px) 0;
    }

    body.step-question.question-first .age-choices .choice {
        flex: 0 0 clamp(56px, 8dvh, 72px);
    }

    body.step-question.question-first .age-choices .choice > span {
        min-height: clamp(56px, 8dvh, 72px);
        font-size: clamp(24px, 2.6dvw, 32px);
    }

    body.step-question.question-first .age-choices .choice.is-selected > span {
        min-height: clamp(64px, 8.8dvh, 78px);
        font-size: clamp(34px, 3.6dvw, 42px);
    }

    body.step-question.question-first .question-actions {
        width: min(300px, 32dvw);
        gap: clamp(14px, 1.8dvw, 18px);
        margin-top: 0;
    }

    body.step-question.question-first .question-actions .btn {
        min-height: 34px;
        padding: 8px 18px;
        font-size: clamp(17px, 1.8dvw, 20px);
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.step-summary .logo {
        top: clamp(22px, 3.2dvw, 32px) !important;
        left: 34px !important;
        width: min(270px, 27vw) !important;
    }

    body.step-summary .age-footer-logo {
        display: block !important;
        top: clamp(22px, 3.2dvw, 32px) !important;
        right: 32px !important;
    }

    body.step-summary .age-footer-logo img {
        width: min(260px, 26vw) !important;
    }

    body.step-summary .summary-card {
        zoom: 1.15;
        width: min(1180px, calc(96dvw / 1.15)) !important;
        max-width: min(1180px, calc(96dvw / 1.15)) !important;
        padding: clamp(76px, 10dvh, 96px) 0 max(16px, env(safe-area-inset-bottom)) !important;
    }

    body.step-summary .summary-score-title {
        margin: 0 0 clamp(16px, 2.2dvh, 24px);
        font-size: clamp(48px, 5vw, 56px);
        gap: 14px;
    }

    body.step-summary .summary-score-title strong {
        min-width: 58px;
        min-height: 52px;
        padding: 0 14px;
        font-size: clamp(42px, 4.5vw, 50px);
        border-radius: 8px;
    }

    body[lang="en"].step-summary .summary-score-title {
        font-size: clamp(44px, 4.8vw, 52px);
    }

    body[lang="en"].step-summary .summary-score-title strong {
        font-size: clamp(38px, 4.2vw, 46px);
    }

    body.step-summary .summary-body {
        width: 100%;
        max-width: 1140px;
        gap: clamp(28px, 3.8dvw, 48px);
        align-items: center;
    }

    body.step-summary .summary-panel {
        flex: 1 1 0;
        width: 50%;
        max-width: 50%;
        min-width: 0;
        padding: clamp(20px, 2.2dvh, 26px) clamp(24px, 2.6dvw, 32px) clamp(18px, 2dvh, 22px) !important;
        border-radius: 16px;
    }

    body.step-summary .summary-age-row {
        margin-bottom: 14px;
        font-size: clamp(20px, 2.1dvw, 24px);
        gap: 12px;
    }

    body.step-summary .summary-age-row strong {
        min-width: 64px;
        padding: 0 16px;
        font-size: clamp(42px, 4.4dvw, 48px);
    }

    body.step-summary .summary-age-row strong.is-summary-age-extended {
        font-size: clamp(34px, 3.6dvw, 40px);
        padding: 0 12px;
    }

    body.step-summary .summary-age-row small {
        font-size: clamp(20px, 2.1dvw, 24px);
        white-space: nowrap;
    }

    body.step-summary .summary-group + .summary-group {
        margin-top: 14px;
    }

    body.step-summary .summary-group-head {
        font-size: clamp(18px, 1.9dvw, 22px);
        margin-bottom: 4px;
    }

    body.step-summary .summary-item {
        font-size: clamp(17px, 1.8dvw, 21px);
        grid-template-columns: minmax(0, 1fr) 28px;
        gap: 12px;
        line-height: 1.24;
    }

    body.step-summary .summary-item b {
        width: 26px;
        height: 26px;
        font-size: clamp(16px, 1.7dvw, 19px);
        justify-self: center;
        border-radius: 5px;
    }

    body.step-summary .summary-recommendation {
        flex: 1 1 0;
        width: 46%;
        max-width: 46%;
        min-width: 0;
        padding: clamp(10px, 1.4dvh, 16px) clamp(12px, 1.6dvw, 20px);
        transform: scale(1.15);
        transform-origin: center center;
    }

    body.step-summary .summary-recommendation .summary-level-label {
        max-width: 100% !important;
        font-size: clamp(18px, 1.8dvw, 22px) !important;
        line-height: 1.05 !important;
        margin-bottom: 4px;
    }

    body.step-summary .summary-recommendation .summary-level {
        max-width: 100% !important;
        font-size: clamp(20px, 2.05dvw, 24px) !important;
        line-height: 1.08 !important;
        margin-bottom: 6px;
        white-space: nowrap;
    }

    body.step-summary .summary-treatment-title {
        font-size: clamp(17px, 1.7dvw, 20px);
        line-height: 1.05;
        margin-bottom: 6px;
    }

    body.step-summary .summary-recommendation .summary-lines {
        font-size: clamp(34px, 3.6dvw, 42px) !important;
        min-width: 230px;
        min-height: 42px;
        padding: 6px 28px;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    body.step-summary .summary-recommendation .summary-lines.is-lines-or-more {
        font-size: clamp(30.6px, 3.24dvw, 37.8px) !important;
    }

    body.step-summary .summary-recommendation .summary-note {
        max-width: 310px !important;
        font-size: clamp(12px, 1.25dvw, 15px) !important;
        line-height: 1.2 !important;
        margin-bottom: 10px;
    }

    body.step-summary .summary-recommendation .summary-table-btn {
        min-width: 250px;
        min-height: 40px;
        padding: 9px 28px;
        font-size: clamp(20px, 2.05dvw, 24px);
    }

    body.step-summary .summary-actions {
        width: min(360px, 40dvw) !important;
        margin-top: clamp(16px, 2.2dvh, 24px) !important;
        gap: 18px;
    }

    body.step-summary .summary-actions .btn {
        min-height: 50px;
        padding: 12px 24px;
        font-size: clamp(19px, 2dvw, 22px);
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.step-plan .logo {
        top: clamp(22px, 3.2dvw, 32px) !important;
        left: 34px !important;
        width: min(270px, 27vw) !important;
    }

    body.step-plan .age-footer-logo {
        display: block !important;
        top: clamp(22px, 3.2dvw, 32px) !important;
        right: 32px !important;
    }

    body.step-plan .age-footer-logo img {
        width: min(260px, 26vw) !important;
    }

    body.step-plan .app-shell {
        width: 100dvw !important;
        max-width: 100dvw !important;
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        padding: 0 !important;
        overflow: visible;
    }

    body.step-plan .plan-stack {
        zoom: 1.15;
        width: min(1180px, calc(96dvw / 1.15));
        max-width: min(1180px, calc(96dvw / 1.15));
        min-height: calc(100dvh / 1.15);
        margin: 0 auto;
        padding: clamp(76px, 10dvh, 96px) 0 max(14px, env(safe-area-inset-bottom));
        box-sizing: border-box;
        justify-content: center;
    }

    body.step-plan .plan-card {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.step-plan .plan-body {
        width: 100% !important;
        min-height: 0;
        gap: clamp(28px, 3.8dvw, 48px);
        align-items: center;
        justify-content: center;
    }

    body.step-plan .plan-left-panel {
        flex: 0 0 48%;
        width: 48%;
        max-width: 48%;
        padding: clamp(10px, 1.4dvh, 16px) clamp(12px, 1.6dvw, 20px);
    }

    body.step-plan .plan-right-panel {
        flex: 0 0 48%;
        width: 48%;
        max-width: 48%;
        padding: 0;
    }

    body.step-plan .plan-intro {
        width: min(92%, 520px);
        max-width: 520px;
    }

    body.step-plan .plan-card h2 {
        font-size: clamp(48px, 5.1dvw, 60px) !important;
        line-height: 0.9;
        margin-bottom: clamp(12px, 1.6dvh, 18px);
    }

    body[lang="en"].step-plan .plan-card h2 {
        font-size: clamp(44px, 4.7dvw, 56px) !important;
    }

    body.step-plan .plan-subtitle {
        font-size: clamp(20px, 2.1dvw, 25px) !important;
        line-height: 1.08;
        margin-bottom: clamp(12px, 1.6dvh, 18px);
    }

    body[lang="en"].step-plan .plan-subtitle {
        font-size: clamp(18px, 1.9dvw, 22px) !important;
    }

    body.step-plan .plan-lines {
        min-width: 280px;
        min-height: 48px;
        padding: 8px 36px;
        font-size: clamp(48px, 5.2dvw, 56px) !important;
        border-radius: 8px;
    }

    body.step-plan .plan-lines.is-lines-or-more {
        font-size: clamp(43.2px, 4.68dvw, 50.4px) !important;
    }

    body.step-plan .plan-choices-wrap {
        width: min(94%, 520px);
        max-width: 520px;
        padding: clamp(20px, 2.2dvh, 26px) clamp(24px, 2.6dvw, 32px) !important;
        border-radius: 16px;
    }

    body.step-plan .plan-card .choices {
        gap: clamp(8px, 1dvh, 12px);
    }

    body.step-plan .plan-choice {
        grid-template-columns: 28px minmax(0, 1fr) !important;
        gap: 12px;
    }

    body.step-plan .plan-choice input {
        width: 26px;
        height: 26px;
    }

    body.step-plan .plan-choice > .plan-choice-text {
        font-size: clamp(22px, 2.3dvw, 27px) !important;
        line-height: 1.06;
    }

    body[lang="en"].step-plan .plan-choice > .plan-choice-text {
        font-size: clamp(20px, 2.05dvw, 24px) !important;
    }

    body.step-plan .plan-choice-sub,
    body.step-plan .plan-choice-muted {
        font-size: 0.72em;
        line-height: 1.05;
    }

    body.step-plan .plan-focus-areas {
        margin: 4px 0 12px 40px;
        font-size: clamp(16px, 1.65dvw, 20px) !important;
        line-height: 1.15;
    }

    body[lang="en"].step-plan .plan-focus-areas {
        font-size: clamp(14px, 1.45dvw, 17px) !important;
    }

    body.step-plan .plan-footer {
        padding-top: clamp(10px, 1.4dvh, 16px);
    }

    body.step-plan .plan-footer .plan-note {
        width: min(960px, 92dvw);
        margin: 0 auto clamp(12px, 1.8dvh, 18px);
        padding: 0;
        font-size: clamp(12px, 1.2dvw, 15px) !important;
        line-height: 1.25;
    }

    body.step-plan .plan-footer .plan-note-row,
    body.step-plan .plan-footer .plan-note-copy {
        max-width: min(960px, 92dvw);
    }

    body.step-plan .plan-footer .plan-actions {
        width: min(360px, 40dvw);
        margin: 0 auto max(8px, env(safe-area-inset-bottom));
        gap: 18px;
    }

    body.step-plan .plan-actions .btn {
        min-height: 50px;
        padding: 12px 24px;
        font-size: clamp(19px, 2dvw, 22px) !important;
    }
}

@media (min-width: 1024px) and (orientation: landscape) {
    body.step-result .logo {
        top: clamp(22px, 3.2dvw, 32px) !important;
        left: 34px !important;
        width: min(270px, 27vw) !important;
    }

    body.step-result .age-footer-logo {
        display: block !important;
        top: clamp(22px, 3.2dvw, 32px) !important;
        right: 32px !important;
    }

    body.step-result .age-footer-logo img {
        width: min(260px, 26vw) !important;
    }

    body.step-result .app-shell {
        width: 100dvw !important;
        max-width: 100dvw !important;
        min-height: 100dvh;
        height: 100dvh;
        max-height: 100dvh;
        padding: 0 !important;
        overflow: visible;
    }

    body.step-result .result-page-card {
        width: min(1180px, 96dvw) !important;
        max-width: 1180px !important;
        min-height: 100dvh !important;
        margin: 0 auto !important;
        padding: clamp(72px, 9.5dvh, 92px) 0 max(12px, env(safe-area-inset-bottom)) !important;
        justify-content: center;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.step-result .result-capture {
        width: min(920px, 82dvw);
        max-width: 920px;
        margin: 0 auto;
    }

    body.step-result .result-page-card h2,
    body.step-result .result-capture h2 {
        margin: 0 0 clamp(10px, 1.4dvh, 14px) !important;
        font-size: clamp(34px, 3.8dvw, 46px) !important;
        line-height: 0.95;
        text-align: center !important;
    }

    body.step-result .result-score-title {
        gap: 12px;
        margin: 0 0 clamp(12px, 1.6dvh, 18px) !important;
        font-size: clamp(44px, 4.8dvw, 56px) !important;
    }

    body.step-result .result-score-title strong {
        min-width: 58px;
        min-height: 52px;
        padding: 0 14px;
        font-size: clamp(42px, 4.5dvw, 50px) !important;
        border-radius: 8px;
    }

    body.step-result .result-recommendation {
        width: 100%;
        text-align: center;
    }

    body.step-result .result-level-label,
    body.step-result .result-treatment-title {
        margin: 0 0 5px !important;
        font-size: clamp(18px, 1.8dvw, 22px) !important;
        line-height: 1.05;
    }

    body.step-result .result-level {
        max-width: 100%;
        margin: 0 0 8px !important;
        font-size: clamp(20px, 2.05dvw, 24px) !important;
        line-height: 1.08 !important;
        white-space: nowrap;
    }

    body.step-result .result-lines {
        min-width: 230px;
        min-height: 42px;
        padding: 6px 28px;
        margin: 0 0 8px !important;
        font-size: clamp(34px, 3.6dvw, 42px) !important;
        line-height: 0.95;
        border-radius: 8px;
    }

    body.step-result .result-lines.is-lines-or-more {
        font-size: clamp(30.6px, 3.24dvw, 37.8px) !important;
    }

    body.step-result .result-note {
        width: min(620px, 92%);
        margin: 0 auto clamp(10px, 1.4dvh, 14px) !important;
        font-size: clamp(12px, 1.25dvw, 15px) !important;
        line-height: 1.2;
    }

    body.step-result .result-plan {
        width: min(560px, 92%);
        max-width: 560px;
        margin: 0 auto clamp(12px, 1.6dvh, 18px) !important;
    }

    body.step-result .result-plan h3 {
        margin: 0 0 6px !important;
        font-size: clamp(19px, 2dvw, 24px) !important;
        line-height: 1.12;
    }

    body.step-result .result-plan-choice {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        grid-template-columns: 32px minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: start;
    }

    body.step-result .result-radio {
        width: 24px !important;
        height: 24px !important;
        margin-top: 3px !important;
    }

    body.step-result .result-plan-choice strong {
        font-size: clamp(20px, 2.05dvw, 24px) !important;
        line-height: 1.12;
    }

    body.step-result .result-choice-sub,
    body.step-result .result-plan-choice p,
    body.step-result .result-plan-choice b {
        font-size: clamp(13px, 1.35dvw, 16px) !important;
        line-height: 1.2;
    }

    body.step-result .result-plan-note {
        width: min(860px, 92dvw) !important;
        max-width: 860px !important;
        margin: 0 auto !important;
        padding: clamp(7px, 0.9dvh, 10px) clamp(12px, 1.4dvw, 18px) !important;
        font-size: clamp(10px, 1dvw, 12px) !important;
        line-height: 1.24;
        border-radius: 8px;
    }

    body.step-result .result-plan-note-footer {
        margin-top: 6px !important;
        line-height: 1.2 !important;
    }

    body.step-result .result-plan-note ol,
    body.step-result .result-plan-note ul {
        padding-left: 14px;
    }

    body.step-result .result-sharebar {
        width: min(560px, 54dvw) !important;
        max-width: 560px !important;
        min-height: 60px;
        margin: clamp(12px, 1.6dvh, 16px) auto max(8px, env(safe-area-inset-bottom)) !important;
        padding: 9px 22px;
        gap: clamp(16px, 2dvw, 22px);
        border-radius: 24px;
    }

    body.step-result .result-action-icon {
        width: 42px;
        height: 42px;
    }

    body.step-result .result-action-icon svg {
        width: 23px;
        height: 23px;
    }

    body.step-result .result-share-action {
        min-width: 78px;
        max-width: 96px;
        gap: 5px;
    }

    body.step-result .result-share-action small {
        font-size: clamp(11px, 1.15dvw, 13px) !important;
    }

    /* Thai result desktop: equal gaps, 50% tighter */
    body[lang="th"].step-result .result-capture {
        gap: 7px;
    }

    body[lang="th"].step-result .result-recommendation,
    body[lang="th"].step-result .result-plan {
        gap: 5px;
    }

    body[lang="th"].step-result .result-level-label,
    body[lang="th"].step-result .result-treatment-title,
    body[lang="th"].step-result .result-level,
    body[lang="th"].step-result .result-note,
    body[lang="th"].step-result .result-plan h3,
    body[lang="th"].step-result .result-plan-choice strong,
    body[lang="th"].step-result .result-choice-sub,
    body[lang="th"].step-result .result-plan-choice p,
    body[lang="th"].step-result .result-plan-choice b,
    body[lang="th"].step-result .result-plan-note,
    body[lang="th"].step-result .result-plan-note p,
    body[lang="th"].step-result .result-plan-note li,
    body[lang="th"].step-result .result-plan-note-footer {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    body[lang="th"].step-result .result-plan-note {
        padding: 8px 14px !important;
    }

    body[lang="th"].step-result .result-plan-note p,
    body[lang="th"].step-result .result-plan-note li {
        margin-bottom: 4px !important;
    }

    body[lang="th"].step-result .result-plan-note p:last-child,
    body[lang="th"].step-result .result-plan-note li:last-child {
        margin-bottom: 0 !important;
    }

    body[lang="th"].step-result .result-plan-note-footer {
        margin-top: 4px !important;
    }
}

/* Tablet scaling is handled in JS (see fitViewport in index.php) for reliable
   behavior across iPad Safari, where `zoom` + viewport units (vh/dvh) are
   computed inconsistently. JS applies `zoom` and sets pixel-based min-heights
   from the real innerHeight. */

