/* ========================================
   LIFEPLAN
   Personal Edition
   ======================================== */

:root {
    color-scheme: dark;

    --bg: #090b11;
    --surface: #11151e;
    --surface-hover: #171d2a;
    --text: #f3f5fa;
    --muted: #929cb0;
    --accent: #2f6be6;
    --accent-light: #82aeff;
    --border: rgba(144, 166, 207, 0.1);
    --radius: 18px;
}

/* BASE */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(47, 107, 230, 0.08),
            transparent 40%
        ),
        var(--bg);

    color: var(--text);

    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--accent);
    color: white;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(620px, calc(100% - 40px));
    margin-inline: auto;
}

.icon {
    display: block;
    flex-shrink: 0;

    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* HEADER */

.header {
    border-bottom: 1px solid var(--border);

    background: rgba(9, 11, 17, 0.8);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    min-height: 72px;
}

.logo {
    display: inline-block;

    color: #f4f6fb;

    font-size: 34px;
    font-weight: 780;
    line-height: 1;
    letter-spacing: -2px;
}

.logo span {
    color: #6195ff;

    background: linear-gradient(
        115deg,
        #82aeff,
        #427ff5 65%,
        #2f6be6
    );

    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    filter: drop-shadow(
        0 0 12px rgba(47, 107, 230, 0.18)
    );
}

.header-author {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;

    min-height: 44px;
}

.author-label {
    color: #8490a6;
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: 0.15px;
}

.author-name {
    color: #c4d2ed;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;

    transition: color 0.25s ease;
}

/* PROFILE */

.profile {
    position: relative;

    padding: 28px 0 24px;

    border-bottom: 1px solid var(--border);

    animation: appear 0.65s ease both;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* AVATAR */

.avatar-ring {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    width: 96px;
    height: 96px;
    padding: 3px;

    border-radius: 50%;

    background: #183361;

    box-shadow:
        0 0 22px rgba(47, 107, 230, 0.14),
        0 0 1px rgba(130, 174, 255, 0.5);
}

.avatar-ring::before {
    content: "";

    position: absolute;
    z-index: -1;
    inset: -50%;

    background: conic-gradient(
        from 0deg,
        #173465,
        #2f6be6,
        #9bbdff,
        #2f6be6,
        #173465
    );

    animation: ring-rotation 12s linear infinite;

    pointer-events: none;
}

.avatar-inner {
    display: grid;
    place-items: center;

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

    padding: 3px;

    background: var(--bg);

    border-radius: 50%;
}

.avatar-inner img {
    display: block;

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

    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;

    border-radius: 50%;
}

/* PROFILE TEXT */

.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;

    min-width: 0;
    flex: 1;
}

.profile-info h1 {
    margin: 0;

    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.85px;
}

.profile-role {
    margin: 0;

    color: #b6bfd1;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
}

.profile-bio {
    margin-top: 21px;
}

.profile-bio p {
    margin: 0 0 4px;

    color: #dce1ec;

    font-size: 14px;
    line-height: 1.6;
}

.profile-bio .bio-project {
    max-width: 490px;

    margin-top: 8px;
    margin-bottom: 0;

    color: #929fb7;
}

/* SOCIAL BUTTONS */

.social-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;

    margin-top: 19px;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 44px;
    padding: 10px 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #151a25;
    color: #d5dceb;

    font-size: 13px;
    font-weight: 550;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease;
}

.social-button .icon {
    width: 16px;
    height: 16px;

    color: #9eb4da;
}

.social-button sup {
    position: relative;
    top: -1px;

    margin-left: 2px;

    color: #8d9fbd;
    font-size: 9px;
}

.social-button:active {
    transform: scale(0.98);
}

/* SECTION HEADER */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin: 24px 0 13px;

    animation: appear 0.55s 0.08s ease both;
}

.section-heading h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.5px;
}

.free-label {
    color: #8e9bb1;
    font-size: 11px;
}

/* TOOLS */

.tools-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);

    gap: 8px;
}

.tool-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    gap: 13px;

    width: 100%;
    min-width: 0;
    min-height: 68px;

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);
    color: var(--text);

    text-align: left;

    animation: appear 0.6s ease both;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.tool-card:nth-child(1) {
    animation-delay: 0.12s;
}

.tool-card:nth-child(2) {
    animation-delay: 0.17s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.22s;
}

.tool-card:nth-child(4) {
    animation-delay: 0.27s;
}

.tool-card:nth-child(5) {
    animation-delay: 0.32s;
}

.tool-card:nth-child(6) {
    animation-delay: 0.37s;
}

.tool-card:nth-child(7) {
    animation-delay: 0.42s;
}

.tool-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;

    width: 42px;
    height: 42px;

    border-radius: 11px;

    color: #8193b5;
    background: #1b2230;
}

.tool-icon .icon {
    width: 21px;
    height: 21px;
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
    flex: 1;
}

.tool-title {
    display: block;
    margin: 0;

    color: #dce2ee;

    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.15px;
}

.tool-description {
    display: block;
    margin: 0;

    color: #8490a6;

    font-size: 12px;
    line-height: 1.4;
}

.status {
    flex-shrink: 0;

    color: #78859d;

    font-size: 11px;
    white-space: nowrap;
}

/* ACTIVE TOOL */

.tool-card.featured {
    min-height: 82px;
    padding: 14px;

    border-color: rgba(79, 133, 255, 0.6);

    background:
        radial-gradient(
            ellipse at 95% 0%,
            rgba(47, 107, 230, 0.28),
            transparent 75%
        ),
        linear-gradient(
            120deg,
            #15274d,
            #14203b
        );

    margin-bottom: 4px;

    animation:
        appear 0.6s 0.12s ease backwards,
        active-glow 5s 0.8s ease-in-out infinite;
}

.featured .tool-icon {
    width: 46px;
    height: 46px;

    color: #ffffff;

    background: linear-gradient(
        140deg,
        #568dff,
        #2f6be6,
        #2347b9
    );

    box-shadow:
        0 5px 16px rgba(47, 107, 230, 0.25),
        inset 0 1px rgba(255, 255, 255, 0.2);
}

.featured .tool-icon .icon {
    width: 24px;
    height: 24px;
}

.featured .tool-title {
    color: #ffffff;

    font-size: 16px;
    font-weight: 650;
}

.featured .tool-description {
    color: #a7bce3;
    font-size: 12px;
}

.tool-arrow {
    width: 20px;
    height: 20px;

    margin-right: 2px;

    color: #a4c4ff;

    animation: arrow-float 3s ease-in-out infinite;
}

.featured::after {
    content: "";

    position: absolute;
    z-index: -1;
    inset: 0;

    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.07) 48%,
        transparent 65%
    );

    transform: translateX(-120%);

    animation: shine 8s ease-in-out infinite;

    pointer-events: none;
}

.tool-card.featured:active {
    transform: scale(0.985);
}

/* INNER PAGES */

#calculator-page,
#result-page {
    max-width: 620px;
    margin-inline: auto;

    animation: appear 0.45s ease both;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 44px;

    margin: 16px 0 20px;
    padding: 10px 0;

    border: 0;

    background: none;
    color: var(--muted);

    font-size: 13px;

    transition: color 0.2s ease;
}

.back-button .icon {
    width: 17px;
    height: 17px;
}

.eyebrow {
    display: inline-block;

    color: var(--accent-light);

    font-size: 10px;
    font-weight: 650;
    letter-spacing: 1.6px;
}

