@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap");

:root {
    --blue: #0056f9;
    --blue-soft: #5a9dff;
    --ray: rgba(198, 223, 255, 0.8);
    --ink: #090723;
    --body: #080523;
    --line: rgba(0, 0, 0, 0.08);
    --font: Onest, Inter, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font);
    -webkit-text-size-adjust: 100%;
}

body {
    overflow: hidden;
    overscroll-behavior: none;
}

button,
textarea {
    font: inherit;
}

button {
    border: 0;
    -webkit-tap-highlight-color: transparent;
}

.app-shell,
.workspace,
.onboarding-wizard {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
}

.app-shell {
    background: #fff;
}

.phone-screen {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background: #fff;
    color: var(--ink);
}

.phone-screen.is-loader {
    background: var(--blue);
}

.status-bar {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 30;
    width: 100%;
    height: 56px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 16px 32px;
    color: rgba(0, 0, 0, 0.88);
    font-size: 15px;
    line-height: 24px;
    font-weight: 700;
    pointer-events: none;
}

.island {
    position: absolute;
    left: 50%;
    top: 12px;
    width: 120px;
    height: 32px;
    transform: translateX(-50%);
    border-radius: 1000px;
    background: #000;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.07), inset 0 -1px 3px -1px rgba(0, 0, 0, 0.07);
}

.island::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #050505;
}

.status-icons {
    width: 77px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.connection {
    width: 18px;
    height: 12px;
    background:
        linear-gradient(currentColor, currentColor) 0 8px / 3px 4px no-repeat,
        linear-gradient(currentColor, currentColor) 5px 6px / 3px 6px no-repeat,
        linear-gradient(currentColor, currentColor) 10px 3px / 3px 9px no-repeat,
        linear-gradient(currentColor, currentColor) 15px 0 / 3px 12px no-repeat;
}

.wifi {
    position: relative;
    width: 17px;
    height: 12px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 84%, currentColor 0 2px, transparent 2.2px);
}

.wifi::before,
.wifi::after {
    content: "";
    position: absolute;
    left: 50%;
    border: 2px solid currentColor;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    transform: translateX(-50%);
}

.wifi::before {
    top: 1px;
    width: 17px;
    height: 12px;
    border-radius: 16px 16px 0 0;
}

.wifi::after {
    top: 5px;
    width: 9px;
    height: 7px;
    border-radius: 10px 10px 0 0;
}

.battery {
    position: relative;
    width: 26px;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, currentColor 0 54%, rgba(0, 0, 0, 0.48) 54% 100%);
}

.battery::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 4px;
    width: 1px;
    height: 4px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.48;
}

.tg-overlay {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 57px;
    z-index: 22;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.tg-overlay span {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 360px;
    background: rgba(126, 126, 126, 0.6);
    color: #fff;
    backdrop-filter: blur(7.5px);
    font-family: "Arial Rounded MT Bold", Arial, sans-serif;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: 0.02em;
}

.tg-close {
    width: 72px;
    gap: 6px;
    padding: 5px 8px 5px 6px;
}

.tg-close i {
    position: relative;
    width: 18px;
    height: 18px;
}

.tg-close i::before,
.tg-close i::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 10px;
    height: 1.5px;
    border-radius: 3px;
    background: #fff;
}

.tg-close i::before {
    transform: rotate(45deg);
}

.tg-close i::after {
    transform: rotate(-45deg);
}

.tg-menu {
    width: 60px;
    gap: 10px;
    padding: 5px 8px 5px 6px;
}

.tg-menu i:first-child {
    width: 18px;
    height: 18px;
    border-top: 1.5px solid #fff;
    transform: translateY(8px);
}

