@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Lora:wght@600;700&display=swap');

:root {
    --wine: #8f4f5f;
    --wine-dark: #713c49;
    --wine-soft: #f2e3e6;
    --rose: #d99aa7;
    --rose-light: #f9eef0;
    --cream: #fbf7f1;
    --cream-dark: #efe5d8;
    --sage: #718779;
    --sage-light: #e5eee7;
    --gold: #d8a65d;
    --ink: #322d2d;
    --muted: #6f6666;
    --line: #e5ded8;
    --white: #ffffff;
    --success: #467356;
    --danger: #9d3f45;
    --shadow-sm: 0 4px 14px rgba(73, 52, 52, 0.07);
    --shadow-md: 0 14px 35px rgba(73, 52, 52, 0.11);
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --container: 1180px;
    --body-size: 18px;
}

html[data-font-size="large"] {
    --body-size: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: var(--body-size);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--wine-dark);
}

img,
iframe {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-family: "Lora", Georgia, serif;
    line-height: 1.18;
}

h1 {
    font-size: clamp(2.15rem, 4vw, 3.5rem);
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.45rem;
}

:focus-visible {
    border-radius: 5px;
    outline: 4px solid rgba(216, 166, 93, 0.58);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 999;
    top: 12px;
    left: 12px;
    padding: 12px 18px;
    background: var(--ink);
    color: var(--white);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.main-content {
    padding-block: 54px 80px;
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--wine);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

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

.button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.button--primary {
    background: var(--wine);
    box-shadow: 0 6px 14px rgba(143, 79, 95, 0.22);
    color: var(--white);
}

.button--primary:hover {
    background: var(--wine-dark);
}

.button--secondary {
    border-color: var(--wine);
    background: var(--white);
    color: var(--wine-dark);
}

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

.button--soft {
    background: var(--wine-soft);
    color: var(--wine-dark);
}

.button--completed {
    border-color: var(--success);
    background: var(--sage-light);
    color: var(--success);
}

.button--full {
    width: 100%;
}

.topbar {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.topbar__inner {
    display: flex;
    width: min(calc(100% - 40px), var(--container));
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    margin-inline: auto;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand__mark {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--wine-soft);
    font-size: 1.65rem;
}

.brand__text {
    display: flex;
    flex-direction: column;
}

.brand__text strong {
    color: var(--wine-dark);
    font-family: "Lora", Georgia, serif;
    font-size: 1.18rem;
    line-height: 1.15;
}

.brand__text small {
    color: var(--muted);
    font-size: 0.73rem;
    letter-spacing: 0.03em;
}

.brand--centered {
    justify-content: center;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav > a {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.main-nav > a:hover {
    color: var(--wine);
}

.main-nav > a.nav-is-active {
    color: var(--wine);
    font-weight: 700;
}

.account-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--sage-light);
    color: var(--sage);
    font-weight: 700;
}

.font-tools {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.font-tools button {
    width: 43px;
    height: 40px;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.font-tools button:last-child {
    border-right: 0;
}

.font-tools button:hover {
    background: var(--cream);
}

.menu-button {
    display: none;
    min-height: 46px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.flash-stack {
    position: fixed;
    z-index: 300;
    top: 98px;
    right: 20px;
    display: grid;
    width: min(430px, calc(100% - 40px));
    gap: 10px;
}

.flash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    color: var(--ink);
}

.flash--success {
    border-left: 5px solid var(--success);
}

.flash--info {
    border-left: 5px solid var(--gold);
}

.flash button {
    padding: 0 0 0 14px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.4rem;
}

.welcome-section {
    overflow: hidden;
    padding: 58px 0 54px;
    background:
        radial-gradient(circle at 90% 22%, rgba(217, 154, 167, 0.26) 0 80px, transparent 82px),
        radial-gradient(circle at 82% 80%, rgba(113, 135, 121, 0.16) 0 130px, transparent 132px),
        linear-gradient(135deg, #f7e9ec 0%, #fbf7f1 62%);
}

.welcome-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.welcome-copy {
    max-width: 690px;
}

.welcome-copy h1 {
    margin-bottom: 14px;
}

.welcome-copy p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.quick-stats {
    display: flex;
    gap: 12px;
}

.quick-stat {
    display: grid;
    min-width: 140px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.quick-stat > span,
.quick-stat > i {
    font-size: 1.45rem;
}

.quick-stat strong {
    color: var(--wine-dark);
    font-size: 1.55rem;
}

.quick-stat small {
    color: var(--muted);
    font-size: 0.73rem;
}

.continue-card {
    display: grid;
    overflow: hidden;
    grid-template-columns: 34% 1fr;
    min-height: 280px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.continue-card__visual,
.course-card__cover {
    position: relative;
    overflow: hidden;
}

.continue-card__visual::before,
.course-card__cover::before,
.course-hero::before {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.37);
    border-radius: 50%;
    content: "";
}

.continue-card__visual::after,
.course-card__cover::after {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px dashed rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    content: "";
}

.continue-card__visual::before {
    top: -65px;
    right: -50px;
}

.continue-card__visual::after {
    bottom: -35px;
    left: -28px;
}

.theme--principal {
    background: linear-gradient(145deg, #a85f70, #74404d);
}

.theme--bolsa {
    background: linear-gradient(145deg, #c58b69, #926048);
}

.theme--amigurumi {
    background: linear-gradient(145deg, #889f8f, #5f7868);
}

.theme--tapete {
    background: linear-gradient(145deg, #d3a65f, #9f7337);
}

.yarn-orbit {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    width: 132px;
    height: 132px;
    place-items: center;
    border: 8px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 15px 35px rgba(42, 28, 28, 0.2);
    font-size: 3.9rem;
    transform: translate(-50%, -50%) rotate(-6deg);
}

.continue-card__body {
    align-self: center;
    padding: 38px clamp(30px, 5vw, 68px);
}

.continue-card__body h2 {
    margin-bottom: 10px;
}

.continue-card__body p {
    margin-bottom: 24px;
    color: var(--muted);
}

.content-section {
    padding-top: 68px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 30px;
}

.section-heading h1,
.section-heading h2 {
    margin-bottom: 0;
}

.section-heading > p {
    max-width: 440px;
    margin-bottom: 4px;
    color: var(--muted);
}

.section-heading--center {
    display: block;
    text-align: center;
}

.section-heading--center > p {
    margin: 12px auto 0;
}

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

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

.course-card {
    display: flex;
    overflow: hidden;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.course-card__cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
}

.course-card__cover::before {
    top: -90px;
    right: -55px;
}

.course-card__cover::after {
    bottom: -50px;
    left: 13%;
}

.course-card__icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    width: 94px;
    height: 94px;
    place-items: center;
    border: 6px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 25px rgba(47, 35, 35, 0.2);
    font-size: 3rem;
    transform: translate(-50%, -42%);
}

.course-card__thumbnail {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f6f1ec;
}

.course-badge {
    position: relative;
    z-index: 3;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.93);
    color: var(--wine-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.course-card__cover > .course-badge {
    position: absolute;
    top: 18px;
    left: 18px;
}

.lock-badge {
    position: absolute;
    z-index: 4;
    top: 15px;
    right: 15px;
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    font-size: 1.1rem;
}

.course-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.course-card__body h3 {
    margin-bottom: 10px;
}

.course-card__body > p {
    flex: 1;
    margin-bottom: 24px;
    color: var(--muted);
}

.progress-block {
    margin-bottom: 23px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.progress-label strong {
    color: var(--wine);
}

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

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--wine), var(--rose));
    transition: width 350ms ease;
}

.progress-block small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.75rem;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.price-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.price-row strong {
    color: var(--wine-dark);
    font-size: 1.22rem;
}

.discover-section {
    margin-top: 75px;
    padding: 58px;
    border-radius: var(--radius-lg);
    background: #f0e9df;
}

.course-grid--compact .course-card__cover {
    min-height: 0;
}

.course-grid--compact .course-card__body {
    padding: 24px;
}

.course-grid--compact .course-card__body h3 {
    font-size: 1.28rem;
}

.course-grid--compact .course-card__body > p {
    font-size: 0.88rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--white);
}

.mobile-bottom-nav {
    display: none;
}

.site-footer__inner {
    display: flex;
    width: min(calc(100% - 40px), var(--container));
    min-height: 150px;
    align-items: center;
    justify-content: space-between;
    margin-inline: auto;
    gap: 30px;
}

.site-footer strong {
    color: var(--wine-dark);
    font-family: "Lora", Georgia, serif;
}

.site-footer p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.support-link > :first-child {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--sage-light);
}

.support-link > span:last-child {
    display: flex;
    flex-direction: column;
    color: var(--ink);
    font-weight: 700;
}

.support-link small {
    color: var(--muted);
    font-weight: 400;
}

/* Login and installation */
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, rgba(217, 154, 167, 0.28) 0 110px, transparent 112px),
        radial-gradient(circle at 93% 84%, rgba(113, 135, 121, 0.18) 0 160px, transparent 162px),
        var(--cream);
}

.auth-page .site-footer {
    background: transparent;
}

.auth-page .site-footer__inner {
    justify-content: center;
    min-height: 105px;
    text-align: center;
}

.auth-page .site-footer .support-link {
    display: none;
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 105px);
    place-items: center;
    padding: 50px 20px;
}

.auth-card {
    width: min(100%, 550px);
    padding: clamp(30px, 5vw, 50px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
}

.auth-heading {
    margin: 36px 0 28px;
    text-align: center;
}

.auth-heading h1,
.install-card h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 5vw, 2.8rem);
}

.auth-intro {
    margin-bottom: 0;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form label {
    font-weight: 700;
}

.auth-form input {
    width: 100%;
    height: 58px;
    margin-bottom: 10px;
    padding: 0 17px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font-size: 1rem;
}

.auth-form input:focus {
    border-color: var(--wine);
    box-shadow: 0 0 0 4px var(--wine-soft);
    outline: 0;
}

.auth-form .button {
    margin-top: 12px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.label-row a {
    font-size: 0.82rem;
    font-weight: 600;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 95px;
}

.password-field button {
    position: absolute;
    top: 8px;
    right: 8px;
    height: 42px;
    padding-inline: 11px;
    border: 0;
    border-radius: 8px;
    background: var(--rose-light);
    color: var(--wine-dark);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.form-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-left: 5px solid var(--danger);
    border-radius: 10px;
    background: #fae7e8;
    color: #75343a;
    font-size: 0.86rem;
}

.demo-access {
    display: grid;
    margin-top: 24px;
    padding: 18px;
    border: 1px dashed var(--rose);
    border-radius: 12px;
    background: var(--rose-light);
    color: var(--muted);
    font-size: 0.79rem;
}

.demo-access strong {
    margin-bottom: 4px;
    color: var(--wine-dark);
}

.auth-help {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.auth-help a {
    font-weight: 700;
}

.install-card {
    text-align: center;
}

.step-chip {
    display: inline-flex;
    margin: 32px 0 13px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--sage-light);
    color: var(--success);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.install-summary {
    display: grid;
    margin: 26px 0;
    gap: 10px;
    text-align: left;
}

.install-summary div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    background: var(--cream);
    font-size: 0.88rem;
}

.install-summary span {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: var(--sage-light);
    color: var(--success);
    font-weight: 700;
}

.success-seal {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    margin: 34px auto 18px;
    border-radius: 50%;
    background: var(--sage-light);
    color: var(--success);
    font-size: 2rem;
    font-weight: 700;
}

/* Course page */
.course-hero {
    position: relative;
    overflow: hidden;
    padding: 26px 0 64px;
    color: var(--white);
}

.course-hero::before {
    top: -80px;
    right: 8%;
    width: 360px;
    height: 360px;
}

.course-hero .breadcrumb a,
.course-hero .breadcrumb span {
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
    font-size: 0.82rem;
}

.breadcrumb a {
    font-weight: 600;
}

.breadcrumb--dark {
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb--dark a {
    color: var(--wine);
}

.course-hero__layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 300px;
    align-items: center;
    gap: 70px;
}

.course-hero__copy {
    max-width: 760px;
}

.course-hero__copy h1 {
    margin: 18px 0;
    color: var(--white);
}

.course-hero__copy > p {
    max-width: 720px;
    margin-bottom: 29px;
    color: rgba(255, 255, 255, 0.89);
    font-size: 1.05rem;
}

.course-hero__copy .button--primary {
    border-color: var(--white);
    background: var(--white);
    box-shadow: none;
    color: var(--wine-dark);
}

.course-progress-card {
    display: grid;
    justify-items: center;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.13);
    text-align: center;
    backdrop-filter: blur(8px);
}

.progress-ring {
    position: relative;
    display: grid;
    width: 142px;
    height: 142px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--white) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.24) 0);
}