.page-heading {
    margin-bottom: 23px;
}

.page-heading h1 {
    margin: 12px 0;

    font-size: clamp(32px, 7vw, 46px);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.05em;

    overflow-wrap: anywhere;
}

.page-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.7;
}

/* CALCULATOR FORM */

.form-card,
.result-card,
.scenario-card,
.recommendation-card {
    min-width: 0;
    padding: 25px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);
}

.field {
    margin-bottom: 23px;
}

.field label {
    display: block;

    margin-bottom: 10px;

    color: #dce2ee;

    font-size: 13px;
    line-height: 1.5;
    font-weight: 550;
}

.field input {
    width: 100%;
    min-width: 0;
    min-height: 54px;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 11px;

    color: var(--text);
    background: #0b0e16;
    outline: none;

    font-size: 16px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.field input::placeholder {
    color: #69758b;
}

.field input:focus {
    border-color: rgba(74, 133, 255, 0.8);

    box-shadow:
        0 0 0 4px rgba(47, 107, 230, 0.1);
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 62px;
}

.input-wrapper > span {
    position: absolute;
    right: 16px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);
    font-size: 14px;

    pointer-events: none;
}

/* ACTION BUTTONS */

.primary-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 53px;

    padding: 14px 18px;

    border: 1px solid rgba(151, 185, 255, 0.25);
    border-radius: 12px;

    background: linear-gradient(
        115deg,
        #2347b9,
        #2f6be6 65%,
        #427ff5
    );

    color: #ffffff;

    font-size: 14px;
    font-weight: 650;

    box-shadow:
        0 6px 24px rgba(47, 107, 230, 0.18),
        inset 0 1px rgba(255, 255, 255, 0.15);

    transition:
        background 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.primary-button::before {
    content: "";

    position: absolute;
    z-index: -1;
    inset: 0;

    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255, 255, 255, 0.12) 48%,
        transparent 70%
    );

    transform: translateX(-120%);

    animation: shine 8s ease-in-out infinite;

    pointer-events: none;
}

.primary-button:active {
    transform: scale(0.98);
}

.secondary-button {
    width: 100%;
    min-height: 48px;

    padding: 12px;
    margin-top: 10px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);
    color: var(--text);

    font-size: 13px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.secondary-button:active {
    transform: scale(0.98);
}

.privacy-note {
    margin: 16px 0 0;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.65;
    text-align: center;
}

/* RESULT */

.result-card {
    border-color: rgba(47, 107, 230, 0.25);

    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(47, 107, 230, 0.13),
            transparent 70%
        ),
        var(--surface);
}

.result-label {
    color: var(--muted);
    font-size: 13px;
}

.large-value {
    margin: 10px 0 26px;

    font-size: clamp(30px, 7vw, 48px);
    font-weight: 680;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;

    overflow-wrap: anywhere;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 11px;

    color: var(--muted);
    font-size: 12px;
}

.progress-info strong {
    color: var(--accent-light);
}

.progress-track {
    height: 7px;
    overflow: hidden;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.07);
}

#progress-bar {
    width: 0;
    height: 100%;

    border-radius: 20px;

    background: linear-gradient(
        90deg,
        #2347b9,
        #2f6be6,
        #92b6ff
    );

    box-shadow: 0 0 16px rgba(47, 107, 230, 0.35);

    transition:
        width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px;
    margin-top: 22px;
}

.metric {
    min-width: 0;

    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.025);
}

.metric span {
    display: block;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.5;
}

.metric strong {
    display: block;

    margin-top: 8px;

    font-size: clamp(17px, 4vw, 25px);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.7px;

    overflow-wrap: anywhere;
}

.result-heading {
    margin: 26px 0 14px;

    font-size: 21px;
    letter-spacing: -0.5px;
    font-weight: 650;
}

/* SCENARIOS */

.scenario-card {
    margin-bottom: 10px;

    animation: appear 0.6s ease both;
}

.scenario-card.recommended {
    border-color: rgba(47, 107, 230, 0.35);

    animation-delay: 0.1s;
}

.scenario-card h3,
.recommendation-card h3 {
    margin: 12px 0;

    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.scenario-value {
    margin-bottom: 10px;

    font-size: clamp(25px, 5vw, 34px);
    font-weight: 650;
    letter-spacing: -1px;

    overflow-wrap: anywhere;
}

.recommended .scenario-value {
    color: var(--accent-light);
}

.scenario-card p,
.recommendation-card p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.75;
    white-space: pre-line;
}

.recommendation-card {
    margin: 20px 0;

    border-color: rgba(47, 107, 230, 0.25);

    background: linear-gradient(
        135deg,
        #152543,
        #101827
    );
}

.recommendation-card h3 {
    margin-top: 0;

    color: var(--accent-light);
}

#notification {
    color: var(--accent-light);

    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

#notification:not(:empty) {
    margin-top: 14px;
}

/* FOOTER */

.footer {
    display: flex;
    flex-direction: column;

    margin-top: 30px;

    padding-top: 22px;
    padding-bottom:
        max(25px, env(safe-area-inset-bottom));

    border-top: 1px solid var(--border);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.footer-logo {
    color: #c9d2e3;

    font-size: 23px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -1.2px;
}

.footer-logo span {
    color: #6195ff;
}

.copyright {
    color: #8490a5;

    font-size: 11px;
    line-height: 1.4;
}

.footer-credit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    gap: 6px;
}

.footer-label {
    color: #8490a5;

    font-size: 11px;
    line-height: 1.4;
}

.footer-credit a {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--accent-light);

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

    transition: color 0.25s ease;
}

.footer-credit .icon {
    width: 12px;
    height: 12px;
}

/* LEGAL NOTES */

.legal-notes {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-top: 18px;
    padding-top: 15px;

    border-top: 1px solid var(--border);
}

.legal-notes p {
    margin: 0;

    color: #8490a5;

    font-size: 10px;
    font-weight: 400;
    line-height: 1.65;

    text-align: left;
}

/* ANIMATIONS */

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(9px);
    }

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

@keyframes ring-rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes active-glow {
    0%, 100% {
        box-shadow:
            0 0 14px rgba(47, 107, 230, 0.08);

        border-color:
            rgba(79, 133, 255, 0.45);
    }

    50% {
        box-shadow:
            0 0 26px rgba(47, 107, 230, 0.16);

        border-color:
            rgba(100, 160, 255, 0.75);
    }
}

@keyframes arrow-float {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(2px, -2px);
    }
}

@keyframes shine {
    0%, 78% {
        transform: translateX(-120%);
    }

    95%, 100% {
        transform: translateX(120%);
    }
}

/* HOVER */

@media (hover: hover) {

    .header-author:hover .author-name {
        color: var(--accent-light);
    }

    .social-button:hover {
        background: #1c2639;

        border-color:
            rgba(100, 145, 245, 0.25);
    }

    .featured:hover {
        transform: translateY(-2px);

        background:
            linear-gradient(
                125deg,
                #1b3260,
                #17294b
            );
    }

    .primary-button:hover {
        background: linear-gradient(
            115deg,
            #2f6be6,
            #5089f7
        );

        box-shadow:
            0 0 28px rgba(47, 107, 230, 0.25);
    }

    .secondary-button:hover {
        background: var(--surface-hover);
    }

    .back-button:hover,
    .footer-credit a:hover {
        color: #ffffff;
    }
}

/* MOBILE */

