/* LIETUVINAM redesign: friendly rounded surfaces, bold learning states and a
   responsive layout based on the supplied mobile screens. */
:root {
    --bg: #f7faf8;
    --surface: #fff;
    --surface-soft: #f2f6f3;
    --surface-warm: #fff4d7;
    --ink: #10241b;
    --muted: #63736b;
    --line: #e1e8e4;
    --primary: #0a8b53;
    --primary-dark: #086c45;
    --primary-soft: #e2f5e9;
    --yellow: #ffc21b;
    --green: #087b4b;
    --blue: #1e72bb;
    --blue-soft: #e7f3fc;
    --red: #bf2934;
    --danger-soft: #fde9e9;
    --success: #10834f;
    --success-soft: #e2f5e9;
    --shadow: 0 12px 0 rgba(16, 36, 27, .045);
    --shadow-soft: 0 5px 0 rgba(16, 36, 27, .055);
    --radius-xl: 28px;
    --radius-lg: 24px;
    --radius-md: 19px;
    --radius-sm: 14px;
    --content: 920px;
    --sidebar: 264px;
    color-scheme: light;
}

html,
body {
    min-height: 100%;
    background: var(--bg);
}

[hidden] {
    display: none !important;
}

body {
    color: var(--ink);
    background: var(--bg);
    font-family: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
strong,
button {
    font-family: inherit;
}

h1,
h2,
h3 {
    color: var(--ink);
    letter-spacing: -.035em;
    font-weight: 900;
}

button,
input,
select {
    font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(30, 114, 187, .35);
    outline-offset: 3px;
}

.app-shell {
    min-height: 100vh;
}

.brand-mark {
    border: 2px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: none;
}

.brand-copy strong {
    padding-bottom: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
    letter-spacing: .12em;
}

.brand-copy strong::after {
    display: none;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.btn {
    min-height: 50px;
    padding: 13px 22px;
    border-radius: 19px;
    font-size: 15px;
    font-weight: 900;
    transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn--primary {
    border: 0;
    color: #fff;
    background: var(--primary);
    box-shadow: inset 0 -5px 0 rgba(0, 54, 33, .25);
}

.btn--primary:hover:not(:disabled) {
    background: #087d4a;
    box-shadow: inset 0 -5px 0 rgba(0, 54, 33, .25), 0 7px 16px rgba(8, 108, 69, .14);
}

.btn--secondary,
.btn--ghost {
    border: 2px solid var(--line);
    color: var(--primary-dark);
    background: #fff;
    box-shadow: inset 0 -3px 0 rgba(16, 36, 27, .045);
}

.btn--danger {
    border: 2px solid #f0caca;
    color: #a91f2b;
    background: #fff;
}

.btn--danger-strong {
    color: #fff;
    background: var(--red);
    box-shadow: inset 0 -5px 0 rgba(97, 12, 23, .24);
}

.onboarding {
    min-height: 100svh;
    grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr);
    background: #fff;
}

.onboarding-visual {
    display: grid;
    min-height: 100svh;
    padding: clamp(36px, 6vw, 86px);
    place-items: center;
    background: #fff8e7;
}

.onboarding-visual::before,
.onboarding-visual::after {
    opacity: .45;
}

.visual-content {
    z-index: 1;
    display: flex;
    width: min(620px, 100%);
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.visual-content .brand-lockup {
    order: 2;
    margin: 10px 0 18px;
}

.visual-content .brand-copy strong {
    font-size: 22px;
    letter-spacing: .15em;
}

.visual-content .brand-copy small {
    font-size: 12px;
}

.brand-stork {
    display: block;
    width: clamp(150px, 20vw, 245px);
    max-height: 250px;
    order: 1;
    object-fit: contain;
}

.onboarding-title {
    order: 3;
    margin: 0 auto 16px;
    color: var(--ink);
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 950;
    line-height: 1.06;
}

.onboarding-title__labas {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.visual-content > p {
    max-width: 530px;
    order: 4;
    color: var(--muted);
    font-size: clamp(17px, 1.6vw, 21px);
    font-weight: 700;
    line-height: 1.5;
}

.feature-pills {
    justify-content: center;
    order: 5;
    gap: 8px;
}

.feature-pill {
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 900;
}

.onboarding-language {
    top: 24px;
    right: 26px;
}

.language-trigger {
    width: 62px;
    height: 56px;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
}

.language-menu {
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 12px 0 rgba(16, 36, 27, .06);
}

.language-option {
    border-radius: 14px;
}

.language-option:hover,
.language-option.is-selected {
    background: var(--blue-soft);
}

.onboarding-panel {
    display: grid;
    min-width: 0;
    padding: clamp(34px, 6vw, 84px);
    place-content: center;
    background: #fff;
}

.onboarding-card {
    width: min(560px, 100%);
    padding: clamp(26px, 4vw, 42px);
    border: 2px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 7px 0 rgba(16, 36, 27, .05);
}

.onboarding-card h2 {
    margin-bottom: 10px;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.08;
}

.onboarding-card > p {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.step-kicker,
.eyebrow {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .1em;
}

.onboarding-progress {
    margin-bottom: 22px;
}

.onboarding-dot {
    width: 10px;
    height: 10px;
    border: 0;
    background: #e3e9e6;
}

.onboarding-dot.is-active {
    width: 30px;
    border-radius: 999px;
    background: var(--primary);
}

.auth-tabs {
    padding: 5px;
    border-radius: 17px;
    background: var(--surface-soft);
}

.auth-tabs button {
    min-height: 44px;
    border-radius: 13px;
    color: var(--muted);
    font-weight: 900;
}

.auth-tabs button.is-active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 3px 0 rgba(16, 36, 27, .06);
}

.auth-form {
    gap: 16px;
}

.form-field > span,
.form-field > label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.form-field input {
    min-height: 56px;
    padding: 13px 16px;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: #f7f9f8;
    font-size: 16px;
}

.form-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(30, 114, 187, .10);
}

.choice-grid,
.native-language-grid {
    gap: 12px;
}

.choice-card,
.native-language-card {
    min-height: 76px;
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: 21px;
    background: #fff;
    box-shadow: inset 0 -4px 0 rgba(16, 36, 27, .045);
}

.choice-card:hover,
.native-language-card:hover {
    border-color: #a7c9e6;
    background: #f7fbff;
}

.choice-card.is-selected,
.native-language-card.is-selected {
    border: 3px solid #81b9e7;
    color: #155b9a;
    background: var(--blue-soft);
    box-shadow: inset 0 -4px 0 rgba(30, 114, 187, .12);
}

.choice-icon,
.level-choice-mark {
    border-radius: 15px;
    color: #835f00;
    background: var(--surface-warm);
}

.choice-card.is-selected .choice-icon,
.choice-card.is-selected .level-choice-mark {
    color: #fff;
    background: var(--blue);
}

.choice-copy strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.choice-copy small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.onboarding-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 22px -8px -8px;
    padding: 12px 8px 8px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
}

.onboarding-actions .btn {
    min-height: 56px;
}

.onboarding-actions--single .btn {
    width: 100%;
}

.legal-links--onboarding {
    width: min(560px, 100%);
    margin: 18px auto 0;
    justify-content: center;
    color: var(--muted);
}

.legal-links--onboarding a,
.legal-links--profile a,
.legal-links--sidebar a {
    color: var(--primary-dark);
    font-weight: 800;
}

.dashboard {
    --dashboard-sidebar-width: var(--sidebar);
    min-height: 100vh;
    background: var(--bg);
}

.dashboard::before {
    width: var(--dashboard-sidebar-width);
    border-right: 1px solid var(--line);
    background: #fff;
}

.sidebar {
    position: sticky;
    height: 100vh;
    padding: 28px 20px 20px;
    border: 0;
    border-right: 1px solid var(--line);
    background: #fff;
    backdrop-filter: none;
}

.sidebar .brand-lockup {
    padding: 4px 8px 12px;
}

.side-nav {
    margin-top: 30px;
    gap: 7px;
}

.nav-item {
    min-height: 54px;
    padding: 0 15px;
    border-radius: 17px;
    color: #68776f;
    font-size: 14px;
    font-weight: 800;
}

.nav-item:hover {
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.nav-item.is-active {
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-weight: 950;
}

.nav-icon {
    width: 30px;
    height: 30px;
    font-size: 21px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 17px;
    border: 2px solid var(--line);
    border-radius: 19px;
    background: #f8faf8;
}

.sidebar-footer strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 950;
}

.sidebar-footer span {
    color: var(--muted);
    font-size: 11px;
}

.app-main {
    min-width: 0;
    padding: 24px clamp(24px, 4vw, 64px) 80px;
}

.topbar,
.page {
    width: min(1240px, 100%);
}

.topbar {
    min-height: 60px;
    margin-bottom: 26px;
}

.stat-chip {
    min-height: 42px;
    padding: 0 14px;
    border: 2px solid var(--line);
    color: var(--muted);
    background: #fff;
    box-shadow: none;
    font-size: 12px;
    font-weight: 850;
}

.stat-chip b {
    color: var(--ink);
    font-weight: 950;
}

.page-header {
    margin-bottom: 27px;
    align-items: center;
}

.page-header h1 {
    margin-bottom: 8px;
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 950;
    line-height: 1.04;
}

.page-header p {
    color: var(--muted);
    font-size: 16px;
    font-weight: 650;
}

.content-card,
.empty-card,
.summary-card,
.module-card,
.profile-card,
.basics-module-card,
.about-brand-card,
.about-card {
    border: 2px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .045);
}

.content-card,
.empty-card {
    padding: clamp(20px, 3vw, 30px);
}

.section-heading h2,
.community-heading h2,
.setting-block h3,
.about-card h2 {
    color: var(--ink);
    font-weight: 950;
}

.page--learn .learn-intro {
    width: min(980px, 100%);
    margin: 0 auto 20px;
    padding: 4px 4px 14px;
    background: transparent;
    box-shadow: none;
}

.page--learn .learn-intro__goal {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 9px 14px;
    border: 2px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    font-weight: 950;
}

.page--learn .learn-intro h1 {
    margin-bottom: 5px;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 950;
}

.page--learn .learn-intro p {
    color: var(--muted);
    font-size: 16px;
}

.page--learn .curriculum-roadmap {
    margin-bottom: 34px;
}

.page--learn .curriculum-roadmap__marker,
.page--learn .curriculum-roadmap__step .curriculum-roadmap__marker {
    border: 2px solid var(--line);
    border-radius: 17px;
    color: var(--muted);
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .04);
    font-weight: 950;
}