.progress-ring::before {
    position: absolute;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: rgba(82, 48, 57, 0.88);
    content: "";
}

.progress-ring > div {
    position: relative;
    z-index: 2;
    display: grid;
}

.progress-ring strong {
    color: var(--white);
    font-size: 1.7rem;
    line-height: 1;
}

.progress-ring span {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
}

.course-progress-card p {
    margin: 17px 0 2px;
}

.course-progress-card > span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.72rem;
}

.completion-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 19px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--success);
    font-weight: 700;
}

.course-content {
    max-width: 980px;
}

.module-list {
    display: grid;
    gap: 18px;
}

.module-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.module-card summary {
    display: grid;
    grid-template-columns: 54px 1fr auto 34px;
    align-items: center;
    gap: 17px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

.module-card summary::-webkit-details-marker {
    display: none;
}

.module-card[open] summary {
    border-bottom: 1px solid var(--line);
}

.module-number {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 14px;
    background: var(--wine-soft);
    color: var(--wine-dark);
    font-family: "Lora", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.module-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.module-title strong {
    font-family: "Lora", Georgia, serif;
    font-size: 1.12rem;
}

.module-title small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-count {
    color: var(--muted);
    font-size: 0.78rem;
}

.chevron {
    color: var(--wine);
    font-size: 1.4rem;
    text-align: center;
    transition: transform 180ms ease;
}

.module-card[open] .chevron {
    transform: rotate(180deg);
}

.lesson-list {
    padding: 8px 24px 16px;
}

.lesson-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 17px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.lesson-row:last-child {
    border-bottom: 0;
}

.lesson-row:hover .lesson-copy strong,
.lesson-row:hover .lesson-action {
    color: var(--wine);
}

.lesson-status {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid var(--wine-soft);
    border-radius: 50%;
    background: var(--rose-light);
    color: var(--wine);
    font-size: 0.82rem;
}

.lesson-row--done .lesson-status {
    border-color: var(--sage-light);
    background: var(--sage-light);
    color: var(--success);
    font-weight: 700;
}

.lesson-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.lesson-copy > small {
    color: var(--wine);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lesson-copy strong {
    margin: 1px 0 3px;
    font-size: 0.98rem;
    transition: color 160ms ease;
}

.lesson-copy > span {
    color: var(--muted);
    font-size: 0.73rem;
}

.lesson-action {
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
}

.empty-state {
    min-height: 65vh;
    padding-block: 100px;
    text-align: center;
}

.empty-state--card {
    min-height: auto;
    padding: 54px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

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

.shop-hero {
    padding: 66px 0;
    background: linear-gradient(135deg, var(--rose-light), #f7f0e6);
    text-align: center;
}

.shop-hero .eyebrow {
    margin-bottom: 12px;
}

.shop-hero h1 {
    max-width: 780px;
    margin: 0 auto 15px;
}

.shop-hero p {
    max-width: 650px;
    margin: 0 auto;
    color: var(--muted);
}

.owned-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--success);
    font-size: 0.88rem;
    font-weight: 700;
}

.owned-row span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: var(--sage-light);
}

.purchase-note {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}

.empty-state > span,
.empty-state > i {
    font-size: 4rem;
}

/* Lesson page */
.lesson-page {
    background: #f8f5f0;
}

.lesson-topline {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.lesson-topline .container {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.mini-progress {
    display: grid;
    grid-template-columns: auto 130px auto;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.72rem;
}

.mini-progress .progress-bar {
    height: 8px;
}

.mini-progress strong {
    color: var(--wine);
}

.lesson-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 34px;
    padding-block: 34px 78px;
}

.lesson-main {
    min-width: 0;
}

.video-player {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #2e292a;
    box-shadow: var(--shadow-md);
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-placeholder {
    position: relative;
    display: grid;
    height: 100%;
    place-content: center;
    justify-items: center;
    padding: 40px;
    background:
        radial-gradient(circle at 15% 20%, rgba(217, 154, 167, 0.23) 0 90px, transparent 92px),
        radial-gradient(circle at 88% 76%, rgba(113, 135, 121, 0.18) 0 120px, transparent 122px),
        linear-gradient(145deg, #3c3436, #262224);
    color: var(--white);
    text-align: center;
}

.video-placeholder__yarn {
    position: absolute;
    top: 8%;
    right: 8%;
    opacity: 0.22;
    font-size: clamp(3rem, 8vw, 7rem);
    transform: rotate(12deg);
}

.play-circle {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    margin-bottom: 18px;
    padding-left: 5px;
    border: 5px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: var(--wine);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    font-size: 1.8rem;
}

.video-placeholder strong {
    margin-bottom: 7px;
    font-family: "Lora", Georgia, serif;
    font-size: 1.25rem;
}

.video-placeholder p {
    max-width: 500px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.lesson-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    padding: 32px 0 26px;
    border-bottom: 1px solid var(--line);
    gap: 24px;
}

.lesson-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.lesson-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.lesson-heading .button {
    flex: 0 0 auto;
    margin-top: 18px;
}

.lesson-description,
.materials-section {
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.lesson-description h2,
.materials-section h2 {
    margin-bottom: 14px;
    font-size: 1.55rem;
}

.lesson-description > p,
.materials-section > div > p {
    color: var(--muted);
}

.gentle-tip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 25px;
    padding: 18px 20px;
    border-left: 5px solid var(--gold);
    border-radius: 12px;
    background: #f8edda;
}

.gentle-tip > span,
.gentle-tip > i {
    font-size: 1.4rem;
}

.gentle-tip p {
    margin: 0;
    color: #655439;
    font-size: 0.84rem;
}

.material-list {
    display: grid;
    margin-top: 20px;
    gap: 12px;
}

.material-card {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.material-card:hover {
    border-color: var(--rose);
}

.material-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 12px;
    background: var(--rose-light);
    font-size: 1.4rem;
}

.material-card > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.material-card small {
    color: var(--muted);
    font-size: 0.74rem;
}

.download-label {
    color: var(--wine);
    font-size: 0.78rem;
    font-weight: 700;
}

.lesson-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 32px;
}

.lesson-comments {
    padding: 38px 0;
    border-bottom: 1px solid var(--line);
}

.lesson-comments__intro {
    max-width: 700px;
}

.lesson-comments__intro h2 {
    margin-bottom: 11px;
    font-size: 1.55rem;
}

.lesson-comments__intro p {
    color: var(--muted);
}

.lesson-comment-form {
    display: grid;
    margin-top: 23px;
    gap: 9px;
}

.lesson-comment-form label {
    font-size: 0.9rem;
    font-weight: 700;
}

.lesson-comment-form textarea,
.share-form textarea {
    width: 100%;
    resize: vertical;
    padding: 15px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
}

.lesson-comment-form textarea:focus,
.share-form textarea:focus,
.comment-form input:focus {
    border-color: var(--wine);
    box-shadow: 0 0 0 4px var(--wine-soft);
    outline: 0;
}

.lesson-comment-form .button {
    justify-self: start;
}

.lesson-comment-list {
    display: grid;
    margin-top: 32px;
    gap: 15px;
}

.lesson-comment-list h3 {
    margin-bottom: 2px;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 1rem;
}

.lesson-comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.lesson-comment--reply {
    margin-left: 34px;
    border-left: 4px solid var(--rose);
}

.lesson-comment--jana {
    border-color: #c9dfd0;
    background: #f5faf6;
}

.lesson-comment > div {
    min-width: 0;
}

.lesson-comment strong {
    color: var(--wine-dark);
    font-size: 0.86rem;
}

.lesson-comment p {
    margin: 3px 0;
    font-size: 0.86rem;
}

.lesson-comment small {
    color: var(--muted);
    font-size: 0.7rem;
}

.lesson-navigation a {
    display: flex;
    min-height: 88px;
    flex-direction: column;
    justify-content: center;
    padding: 16px 19px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.lesson-navigation a:hover {
    border-color: var(--rose);
    box-shadow: var(--shadow-sm);
}

.lesson-navigation small {
    color: var(--muted);
    font-size: 0.7rem;
}

.lesson-navigation strong {
    overflow: hidden;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-navigation__next {
    text-align: right;
}

.lesson-sidebar {
    position: sticky;
    top: 118px;
    display: grid;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    gap: 18px;
}

.lesson-sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lesson-sidebar__header .course-card__icon {
    position: static;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border: 0;
    box-shadow: none;
    font-size: 1.75rem;
    transform: none;
}

.lesson-sidebar__header > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.lesson-sidebar__header small {
    color: var(--muted);
    font-size: 0.65rem;
}

.lesson-sidebar__header strong {
    overflow: hidden;
    color: var(--ink);
    font-family: "Lora", Georgia, serif;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-sidebar .button {
    min-height: 48px;
    padding-inline: 14px;
    font-size: 0.78rem;
}

.help-card {
    display: grid;
    justify-items: center;
    padding: 20px 14px;
    border-radius: 14px;
    background: var(--sage-light);
    text-align: center;
}

.help-card > span,
.help-card > i {
    font-size: 1.5rem;
}

.help-card strong {
    margin-top: 5px;
    color: var(--success);
    font-size: 0.86rem;
}

.help-card p {
    margin: 5px 0 10px;
    color: #5d6e62;
    font-size: 0.7rem;
}

.help-card a {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Help */
.help-page {
    min-height: 70vh;
}

/* Feed da comunidade */
.feed-layout {
    max-width: 860px;
}

.feed-intro {
    display: flex;
    max-width: none;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.feed-intro__copy {
    max-width: 650px;
}

.feed-intro h1 {
    margin-bottom: 12px;
}

.feed-intro p {
    margin-bottom: 0;
    color: var(--muted);
}

.feed-create-button {
    flex: 0 0 auto;
}

.share-card,
.post-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.share-card {
    padding: 27px;
}

.share-card__heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 23px;
}

.share-card__heading h2 {
    margin-bottom: 3px;
    font-size: 1.34rem;
}

.share-card__heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.avatar--large {
    width: 54px;
    height: 54px;
    font-size: 1rem;
}

.share-form {
    display: grid;
    gap: 10px;
}

.share-form > label:not(.photo-picker) {
    font-size: 0.88rem;
    font-weight: 700;
}

.share-form > label span {
    color: var(--muted);
    font-weight: 400;
}

.photo-picker {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border: 2px dashed var(--rose);
    border-radius: 14px;
    background: var(--rose-light);
    cursor: pointer;
}

.photo-picker:hover {
    border-color: var(--wine);
}

.photo-picker__icon {
    display: grid;
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--white);
    font-size: 1.35rem;
}

.photo-picker > span:last-child {
    display: flex;
    flex-direction: column;
}

.photo-picker strong {
    color: var(--wine-dark);
    font-size: 0.92rem;
}

.photo-picker small,
.selected-photos {
    color: var(--muted);
    font-size: 0.73rem;
}

.selected-photos {
    min-height: 20px;
    margin: 0;
}

body.feed-modal-open {
    overflow: hidden;
}

.feed-modal[hidden] {
    display: none;
}

.feed-modal {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
}

.feed-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(42, 29, 32, 0.72);
    cursor: pointer;
}

.feed-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(42, 29, 32, 0.32);
}

.feed-modal__dialog .share-card {
    border: 0;
    border-radius: 0;
    padding-top: 68px;
    box-shadow: none;
}

.feed-modal__close,
.gallery-modal__close {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
}

.feed-modal__close {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    padding: 8px 13px;
    background: var(--cream);
    color: var(--ink);
}

.feed-modal__dialog--confirm {
    width: min(100%, 520px);
    padding: 34px;
    overflow: visible;
    text-align: center;
}

.delete-post-modal__icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 18px;
    background: #fff1f1;
    color: var(--danger);
    font-size: 1.55rem;
}

.feed-modal__dialog--confirm h2 {
    margin-bottom: 9px;
    font-size: 1.55rem;
}

.feed-modal__dialog--confirm p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.delete-post-modal__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.delete-post-modal__confirm {
    border-color: var(--danger);
    background: var(--danger);
    color: var(--white);
}

.share-form .button {
    justify-self: start;
}

.feed-list {
    display: grid;
    margin-top: 34px;
    gap: 26px;
}

.post-card {
    overflow: hidden;
}

.post-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
}

.post-card__header > div {
    display: flex;
    flex-direction: column;
}

.post-delete-form {
    margin-left: auto;
}

.post-delete-form button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
}

.post-delete-form button:hover {
    background: #fff1f1;
}

.post-card__header strong {
    font-size: 0.9rem;
}

.post-card__header small {
    color: var(--muted);
    font-size: 0.72rem;
}

.avatar--post {
    width: 42px;
    height: 42px;
    font-size: 0.75rem;
}

.avatar--comment {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    font-size: 0.66rem;
}

.post-images {
    display: grid;
    overflow: hidden;
    background: #eee8e2;
    gap: 3px;
}

.post-images--1 {
    grid-template-columns: 1fr;
    height: clamp(330px, 68vw, 650px);
}

.post-images--2,
.post-images--3 {
    grid-template-columns: repeat(2, 1fr);
}

.post-images--2 {
    height: clamp(300px, 50vw, 520px);
}

.post-images--3 {
    height: clamp(360px, 55vw, 600px);
}

.post-images--3 .post-image-button:first-child {
    grid-row: span 2;
}

.post-images .post-image-button {
    display: block;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #ded7d1;
    cursor: zoom-in;
}

.post-images img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    transition: transform 220ms ease;
}

.post-images--1 img {
    object-fit: contain;
}

.post-images .post-image-button:hover img {
    transform: scale(1.025);
}

.post-images .post-image-button:focus-visible {
    position: relative;
    z-index: 2;
    outline: 4px solid var(--wine);
    outline-offset: -4px;
}

.gallery-modal {
    z-index: 310;
    padding: 18px;
}

.gallery-modal .feed-modal__backdrop {
    background: rgba(25, 17, 20, 0.94);
}

.gallery-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 1180px);
    height: min(88vh, 820px);
    grid-template-rows: 1fr auto;
    gap: 12px;
}