.tg-menu i:last-child {
    width: 18px;
    height: 18px;
    background:
        radial-gradient(circle, #fff 0 2px, transparent 2.1px) 3px 8px / 6px 6px no-repeat,
        radial-gradient(circle, #fff 0 2px, transparent 2.1px) 8px 8px / 6px 6px no-repeat,
        radial-gradient(circle, #fff 0 2px, transparent 2.1px) 13px 8px / 6px 6px no-repeat;
}

.home-indicator {
    position: absolute;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 35;
    width: 134px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 100px;
    background: #0f172a;
}

.home-indicator.is-light {
    background: #fff;
}

.loader-brand {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.loader-brand span {
    width: 194px;
    height: 47px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 41px;
    line-height: 47px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.04em;
    text-transform: lowercase;
    transform: skewX(-9deg);
}

.welcome-art {
    position: absolute;
    left: 0;
    top: -3px;
    width: 100%;
    height: 638px;
    overflow: hidden;
    background: #fff;
}

.welcome-rays {
    position: absolute;
    left: 50%;
    top: 298px;
    width: 930px;
    height: 930px;
    transform: translate(-50%, -50%);
    background: repeating-conic-gradient(from -2deg, var(--ray) 0deg 18deg, #fff 18deg 36deg);
}

.welcome-art::after {
    content: "";
    position: absolute;
    left: 0;
    top: 505px;
    width: 100%;
    height: 136px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
}

.welcome-hero {
    position: absolute;
    left: calc(50% + 9px);
    top: calc(50% + 14px);
    width: 270px;
    height: 294px;
    transform: translate(-50%, -50%);
}

.welcome-hero::before {
    content: "";
    position: absolute;
    left: 38px;
    top: 55px;
    width: 184px;
    height: 136px;
    border: 9px solid var(--blue-soft);
    border-radius: 52% 46% 48% 44% / 52% 52% 42% 48%;
    background: var(--blue);
    box-shadow:
        -30px 43px 0 -4px var(--blue),
        31px -20px 0 -8px var(--blue),
        58px 39px 0 -10px var(--blue);
}

.welcome-hero::after {
    content: "";
    position: absolute;
    left: 127px;
    top: 87px;
    width: 70px;
    height: 58px;
    border-radius: 18px 18px 27px 25px;
    background:
        radial-gradient(circle at 20px 18px, var(--blue) 0 7px, transparent 8px),
        radial-gradient(circle at 50px 18px, var(--blue) 0 7px, transparent 8px),
        #fff;
}

.welcome-hero span {
    position: absolute;
    z-index: 2;
    display: block;
    border: 8px solid var(--blue-soft);
    border-radius: 999px;
    background: var(--blue);
}

.welcome-hero span:nth-child(1) {
    left: 17px;
    top: 140px;
    width: 38px;
    height: 76px;
    transform: rotate(-37deg);
}

.welcome-hero span:nth-child(2) {
    left: 56px;
    top: 179px;
    width: 54px;
    height: 96px;
    transform: rotate(12deg);
}

.welcome-hero span:nth-child(3) {
    left: 202px;
    top: 18px;
    width: 46px;
    height: 70px;
    transform: rotate(16deg);
}

.welcome-hero span:nth-child(4) {
    left: 134px;
    top: 178px;
    width: 40px;
    height: 68px;
    transform: rotate(8deg);
}

.welcome-hero i {
    position: absolute;
    right: 10px;
    bottom: 43px;
    z-index: 2;
    width: 76px;
    height: 30px;
    border: 8px solid var(--blue-soft);
    border-radius: 999px;
    background: var(--blue);
    transform: rotate(66deg);
}

.welcome-copy {
    position: absolute;
    left: calc(50% - 154px);
    top: 585px;
    width: 308px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.welcome-copy h1,
.question-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 130%;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
}

.welcome-copy h1 {
    width: 308px;
    letter-spacing: -0.03em;
}

.welcome-copy p {
    width: 288px;
    margin: 0;
    color: var(--body);
    opacity: 0.5;
    font-size: 16px;
    line-height: 140%;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.02em;
}

.terms {
    position: absolute;
    left: calc(50% - 147px);
    top: 771px;
    width: 294px;
    height: 32px;
    margin: 0;
    color: rgba(9, 7, 35, 0.4);
    font-size: 12px;
    line-height: 130%;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.01em;
}

.question-header {
    position: absolute;
    left: 50%;
    top: 100px;
    z-index: 18;
    width: 350px;
    height: 28px;
    transform: translateX(-50%);
}

.nav-button {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.4;
}

.nav-button::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
}

.nav-button.is-close::before,
.nav-button.is-close::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 13px;
    width: 17px;
    height: 2px;
    border: 0;
    border-radius: 4px;
    background: var(--ink);
}

.nav-button.is-close::before {
    transform: rotate(45deg);
}

.nav-button.is-close::after {
    transform: rotate(-45deg);
}

.progress {
    position: absolute;
    left: 95px;
    top: 12px;
    width: 172px;
    height: 3px;
    overflow: hidden;
    border-radius: 360px;
    background: rgba(9, 7, 35, 0.08);
}

.progress span {
    display: block;
    height: 3px;
    border-radius: 360px;
    background: var(--blue);
}

.question-copy {
    position: absolute;
    left: 50%;
    top: 143px;
    width: 342px;
    height: 78px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.question-copy p {
    max-width: 342px;
    margin: 0;
    color: rgba(9, 7, 35, 0.4);
    font-size: 14px;
    line-height: 130%;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.005em;
    white-space: pre-line;
}

.goal-field {
    position: absolute;
    left: 50%;
    top: 253px;
    width: 350px;
    height: 476px;
    transform: translateX(-50%);
}

.goal-field textarea {
    width: 350px;
    height: 430px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: var(--body);
    font-size: 18px;
    line-height: 140%;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.goal-field textarea::placeholder {
    color: rgba(8, 5, 35, 0.3);
    opacity: 1;
}

.goal-field span {
    position: absolute;
    left: 50%;
    top: 456px;
    width: 80px;
    height: 20px;
    transform: translateX(-50%);
    color: rgba(8, 5, 35, 0.3);
    font-size: 14px;
    line-height: 140%;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.02em;
}

.choice-grid,
.choice-list {
    position: absolute;
    left: 50%;
    top: 249px;
    width: 342px;
    display: grid;
    gap: 8px;
    transform: translateX(-50%);
}

.choice-grid {
    height: 342px;
    grid-template-columns: repeat(2, 167px);
    grid-template-rows: repeat(2, 167px);
}

.choice-list {
    height: 228px;
    grid-template-columns: 342px;
    grid-auto-rows: 51px;
}

.choice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 130%;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.choice.is-selected {
    border-color: var(--blue);
}

.actions {
    position: absolute;
    left: 50%;
    top: 753px;
    z-index: 20;
    width: 342px;
    display: grid;
    grid-template-columns: 342px;
    gap: 10px;
    transform: translateX(-50%);
}

.secondary-button {
    position: absolute;
    left: 0;
    top: -60px;
    width: 342px;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 130%;
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.secondary-button.is-selected {
    border-color: var(--blue);
}

.primary-button {
    width: 342px;
    height: 50px;
    padding: 15px 40px;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    line-height: 130%;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.primary-button:disabled {
    opacity: 1;
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
}

.welcome-button {
    position: absolute;
    left: 50%;
    top: 703px;
    transform: translateX(-50%);
}

.fatal {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--ink);
    font-size: 16px;
    text-align: center;
}

@media (max-width: 389px) {
    .phone-screen {
        width: 100vw;
        min-width: 320px;
    }

    .question-header,
    .goal-field {
        width: calc(100vw - 40px);
    }

    .goal-field textarea {
        width: 100%;
    }

    .choice-grid,
    .choice-list,
    .actions,
    .primary-button,
    .secondary-button {
        width: calc(100vw - 48px);
    }

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