.page--learn .curriculum-roadmap__step.is-complete .curriculum-roadmap__marker {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
}

.page--learn .curriculum-roadmap__step.is-current .curriculum-roadmap__marker {
    border-color: var(--blue);
    color: #155b9a;
    background: var(--blue-soft);
}

.page--learn .curriculum-roadmap__track-fill {
    background: var(--primary);
}

.page--learn .curriculum-stage__modules {
    width: min(900px, 100%);
}

.path-unit {
    overflow: hidden;
    padding: 0 0 22px;
    border: 2px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 6px 0 rgba(16, 36, 27, .05);
}

.path-unit + .path-unit {
    margin-top: 20px;
}

.path-unit-banner {
    display: grid;
    min-height: 150px;
    margin: -1px -1px 18px;
    padding: 26px 30px;
    border-radius: 25px 25px 20px 20px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    color: #fff;
    background: var(--primary);
}

.path-unit-copy h3,
.path-unit-copy p {
    color: #fff;
}

.path-unit-copy h3 {
    margin-bottom: 7px;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.08;
}

.path-unit-copy p {
    max-width: 620px;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 700;
    opacity: .92;
}

.path-unit-icon {
    display: grid;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    place-items: center;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, .2);
    font-size: 27px;
}

.path-unit-count {
    min-width: 74px;
    padding: 12px 15px;
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    font-size: 20px;
    font-weight: 950;
    text-align: center;
}

.path-unit.is-locked .path-unit-banner {
    color: var(--muted);
    background: #e8eeea;
}

.path-unit.is-locked .path-unit-copy h3,
.path-unit.is-locked .path-unit-copy p {
    color: var(--muted);
}

.path-nodes {
    position: relative;
    display: flex;
    min-height: 150px;
    padding: 12px 24px 24px;
    flex-direction: column;
    align-items: center;
    gap: 19px;
}

.path-nodes::before {
    position: absolute;
    top: 28px;
    bottom: 58px;
    left: 50%;
    width: 4px;
    border-radius: 999px;
    background: #e7ede9;
    content: "";
    transform: translateX(-50%);
}