.gallery-modal__stage {
    position: relative;
    display: grid;
    min-height: 0;
    place-items: center;
}

.gallery-modal__stage img {
    display: block;
    max-width: calc(100% - 130px);
    max-height: 100%;
    border-radius: 14px;
    object-fit: contain;
}

.gallery-modal__close {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    padding: 9px 14px;
    background: var(--white);
    color: var(--ink);
}

.gallery-modal__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-50%);
}

.gallery-modal__arrow--previous {
    left: 0;
}

.gallery-modal__arrow--next {
    right: 0;
}

.gallery-modal__counter {
    min-height: 28px;
    margin: 0;
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
}

.post-caption {
    margin: 0;
    padding: 18px 20px 4px;
    font-size: 0.93rem;
}

.post-actions {
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
}

.post-actions > span,
.post-actions > a {
    color: var(--muted);
    font-size: 0.75rem;
}

.post-actions > a {
    text-decoration: none;
}

.like-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.like-button:hover,
.like-button--active {
    background: var(--rose-light);
    color: var(--wine);
}

.like-button > i:first-child {
    font-size: 1.15rem;
}

.post-comments {
    padding: 20px;
}

.post-comments h2 {
    margin-bottom: 13px;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 1rem;
}

.comment-list {
    display: grid;
    margin-bottom: 17px;
    gap: 12px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.comment-item p {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 0.82rem;
}

.comment-item p strong {
    margin-right: 4px;
    color: var(--wine-dark);
}

.comment-item p small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.67rem;
}