@media (max-width: 540px) {

    .container {
        width: calc(100% - 32px);
    }

    .header-content {
        min-height: 66px;
    }

    .logo {
        font-size: 31px;
        letter-spacing: -1.8px;
    }

    .author-label {
        font-size: 9px;
    }

    .author-name {
        font-size: 12px;
    }

    .profile {
        padding: 22px 0 20px;
    }

    .profile-main {
        gap: 17px;
    }

    .avatar-ring {
        width: 86px;
        height: 86px;
    }

    .profile-info {
        gap: 6px;
    }

    .profile-info h1 {
        font-size: clamp(21px, 5.7vw, 25px);
    }

    .profile-role {
        font-size: 14px;
    }

    .profile-bio {
        margin-top: 17px;
    }

    .profile-bio p {
        font-size: 13px;
        line-height: 1.55;
    }

    .social-links {
        margin-top: 15px;
        gap: 8px;
    }

    .social-button {
        min-height: 44px;
    }

    .section-heading {
        margin: 21px 0 12px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .tools-grid {
        gap: 7px;
    }

    .tool-card {
        min-height: 66px;
        padding: 11px;
        gap: 10px;

        border-radius: 12px;
    }

    .tool-icon {
        width: 39px;
        height: 39px;
    }

    .tool-icon .icon {
        width: 19px;
        height: 19px;
    }

    .tool-content {
        gap: 3px;
    }

    .tool-title {
        font-size: 13px;
    }

    .tool-description {
        font-size: 11px;
    }

    .status {
        font-size: 10px;
    }

    .tool-card.featured {
        min-height: 77px;
        padding: 12px;
    }

    .featured .tool-icon {
        width: 43px;
        height: 43px;
    }

    .featured .tool-title {
        font-size: 15px;
    }

    .featured .tool-description {
        font-size: 11px;
    }

    .form-card,
    .result-card,
    .scenario-card,
    .recommendation-card {
        padding: 20px;
        border-radius: 16px;
    }

    .field {
        margin-bottom: 21px;
    }

    .metric {
        padding: 12px;
    }

    .metrics-grid {
        gap: 8px;
    }

    .footer {
        margin-top: 24px;
        padding-top: 19px;
    }

    .footer-logo {
        font-size: 21px;
    }

    .footer-credit a {
        font-size: 12px;
    }

    .legal-notes {
        margin-top: 15px;
        padding-top: 13px;
    }

    .legal-notes p {
        font-size: 10px;
        line-height: 1.6;
    }
}

/* SMALL PHONES */

@media (max-width: 360px) {

    .container {
        width: calc(100% - 24px);
    }

    .profile-main {
        gap: 12px;
    }

    .avatar-ring {
        width: 74px;
        height: 74px;
    }

    .profile-info h1 {
        font-size: 20px;
    }

    .profile-role {
        font-size: 12px;
    }

    .tool-card {
        padding: 10px;
        gap: 8px;
    }

    .tool-icon {
        width: 35px;
        height: 35px;
    }

    .tool-title {
        font-size: 12px;
    }

    .tool-description {
        font-size: 11px;
    }

    .featured .tool-title {
        font-size: 14px;
    }

    .form-card,
    .result-card,
    .scenario-card,
    .recommendation-card {
        padding: 17px;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }

    .avatar-ring::before,
    .tool-arrow,
    .featured::after,
    .primary-button::before {
        animation: none !important;
    }
}

/* Wizard and final layout */
.footer { align-items: stretch; text-align: left; }
.footer-top { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; }
.footer-brand { align-items: flex-start; }
.footer-credit { margin: 0; align-items: flex-end; text-align: right; }
.footer > .copyright { display: block; margin-top: 16px; }
.footer-logo { font-size: 26px; }
.wizard-nav { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wizard-nav .back-button { margin: 10px 0; }
.step-counter { color:var(--muted); font-size:12px; font-weight:500; }
.wizard-progress { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin:4px 0 28px; }
.wizard-progress span { height:4px; background:#242b39; border-radius:8px; transition:background .25s ease; }
.wizard-progress span.active { background:#477ff0; }
.wizard-step { animation:appear .32s ease backwards; }
.wizard-step h1,.result-heading-block h1 { margin:0 0 20px; font-size:clamp(26px,6.6vw,36px); line-height:1.15; font-weight:680; letter-spacing:-.045em; overflow-wrap:anywhere; }
.step-hint { color:var(--muted); margin:-9px 0 19px; font-size:13px; }
.choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.choice { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:14px; min-height:100px; padding:16px; border:1px solid #252d3b; border-radius:15px; background:#131823; color:var(--text); text-align:left; font-size:14px; font-weight:600; transition:background .2s,border-color .2s,transform .15s; }
.choice .icon { width:26px; height:26px; color:#8898b6; }
.choice[aria-pressed=true],.preset[aria-pressed=true],.unit-switch button[aria-pressed=true] { border-color:#548bff; background:#162b50; color:#e7efff; }
.choice[aria-pressed=true] .icon { color:#82aeff; }
.choice:active,.preset:active { transform:scale(.97); }
.choice.term-choice { align-items:center; min-height:64px; text-align:center; }
.wizard-panel { background:#111620; border:1px solid var(--border); padding:18px; border-radius:17px; display:flex; flex-direction:column; gap:13px; }
.wizard-panel label,.exact-field label { color:#dce2ee; font-size:14px; font-weight:600; }
.money-field { position:relative; }
.money-field input,.exact-field input,.term-row input { display:block; min-width:0; width:100%; min-height:56px; padding:12px 14px; border:1px solid #283244; border-radius:11px; background:#0b0e16; color:var(--text); font-size:22px; font-weight:600; font-variant-numeric:tabular-nums; outline:none; }
.money-field input { padding-right:45px; }
.money-field span { position:absolute; right:15px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.money-field input:focus,.exact-field input:focus,.term-row input:focus { border-color:#6195ff; box-shadow:0 0 0 3px #2f6be621; }
.exact-field { margin-top:16px; display:grid; gap:9px; }
.exact-field input { font-size:16px; font-weight:400; }
.preset-grid { display:grid; gap:7px; }
.preset-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.preset-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.preset { min-height:43px; padding:7px 5px; border:1px solid #283244; border-radius:10px; background:#151b27; color:#d5deed; font-size:13px; font-weight:550; transition:background .2s,border-color .2s,transform .15s; }
.panel-divider { height:1px; background:#242b39; margin:5px 0; }
.term-panel { margin-top:15px; }
.term-row { display:flex; align-items:center; gap:9px; }
.term-row input { flex:1; }
.unit-switch { display:flex; gap:3px; background:#0b0e16; border-radius:10px; padding:4px; }
.unit-switch button { min-height:44px; padding:8px 12px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); font-size:13px; }
.range-wrap { margin-top:7px; }
#monthly-range { display:block; width:100%; height:32px; margin:0; accent-color:#6195ff; cursor:pointer; touch-action:pan-y; }
.range-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; }
.wizard-next { margin-top:20px; }
.wizard-error { color:#ffb2b2; font-size:13px; line-height:1.5; margin:13px 0 0; }
.result-heading-block h1 { margin-top:7px; }
.result-main { background:linear-gradient(140deg,#172e56,#12213e); border-color:#376fe5; }
.result-main .large-value { margin:10px 0 4px; }
.result-main .panel-divider { background:#30466c; margin:18px 0; }
.result-main .result-label { color:#b3c5e7; }
.result-row { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; margin-bottom:13px; color:#c0cde5; }
.result-row strong { color:white; white-space:nowrap; }
.result-main #progress-percent { margin:9px 0 0; font-size:11px; }
.gap-value { font-size:clamp(25px,6vw,35px); font-weight:680; letter-spacing:-.035em; color:#82aeff; margin-top:6px; overflow-wrap:anywhere; }
.result-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:12px 0; }
.result-facts > div { background:#111620; border:1px solid var(--border); border-radius:13px; padding:14px; display:grid; gap:7px; }
.result-facts span { color:var(--muted); font-size:11px; }
.result-facts strong { font-size:17px; overflow-wrap:anywhere; }
.scenario-card h3 { margin-top:0; }
.save-button { display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:20px; }
.message-card { background:#10151f; border:1px solid #263146; border-radius:20px; padding:19px; margin-top:24px; display:flex; flex-direction:column; gap:17px; }
.message-card h2 { margin:0; font-size:23px; font-weight:670; letter-spacing:-.6px; }
.message-row { display:flex; align-items:center; gap:15px; }
.video-ring { position:relative; display:grid; place-items:center; width:142px; height:142px; flex:0 0 142px; border-radius:50%; padding:8px; background:#142747; border:2px solid #6195ff; box-shadow:0 0 22px #2f6be629; }
.video-ring img,.video-ring video { display:block; width:100%; height:100%; min-width:0; min-height:0; border-radius:50%; object-fit:cover; }
.video-ring.ready { animation:video-glow 4s ease-in-out infinite; cursor:pointer; }
.video-ring.playing { animation:none; }
.video-toggle { position:absolute; display:grid; place-items:center; width:46px; height:46px; top:50%; left:50%; transform:translate(-50%,-50%); border:0; border-radius:50%; background:#2f6be6e8; color:white; transition:opacity .2s; z-index:2; }
.video-toggle .icon { width:25px; height:25px; }
.video-ring.playing .video-toggle { opacity:0; }
.video-ring.playing:hover .video-toggle,.video-toggle:focus-visible { opacity:1; }
.video-progress { position:absolute; inset:-2px; width:calc(100% + 4px); height:calc(100% + 4px); pointer-events:none; transform:rotate(-90deg); }
.video-progress circle { fill:none; stroke:#a5c6ff; stroke-width:2.5; stroke-dasharray:439.823; stroke-dashoffset:439.823; }
.message-person { flex:1; min-width:0; }
.message-person strong { font-size:15px; font-weight:650; }
.message-person p,.message-copy { color:#b5c0d4; font-size:13px; line-height:1.6; margin:7px 0 0; }
.message-copy { margin:0; }
.message-card .panel-divider { margin:0; }
.integration-note { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
#bot-link[aria-disabled=true] { cursor:default; }
@keyframes video-glow { 0%,100% {box-shadow:0 0 16px #2f6be61a;} 50% {box-shadow:0 0 28px #2f6be64d;} }
@media(max-width:360px) { .wizard-panel,.message-card {padding:14px;} .message-row {gap:11px;} .video-ring {width:142px;height:142px;flex-basis:142px;} .message-person strong {font-size:13px;} .message-person p {font-size:12px;} .preset {font-size:12px;} }
@media(prefers-reduced-motion:reduce) { .video-ring.ready {animation:none;} }

/* Compact result */
#result-page .back-button{margin:8px 0 12px;}
.dream-title{display:flex;align-items:center;gap:12px;margin:6px 0 12px}.dream-title .icon{width:28px;height:28px;color:#82aeff}.dream-title h1{margin:0;font-size:clamp(26px,6.6vw,36px)}
.goal-summary{margin:0 0 14px;display:grid;gap:10px}.goal-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.goal-line strong{font-size:24px;overflow-wrap:anywhere;min-width:0}.goal-line span{font-size:12px;color:var(--muted);text-align:right}.goal-line.small span{text-align:left;font-size:11px}.result-comparison{background:#111620;border:1px solid var(--border);border-radius:16px;padding:15px;display:grid;gap:10px}.comparison-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.comparison-grid>div{display:grid;gap:5px}.comparison-grid span,.comparison-grid small,.current-line span{color:var(--muted);font-size:12px}.comparison-grid strong{font-size:clamp(17px,5vw,25px);overflow-wrap:anywhere;letter-spacing:-.04em}.current-line>div{display:grid;gap:5px}.current-line>div span{text-align:left}.current-line strong{font-size:18px}.result-gap-card{margin-top:12px;padding:15px;border:1px solid #376fe5;border-radius:16px;background:linear-gradient(140deg,#172e56,#12213e);display:grid;gap:5px}.result-gap-card span,.result-gap-card small{font-size:13px;color:#b5c9ed}.result-gap-card .gap-value{margin:0;line-height:1.2}.result-gap-card small:empty{display:none}#result-page .message-card{margin-top:12px}.image-save{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:14px;min-height:44px;background:none;border:0;color:#a1aec4;font-size:12px}.image-save .icon{width:16px;height:16px}#result-page .privacy-note{margin-top:5px}

/* Final visual system */
:root{--bg:#080a0f;--surface:#121721;--surface-hover:#1a2130;--muted:#a0aabe;--border:#252c39;--radius:18px;}
body{background:radial-gradient(ellipse at 50% -150px,#17243e 0,transparent 520px),var(--bg);font-feature-settings:"tnum" 1;}
.container{width:min(600px,calc(100% - 40px));}
.header{background:transparent;backdrop-filter:none;border-color:#202532;}
.header-content{min-height:74px}.logo{font-size:35px;letter-spacing:-2.3px}.logo span{filter:none;}
.profile{padding:30px 0 25px}.profile-info h1{font-weight:680;letter-spacing:-.045em}.profile-bio p{font-size:14px;line-height:1.65}.avatar-ring{box-shadow:0 0 22px #2f6be619;}
.social-button{background:#121721;border-color:#252c39;font-size:13px;border-radius:12px;}
.section-heading{margin:27px 0 14px}.section-heading h2{font-size:22px;letter-spacing:-.04em}.free-label{font-size:12px;}
.tool-card{border-color:transparent;background:#10141d;min-height:64px;padding:10px 12px;border-radius:12px;}.tool-card.upcoming{background:#10141c;}.upcoming .tool-icon{background:#19202d;}.tool-title{font-size:14px}.tool-description{color:#99a5b9;}.status{color:#929eb3;}
.tool-card.featured{min-height:76px;background:linear-gradient(115deg,#182b50,#101b31);border-color:#365b9d;animation:appear .35s ease backwards;box-shadow:none;}.featured::after,.primary-button::before{animation:none;display:none}.tool-arrow{animation:none;}.featured .tool-icon{box-shadow:none;}
.primary-button{min-height:54px;background:#2f6be6;border:1px solid #477ff0;border-radius:13px;box-shadow:0 6px 20px #0003;font-size:15px;}.primary-button:hover{background:#3978ed;}
.wizard-nav .back-button{margin:14px 0}.wizard-progress{margin:6px 0 30px}.wizard-step h1{font-weight:680;font-size:clamp(28px,7vw,39px);line-height:1.12;letter-spacing:-.045em;max-width:510px}.step-hint{font-size:14px;margin-bottom:22px;}
.choice{border-color:#252c39;background:#121721;min-height:108px;padding:18px;border-radius:16px;gap:15px;font-size:15px;}.choice[aria-pressed=true],.preset[aria-pressed=true]{background:#192d50;border-color:#5a8bf3;}.choice .icon{color:#a1aec4;}.wizard-panel{padding:18px;background:transparent;border:0;border-radius:0;gap:15px;}.wizard-panel label{font-size:14px;}.money-field input,.term-row input{min-height:60px;background:#121721;border-color:#30394a;border-radius:13px;font-size:26px;letter-spacing:-.03em;}.preset{min-height:46px;background:#151b25;border-color:#252c39;border-radius:12px;font-size:13px;}.wizard-next{margin-top:24px;}.term-panel{padding-inline:0;}.range-labels{font-size:12px;}
#result-page{padding-bottom:8px;animation:none;}.result-heading-block{margin-top:8px;}.dream-title{flex-direction:row-reverse;justify-content:space-between;margin:9px 0 16px;}.dream-title h1{font-size:clamp(30px,7vw,40px);font-weight:680;letter-spacing:-.05em;}.goal-summary{gap:12px;margin-bottom:22px;}.goal-line strong{font-size:clamp(30px,8vw,48px);font-weight:680;letter-spacing:-.055em;}.goal-line span{font-size:13px;}.goal-line.small span{font-size:12px;}.progress-track{height:5px;background:#232b3a;}#progress-bar{transition:width .65s ease;background:#6195ff;box-shadow:none;}
.result-comparison{background:none;border:0;border-top:1px solid #252c39;border-radius:0;padding:20px 0 4px;}.comparison-grid{gap:14px;}.comparison-grid strong{font-size:clamp(21px,5.4vw,30px);letter-spacing:-.045em;}.comparison-grid span{font-size:12px;line-height:1.4;}.result-gap-card{padding:19px;border:0;background:#111e36;border-radius:16px;margin-top:18px;gap:6px;}.result-gap-card .gap-value{font-size:clamp(32px,8vw,46px);font-weight:700;letter-spacing:-.05em;}.result-gap-card span{line-height:1.5;}
.forecast{margin-top:26px;padding:24px 0 22px;border-top:1px solid #252c39;display:grid;gap:15px;}.forecast h2,.message-card h2{font-size:23px;letter-spacing:-.045em;font-weight:680;margin:0;}.forecast-caption{color:var(--muted);font-size:12px;line-height:1.55;margin:0;}.forecast-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}.forecast-options button{white-space:normal;overflow-wrap:anywhere;}.forecast-lines{display:grid;gap:9px;margin-top:3px;}.forecast-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px;color:var(--muted);}.forecast-line strong{text-align:right;font-size:13px;color:var(--text);}.forecast-track{height:7px;border-radius:8px;background:#1a2333;overflow:hidden;margin-bottom:5px;}.forecast-track>div{height:100%;border-radius:8px;background:#6195ff;transition:width .35s ease;}#forecast-base{background:#46536a;}.forecast-impact{display:grid;gap:6px;text-align:center;padding:11px 0 5px;}.forecast-impact span{font-size:13px;color:var(--muted);}.forecast-impact strong{font-size:clamp(28px,7vw,40px);color:#82aeff;letter-spacing:-.04em;overflow-wrap:anywhere;}
#result-page .message-card{margin-top:6px;padding:23px 0 12px;border:0;border-top:1px solid #252c39;background:none;border-radius:0;gap:18px;scroll-margin-top:16px;}.message-person strong{font-size:16px;}.message-person p,.message-copy{font-size:14px;line-height:1.6;}.message-card .panel-divider{background:#252c39;}.video-ring{box-shadow:0 0 22px #2f6be61f;}.image-save{margin-top:15px;}.privacy-note{font-size:11px;}
.floating-wrap{position:fixed;z-index:10;bottom:0;left:0;right:0;padding:10px 20px max(12px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#080a0ff5 30%);pointer-events:none;}.floating-action{pointer-events:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;width:min(600px,100%);margin:auto;padding:10px 12px 10px 15px;border:1px solid #344561;border-radius:16px;background:#121b2cf5;color:#f3f5fa;text-align:left;box-shadow:0 8px 26px #0007;backdrop-filter:blur(16px);}.floating-action span:first-child{display:grid;gap:3px;}.floating-action strong{font-size:13px;}.floating-action small{color:#a1aec4;font-size:11px;}.floating-icon{width:37px;height:37px;display:grid;place-items:center;background:#2f6be6;border-radius:10px;font-size:22px;flex-shrink:0;}
.footer{align-items:stretch;width:min(600px,calc(100% - 40px));}.footer-top{width:100%;grid-template-columns:1fr auto;}.footer-credit{align-items:flex-end;}.footer-logo{font-size:25px;}.legal-notes p{font-size:11px;}
@media(max-width:540px){.container,.footer{width:calc(100% - 32px);}.header-content{min-height:66px;}.logo{font-size:31px;}.profile{padding:24px 0 22px;}.choice{padding:15px;min-height:98px;}.wizard-panel{padding:0;}.forecast h2,.message-card h2{font-size:22px;}.floating-wrap{padding-inline:16px;}.tool-card{min-height:64px;}}
@media(max-width:360px){.container,.footer{width:calc(100% - 24px);}.message-row{gap:11px;}.message-person strong{font-size:14px;}.message-person p{font-size:12px;}.forecast-options .preset{font-size:12px;}.choice{font-size:13px;}.floating-wrap{padding-inline:12px;}}
@media(prefers-reduced-motion:reduce){.forecast-track>div{transition:none;}}

/* Obsidian Blue: shared visual tokens and approved home composition */
:root{--bg:#050507;--surface:#101116;--surface-hover:#191b23;--text:#f5f5f7;--muted:#9298a6;--accent:#2f6be6;--accent-light:#82aeff;--border:#252730;--radius:18px;}
body{background:var(--bg);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-feature-settings:normal;}
.header,.footer,.forecast,.result-comparison,#result-page .message-card{border-color:var(--border)}
.header{background:var(--bg)}.logo span{background:none;-webkit-text-fill-color:initial;color:var(--accent);filter:none}.author-name{color:#c9cbd3}.author-label,.footer-label{color:var(--muted)}
.home-intro{padding:30px 0 22px}.home-intro h1{font-size:clamp(29px,7vw,42px);line-height:1.12;letter-spacing:-.055em;font-weight:700;margin:0 0 12px}.home-intro p{font-size:15px;line-height:1.55;color:var(--muted);margin:0}
.home-message{margin:0;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:20px;gap:18px}.message-person strong{font-size:16px;line-height:1.35}.message-person p,.message-copy{color:#b5bac5;line-height:1.6}.message-person p{color:var(--muted)}.video-ring{background:#101116;border-color:var(--accent);box-shadow:none}.video-ring img,.video-ring video{object-position:center}.video-toggle{background:var(--accent)}
.primary-button{background:var(--accent);border:1px solid #4779e4;box-shadow:none;border-radius:12px;min-height:54px}.primary-button:hover{background:#3976f5;box-shadow:none}.primary-button:focus-visible{outline-offset:3px}
.section-heading{margin:29px 0 13px}.section-heading h2{font-size:20px}.tools-grid{gap:9px}.tool-card.featured.hero-tool{display:flex;flex-direction:column;align-items:stretch;gap:13px;background:var(--surface);border:1px solid #303b51;border-radius:20px;padding:20px;margin:0;box-shadow:none;animation:appear .35s ease backwards}.tool-card.featured.hero-tool:hover{background:#14161d;transform:translateY(-1px)}.hero-top{display:flex;align-items:center;justify-content:space-between}.hero-tool .tool-icon{width:48px;height:48px;border-radius:13px;background:#15223c;color:var(--accent-light);box-shadow:none}.hero-chart{display:block;width:100%;height:auto;max-height:105px;overflow:visible}.hero-title{font-size:24px;font-weight:680;letter-spacing:-.045em;line-height:1.2}.hero-description{font-size:14px;line-height:1.55;color:var(--muted)}.hero-action{display:flex;align-items:center;gap:8px;color:var(--accent-light);font-weight:600;font-size:14px;margin-top:3px}.hero-action .icon{width:16px;height:16px}.tool-card.upcoming{background:var(--surface);border:1px solid var(--border);padding:13px;border-radius:14px;min-height:76px}.upcoming .tool-icon{background:#191b21;color:var(--muted)}.tool-title{color:#e1e2e8}.tool-description,.status{color:var(--muted)}
.wizard-progress span{background:var(--border)}.wizard-progress span.active{background:var(--accent)}.choice,.preset,.money-field input,.term-row input,.exact-field input{background:var(--surface);border-color:var(--border)}.choice .icon{color:var(--muted)}.choice[aria-pressed=true],.preset[aria-pressed=true],.unit-switch button[aria-pressed=true]{background:#101c32;border-color:#477dff;color:#e7efff}.choice[aria-pressed=true]{position:relative}.choice[aria-pressed=true]::after{content:"✓";position:absolute;right:13px;top:12px;color:var(--accent-light);font-size:15px}.choice.term-choice[aria-pressed=true]::after{font-size:12px;right:8px;top:6px}.unit-switch{background:#101116}.money-field input:focus,.term-row input:focus,.exact-field input:focus{border-color:#477dff}.panel-divider,.message-card .panel-divider{background:var(--border)}.step-counter,.step-hint,.range-labels{color:var(--muted)}
.result-gap-card{background:#101c32;border:1px solid #25395e}.result-gap-card span,.result-gap-card small{color:#b5c5e0}.progress-track,.forecast-track{background:var(--border)}#progress-bar,.forecast-track>div{background:var(--accent)}#forecast-base{background:#4b505c}.forecast-impact strong,.gap-value{color:var(--accent-light)}.floating-wrap{background:linear-gradient(transparent,#050507f5 30%)}.floating-action{background:#101116f5;border-color:#303b51}.floating-action small,.image-save{color:var(--muted)}.footer-logo{color:var(--text)}.legal-notes p,.copyright{color:var(--muted)}
@media(max-width:540px){.home-intro{padding:25px 0 19px}.home-message{padding:16px}.tool-card.featured.hero-tool{padding:17px}.hero-title{font-size:22px}.hero-chart{max-height:90px}}
@media(max-width:360px){.home-message{padding:13px}.home-message .message-row{gap:10px}.home-message .message-person strong{font-size:14px}.home-message .message-person p{font-size:12px}.hero-action{font-size:13px}.tool-card.upcoming{padding:10px;gap:8px}}

/* Motion edition: subtle atmosphere and landscape media */
body{background:var(--bg);isolation:isolate;}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(90deg,#8499bd0b 1px,transparent 1px),linear-gradient(#8499bd0b 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(ellipse at 50% 15%,#000 0%,#0009 48%,transparent 85%);-webkit-mask-image:radial-gradient(ellipse at 50% 15%,#000 0%,#0009 48%,transparent 85%);}
body::after{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background:radial-gradient(ellipse at 15% 0%,#15336730,transparent 45%),radial-gradient(ellipse at 90% 65%,#142b5a20,transparent 52%);}
.header{background:#050507b8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
.message-card .message-row{display:flex;flex-direction:column;align-items:stretch;gap:14px;}
.message-card .video-ring{display:grid;position:relative;isolation:isolate;overflow:hidden;width:100%;height:auto;aspect-ratio:16/9;flex:none;padding:0;border:1px solid #303747;border-radius:14px;background:#11141c;box-shadow:none;--played:0%;}
.message-card .video-ring img,.message-card .video-ring video{position:absolute;inset:0;width:100%;height:100%;border-radius:0;object-fit:contain;}
.message-card .video-ring img{object-fit:cover;object-position:center 42%;}
.message-card .video-ring:not(.playing)::before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#05050755,transparent 50%);z-index:1;pointer-events:none;}
.message-card .video-ring.ready{animation:none;}
.message-card .video-ring.ready::after{content:"";position:absolute;z-index:3;bottom:0;left:0;width:var(--played);height:3px;background:#82aeff;pointer-events:none;transition:width .2s linear;}
.message-card .video-progress{display:none;}
.message-card .video-toggle{width:62px;height:62px;background:#2f6be6e8;border:1px solid #ffffff50;box-shadow:0 6px 32px #0006;backdrop-filter:blur(10px);}
.message-card .video-toggle .icon{width:30px;height:30px;}
.message-card .video-ring.playing .video-toggle{opacity:.25;}
.message-card .video-ring.playing:hover .video-toggle,.message-card .video-toggle:focus-visible{opacity:1;}
.message-card .message-person strong{font-size:17px;}.message-card .message-person p{font-size:14px;}
.primary-button{isolation:isolate;transition:transform .2s ease,background .25s ease,box-shadow .3s ease;}
.primary-button::before{display:block;animation:motion-shine 6s ease-in-out infinite;background:linear-gradient(110deg,transparent 30%,#ffffff24 49%,transparent 68%);}
#home-bot-link,#bot-link{animation:cta-breathe 5s ease-in-out infinite;}
.primary-button .icon,.hero-action .icon{transition:transform .25s ease;}
.primary-button:active,.hero-tool:active{transform:scale(.985);}
.tool-card.featured.hero-tool{animation:appear .55s ease backwards;transition:transform .25s ease,border-color .3s,box-shadow .3s;}
.hero-chart .chart-line{stroke-dasharray:1;stroke-dashoffset:0;animation:chart-draw 1.65s .15s cubic-bezier(.22,1,.36,1) backwards;}
.hero-chart .chart-area{animation:chart-fill .9s .6s ease backwards,chart-breathe 4.5s 1.7s ease-in-out infinite;}
.hero-chart .chart-dot{transform-box:fill-box;transform-origin:center;animation:chart-dot-in .4s 1.5s ease backwards,chart-dot-pulse 3s 1.9s ease-in-out infinite;}
.wizard-progress span{transition:background .3s,box-shadow .3s;}.wizard-progress span.active{box-shadow:0 0 8px #2f6be635;}
.choice,.preset{transition:transform .2s,border-color .2s,background .25s,box-shadow .25s;}.choice[aria-pressed=true],.preset[aria-pressed=true]{box-shadow:0 0 0 2px #2f6be619;}
@media(hover:hover){.primary-button:hover .icon,.hero-tool:hover .hero-action .icon{transform:translate(3px,-2px)}.tool-card.featured.hero-tool:hover{border-color:#477dff;box-shadow:0 8px 32px #2f6be619;transform:translateY(-2px);}}
@keyframes motion-shine{0%,65%{transform:translateX(-120%)}85%,100%{transform:translateX(120%)}}
@keyframes cta-breathe{0%,100%{box-shadow:0 4px 16px #2f6be615}50%{box-shadow:0 4px 26px #2f6be640}}
@keyframes chart-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes chart-fill{from{opacity:0}to{opacity:1}}
@keyframes chart-breathe{0%,100%{opacity:1}50%{opacity:.42}}
@keyframes chart-dot-in{from{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}
@keyframes chart-dot-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.35)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* Viewport motion: no layout shifts; repeat only after the element leaves view. */
.home-intro{padding-bottom:18px}.home-message{gap:13px}.message-card .message-row{gap:10px}.message-person p{margin-top:4px}.tool-card.upcoming{min-height:62px}.hero-tool{gap:10px}.wizard-step h1{margin-bottom:20px}
#home-page .tool-card,#home-page .home-intro,#home-page .section-heading,.wizard-step,#calculator-page,#result-page{animation:none}
.scroll-reveal{opacity:0;translate:0 12px;transition:opacity .48s ease,translate .58s cubic-bezier(.22,1,.36,1);}
.scroll-reveal.in-view,.scroll-reveal:focus-within{opacity:1;translate:0 0;}
.tool-card.featured.hero-tool.scroll-reveal{animation:none;transition:opacity .48s ease,translate .58s cubic-bezier(.22,1,.36,1),transform .25s ease,border-color .3s,box-shadow .3s;}
.scroll-reveal:not(.in-view) .chart-line{animation:none;stroke-dashoffset:1;}
.scroll-reveal:not(.in-view) .chart-area,.scroll-reveal:not(.in-view) .chart-dot{animation:none;opacity:0;}
.scroll-reveal.in-view .chart-line{animation:chart-draw 1.65s .12s cubic-bezier(.22,1,.36,1) backwards;}
.scroll-reveal.in-view .chart-area{animation:chart-fill .9s .6s ease backwards,chart-breathe 4.5s 1.7s ease-in-out infinite;}
.scroll-reveal.in-view .chart-dot{animation:chart-dot-in .4s 1.5s ease backwards,chart-dot-pulse 3s 1.9s ease-in-out infinite;}
.scroll-reveal:not(.in-view) .primary-button::before,.primary-button.scroll-reveal:not(.in-view)::before,.scroll-reveal:not(.in-view) .tool-arrow{animation-play-state:paused;}
.scroll-reveal:not(.in-view) #home-bot-link,.scroll-reveal:not(.in-view) #bot-link{animation-play-state:paused;}
@media(prefers-reduced-motion:reduce){.scroll-reveal{opacity:1;translate:none;}.scroll-reveal .chart-line{stroke-dashoffset:0!important;}.scroll-reveal .chart-area,.scroll-reveal .chart-dot{opacity:1!important;}}
/* Approved compact composition */
.home-message,#message-card{padding:0;border:0;background:none;border-radius:0;gap:14px}.home-intro p{margin:8px 0 0;color:var(--muted);font-size:14px}.home-message .message-person p,#message-card .message-person p{font-size:12px;color:var(--muted)}.hero-top{gap:12px}.hero-text{flex:1;display:grid;gap:4px;min-width:0}.hero-text .hero-title{font-size:19px}.hero-text .hero-description{font-size:12px}.hero-action{justify-content:space-between;background:#17243d;padding:12px;border-radius:9px}.hero-chart{max-height:106px}.cta-send{margin-right:auto}.primary-button:has(.cta-send) .icon:last-child{margin-left:auto}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.wizard-active .footer{display:none}.wizard-active main{min-height:calc(100dvh - 73px);padding-bottom:max(12px,env(safe-area-inset-bottom))}#calculator-page{min-height:inherit;display:flex;flex-direction:column}.wizard-active #dream-form{flex:1;display:flex;flex-direction:column;min-height:0}.wizard-step h1{font-size:clamp(25px,6.6vw,34px);margin:0 0 14px}.wizard-progress{margin:0 0 18px}.wizard-panel{padding:0;border:0;background:none;gap:9px}.wizard-step .panel-divider{margin:8px 0}.choice{min-height:82px;padding:12px;gap:12px}.choice.term-choice{min-height:68px;align-items:flex-start;gap:4px}.term-choice span{font-size:19px}.preset-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.preset-grid.four .preset{font-size:11px}.step-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;color:var(--muted);font-size:12px}.summary-name{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere}.summary-name .icon{color:var(--accent-light);width:18px;height:18px}.step-summary strong{color:var(--text);white-space:nowrap}.monthly-summary{flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);padding:10px;border-radius:12px}.monthly-summary small{flex-basis:100%}.custom-term-toggle{margin-top:12px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font-size:13px;text-align:left}.custom-term-toggle[aria-pressed=true],.custom-term-toggle[aria-expanded=true]{border-color:#477dff;background:#142443}.term-panel{margin-top:8px}.term-row input{min-width:0}.unit-switch button{padding:7px}.wizard-next{margin-top:auto;position:sticky;bottom:max(10px,env(safe-area-inset-bottom));z-index:5;flex-shrink:0}.wizard-step{padding-bottom:14px}.wizard-step[data-step="3"] .preset-grid{margin-top:10px}.wizard-step[data-step="3"] .preset{min-height:39px}.wizard-step[data-step="3"] .range-wrap{margin:0}.wizard-step[data-step="3"] .money-field input{min-height:48px}.wizard-step[data-step="3"] .wizard-panel{padding:10px;border:1px solid var(--border);border-radius:12px}.wizard-step[data-step="3"] #zero-monthly{justify-content:flex-start}.wizard-step[data-step="3"] #zero-monthly .icon{color:var(--muted)}
.result-heading-block .ready-label{color:var(--accent-light)}.dream-title{flex-direction:row-reverse;justify-content:space-between}.goal-line strong#result-cost{font-size:clamp(30px,8vw,46px);letter-spacing:-.05em}.result-comparison{padding:16px 0;background:none;border:0;border-top:1px solid var(--border);border-radius:0}.result-gap-card{padding:18px;margin:0 0 22px}.result-gap-card .gap-value{font-size:clamp(30px,8vw,44px)}#forecast-chart{display:block;width:100%;height:auto;margin:15px 0}#forecast-chart path{transition:d .4s ease}#forecast-dot{transition:cx .4s ease}.forecast .comparison-grid strong{font-size:17px}.forecast-impact{text-align:center}.forecast{border-top:1px solid var(--border);padding-top:18px;margin-bottom:24px}.forecast-caption{font-size:12px}.floating-wrap.direct .floating-action{background:var(--accent)}.floating-wrap.direct .floating-icon{background:transparent}.floating-wrap.direct small{display:none}.hero-chart .chart-line,.hero-chart .chart-area,.hero-chart .chart-dot{animation:none!important;stroke-dasharray:none!important;stroke-dashoffset:0!important;opacity:1!important;transform:none!important}.video-ring.ready:not(.playing) .video-toggle{animation:cta-breathe 3s ease-in-out infinite}.cta-finish{animation:cta-finish .9s ease 2!important}@keyframes cta-finish{50%{box-shadow:0 0 25px #6195ff99;filter:brightness(1.25)}}
@media(max-height:740px) and (max-width:540px){.wizard-step h1{font-size:24px;margin-bottom:10px}.wizard-progress{margin-bottom:10px}.wizard-nav .back-button{margin:2px 0;min-height:36px}.wizard-step{padding-bottom:8px}.choice{min-height:72px;gap:8px}.choice.term-choice{min-height:57px}.wizard-step[data-step="3"] .preset{min-height:34px}.wizard-step[data-step="3"] .monthly-summary{padding:7px;margin-bottom:8px}.wizard-next{min-height:48px}.wizard-step[data-step="3"] .custom-term-toggle{margin-top:8px;min-height:38px}}
@media(prefers-reduced-motion:reduce){#forecast-chart path,#forecast-dot{transition:none!important}}
#forecast-base,#forecast-bar{background:none}.forecast.in-view #forecast-base,.forecast.in-view #forecast-bar{animation:forecast-draw .8s ease both}@keyframes forecast-draw{from{stroke-dasharray:1;stroke-dashoffset:1}to{stroke-dasharray:1;stroke-dashoffset:0}}.video-ring.playing .video-toggle{opacity:0}.video-ring.playing:focus-within .video-toggle,.video-ring.playing:hover .video-toggle{opacity:1}.wizard-next:not([hidden]){margin-top:auto}.icon{stroke-width:2}.wizard-step.in-view{transition:opacity .32s ease,translate .38s ease}.video-ring.ready{cursor:pointer}

/* Final polish v10 */
.container{width:min(620px,calc(100% - 40px));}
body{background:radial-gradient(ellipse at 50% 4%,rgba(47,107,230,.095),transparent 36%),#050507;}
.primary-button{min-height:52px;border-radius:12px;background:linear-gradient(115deg,#255bce,#326ee8 65%,#3876ee);gap:10px;font-weight:650;box-shadow:0 6px 24px #2f6be626;}
#home-bot-link,#bot-link{justify-content:center;gap:10px;}
.primary-button .icon{width:18px;height:18px;margin:0;}
.hero-tool.featured{background:radial-gradient(ellipse at 90% 25%,#172b4c88,transparent 72%),linear-gradient(150deg,#141824,#101116);border-color:#344467;box-shadow:0 8px 36px #2f6be612;border-radius:16px;}
.hero-action{background:none;padding:8px 0 0;border-top:1px solid #252b39;border-radius:0;}
.upcoming .tool-icon{background:transparent;width:30px;height:30px;}
.tool-card.upcoming{border-radius:16px;}
#message-card{padding:18px;border:1px solid #344d7d;border-radius:16px;background:radial-gradient(ellipse at 95% 0%,#203b6d66,transparent 65%),linear-gradient(155deg,#141b2a,#101116 70%);box-shadow:0 10px 40px #2f6be619;gap:14px;scroll-margin-top:16px;}
#message-card h2{font-size:clamp(23px,6vw,29px);line-height:1.15;letter-spacing:-.04em;}
#message-card .message-copy{color:#c0c8d8;margin:0;}
.result-gap-card{border-radius:16px;background:linear-gradient(140deg,#14223d,#101827);border-color:#30486d;}
.forecast{margin-bottom:20px;padding-top:16px;}.forecast-caption{margin:6px 0 10px;line-height:1.45;}
#forecast-chart{max-height:132px;margin:12px 0;}.forecast-impact{padding:10px 0;}.forecast-impact strong{line-height:1.12;}
.floating-wrap{width:min(580px,calc(100% - 40px));bottom:max(12px,env(safe-area-inset-bottom));}
.floating-action{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;min-height:50px;border-radius:999px;background:#15171eeb;border:1px solid #344467;backdrop-filter:blur(16px);box-shadow:0 8px 30px #0007;}
.floating-action strong{flex:1;font-size:13px;font-weight:600;}.floating-play{width:34px;height:34px;display:grid;place-items:center;flex:none;border-radius:50%;background:#17243d;color:#82aeff;}.floating-play .icon{width:17px;height:17px;}.floating-icon{width:24px;height:24px;background:none;color:#82aeff;}.floating-wrap.direct .floating-play{display:none;}.floating-wrap.direct .floating-action{justify-content:center;padding:12px 16px;}.floating-wrap.direct strong{flex:none;}.floating-wrap.direct .floating-icon{color:white;}
.wizard-nav,.wizard-progress{opacity:1!important;translate:none!important;}.wizard-progress{display:flex;gap:0;overflow:hidden;border-radius:999px;background:#252730;}.wizard-progress span{flex:1;height:3px;border-radius:0;box-shadow:none!important;}
.scroll-reveal{transition:opacity .45s ease,translate .45s cubic-bezier(.22,1,.36,1);}.wizard-step.in-view{transition:opacity .28s ease,translate .28s ease;}.choice,.preset{transition:transform .15s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease;}
@media(max-height:740px) and (max-width:540px){.wizard-next{min-height:48px;}.choice{padding:10px;}.wizard-step h1{font-size:24px;}}
@media(max-width:360px){.container{width:calc(100% - 28px);}#message-card{padding:14px;}.floating-wrap{width:calc(100% - 28px);}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* V11: separate media sections and Telegram viewport */
:root { --lp-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px)); }
html { overflow-x: clip; }
body { overflow-x: clip; }
.home-message, #result-page #message-card {
 position:relative; isolation:isolate; overflow:visible;
 padding:20px; margin:12px 0 30px; gap:16px;
 border:1px solid #405b91; border-radius:20px;
 background:radial-gradient(ellipse at 90% 0%, #23457866, transparent 70%), linear-gradient(150deg,#172237,#101116 78%);
 box-shadow:0 12px 40px #2f6be621, 0 0 24px #2f6be614;
}
#result-page #message-card {margin-top:32px;margin-bottom:24px;scroll-margin-top:24px;}
.video-section-label {display:flex;align-items:center;gap:8px;color:#a8bfe8;font-size:12px;font-weight:600;letter-spacing:.02em;}
.video-section-label span {width:7px;height:7px;border-radius:50%;background:#82aeff;box-shadow:0 0 12px #6195ff88;}
.message-card .video-ring {overflow:hidden;box-shadow:0 6px 20px #0005;}
.message-card .message-person {padding:2px 0;}
.tool-card.featured.hero-tool {overflow:visible;box-shadow:0 8px 36px #2f6be621;}
.hero-chart {overflow:visible;}
.wizard-progress {overflow:visible;}
.wizard-progress span:first-child {border-radius:8px 0 0 8px;}
.wizard-progress span:last-child {border-radius:0 8px 8px 0;}
.floating-wrap {left:50%;right:auto;transform:translateX(-50%);padding:0;background:none;bottom:max(12px,var(--lp-bottom));overflow:visible;}
#result-page {padding-bottom:80px;}
.footer {padding-bottom:max(25px,var(--lp-bottom));}
.telegram-app body {min-height:var(--tg-viewport-stable-height,100dvh);}
.telegram-app .header {padding-top:var(--tg-content-safe-area-inset-top,0px);}
.telegram-app .wizard-active main {min-height:calc(var(--tg-viewport-stable-height,100dvh) - 74px - var(--tg-content-safe-area-inset-top,0px));padding-bottom:max(12px,var(--lp-bottom));}
.telegram-app .wizard-next {bottom:max(10px,var(--lp-bottom));}
.keyboard-open .wizard-next {position:static;}
.keyboard-open .wizard-active main {min-height:0;}
.keyboard-open .floating-wrap {display:none!important;}
@media(max-width:540px){.home-message,#result-page #message-card{padding:16px;}.telegram-app .wizard-active main{min-height:calc(var(--tg-viewport-stable-height,100dvh) - 66px - var(--tg-content-safe-area-inset-top,0px));}.telegram-app.keyboard-open .wizard-active main{min-height:0;}}
@media(max-width:360px){.home-message,#result-page #message-card{padding:13px;}}