.path-step {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 103px;
    display: flex;
    justify-content: center;
}

.path-node-wrap {
    display: grid;
    min-width: 185px;
    justify-items: center;
    align-content: start;
    gap: 8px;
    transform: translateX(var(--node-offset-mobile, 0px));
}

.path-node-button {
    display: grid;
    width: 72px;
    height: 72px;
    border: 5px solid #fff;
    border-radius: 50%;
    place-items: center;
    color: #fff;
    background: #cbd5cf;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .12), 0 0 0 3px var(--line);
    cursor: pointer;
}

.path-step.is-complete .path-node-button,
.path-step.is-current .path-node-button {
    background: var(--primary);
    box-shadow: 0 6px 0 #06633d, 0 0 0 3px var(--primary);
}

.path-step.is-current .path-node-button {
    width: 82px;
    height: 82px;
    border-color: #fff;
    box-shadow: 0 6px 0 #06633d, 0 0 0 5px var(--primary);
}

.path-node-symbol {
    font-size: 24px;
}

.path-node-caption {
    max-width: 250px;
    color: var(--ink);
    text-align: center;
}

.path-node-caption strong {
    display: block;
    font-size: 15px;
    font-weight: 950;
}

.path-node-caption small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.path-current-bubble {
    position: absolute;
    top: -18px;
    padding: 5px 12px;
    border: 2px solid var(--primary);
    border-radius: 12px;
    color: var(--primary-dark);
    background: #fff;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.progress-track,
.basics-progress-track {
    height: 11px;
    border-radius: 999px;
    background: #e6ece8;
}

.progress-fill,
.basics-progress-track > span {
    background: var(--primary);
}

.mobile-nav {
    display: none;
}

.page--words .page-header {
    align-items: end;
}

.words-count {
    display: flex;
    min-width: 150px;
    padding: 15px 19px;
    border: 2px solid var(--line);
    border-radius: 20px;
    flex-direction: column;
    background: #fff;
}

.words-count strong {
    color: var(--primary-dark);
    font-size: 27px;
    font-weight: 950;
}

.words-count span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.word-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.word-row {
    min-height: 86px;
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 21px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .04);
}

.word-row strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
}

.word-row span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.icon-button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: var(--blue);
    box-shadow: inset 0 -4px 0 rgba(3, 49, 89, .22);
}

.basics-page-header {
    margin-bottom: 16px;
}

.basics-tabs {
    display: grid;
    width: min(720px, 100%);
    margin: 0 auto 18px;
    padding: 6px;
    border-radius: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: #edf1ee;
}

.basics-tabs button {
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    color: var(--muted);
    background: transparent;
    font-weight: 950;
    cursor: pointer;
}

.basics-tabs button.is-active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .08);
}

.basics-independent-note {
    width: min(960px, 100%);
    margin: 0 auto 18px;
    padding: 16px 20px;
    border-radius: 23px;
    color: var(--ink);
    background: var(--surface-warm);
}

.basics-module-grid {
    width: min(1040px, 100%);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
}

.basics-module-card {
    overflow: hidden;
    padding: clamp(20px, 3vw, 34px);
}

.basics-module-card__header {
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
}

.basics-module-card__identity h2 {
    font-size: 28px;
}

.basics-module-card__identity p {
    color: var(--muted);
}

.basics-reference {
    margin: 20px 0 22px;
    padding: 18px;
    border-radius: 23px;
    background: #fff8e2;
}

.basics-reference__head {
    margin-bottom: 15px;
}

.basics-reference__head strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
}

.basics-reference__head span {
    color: var(--muted);
}

.alphabet-reference-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.alphabet-reference-letter {
    min-height: 68px;
    border: 3px solid var(--line);
    border-radius: 19px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .07);
    font-size: 26px;
    font-weight: 950;
}

.alphabet-reference-letter.is-special {
    border-color: #f0cf6f;
    background: #fff3cf;
}

.alphabet-reference-letter:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.number-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.number-reference-item {
    min-height: 70px;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.basics-lessons-head {
    margin: 22px 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.basics-lesson-row {
    min-height: 82px;
    padding: 12px 15px;
    border: 2px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .045);
}

.basics-lesson-row:not(:disabled):hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.basics-lesson-row__index {
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    place-items: center;
    color: #fff;
    background: var(--primary);
    font-weight: 950;
}

.progress-layout,
.profile-grid,
.profile-footer-grid {
    gap: 16px;
}

.big-stat {
    padding: 14px 0;
}

.big-stat strong {
    color: var(--primary-dark);
    font-weight: 950;
}

.setting-block h3 {
    font-size: 20px;
}

.setting-block > p {
    color: var(--muted);
}

.segmented {
    padding: 6px;
    border-radius: 18px;
    background: #edf2ee;
}

.segmented button {
    min-height: 43px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 850;
}

.segmented button.is-active {
    color: var(--primary-dark);
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .06);
}

.profile-overview {
    display: grid;
    margin-bottom: 22px;
    padding: clamp(20px, 3vw, 30px);
    border: 2px solid var(--line);
    border-radius: 26px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .045);
}

.profile-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 17px;
}

.profile-avatar {
    display: grid;
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    border-radius: 50%;
    place-items: center;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 5px 0 #06633d;
    font-size: 35px;
    font-weight: 950;
}

.profile-identity h2 {
    margin: 0 0 3px;
    font-size: clamp(24px, 3vw, 34px);
}