.no-comments {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 0.8rem;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.comment-form input {
    min-width: 0;
    min-height: 49px;
    padding: 10px 13px;
    border: 2px solid var(--line);
    border-radius: 11px;
    background: var(--white);
}

.comment-form .button {
    min-height: 49px;
    padding-inline: 16px;
    font-size: 0.78rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.faq-list {
    display: grid;
    max-width: 850px;
    margin: 40px auto;
    gap: 13px;
}

.faq-list details {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.faq-list summary {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list details[open] summary {
    color: var(--wine-dark);
}

.faq-list details p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--muted);
}

.contact-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    max-width: 980px;
    margin: 55px auto 0;
    padding: 30px;
    border-radius: var(--radius);
    background: var(--wine-soft);
    gap: 20px;
}

.contact-card > span,
.contact-card > i {
    font-size: 2.3rem;
}

.contact-card h2 {
    margin-bottom: 5px;
    font-size: 1.45rem;
}

.contact-card p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 1020px) {
    .menu-button {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 20px;
        display: none;
        width: min(330px, calc(100% - 40px));
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--white);
        box-shadow: var(--shadow-md);
    }

    .main-nav.is-open {
        display: grid;
        gap: 6px;
    }

    .main-nav > a {
        min-height: 48px;
        padding: 11px;
        border-radius: 8px;
    }

    .main-nav > a:hover {
        background: var(--cream);
    }

    .font-tools {
        width: max-content;
        margin: 8px 11px;
    }

    .account-link {
        border-top: 1px solid var(--line);
    }

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

    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .lesson-sidebar .button {
        width: auto;
    }

    .help-card {
        display: none;
    }
}