.profile-identity p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.profile-overview-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.profile-metrics {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.profile-metric {
    min-width: 0;
    padding: 15px;
    border: 2px solid var(--line);
    border-radius: 19px;
    background: #fff;
}

.profile-metric__icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 13px;
    place-items: center;
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.profile-metric:nth-child(1) .profile-metric__icon {
    color: #b74e05;
    background: #fff1d8;
}

.profile-metric:nth-child(3) .profile-metric__icon {
    color: var(--blue);
    background: var(--blue-soft);
}

.profile-metric span:last-child {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.profile-metric strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 25px;
    font-weight: 950;
}

.profile-stage-progress {
    grid-column: 1 / -1;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.profile-stage-progress__heading {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-stage-progress__heading strong {
    font-size: 17px;
    font-weight: 950;
}

.profile-stage-progress__heading .btn {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 12px;
}

.profile-stage-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.profile-stage-item {
    display: grid;
    gap: 8px;
}

.profile-stage-item__label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 900;
}

.profile-stage-item__label span:last-child {
    color: var(--muted);
}

.profile-stage-item .progress-track {
    height: 9px;
}

.profile-overview__links {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-overview__links .btn {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 13px;
}

.lesson-screen {
    min-height: 100svh;
    color: var(--ink);
    background: #fff;
}

.lesson-topbar {
    min-height: 82px;
    padding: 14px clamp(16px, 4vw, 54px);
    border-bottom: 2px solid #eef2ef;
    background: rgba(255, 255, 255, .96);
    box-shadow: none;
}

.lesson-close {
    width: 48px;
    height: 48px;
    border: 2px solid var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .05);
}

.lesson-step-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 950;
}

.lesson-wrap {
    width: min(860px, calc(100% - 40px));
    min-height: calc(100svh - 82px);
    padding: clamp(38px, 8vh, 90px) 0 185px;
    gap: 14px;
}

.exercise-heading {
    display: grid;
    margin-bottom: 14px;
    grid-template-columns: minmax(0, 1fr) 120px;
    align-items: center;
    gap: 18px;
}

.exercise-heading__copy {
    min-width: 0;
}

.exercise-heading .exercise-title {
    margin-bottom: 0;
}

.lesson-mascot {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.exercise-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 9px 14px;
    border-radius: 14px;
    color: #805c00;
    background: var(--surface-warm);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .1em;
}

.exercise-title {
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 950;
    line-height: 1.05;
}

.phrase-card,
.reading-card,
.scenario-card,
.cloze-card {
    margin-bottom: 17px;
    padding: clamp(20px, 3vw, 32px);
    border: 3px solid var(--line);
    border-radius: 27px;
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .05);
}

.phrase-card--listening {
    justify-content: center;
    border: 0;
    box-shadow: none;
}

.phrase-audio {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    color: #fff;
    background: var(--blue);
    box-shadow: inset 0 -6px 0 rgba(3, 49, 89, .24);
    font-size: 30px;
}

.phrase-card strong {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 950;
}

.phrase-card span {
    font-size: 17px;
}

.exercise-cue {
    margin-bottom: 18px;
    padding: 20px 24px;
    border-radius: 24px;
    color: var(--ink);
    background: #f2f6f4;
    font-size: 24px;
    font-weight: 900;
}

.answer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.answer-option {
    min-height: 76px;
    padding: 16px 22px;
    border: 3px solid var(--line);
    border-radius: 24px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .055);
    font-size: 20px;
    font-weight: 900;
}

.answer-option:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #a9cbe5;
    background: #f8fcff;
}

.answer-option.is-selected {
    border-color: #78b7e9;
    color: #155b9a;
    background: var(--blue-soft);
    box-shadow: 0 5px 0 rgba(30, 114, 187, .12);
}

.answer-option.is-correct {
    border-color: #8fcdaa;
    color: var(--primary-dark);
    background: var(--success-soft);
}

.answer-option.is-wrong {
    border-color: #efadb1;
    color: #a31f2a;
    background: var(--danger-soft);
}

.option-letter {
    display: none;
}

.word-bank,
.sentence-zone {
    min-height: 100px;
    padding: 18px;
    gap: 11px;
}

.sentence-zone {
    border: 0;
    border-bottom: 3px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.word-bank {
    border: 0;
    background: transparent;
}

.word-token {
    min-height: 56px;
    padding: 0 20px;
    border: 3px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 5px 0 rgba(16, 36, 27, .06);
    font-size: 17px;
    font-weight: 900;
}

.word-token:disabled {
    opacity: .46;
}

.lesson-footer {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 13px 20px max(15px, env(safe-area-inset-bottom));
    border-top: 2px solid #eef2ef;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
}

.lesson-footer-inner {
    display: grid;
    width: min(860px, 100%);
    min-height: 58px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.lesson-footer-inner > .btn {
    min-width: min(290px, 35vw);
    min-height: 58px;
}

.feedback-copy {
    display: none;
    min-width: 0;
    color: var(--primary-dark);
}

.feedback-copy.is-visible {
    display: grid;
    gap: 3px;
}

.feedback-copy strong {
    font-size: 20px;
    font-weight: 950;
}

.feedback-copy span {
    color: var(--muted);
    font-size: 14px;
}

.lesson-footer.is-correct {
    border-top-color: #c7ead5;
    background: var(--success-soft);
}

.lesson-footer.is-wrong {
    border-top-color: #f2c5c7;
    background: var(--danger-soft);
}

.lesson-footer.is-wrong .feedback-copy {
    color: #a31f2a;
}

.completion-card {
    align-content: center;
    justify-items: center;
    text-align: center;
}

.completion-card .completion-badge {
    display: grid;
    width: 180px;
    height: 180px;
    margin-bottom: 12px;
    border-radius: 50%;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 54px;
}

.completion-mascot {
    width: min(220px, 45vw);
    margin-bottom: 12px;
}

.completion-card h1 {
    color: var(--primary);
    font-size: clamp(36px, 5vw, 56px);
}

.completion-card > p {
    color: var(--muted);
    font-size: 18px;
}

.reward-grid {
    width: 100%;
    margin: 18px 0;
    gap: 12px;
}

.reward-card {
    padding: 20px 13px;
    border: 2px solid var(--line);
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .045);
}

.reward-card strong {
    color: var(--primary-dark);
    font-size: 27px;
    font-weight: 950;
}

.completion-card > .btn {
    width: min(560px, 100%);
    margin-top: 8px;
}

.scroll-to-top {
    border: 2px solid var(--line);
    color: var(--primary-dark);
    box-shadow: 0 5px 0 rgba(16, 36, 27, .08);
}

.custom-select__trigger {
    min-height: 50px;
    padding: 12px 42px 12px 16px;
    border: 2px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .045);
    font-weight: 800;
}

.custom-select__menu {
    padding: 8px;
    border: 2px solid var(--line);
    border-radius: 19px;
    box-shadow: 0 9px 0 rgba(16, 36, 27, .07), 0 20px 38px rgba(16, 36, 27, .11);
}

.custom-select__option {
    min-height: 46px;
    padding: 10px 38px 10px 13px;
    border-radius: 13px;
    font-weight: 750;
}

.custom-select__option:hover,
.custom-select__option.is-active,
.custom-select__option[aria-selected="true"] {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

@media (min-width: 1180px) {
    .page--basics .basics-reference {
        padding: 22px;
    }

    .lesson-screen:not(.lesson-screen--listen) .answer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .profile-overview {
        grid-template-columns: 1fr;
    }

    .profile-overview-actions {
        justify-self: start;
    }

    .profile-overview-actions:empty {
        display: none;
    }
}

@media (max-width: 980px) {
    .dashboard {
        display: block;
        min-height: 100svh;
    }

    .dashboard::before,
    .sidebar {
        display: none;
    }

    .app-main {
        padding: 14px 22px calc(112px + env(safe-area-inset-bottom));
    }

    .topbar {
        margin-bottom: 24px;
    }

    .mobile-brand {
        display: block;
    }

    .mobile-brand .brand-copy small {
        display: none;
    }

    .stat-chips {
        gap: 6px;
    }

    .stat-chip:nth-child(2),
    .stat-chip:nth-child(3) {
        display: none;
    }

    .mobile-nav {
        position: fixed;
        z-index: 50;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        min-height: calc(78px + env(safe-area-inset-bottom));
        padding: 8px 10px max(8px, env(safe-area-inset-bottom));
        border-top: 2px solid #edf1ee;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: center;
        gap: 4px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -8px 26px rgba(16, 36, 27, .055);
        backdrop-filter: blur(16px);
    }

    .mobile-nav .nav-item {
        display: grid;
        min-width: 0;
        min-height: 62px;
        padding: 4px 3px;
        border: 2px solid transparent;
        border-radius: 18px;
        justify-items: center;
        align-content: center;
        gap: 2px;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.1;
        text-align: center;
    }

    .mobile-nav .nav-item[data-view="progress"],
    .mobile-nav .nav-item[data-view="about"] {
        display: none;
    }

    .mobile-nav .nav-item.is-active {
        border-color: #bee8d0;
        color: var(--primary-dark);
        background: var(--primary-soft);
    }

    .mobile-nav .nav-icon {
        width: 27px;
        height: 27px;
        font-size: 22px;
    }

    .page {
        width: min(920px, 100%);
    }

    .scroll-to-top {
        bottom: calc(86px + env(safe-area-inset-bottom));
    }

    .onboarding {
        display: flex;
        min-height: 100svh;
        flex-direction: column;
    }

    .onboarding-visual {
        min-height: 310px;
        padding: 50px 24px 20px;
    }

    .onboarding--personalising .onboarding-visual {
        min-height: 175px;
        padding: 30px 22px 12px;
    }

    .onboarding--personalising .brand-stork,
    .onboarding--personalising .visual-content > p,
    .onboarding--personalising .feature-pills {
        display: none;
    }

    .onboarding--personalising .visual-content .brand-lockup {
        order: 1;
        margin: 0 0 8px;
    }

    .onboarding--personalising .onboarding-title {
        order: 2;
        margin: 0;
        font-size: 27px;
    }

    .onboarding-panel {
        flex: 1;
        padding: 14px 20px 30px;
        align-content: start;
    }

    .onboarding-card {
        width: min(640px, 100%);
        padding: 22px;
        box-shadow: none;
    }

    .legal-links--onboarding {
        margin-bottom: 14px;
    }
}

@media (max-width: 720px) {
    .app-main {
        padding: 12px 16px calc(108px + env(safe-area-inset-bottom));
    }

    .topbar {
        min-height: 48px;
        margin-bottom: 22px;
    }

    .mobile-brand .brand-lockup {
        gap: 9px;
    }

    .mobile-brand .brand-mark {
        width: 38px;
        height: 37px;
    }

    .mobile-brand .brand-copy strong {
        font-size: 14px;
    }

    .stat-chip {
        min-height: 38px;
        padding: 0 10px;
        font-size: 11px;
    }

    .page-header {
        margin-bottom: 20px;
        align-items: start;
    }

    .page-header h1 {
        font-size: clamp(32px, 8vw, 42px);
    }

    .page-header p {
        font-size: 14px;
    }

    .page--words .page-header {
        align-items: start;
    }

    .words-count {
        min-width: 82px;
        padding: 10px 12px;
    }

    .words-count strong {
        font-size: 22px;
    }

    .words-count span {
        font-size: 10px;
    }

    .word-list {
        grid-template-columns: 1fr;
    }

    .word-row {
        min-height: 78px;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .word-row strong {
        font-size: 16px;
    }

    .word-row span {
        font-size: 13px;
    }

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

    .profile-stage-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-overview-actions {
        flex-wrap: wrap;
    }

    .basics-tabs {
        margin-bottom: 14px;
    }

    .basics-tabs button {
        min-height: 48px;
        font-size: 14px;
    }

    .basics-independent-note {
        padding: 14px 16px;
    }

    .basics-module-card__header {
        flex-direction: column;
        align-items: stretch;
    }

    .alphabet-reference-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .alphabet-reference-letter {
        min-height: 57px;
        border-radius: 16px;
        font-size: 22px;
    }

    .path-unit-banner {
        min-height: 130px;
        padding: 19px 18px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 11px;
    }

    .path-unit-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 21px;
    }

    .path-unit-copy h3 {
        font-size: 22px;
    }

    .path-unit-copy p {
        font-size: 12px;
    }

    .path-unit-count {
        min-width: 54px;
        padding: 9px 8px;
        font-size: 15px;
    }

    .path-nodes {
        padding: 8px 12px 16px;
        gap: 12px;
    }

    .path-node-wrap {
        min-width: 156px;
        transform: translateX(var(--node-offset-mobile, 0px));
    }

    .path-node-button {
        width: 62px;
        height: 62px;
    }

    .path-step.is-current .path-node-button {
        width: 72px;
        height: 72px;
    }

    .path-node-caption strong {
        max-width: 180px;
        font-size: 13px;
    }

    .path-node-caption small {
        font-size: 10px;
    }

    .lesson-topbar {
        min-height: 68px;
        padding: 10px 14px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 11px;
    }

    .lesson-wrap {
        width: min(650px, calc(100% - 28px));
        min-height: calc(100svh - 68px);
        padding: 30px 0 155px;
    }

    .exercise-heading {
        margin-bottom: 9px;
        grid-template-columns: minmax(0, 1fr) 70px;
        gap: 8px;
    }

    .lesson-mascot {
        width: 68px;
        height: 68px;
    }

    .exercise-title {
        font-size: clamp(30px, 8vw, 40px);
    }

    .phrase-card,
    .reading-card,
    .scenario-card,
    .cloze-card {
        padding: 18px;
        border-radius: 22px;
    }

    .phrase-audio {
        width: 66px;
        height: 66px;
        border-radius: 19px;
    }

    .answer-option {
        min-height: 67px;
        padding: 13px 17px;
        border-radius: 21px;
        font-size: 17px;
    }

    .exercise-cue {
        padding: 17px 18px;
        border-radius: 20px;
        font-size: 20px;
    }

    .lesson-footer {
        padding: 10px 14px max(12px, env(safe-area-inset-bottom));
    }

    .lesson-footer-inner {
        min-height: 55px;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .lesson-footer-inner > .btn {
        width: 100%;
        min-width: 0;
        min-height: 54px;
    }

    .feedback-copy.is-visible {
        padding: 4px 6px 0;
    }

    .feedback-copy strong {
        font-size: 18px;
    }

    .feedback-copy span {
        font-size: 12px;
    }

    .completion-card .completion-badge {
        width: 130px;
        height: 130px;
    }

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

    .reward-card {
        padding: 13px 6px;
    }

    .reward-card strong {
        font-size: 21px;
    }

    .reward-card span {
        font-size: 10px;
    }

    .onboarding-visual {
        min-height: 300px;
        padding: 54px 18px 20px;
    }

    .brand-stork {
        width: 112px;
        max-height: 122px;
    }

    .visual-content .brand-lockup {
        margin: 4px 0 10px;
    }

    .visual-content .brand-copy strong {
        font-size: 16px;
    }

    .onboarding-title {
        margin-bottom: 8px;
        font-size: 34px;
    }

    .visual-content > p {
        margin-bottom: 12px;
        font-size: 14px;
    }

    .feature-pills {
        gap: 5px;
    }

    .feature-pill {
        padding: 7px 10px;
        font-size: 10px;
    }

    .onboarding-language {
        top: 12px;
        right: 13px;
    }

    .language-trigger {
        width: 48px;
        height: 44px;
        border-radius: 15px;
    }

    .onboarding-panel {
        padding: 8px 14px 24px;
    }

    .onboarding-card {
        padding: 19px 17px;
        border-radius: 22px;
    }

    .onboarding-card h2 {
        font-size: 28px;
    }

    .onboarding-card > p {
        font-size: 14px;
    }

    .onboarding-actions {
        margin: 18px -5px -5px;
        padding: 10px 5px 5px;
    }
}

@media (max-width: 420px) {
    .app-main {
        padding-right: 12px;
        padding-left: 12px;
    }

    .profile-identity {
        gap: 12px;
    }

    .profile-avatar {
        width: 62px;
        height: 62px;
        font-size: 28px;
    }

    .profile-metric {
        padding: 12px;
    }

    .path-unit-banner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .path-unit-icon {
        display: none;
    }

    .alphabet-reference-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .exercise-heading {
        grid-template-columns: minmax(0, 1fr) 54px;
    }

    .lesson-mascot {
        width: 54px;
        height: 54px;
    }

    .reward-grid {
        gap: 6px;
    }
}

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

/* New learner flow follows the supplied mobile-first onboarding screens. */
.onboarding--welcome,
.onboarding--setup,
.onboarding--auth,
.onboarding--postlesson {
    display: block;
    min-height: 100svh;
    color: var(--ink);
    background: #fff9e9;
}

.onboarding--welcome .onboarding-language {
    top: 24px;
    right: max(24px, calc((100vw - 1080px) / 2));
}

.welcome-screen,
.postlesson-screen {
    display: flex;
    width: min(680px, calc(100% - 36px));
    min-height: 100svh;
    margin: 0 auto;
    padding: 30px 0 26px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.welcome-stork {
    display: block;
    width: clamp(176px, 24vw, 236px);
    height: auto;
    margin: 0 auto 8px;
    object-fit: contain;
}

.welcome-screen > .brand-lockup,
.postlesson-screen > .brand-lockup {
    margin: 0 auto 22px;
}

.welcome-screen .brand-copy strong,
.postlesson-screen .brand-copy strong {
    color: var(--ink);
}

.welcome-screen .onboarding-title,
.postlesson-screen h1 {
    display: block;
    width: 100%;
    margin: 0 auto 13px;
    color: var(--ink);
    font-size: clamp(34px, 5vw, 50px);
    font-weight: 950;
    line-height: 1.08;
    text-align: center;
}

.welcome-screen .onboarding-title__labas {
    display: inline;
    margin: 0 .12em 0 0;
    color: var(--primary-dark);
}

.welcome-subtitle {
    max-width: 520px;
    margin: 0 auto 21px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.welcome-screen .feature-pills {
    margin-bottom: 26px;
    justify-content: center;
}

.welcome-screen .feature-pill {
    border: 1px solid #d8e9dd;
    color: var(--primary-dark);
    background: #eaf5ed;
    font-size: 12px;
    font-weight: 850;
}

.welcome-actions {
    display: grid;
    width: min(390px, 100%);
    gap: 8px;
}

.welcome-actions .btn {
    min-height: 58px;
    border-radius: 18px;
    font-size: 16px;
}

.welcome-login-link,
.save-later {
    padding: 10px 12px;
    border: 0;
    color: var(--primary-dark);
    background: transparent;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.welcome-login-link:hover,
.save-later:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.welcome-screen .legal-links--onboarding,
.postlesson-screen .legal-links--onboarding {
    margin-top: 18px;
}

.onboarding--setup,
.onboarding--auth {
    background:
        radial-gradient(circle at 50% 0, rgba(255, 231, 176, .52), transparent 390px),
        #fffdf7;
}

.onboarding-flow-head {
    position: relative;
    display: grid;
    width: min(1120px, 100%);
    min-height: 88px;
    margin: 0 auto;
    padding: 14px 24px;
    grid-template-columns: 48px minmax(130px, 1fr) minmax(160px, 360px) 48px;
    align-items: center;
    gap: 18px;
}

.onboarding-flow-head > .brand-lockup {
    justify-self: center;
}

.onboarding-back {
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: 15px;
    place-items: center;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
}

.onboarding-back svg {
    transform: rotate(180deg);
}

.setup-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ece8;
}

.setup-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 180ms ease;
}

.onboarding-flow-head .onboarding-language {
    position: relative;
    top: auto;
    right: auto;
    justify-self: end;
}

.onboarding-flow-head .language-trigger {
    width: 56px;
    height: 48px;
}

.setup-screen,
.onboarding--auth .onboarding-panel {
    display: flex;
    width: min(900px, calc(100% - 36px));
    min-height: calc(100svh - 88px);
    margin: 0 auto;
    padding: 25px 0 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    backdrop-filter: none;
}

.setup-card,
.onboarding--auth .onboarding-card {
    width: min(690px, 100%);
    padding: clamp(24px, 4vw, 42px);
    border: 2px solid #e6e9e2;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 8px 0 rgba(16, 36, 27, .045);
}

.setup-mascot {
    display: flex;
    height: 86px;
    margin: 0 auto 12px;
    justify-content: center;
}

.setup-mascot img {
    width: 96px;
    height: 86px;
    object-fit: contain;
}

.setup-card > .step-kicker,
.setup-card > h1,
.setup-card > p {
    justify-content: center;
    text-align: center;
}

.setup-card > h1 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(27px, 3.5vw, 38px);
    font-weight: 950;
    line-height: 1.12;
}

.setup-card > p {
    margin-bottom: 24px;
    color: var(--muted);
    line-height: 1.5;
}

.setup-card .native-language-grid {
    max-height: min(36vh, 310px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-card .native-language-card {
    min-height: 58px;
    border-width: 2px;
    border-radius: 16px;
    font-size: 14px;
}

.daily-goal-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.daily-goal-option {
    position: relative;
    display: flex;
    min-height: 104px;
    padding: 14px 8px;
    border: 2px solid var(--line);
    border-radius: 19px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.daily-goal-option:hover {
    transform: translateY(-2px);
    border-color: #9bcdb0;
}

.daily-goal-option.is-selected {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: #edf8f0;
    box-shadow: inset 0 0 0 1px var(--primary);
}

.daily-goal-option strong {
    font-size: 27px;
    font-weight: 950;
    line-height: 1;
}

.daily-goal-option span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.daily-goal-option small {
    position: absolute;
    top: -10px;
    left: 50%;
    padding: 4px 7px;
    border-radius: 999px;
    color: #fff;
    background: var(--primary);
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
    transform: translateX(-50%);
}

.setup-card .onboarding-actions {
    margin-top: 24px;
}

.setup-card .onboarding-actions .btn {
    min-height: 58px;
    border-radius: 18px;
}

.onboarding--auth .onboarding-flow-head {
    grid-template-columns: 48px 1fr 48px;
}

.onboarding--auth .onboarding-flow-head > .brand-lockup {
    grid-column: 2;
}

.onboarding--auth .onboarding-flow-head .onboarding-language {
    grid-column: 3;
    grid-row: 1;
}

.onboarding--auth .onboarding-panel {
    min-height: calc(100svh - 88px);
    padding-top: 0;
}

.onboarding--auth .onboarding-card h2 {
    font-size: 32px;
}

.auth-return-link {
    display: block;
    margin: 8px auto 0;
}

.onboarding--postlesson {
    position: relative;
}

.postlesson-screen {
    width: min(520px, calc(100% - 36px));
    gap: 0;
}

.postlesson-screen .welcome-stork {
    width: 196px;
    margin-bottom: 3px;
}

.streak-celebration {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 5px auto 15px;
    border-radius: 22px;
    place-items: center;
    color: #a76400;
    background: #fff0c9;
}

.streak-celebration svg {
    width: 34px;
    height: 34px;
}

.streak-count {
    display: flex;
    margin: 0 auto 10px;
    align-items: baseline;
    gap: 7px;
    color: var(--primary-dark);
}

.streak-count strong {
    font-size: 38px;
    font-weight: 950;
}

.streak-count span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.postlesson-screen > p {
    max-width: 430px;
    margin: 0 auto 23px;
    color: var(--muted);
    line-height: 1.55;
}

.postlesson-screen > .btn {
    min-height: 58px;
    border-radius: 18px;
}

.onboarding--save .save-later {
    position: absolute;
    top: 20px;
    right: max(20px, calc((100vw - 800px) / 2));
}

.save-progress-screen {
    width: min(570px, calc(100% - 36px));
}

.save-progress-screen .welcome-stork {
    width: 150px;
}

.save-progress-screen h1 {
    margin-bottom: 8px;
}

.save-progress-form {
    width: min(450px, 100%);
    margin-top: 4px;
    text-align: left;
}

.save-progress-form .btn {
    min-height: 56px;
    border-radius: 17px;
}

.page--learn {
    max-width: 940px;
}

.page--learn .learn-intro {
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
}

.page--learn .learn-intro__goal {
    margin-bottom: 8px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #eaf5ed;
    font-size: 12px;
    text-transform: uppercase;
}

.page--learn .learn-intro h1 {
    margin-bottom: 5px;
    font-size: clamp(26px, 3vw, 34px);
}

.page--learn .learn-intro p {
    max-width: 660px;
    margin: 0;
    font-size: 14px;
}

.daily-goal-card {
    display: flex;
    width: min(900px, 100%);
    min-height: 86px;
    margin: 0 auto 20px;
    padding: 15px 20px;
    border: 2px solid var(--line);
    border-radius: 21px;
    align-items: center;
    gap: 14px;
    background: #fff;
    box-shadow: 0 4px 0 rgba(16, 36, 27, .035);
}

.daily-goal-card__icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 15px;
    place-items: center;
    color: var(--primary-dark);
    background: #eaf5ed;
}

.daily-goal-card__icon svg {
    width: 23px;
    height: 23px;
}

.daily-goal-card__copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.daily-goal-card__copy strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 950;
}

.daily-goal-card__copy span {
    color: var(--muted);
    font-size: 12px;
}

.daily-goal-card__target {
    padding: 9px 13px;
    border-radius: 13px;
    color: var(--primary-dark);
    background: #eaf5ed;
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
}

.page--learn .path-unit {
    width: min(900px, 100%);
    margin-right: auto;
    margin-left: auto;
    border-radius: 24px;
}

.page--learn .path-unit-banner {
    min-height: 112px;
    margin-bottom: 10px;
    padding: 19px 24px;
    border-radius: 22px 22px 16px 16px;
}

.page--learn .path-unit-copy h3 {
    font-size: clamp(21px, 2.7vw, 29px);
}

.page--learn .path-unit-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
}

.page--learn .path-nodes {
    padding-top: 18px;
    gap: 16px;
}

.page--learn .path-node-wrap {
    transform: translateX(var(--node-offset, 0px));
}

.daily-goal-settings .daily-goal-options {
    margin-top: 16px;
}

.daily-goal-settings .daily-goal-option {
    min-height: 82px;
    border-radius: 15px;
}

@media (max-width: 980px) {
    .onboarding-flow-head {
        grid-template-columns: 46px minmax(100px, 1fr) minmax(110px, 260px) 46px;
        gap: 11px;
    }

    .page--learn .path-node-wrap {
        transform: translateX(var(--node-offset-mobile, 0px));
    }
}

@media (max-width: 720px) {
    .onboarding--welcome .onboarding-language {
        top: 12px;
        right: 13px;
    }

    .welcome-screen {
        width: min(500px, calc(100% - 32px));
        min-height: 100svh;
        padding: 34px 0 22px;
    }

    .welcome-stork {
        width: 190px;
        margin-bottom: 0;
    }

    .welcome-screen > .brand-lockup {
        margin-bottom: 15px;
    }

    .welcome-screen .onboarding-title {
        margin-bottom: 9px;
        font-size: 35px;
    }

    .welcome-subtitle {
        margin-bottom: 15px;
        font-size: 14px;
    }

    .welcome-screen .feature-pills {
        margin-bottom: 20px;
        gap: 6px;
    }

    .welcome-screen .feature-pill {
        padding: 7px 9px;
        font-size: 10px;
    }

    .welcome-actions .btn {
        min-height: 54px;
    }

    .onboarding-flow-head {
        min-height: 70px;
        padding: 10px 14px;
        grid-template-columns: 40px 1fr minmax(70px, 120px) 40px;
        gap: 8px;
    }

    .onboarding-flow-head > .brand-lockup {
        gap: 7px;
    }

    .onboarding-flow-head .brand-mark {
        width: 32px;
        height: 31px;
    }

    .onboarding-flow-head .brand-copy strong {
        font-size: 12px;
    }

    .onboarding-back {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .setup-progress {
        height: 8px;
    }

    .onboarding-flow-head .language-trigger {
        width: 40px;
        height: 38px;
        padding: 0 6px;
    }

    .setup-screen,
    .onboarding--auth .onboarding-panel {
        width: 100%;
        min-height: calc(100svh - 70px);
        padding: 12px 14px max(18px, env(safe-area-inset-bottom));
        justify-content: flex-start;
    }

    .setup-card,
    .onboarding--auth .onboarding-card {
        padding: 18px 16px;
        border-radius: 23px;
        box-shadow: none;
    }

    .setup-mascot {
        height: 68px;
        margin-bottom: 6px;
    }

    .setup-mascot img {
        width: 76px;
        height: 68px;
    }

    .setup-card > h1 {
        font-size: 27px;
    }

    .setup-card > p {
        margin-bottom: 18px;
        font-size: 13px;
    }

    .setup-card .native-language-grid {
        max-height: min(40vh, 300px);
        gap: 7px;
    }

    .setup-card .native-language-card {
        min-height: 49px;
        padding: 8px;
        gap: 8px;
        font-size: 12px;
    }

    .setup-card .native-language-card img {
        width: 26px;
        height: 18px;
    }

    .daily-goal-options {
        gap: 7px;
    }

    .daily-goal-option {
        min-height: 86px;
        border-radius: 15px;
    }

    .daily-goal-option strong {
        font-size: 24px;
    }

    .daily-goal-option small {
        font-size: 8px;
    }

    .setup-card .onboarding-actions {
        margin: 17px -4px -4px;
        padding: 8px 4px 4px;
    }

    .setup-card .onboarding-actions .btn {
        min-height: 53px;
        font-size: 14px;
    }

    .onboarding--auth .onboarding-flow-head {
        grid-template-columns: 40px 1fr 40px;
    }

    .onboarding--auth .onboarding-panel {
        padding: 10px 14px 22px;
    }

    .onboarding--auth .onboarding-card h2 {
        font-size: 27px;
    }

    .postlesson-screen {
        min-height: 100svh;
        padding: 28px 0 max(24px, env(safe-area-inset-bottom));
    }

    .postlesson-screen .welcome-stork {
        width: 164px;
    }

    .postlesson-screen > .brand-lockup {
        margin-bottom: 12px;
    }

    .postlesson-screen h1 {
        font-size: 31px;
    }

    .postlesson-screen > p {
        font-size: 14px;
    }

    .onboarding--save .save-later {
        top: 10px;
        right: 12px;
    }

    .save-progress-screen {
        padding-top: 46px;
    }

    .save-progress-screen .welcome-stork {
        width: 132px;
    }

    .save-progress-form {
        gap: 11px;
    }

    .save-progress-form .form-field input {
        min-height: 48px;
    }

    .page--learn .learn-intro {
        margin-bottom: 14px;
    }

    .page--learn .learn-intro h1 {
        font-size: 27px;
    }

    .page--learn .learn-intro p {
        font-size: 12px;
    }

    .daily-goal-card {
        min-height: 74px;
        margin-bottom: 14px;
        padding: 11px 12px;
        gap: 10px;
        border-radius: 18px;
    }

    .daily-goal-card__icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .daily-goal-card__copy span {
        display: none;
    }

    .daily-goal-card__target {
        padding: 8px 9px;
        font-size: 12px;
    }

    .page--learn .path-unit-banner {
        min-height: 100px;
        padding: 15px 14px;
    }

    .page--learn .path-unit-copy h3 {
        font-size: 20px;
    }

    .page--learn .path-unit-copy p {
        font-size: 11px;
    }

    .page--learn .path-node-wrap {
        transform: translateX(var(--node-offset-mobile, 0px));
    }

    .mobile-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 390px) {
    .welcome-screen .onboarding-title {
        font-size: 31px;
    }

    .welcome-screen .feature-pills {
        max-width: 310px;
    }

    .setup-card .native-language-card {
        font-size: 11px;
    }

    .setup-card .native-language-card img {
        width: 23px;
        height: 16px;
    }
}