@media (max-width: 760px) {
    :root {
        --body-size: 17px;
    }

    html[data-font-size="large"] {
        --body-size: 19px;
    }

    .container,
    .topbar__inner,
    .site-footer__inner {
        width: min(calc(100% - 28px), var(--container));
    }

    .topbar__inner {
        min-height: 74px;
    }

    .brand__mark {
        width: 46px;
        height: 46px;
        font-size: 1.45rem;
    }

    .brand__text strong {
        font-size: 1.02rem;
    }

    .brand__text small {
        display: none;
    }

    .menu-button > span:last-child {
        display: none;
    }

    .main-content {
        padding-block: 35px 60px;
    }

    body:not(.auth-page) {
        padding-bottom: 78px;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 200;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        min-height: 70px;
        padding: 5px 5px max(5px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -4px 18px rgba(73, 52, 52, 0.08);
        backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav a {
        display: grid;
        min-width: 0;
        place-items: center;
        align-content: center;
        gap: 1px;
        border-radius: 10px;
        color: var(--muted);
        font-size: 0.58rem;
        font-weight: 700;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
    }

    .mobile-bottom-nav a > i:first-child {
        font-size: 1.22rem;
        line-height: 1;
    }

    .mobile-bottom-nav a.mobile-nav--active {
        background: var(--rose-light);
        color: var(--wine-dark);
    }

    .welcome-section {
        padding: 40px 0;
    }

    .welcome-section .container {
        display: block;
    }

    .welcome-copy p {
        font-size: 1rem;
    }

    .quick-stats {
        margin-top: 28px;
    }

    .quick-stat {
        min-width: 0;
        flex: 1;
        padding: 15px 10px;
    }

    .continue-card {
        display: block;
    }

    .continue-card__visual {
        min-height: 190px;
    }

    .continue-card__body {
        padding: 28px 24px 30px;
    }

    .content-section {
        padding-top: 48px;
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        margin-top: 10px;
    }

    .course-grid,
    .course-grid--compact {
        grid-template-columns: 1fr;
    }

    .discover-section {
        margin: 55px -14px 0;
        padding: 38px 14px;
        border-radius: 22px;
    }

    .course-card__cover {
        min-height: 0;
    }

    .site-footer__inner {
        display: grid;
        justify-items: center;
        min-height: 190px;
        padding-block: 28px;
        text-align: center;
    }

    .course-hero {
        padding: 20px 0 45px;
    }

    .course-hero__layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .course-progress-card {
        grid-template-columns: auto 1fr;
        justify-items: start;
        text-align: left;
    }

    .course-progress-card .progress-ring {
        grid-row: span 2;
        width: 105px;
        height: 105px;
    }

    .progress-ring::before {
        width: 85px;
        height: 85px;
    }

    .progress-ring strong {
        font-size: 1.3rem;
    }

    .progress-ring span {
        display: none;
    }

    .course-progress-card p {
        align-self: end;
        margin: 0;
    }

    .course-progress-card > span {
        align-self: start;
    }

    .module-card summary {
        grid-template-columns: 45px 1fr 26px;
        padding: 18px 15px;
        gap: 12px;
    }

    .module-number {
        width: 43px;
        height: 43px;
    }

    .module-count {
        display: none;
    }

    .lesson-list {
        padding-inline: 15px;
    }

    .lesson-row {
        grid-template-columns: 43px 1fr;
    }

    .lesson-action {
        display: none;
    }

    .lesson-topline .container {
        min-height: 58px;
    }

    .mini-progress > span:first-child {
        display: none;
    }

    .mini-progress {
        grid-template-columns: 80px auto;
    }

    .lesson-layout {
        padding-block: 22px 55px;
    }

    .breadcrumb--dark {
        overflow: hidden;
        white-space: nowrap;
    }

    .video-player {
        margin-inline: -14px;
        border-radius: 0;
    }

    .video-placeholder {
        padding: 20px;
    }

    .video-placeholder p {
        display: none;
    }

    .play-circle {
        width: 66px;
        height: 66px;
    }

    .lesson-heading {
        display: block;
    }

    .lesson-heading .button {
        width: 100%;
        margin-top: 12px;
    }

    .material-card {
        grid-template-columns: 46px 1fr;
    }

    .download-label {
        grid-column: 2;
    }

    .lesson-navigation {
        grid-template-columns: 1fr;
    }

    .lesson-navigation > span {
        display: none;
    }

    .lesson-navigation__next {
        text-align: left;
    }

    .lesson-sidebar {
        display: block;
    }

    .lesson-sidebar__header {
        margin-bottom: 16px;
    }

    .lesson-sidebar .button {
        width: 100%;
    }

    .contact-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .shop-hero {
        padding: 44px 0;
    }

    .course-grid--wide {
        grid-template-columns: 1fr;
    }

    .feed-intro {
        display: grid;
        align-items: start;
        gap: 20px;
    }

    .feed-create-button {
        width: 100%;
    }

    .feed-modal {
        align-items: end;
        padding: 10px;
    }

    .feed-modal__dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 22px 22px 16px 16px;
    }

    .feed-modal__dialog .share-card {
        padding-top: 68px;
    }

    .feed-modal__dialog--confirm {
        padding: 28px 20px 22px;
    }

    .delete-post-modal__actions {
        display: grid;
    }

    .delete-post-modal__actions .button {
        width: 100%;
    }

    .gallery-modal {
        place-items: center;
        padding: 10px;
    }

    .gallery-modal__dialog {
        width: 100%;
        height: calc(100dvh - 100px);
    }

    .gallery-modal__stage img {
        max-width: calc(100% - 18px);
        border-radius: 11px;
    }

    .gallery-modal__arrow {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.92);
    }

    .gallery-modal__arrow--previous {
        left: 8px;
    }

    .gallery-modal__arrow--next {
        right: 8px;
    }

    .share-card {
        padding: 20px 16px;
    }

    .share-card__heading {
        align-items: flex-start;
    }

    .share-card__heading h2 {
        font-size: 1.18rem;
    }

    .share-form .button,
    .lesson-comment-form .button {
        width: 100%;
    }

    .post-images--1 {
        height: clamp(280px, 85vw, 440px);
    }

    .post-images--2 {
        height: clamp(240px, 72vw, 340px);
    }

    .post-images--3 {
        height: clamp(300px, 92vw, 420px);
    }

    .post-actions {
        flex-wrap: wrap;
        gap: 7px 13px;
        padding-inline: 15px;
    }

    .post-comments {
        padding: 17px 15px;
    }

    .comment-form {
        grid-template-columns: 1fr;
    }

    .comment-form .button {
        width: 100%;
    }

    .lesson-comment--reply {
        margin-left: 16px;
    }
}

@media (max-width: 420px) {
    .auth-shell {
        padding: 24px 12px;
    }

    .auth-card {
        padding: 26px 19px;
        border-radius: 20px;
    }

    .auth-heading {
        margin-top: 28px;
    }

    .label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .quick-stat small {
        font-size: 0.66rem;
    }

    .course-card__body {
        padding: 23px 20px;
    }
}

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