/* Local fonts */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/roboto-condensed-400-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/roboto-condensed-400-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/roboto-condensed-700-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/roboto-condensed-700-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Shared layout and catalog */
/* Shared content and artwork across all screen sizes. */
:root { --ink: #080e37; --muted: #5776c1; --red: #e72b0c; --rust: #a34225; --border: #fde1c5; --paper: #fffaf3; --focus: #2449b6; --content: 1280px; --heading-h1-size: 40px; --heading-h2-size: 30px; --heading-h3-size: 18px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Roboto Condensed",Arial,sans-serif; font-size: 16px; line-height: 1.35; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
input { -webkit-tap-highlight-color: transparent; }
summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
.icon { width: 24px; height: 24px; }
button { border: 0; background: none; }
ul { margin: 0; padding: 0; list-style: none; }
ol { margin: 0; padding: 0; list-style: none; }
h1 { margin: 0; }
h2 { margin: 0; }
h3 { margin: 0; }
p { margin: 0; }
h1 { line-height: 1.1; font-weight: 700; }
h2 { line-height: 1.1; font-weight: 700; }
h3 { line-height: 1.1; font-weight: 700; }
h1 { font-size: var(--heading-h1-size); }
h2 { font-size: var(--heading-h2-size); }
h3 { font-size: var(--heading-h3-size); }
a { touch-action: manipulation; }
button { touch-action: manipulation; }
summary { touch-action: manipulation; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 5px; }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 5px; }
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 5px; }
summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 5px; }
[hidden] { display: none!important; }
.container { width: min(var(--content),calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); z-index: 100; background: #fff; padding: 12px; border: 2px solid var(--focus); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #f6e7db; background: #fff; }
.header-inner { display: flex; align-items: center; gap: 30px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: Arial,sans-serif; font-weight: 700; font-size: 29px; letter-spacing: -1.1px; color: var(--red); white-space: nowrap; }
.logo>.icon { width: 30px; height: 30px; }
.catalog-button { display: inline-flex; align-items: center; gap: 10px; min-height: 43px; border: 1px solid #a74b2b; border-radius: 8px; background: linear-gradient(125deg,#9c3e23,#ae4c2a); color: #fff; padding: 9px 32px; box-shadow: inset 0 1px 2px #d99b74; font-size: 17px; font-weight: 700; }
.catalog-button .icon { width: 19px; height: 19px; }
.header-search { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 240px; min-height: 44px; border: 1px solid #dac6bb; border-radius: 8px; padding: 9px 12px; background: #fdfcfc; color: #686d87; }
.header-search .icon { width: 21px; height: 21px; color: #4f5368; }
.add-lesson { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 17px; }
.login { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 17px; }
.add-lesson { color: var(--red); }
.login { color: #203b98; }
.login-avatar-wrap { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; overflow: hidden; border: 1px solid #e8d8ce; border-radius: 50%; background: #fff; }
.login-avatar-wrap > .login-avatar,
.login-avatar-wrap > .login-avatar-fallback { grid-area: 1 / 1; width: 100%; height: 100%; }
.login-avatar-wrap > .login-avatar { object-fit: cover; }
.login-avatar-wrap > .login-avatar-fallback { display: grid; place-items: center; }
.login-avatar-wrap > .login-avatar-fallback > .icon { width: 22px; height: 22px; }
.hero { position: relative; padding: 13px 6px 18px; isolation: isolate; }
.hero-decoration { position: absolute; right: -28px; top: 0; width: 276px; pointer-events: none; z-index: -1; }
.breadcrumbs { font-size: 15px; margin-bottom: 12px; color: #939aaf; }
.breadcrumbs ol { display: flex; gap: 12px; }
.breadcrumbs li+li::before { content: "/"; margin-right: 12px; color: #a7acba; }
.breadcrumbs li:last-child { color: var(--ink); }
h1 { letter-spacing: -1.1px; padding-right: 130px; }
.hero-description { color: var(--muted); font-size: clamp(19px,1.65vw,24px); margin-top: 5px; max-width: 1070px; }
.kids-section { background: linear-gradient(115deg,#fff9ef,#fffcf8); border: 1px solid var(--border); border-radius: 9px; padding: 12px 15px 14px; margin-bottom: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.age-links { display: flex; gap: 10px; flex-shrink: 0; }
.age-links a { border: 1px solid var(--border); background: #fff; border-radius: 30px; padding: 6px 23px; font-size: 17px; line-height: 1.15; white-space: nowrap; }
.lesson-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; min-width: 0; max-width: 100%; }
.lesson-grid:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 7px; }
.lesson-card { display: block; position: relative; background: #fff; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; height: 100%; transition: border-color .18s,box-shadow .18s; }
.lesson-card>img { width: 100%; aspect-ratio: 1.64; object-fit: contain; object-position: center; }
.card-caption { position: relative; padding: 7px 16px 9px; min-height: 61px; padding-right: 54px; }
.card-caption h3 { line-height: 1.15; overflow-wrap: anywhere; }
.card-note { display: block; color: #6484ce; font-size: 17px; line-height: 1.2; margin-top: 2px; }
.card-arrow { position: absolute; right: 12px; bottom: 16px; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--red); background: #fffefa; }
.card-arrow .icon { width: 22px; height: 22px; }
.lesson-card:hover { border-color: #d7a17c; box-shadow: 0 4px 12px #8936120c; }
.category-card:hover { border-color: #d7a17c; box-shadow: 0 4px 12px #8936120c; }
.kids-all { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--red); font-size: 20px; min-height: 45px; border: 1px solid #ffc8a8; border-radius: 7px; margin-top: 12px; }
.all-link { display: inline-flex; align-items: center; gap: 8px; color: var(--red); white-space: nowrap; font-size: 18px; }
.all-link .icon { width: 20px; height: 20px; }
.lesson-section { margin-bottom: 19px; scroll-margin-top: 20px; }
.catalog-text-section { max-width: 1000px; margin-block: 28px 32px; }
.catalog-text-section > .section-heading { margin-bottom: 14px; }
.catalog-prose { color: #333c52; font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.catalog-prose p + p { margin-top: 14px; }
.catalog-prose strong { color: var(--ink); font-weight: 700; }
@media (max-width: 767px) {
  .lesson-section.catalog-text-section { margin-block: 24px 28px; }
  .catalog-prose { font-size: 17px; line-height: 1.6; }
  .catalog-prose p + p { margin-top: 12px; }
}
.other-section { margin-top: 4px; }
.other-section h2 { margin-bottom: 10px; }
.category-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.category-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 1px 46px 1px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; transition: border-color .18s; }
.category-card>img { width: 105px; height: 67px; object-fit: contain; flex-shrink: 0; }
.category-card h3 { line-height: 1.15; }
.category-card .card-arrow { border: 0; right: 9px; bottom: 20px; background: none; width: 24px; height: 24px; }
.site-footer { border-top: 1px solid #f6e7db; margin-top: 18px; overflow: hidden; }
.site-footer>.container { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 65px; position: relative; }
.site-footer .logo { font-size: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 15px 260px 15px 0; color: var(--muted); font-size: 16px; }
.info-page { max-width: 860px; margin: 36px auto 64px; padding: 36px; border: 1px solid #f2e5da; border-radius: 24px; background: #fff; line-height: 1.7; }
.info-page h1 { margin: 0 0 24px; line-height: 1.2; }
.info-page h2 { margin: 30px 0 10px; line-height: 1.3; }
.info-page p { margin: 0 0 16px; }
.info-page a, .lesson-publication-consent a { color: #ad4f1e; text-decoration: underline; }
.lesson-publication-consent { margin: 20px 0; padding: 18px; border-radius: 14px; background: #fff6ee; line-height: 1.5; }
.lesson-publication-consent input { margin-right: 8px; }
.lesson-publication-consent [data-field-error] { display: block; color: #a32828; }
.lesson-publication-consent [hidden] { display: none; }
@media (max-width: 700px) { .info-page { margin: 20px auto 36px; padding: 22px; } .site-footer nav { flex-wrap: wrap; } }
.footer-flourish { position: absolute; right: -40px; width: 240px; pointer-events: none; }
.noscript-nav { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; }
.catalog-panel { position: fixed; inset: 83px 24px auto; margin: 0 auto; padding: 28px 26px 36px; border: 1px solid #e6b490; border-radius: 10px; width: min(1450px,calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 105px); overflow: auto; color: var(--ink); background: white; }
.catalog-panel::backdrop { background: rgb(8 14 55 / .18); }
.catalog-panel[open] { animation: menu-in .16s ease-out; }
.catalog-layout { display: grid; grid-template-columns: 39% 61%; }
.catalog-root { padding-right: 26px; border-right: 1px solid var(--border); }
.catalog-root h2 { margin-bottom: 22px; }
.root-categories { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--root-category-rows,9),auto); grid-template-columns: 1fr 1fr; column-gap: 22px; }
.root-categories>li { min-width: 0; }
.menu-category { display: flex; align-items: center; gap: 17px; width: 100%; min-height: 70px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 22px; line-height: 1.2; }
.menu-category.catalog-leaf-category,
.menu-category.catalog-member-category { color: inherit; text-decoration: none; }
.menu-category.catalog-member-category > .catalog-member-icon { flex: 0 0 36px; width: 36px; height: 36px; margin-left: 0; color: var(--rust); }
.menu-category.active { background: #fcf0e2; font-weight: 700; }
.menu-category:hover { background: #fff7ee; }
.menu-row:hover { background: #fff7ee; }
.menu-category>.icon { width: 18px; height: 18px; margin-left: auto; color: #6d3421; }
.root-categories>li.catalog-root-column-start { border-left: 1px solid var(--border); padding-left: 16px; }
.animal-menu { padding-left: 26px; }
.animal-heading { align-items: center; gap: 16px; margin-bottom: 34px; padding-right: 8px; min-height: 65px; position: relative; }
.animal-heading .all-link { margin-left: auto; font-size: 23px; }
.animal-columns { display: grid; grid-template-columns: 1fr 1.16fr 1fr; }
.animal-columns>section { min-width: 0; padding: 0 18px; }
.animal-columns>section:first-child { padding-left: 0; }
.animal-columns>section+section { border-left: 1px solid var(--border); }
.menu-column-title { font-size: 25px; color: #532113; margin-bottom: 24px; }
.menu-row { display: flex; align-items: center; gap: 14px; min-height: 71px; padding: 10px 6px; font-size: 21px; line-height: 1.2; }
.cats-branch>summary { display: flex; align-items: center; gap: 14px; min-height: 71px; padding: 10px 6px; font-size: 21px; line-height: 1.2; }
.menu-row>.icon { width: 17px; height: 17px; color: #7c3220; margin-left: auto; }
.cats-branch>summary>.icon { width: 17px; height: 17px; color: #7c3220; margin-left: auto; }
.cats-branch { border-radius: 10px; background: #fdf5e9; margin-bottom: 14px; }
.cats-branch>summary { cursor: pointer; list-style: none; background: #fcf0e2; border-radius: 10px; font-weight: 700; padding-inline: 12px; }
.cats-branch>summary::-webkit-details-marker { display: none; }
summary::-webkit-details-marker { display: none; }
.cats-branch:not([open])>summary>.icon { transform: rotate(-90deg); }
.tree { padding: 4px 12px 16px 28px; }
.tree li { border-left: 1px solid #ba7953; position: relative; }
.tree li::before { content: ""; position: absolute; width: 22px; border-bottom: 1px solid #ba7953; left: 0; top: 50%; }
.tree li::after { content: ""; position: absolute; width: 6px; height: 6px; left: 20px; top: calc(50% - 3px); border-radius: 50%; background: var(--rust); }
.tree a { min-height: 50px; padding-left: 34px; font-size: 20px; color: #66301b; }
.tree a:hover { text-decoration: underline; }
.extra-grid { display: flex; flex-direction: column; }
.extra-grid .menu-row { min-height: 64px; }
.desktop-close { position: absolute; top: 8px; right: 10px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 7px; color: var(--rust); }
.icon-button .icon { width: 29px; height: 29px; }
.mobile-menu-header { display: none; }
.no-results { padding: 20px; font-size: 19px; color: var(--muted); }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media(min-width:1500px) {
  .catalog-panel { inset-block-start: 80px; }
  .catalog-layout { grid-template-columns: 39% 61%; }
}
@media(max-width:1150px) and (min-width:761px) {
  .container { width: calc(100% - 64px); }
  .header-inner { gap: 24px; min-height: 47px; }
  .logo { font-size: 25px; }
  .logo>.icon { width: 25px; height: 25px; }
  .catalog-button { min-height: 43px; padding: 9px 25px; font-size: 15px; }
  .header-search { min-height: 34px; font-size: 15px; }
  .add-lesson { font-size: 15px; gap: 6px; }
  .login { font-size: 15px; gap: 6px; }
  h1 { padding-right: 60px; }
  .hero-description { font-size: 21px; }
  .hero { padding-top: 9px; padding-bottom: 13px; }
  .breadcrumbs { font-size: 14px; margin-bottom: 8px; }
  .hero-decoration { width: 264px; right: -24px; }
  .kids-section { padding: 9px 12px 11px; margin-bottom: 15px; }
  .age-links { gap: 8px; }
  .age-links a { font-size: 15px; padding: 5px 20px; }
  .card-caption { padding: 5px 12px 7px; min-height: 52px; padding-right: 44px; }
  .card-note { font-size: 15px; }
  .card-arrow { width: 30px; height: 30px; right: 9px; bottom: 11px; }
  .kids-all { font-size: 17px; min-height: 36px; margin-top: 10px; }
  .all-link { font-size: 16px; }
  .lesson-section { margin-bottom: 15px; }
  .category-card { gap: 10px; min-height: 57px; padding-left: 6px; padding-right: 31px; }
  .category-card>img { width: 78px; height: 52px; }
  .category-card .card-arrow { bottom: 15px; right: 7px; }
  .site-footer .logo { font-size: 20px; }
  .site-footer nav { margin-right: 180px; gap: 26px; font-size: 14px; }
  .footer-flourish { width: 210px; right: -32px; }
  .catalog-panel { inset-block-start: 68px; padding: 22px 18px; width: calc(100% - 32px); max-height: calc(100dvh - 85px); }
  .catalog-layout { grid-template-columns: 38% 62%; }
  .catalog-root { padding-right: 16px; }
  .root-categories { column-gap: 10px; }
  .menu-category { font-size: 17px; gap: 8px; min-height: 62px; padding: 7px 4px; }
  .root-categories>li.catalog-root-column-start { padding-left: 8px; }
  .animal-menu { padding-left: 17px; }
  .animal-heading { margin-bottom: 20px; gap: 10px; }
  .animal-heading .all-link { font-size: 17px; }
  .animal-columns>section { padding-inline: 11px; }
  .menu-column-title { font-size: 20px; }
  .menu-row { font-size: 17px; gap: 8px; min-height: 60px; }
  .cats-branch>summary { font-size: 17px; gap: 8px; min-height: 60px; }
  .tree { padding-left: 20px; padding-right: 6px; }
  .tree a { font-size: 16px; padding-left: 26px; min-height: 43px; }
  .tree li::before { width: 15px; }
  .tree li::after { left: 13px; }
}
@media(max-width:760px) {
  :root { --content: 620px; }
  .container { width: calc(100% - 32px); }
  .site-header { border: 0; }
  .header-inner { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; min-height: 104px; padding-top: 10px; padding-bottom: 8px; }
  .header-inner>.logo { grid-column: 2; grid-row: 1; justify-self: center; font-size: 24px; letter-spacing: -.8px; }
  .logo>.icon { width: 25px; height: 25px; }
  .catalog-button { grid-column: 1; grid-row: 1; width: 44px; height: 40px; padding: 9px; border: 0; background: none; color: var(--red); box-shadow: none; border-radius: 0; justify-content: center; }
  .catalog-button>.icon { width: 26px; height: 26px; stroke-width: 2.5px; }
  .catalog-button>span { display: none; }
  .login>.login-name { display: none; }
  .login { grid-column: 3; grid-row: 1; justify-self: end; width: 44px; height: 40px; justify-content: center; color: var(--red); }
  .login>.icon { width: 26px; height: 26px; }
  .login-avatar-wrap { flex-basis: 26px; width: 26px; height: 26px; }
  .header-search { grid-column: 1/-1; grid-row: 2; min-height: 41px; border-color: #dce1ef; border-radius: 10px; font-size: 16px; gap: 10px; background: #fff; color: #5b78b8; }
  .header-search .icon { width: 20px; height: 20px; color: var(--ink); }
  .hero { padding: 13px 0 16px; }
  .breadcrumbs { font-size: 14px; margin-bottom: 10px; color: var(--muted); }
  .breadcrumbs li:last-child { color: var(--muted); }
  .breadcrumbs ol { gap: 4px; }
  .breadcrumbs li+li::before { margin-right: 4px; }
  .hero-decoration { width: 130px; top: 6px; right: -8px; opacity: .2; }
  h1 { line-height: 1.05; letter-spacing: -.55px; padding-right: 0; max-width: 560px; }
  .hero-description { font-size: 17px; line-height: 1.35; margin-top: 8px; max-width: 500px; }
  .kids-section { padding: 15px 11px 11px; margin-bottom: 22px; }
  .kids-section h2 { max-width: 450px; margin-bottom: 12px; }
  .age-links { justify-content: space-between; gap: 7px; margin-top: 10px; }
  .age-links a { flex: 1; text-align: center; font-size: 16px; padding: 7px 4px; border-color: #e5e8ee; min-height: 35px; }
  .kids-section { display: flex; flex-direction: column; }
  .kids-all { min-height: 41px; background: linear-gradient(125deg,#a33f21,#ad4a2b); border-color: #8c351c; color: #fff; font-size: 17px; border-radius: 11px; margin-top: 10px; padding: 8px; text-align: center; gap: 7px; }
  .kids-all .icon { width: 18px; height: 18px; }
  .lesson-section { margin-bottom: 26px; }
  .section-heading { gap: 6px; margin-bottom: 10px; align-items: center; }
  .section-heading h2 { letter-spacing: -.2px; }
  .all-link { font-size: 15px; gap: 4px; }
  .all-link .icon { width: 18px; height: 18px; }
  .lesson-card { border-radius: 8px; }
  .card-caption { padding: 7px 10px 10px; min-height: 57px; padding-right: 39px; }
  .card-note { font-size: 15px; line-height: 1.15; margin-top: 3px; }
  .card-arrow { width: 29px; height: 29px; right: 8px; bottom: 13px; }
  .card-arrow .icon { width: 20px; height: 20px; }
  .other-section h2 { margin-bottom: 12px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .category-card { display: block; padding: 0 0 12px; overflow: hidden; min-height: 0; border-radius: 9px; }
  .category-card>img { width: 100%; height: auto; aspect-ratio: 1.14; object-fit: contain; }
  .category-card h3 { min-height: 36px; line-height: 1.1; padding: 6px 38px 0 10px; }
  .category-card .card-arrow { border: 1px solid var(--border); width: 28px; height: 28px; right: 8px; bottom: 10px; background: #fffefa; }
  .site-footer { border: 0; margin-top: 15px; padding-bottom: 20px; }
  .site-footer>.container { display: block; min-height: 0; }
  .site-footer .logo { font-size: 23px; letter-spacing: -.8px; }
  .site-footer .logo>.icon { display: block; width: 24px; height: 24px; }
  .site-footer nav { justify-content: center; gap: 20px; margin-right: 0; margin-top: 10px; font-size: 15px; }
  .catalog-panel { inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; padding: 0; background: #fff; overscroll-behavior: contain; }
  .catalog-panel::backdrop { background: #e8f5fb; }
  .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 12px 19px; border-bottom: 1px solid #fae9da; background: #fff; position: sticky; top: 0; z-index: 2; }
  .mobile-menu-header .logo { font-size: 29px; color: var(--red); letter-spacing: -.9px; }
  .mobile-menu-header .icon-button { color: #ad3217; }
  .desktop-close { display: none; }
  .catalog-layout { display: block; padding: 13px 17px 22px; }
  .catalog-root { padding: 0; border: 0; }
  .catalog-root h2 { letter-spacing: -.7px; margin-bottom: 13px; }
  .category-search { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border: 1px solid #cbd2e5; border-radius: 12px; padding: 9px 13px; margin-bottom: 14px; }
  .category-search .icon { width: 22px; height: 22px; }
  .category-search input { width: 100%; min-width: 0; border: 0; background: none; outline: 0; color: var(--ink); font-size: 18px; }
  .category-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
  .category-search input::placeholder { color: #6b79a6; }
  .root-categories { display: block; }
  .root-categories>li { margin-bottom: 5px; }
  .root-categories>li.catalog-root-column-start { border: 0; padding: 0; }
  .menu-category { min-height: 58px; border: 1px solid var(--border); border-radius: 10px; gap: 16px; padding: 2px 12px 2px 7px; font-size: 20px; font-weight: 700; }
  .menu-category.active { background: #fdf0df; }
  .menu-category>.icon { color: var(--red); width: 19px; height: 19px; }
  .menu-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin-top: 18px; }
  .menu-actions>a { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 49px; border: 1px solid #b65130; border-radius: 12px; color: var(--rust); font-size: 18px; }
  .menu-actions>a:first-child { background: linear-gradient(120deg,#a84222,#a34426); color: #fff; }
  .animal-menu { display: none; padding: 0; }
  .catalog-panel[data-view="animals"] .catalog-root { display: none; }
  .catalog-panel[data-view="animals"] .animal-menu { display: block; }
  .catalog-panel[data-view="animals"] .mobile-menu-header .logo { display: none; }
  .menu-back { display: flex; align-items: center; gap: 11px; padding: 8px 0; color: var(--rust); font-size: 23px; }
  .menu-back .icon { width: 30px; height: 30px; }
  .animal-heading { display: block; margin-bottom: 15px; min-height: 111px; padding: 6px 130px 0 4px; }
  .animal-heading h2 { letter-spacing: -.6px; margin-bottom: 12px; }
  .animal-heading .all-link { font-size: 20px; white-space: nowrap; }
  .animal-heading .all-link>.icon { width: 24px; height: 24px; }
  .animal-menu-kitten { display: block; position: absolute; right: 1px; bottom: -5px; width: 145px; height: 115px; object-fit: contain; pointer-events: none; }
  .animal-columns { display: block; }
  .animal-columns>section { padding: 0; }
  .animal-columns>section+section { border: 0; }
  .domestic-branch { background: #fffbf4; border: 1px solid var(--border); border-radius: 12px; padding: 0 3px 6px; }
  .domestic-summary { display: flex; align-items: center; gap: 13px; min-height: 58px; list-style: none; cursor: pointer; font-size: 22px; font-weight: 700; padding: 10px 12px; }
  .extra-branch>summary { display: flex; align-items: center; gap: 13px; min-height: 58px; list-style: none; cursor: pointer; font-size: 22px; font-weight: 700; padding: 10px 12px; }
  .domestic-summary>img { width: 38px; height: 38px; object-fit: contain; mix-blend-mode: multiply; }
  .extra-branch>summary>img { width: 38px; height: 38px; object-fit: contain; mix-blend-mode: multiply; }
  .domestic-summary>.icon { margin-left: auto; color: var(--red); width: 21px; height: 21px; }
  .extra-branch>summary>.icon { margin-left: auto; color: var(--red); width: 21px; height: 21px; }
  .cats-branch { background: #fff; margin-bottom: 7px; }
  .cats-branch>summary { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 2px 9px; gap: 13px; font-size: 22px; min-height: 57px; }
  .cats-branch>summary>.icon { color: var(--red); width: 20px; height: 20px; }
  .tree { padding: 4px 0 9px 45px; }
  .tree li { border-color: #efc4a7; }
  .tree li::before { width: 12px; border-color: #efc4a7; }
  .tree li::after { left: -3px; background: #efc4a7; width: 6px; height: 6px; }
  .tree a { font-size: 18px; color: var(--ink); padding: 3px 10px 3px 17px; min-height: 54px; border-bottom: 1px solid #faecdc; gap: 10px; }
  .tree li:last-child a { border-bottom: 0; }
  .tree-art { display: block; width: 61px; height: 45px; object-fit: contain; mix-blend-mode: multiply; }
  .tree .icon { display: block; width: 18px; height: 18px; color: var(--red); margin-left: auto; }
  .who-column .menu-row { min-height: 61px; gap: 13px; margin-top: 5px; border: 1px solid var(--border); border-radius: 10px; padding: 2px 10px 2px 6px; font-size: 22px; font-weight: 700; background: #fff; }
  .large-column .menu-row { min-height: 61px; gap: 13px; margin-top: 5px; border: 1px solid var(--border); border-radius: 10px; padding: 2px 10px 2px 6px; font-size: 22px; font-weight: 700; background: #fff; }
  .menu-row>.icon { width: 18px; height: 18px; color: var(--red); }
  .large-column { margin-top: 14px; }
  .extra-column { margin-top: 16px; }
  .extra-branch { border: 1px solid var(--border); background: #fff8ed; border-radius: 12px; padding: 0 5px 9px; }
  .extra-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; }
  .extra-grid>.menu-row { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 2px 8px 2px 2px; font-size: 17px; gap: 6px; min-height: 55px; }
  .extra-grid>.menu-row>.icon { width: 17px; height: 17px; }
  .domestic-branch:not([open])>.domestic-summary>.icon { transform: rotate(-90deg); }
  .extra-branch:not([open])>summary>.icon { transform: rotate(-90deg); }
}
@media(max-width:380px) {
  .container { width: calc(100% - 26px); }
  .header-inner>.logo { font-size: 22px; }
  .all-link { font-size: 14px; }
  .card-caption { padding-left: 8px; padding-right: 34px; }
  .card-note { font-size: 14px; }
  .site-footer nav { gap: 15px; font-size: 14px; }
  .animal-heading { padding-right: 90px; }
  .animal-heading .all-link { font-size: 18px; }
  .animal-menu-kitten { width: 111px; opacity: .8; }
  .menu-category { font-size: 18px; gap: 12px; }
  .extra-grid>.menu-row { font-size: 15px; gap: 4px; }
  .domestic-summary { font-size: 20px; }
  .extra-branch>summary { font-size: 20px; }
  .tree { padding-left: 28px; }
  .tree-art { width: 48px; }
  .tree a { font-size: 17px; }
}
.header-search { text-align: left; }
.header-search:hover { border-color: #aaaec4; }
.menu-category>span { min-width: 0; overflow-wrap: anywhere; }
.menu-row>span { min-width: 0; overflow-wrap: anywhere; }
.category-card>h3 { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.desktop-close { z-index: 3; background: white; border-radius: 50%; }
@media(min-width:1151px) {
  .menu-category { gap: 12px; padding-inline: 6px; }
  .root-categories { column-gap: 16px; }
  .root-categories>li.catalog-root-column-start { padding-left: 12px; }
}
@media(min-width:851px) and (max-width:1150px) {
  .category-card[href$="/presmykayushhiesya"]>h3 { letter-spacing: -.2px; }
  .category-card[href$="/presmykayushhiesya"]>img { width: 72px; }
}
@media(max-width:760px) {
}
@media(min-width:761px) and (max-width:850px) {
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .kids-section .section-heading { flex-wrap: wrap; }
  .kids-section .age-links { margin-left: auto; }
  .header-inner { gap: 15px; }
  .header-inner .add-lesson { font-size: 14px; }
  .header-inner .logo { font-size: 23px; }
}
@media(min-width:761px) {
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  * { animation: none!important; transition: none!important; }
  *::before { animation: none!important; transition: none!important; }
  *::after { animation: none!important; transition: none!important; }
}

/* Shared menu artwork and sections. Only their columns change with the viewport. */
.menu-art {
  display: block;
  width: 56px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}
.menu-category { gap: 10px; padding-inline: 6px; font-size: 20px; }
.root-categories { column-gap: 12px; }
.root-categories > li.catalog-root-column-start { padding-left: 6px; }
.category-search { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border: 1px solid #cbd2e5; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.category-search input { width: 100%; min-width: 0; border: 0; background: none; color: var(--ink); font-size: 18px; }
.category-search input:focus-visible { outline: none; }
.category-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.menu-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 18px; }
.menu-actions > a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; border: 1px solid #b65130; border-radius: 10px; color: var(--rust); font-size: 17px; padding: 6px; text-align: center; }
.menu-actions > a:first-child { background: linear-gradient(120deg, #a84222, #a34426); color: #fff; }
.animal-heading { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding-right: 130px; min-height: 110px; }
.animal-heading .all-link { margin-left: 0; }
.animal-menu-kitten { display: block; position: absolute; right: 0; top: -6px; width: 122px; height: 116px; object-fit: contain; }
.animal-columns { grid-template-columns: 1.08fr 1.1fr 1fr; }
.animal-columns > section { padding-inline: 10px; }
.domestic-branch, .extra-branch { background: #fffbf4; border: 1px solid var(--border); border-radius: 10px; padding: 0 3px 6px; }
.domestic-summary, .extra-branch > summary { display: flex; align-items: center; gap: 8px; min-height: 66px; list-style: none; cursor: pointer; font-size: 19px; font-weight: 700; padding: 6px; }
.domestic-summary > .menu-art, .extra-branch > summary > .menu-art { width: 48px; height: 44px; }
.domestic-summary > .icon, .extra-branch > summary > .icon { margin-left: auto; color: var(--red); width: 17px; height: 17px; }
summary > span { min-width: 0; overflow-wrap: anywhere; }
.cats-branch { background: #fff; }
.cats-branch > summary { background: #fff; padding-inline: 6px; gap: 8px; font-size: 20px; }
.menu-row { gap: 8px; font-size: 19px; }
.menu-row > .menu-art { width: 50px; height: 45px; }
.tree { padding-left: 18px; padding-right: 3px; }
.tree a { display: flex; align-items: center; gap: 6px; min-height: 58px; padding-left: 12px; font-size: 17px; color: var(--ink); }
.tree a > span { min-width: 0; overflow-wrap: anywhere; }
.tree-art { display: block; width: 42px; height: 38px; object-fit: contain; flex-shrink: 0; mix-blend-mode: multiply; }
.tree .icon { display: block; width: 14px; height: 14px; margin-left: auto; color: var(--red); }
.tree li::before { width: 10px; }
.tree li::after { left: -3px; background: #efc4a7; }
.tree li { border-color: #efc4a7; }
.extra-grid .menu-row { min-height: 59px; font-size: 18px; }


@media (min-width: 761px) and (max-width: 1150px) {
  .catalog-layout { grid-template-columns: 30% 70%; }
  .root-categories { display: block; }
  .root-categories > li.catalog-root-column-start { border: 0; padding-left: 0; }
  .menu-category { gap: 8px; font-size: 17px; min-height: 60px; }
  .menu-art { width: 40px; height: 40px; }
  .animal-columns > section { padding-inline: 7px; }
  .menu-column-title { font-size: 20px; }
  .domestic-summary, .extra-branch > summary { font-size: 17px; padding-inline: 3px; gap: 6px; }
  .domestic-summary > .menu-art, .extra-branch > summary > .menu-art { width: 38px; height: 40px; }
  .menu-row, .cats-branch > summary { gap: 6px; font-size: 17px; padding-inline: 3px; }
  .menu-row > .menu-art { width: 40px; }
  .extra-grid .menu-row { font-size: 16px; }
  .tree { padding-left: 11px; }
  .tree a { padding-left: 7px; font-size: 16px; gap: 4px; }
  .tree-art { width: 28px; height: 34px; }
  .tree .icon { width: 12px; }
  .menu-actions { gap: 6px; }
  .menu-actions > a { font-size: 15px; gap: 5px; }
  .menu-actions .icon { width: 19px; height: 19px; }
}
@media (max-width: 760px) {
  .header-search { grid-column: 1 / 3; min-width: 0; }
  .add-lesson { display: flex; grid-column: 3; grid-row: 2; width: 44px; height: 41px; justify-content: center; }
  .add-lesson > span { display: none; }
  .kids-section > .section-heading { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .kids-section h2 { margin-bottom: 0; }
  .age-links { margin-top: 0; }
  .kids-grid { gap: 8px; }
  .kids-all { background: transparent; color: var(--red); border-color: #ffc8a8; border-radius: 7px; }
  .site-footer .logo > .icon { display: block; width: 24px; height: 24px; }
  .footer-flourish { display: block; position: static; width: 130px; margin: 10px 0 0 auto; }
  .root-categories > li.catalog-root-column-start { padding-left: 0; }
  .menu-category { gap: 16px; font-size: 20px; padding-inline: 7px 12px; }
  .menu-art, .menu-row > .menu-art, .domestic-summary > .menu-art, .extra-branch > summary > .menu-art { width: 79px; height: 53px; }
  .animal-heading { display: block; min-height: 111px; padding: 6px 130px 0 4px; }
  .animal-menu-kitten { right: 1px; top: auto; bottom: -5px; width: 145px; height: 115px; }
  .animal-columns > section { padding: 0; }
  .menu-column-title { margin: 12px 5px; font-size: 23px; }
  .domestic-summary, .extra-branch > summary, .cats-branch > summary { gap: 13px; font-size: 22px; }
  .tree { padding: 4px 0 9px 45px; }
  .tree a { font-size: 18px; padding: 3px 10px 3px 17px; min-height: 54px; gap: 10px; }
  .tree-art { width: 61px; height: 45px; }
  .tree .icon { width: 18px; height: 18px; }
  .who-column .menu-row, .large-column .menu-row { gap: 13px; padding: 2px 10px 2px 6px; font-size: 22px; }
  .extra-grid > .menu-row { font-size: 17px; gap: 6px; min-height: 55px; }
  .extra-grid .menu-art { width: 60px; height: 48px; }
}
@media (max-width: 380px) {
  .header-search { font-size: 15px; gap: 7px; padding-inline: 8px; }
  .menu-category { font-size: 18px; gap: 12px; }
  .menu-art { width: 66px; }
  .extra-grid > .menu-row { font-size: 15px; gap: 4px; }
  .extra-grid .menu-art { width: 49px; }
  .domestic-summary, .extra-branch > summary { font-size: 20px; }
  .tree { padding-left: 28px; }
  .tree-art { width: 48px; }
  .tree a { font-size: 17px; }
}

/* Compact horizontal navigation; small phones use two columns. */
@media (max-width: 760px) {
  .category-card { display: flex; align-items: center; gap: 8px; min-height: 62px; height: 100%; padding: 4px 28px 4px 6px; border-radius: 7px; }
  .category-card > img { width: clamp(48px, 10vw, 72px); height: 54px; aspect-ratio: auto; object-fit: contain; }
  .category-card h3 { min-height: 0; padding: 0; line-height: 1.15; }
  .category-card .card-arrow { top: 50%; right: 4px; bottom: auto; width: 20px; height: 20px; border: 0; background: none; transform: translateY(-50%); }
  .category-card .card-arrow .icon { width: 18px; height: 18px; }
}
@media (max-width: 540px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { gap: 6px; padding: 4px 24px 4px 4px; }
  .category-card > img { width: clamp(36px, 10vw, 54px); }
}

/* Six cards on larger screens; one independently scrollable row on phones. */
@media (min-width: 761px) and (max-width: 1150px) {
  .lesson-grid .card-caption { min-height: 76px; padding: 6px 8px 34px; }
  .lesson-grid .card-note { font-size: 14px; }
  .lesson-grid .card-arrow { width: 24px; height: 24px; right: 8px; bottom: 5px; }
  .lesson-grid .card-arrow .icon { width: 18px; height: 18px; }
}
@media (max-width: 760px) {
  .lesson-grid {
    grid-template-columns: none;
    grid-template-rows: 1fr;
    grid-auto-flow: column;
    grid-auto-columns: clamp(152px, 40vw, 208px);
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
    scrollbar-width: thin;
    scrollbar-color: #c9825b #fff2e4;
    padding: 2px 2px 10px;
  }
  .lesson-grid > li { min-width: 0; scroll-snap-align: start; }
  .lesson-grid::-webkit-scrollbar { height: 8px; }
  .lesson-grid::-webkit-scrollbar-track { background: #fff2e4; border-radius: 10px; }
  .lesson-grid::-webkit-scrollbar-thumb { background: #c9825b; border-radius: 10px; }
  .lesson-grid--no-mobile-scroll {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-template-rows: auto;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
    overflow-y: visible;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    padding: 2px;
  }
  .lesson-grid--no-mobile-scroll > li { scroll-snap-align: none; }
  .lesson-grid--no-mobile-scroll .card-caption { min-height: 52px; padding: 5px 25px 7px 6px; }
  .lesson-grid--no-mobile-scroll .card-caption h3 { font-size: clamp(12px,3.4vw,14px); }
  .lesson-grid--no-mobile-scroll .card-note { font-size: 12px; }
  .lesson-grid--no-mobile-scroll .card-arrow { right: 3px; bottom: 4px; width: 19px; height: 19px; border: 0; background: transparent; }
  .lesson-grid--no-mobile-scroll .card-arrow .icon { width: 15px; height: 15px; }
  .lesson-grid--no-mobile-scroll::-webkit-scrollbar { display: none; }
}

/* Shared two-step category navigation for desktop and mobile. */
.category-menu { min-width: 0; padding-left: 26px; }
.category-menu-placeholder { display: flex; min-height: 540px; padding: 30px; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.category-menu-placeholder-art { width: min(230px, 55%); height: 150px; object-fit: contain; margin-bottom: 14px; }
.category-menu-placeholder h2 { color: var(--ink); }
.category-menu-placeholder p { max-width: 390px; margin-top: 8px; font-size: 17px; line-height: 1.45; }
.category-submenu[hidden], .category-menu-placeholder[hidden], .menu-back[hidden] { display: none !important; }
.category-menu-heading { display: flex; align-items: center; gap: 16px; min-height: 100px; padding: 4px 34px 14px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.category-menu-art { flex: 0 0 104px; width: 104px; height: 76px; object-fit: contain; }
.category-menu-title { min-width: 0; }
.category-menu-title h2 { line-height: 1.05; }
.category-menu-title p { margin-top: 4px; color: var(--muted); font-size: 16px; }
.category-menu-all { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; color: var(--red); font-size: 17px; white-space: nowrap; }
.category-menu-all .icon { width: 20px; height: 20px; }
.category-menu-note { margin: 18px 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: #fffcf8; }
.subcategory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.subcategory-grid > li { min-width: 0; }
.subcategory-link { display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 8px 10px 8px 13px; border: 1px solid var(--border); border-radius: 9px; font-size: 17px; line-height: 1.18; transition: background-color .15s ease,border-color .15s ease; }
.subcategory-link > span { min-width: 0; overflow-wrap: anywhere; }
.subcategory-link:hover, .subcategory-link:focus-visible { border-color: #e3a17b; background: #fff7ee; }
.subcategory-link[data-depth="2"] { padding-inline-start: 20px; }
.subcategory-link[data-depth="3"] { padding-inline-start: 30px; }
.subcategory-link[data-depth="4"] { padding-inline-start: 40px; }
.subcategory-link .icon { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; color: var(--red); }
@media(max-width:1150px) and (min-width:761px) {
  .category-menu { padding-left: 17px; }
  .category-menu-heading { gap: 10px; }
  .category-menu-art { flex-basis: 76px; width: 76px; height: 60px; }
  .category-menu-all { font-size: 15px; }
  .subcategory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .subcategory-link { min-height: 44px; padding-inline: 8px; font-size: 15px; }
}
@media(max-width:760px) {
  .category-menu { display: none; max-height: none; overflow: visible; padding: 0; }
  .catalog-panel[data-view="category"] .catalog-root { display: none; }
  .catalog-panel[data-view="category"] .category-menu { display: block; }
  .catalog-panel[data-view="category"] .mobile-menu-header .logo { display: none; }
  .category-menu-heading { position: relative; display: block; min-height: 95px; padding: 8px 104px 12px 4px; margin-bottom: 12px; }
  .category-menu-art { position: absolute; right: 0; bottom: -2px; width: 102px; height: 84px; }
  .category-menu-title h2 { letter-spacing: -.5px; }
  .category-menu-title p { display: none; }
  .category-menu-all { margin: 9px 0 0; font-size: 17px; }
  .subcategory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .subcategory-link { min-height: 42px; gap: 4px; padding: 6px 7px 6px 9px; font-size: 15px; }
  .subcategory-link .icon { flex-basis: 14px; width: 14px; height: 14px; }
  .category-menu-note { margin: 12px 0; padding: 12px; font-size: 15px; }
}
@media(max-width:380px) {
  .category-menu-heading { padding-right: 88px; }
  .category-menu-art { width: 86px; height: 76px; }
  .subcategory-link { font-size: 14px; padding-inline: 7px; }
}

/* Community blocks */
/* Lower-page discovery and community modules share their content across devices. */
.community-discovery { margin-top: 24px; }
.discovery-section { margin-bottom: 22px; }
.discovery-section > .section-heading,
.community-panel > .section-heading { flex-wrap: wrap; gap: 12px 18px; margin-bottom: 12px; }
.discovery-section h2,
.community-panel h2 { display: flex; align-items: center; gap: 11px; min-width: 0; }
.discovery-section h2 > span,
.community-panel h2 > span { min-width: 0; }
.discovery-section h2 > .icon,
.community-panel h2 > .icon { width: 33px; height: 33px; color: var(--red); }
.community-discovery .all-link { font-size: 18px; }
.community-discovery .all-link > .icon { width: 22px; height: 22px; }

/* Each rank is anchored to the upper-left corner of its own card. */
.daily-top-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ranked-lesson { position: relative; display: grid; grid-template-columns: 59% minmax(0, 1fr); min-height: 136px; height: 100%; border: 1px solid var(--border); border-radius: 7px; background: #fff; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.ranked-lesson > .rank-badge { position: absolute; top: 6px; left: 6px; z-index: 1; pointer-events: none; }
.ranked-lesson:hover { border-color: #d7a17c; box-shadow: 0 4px 12px #8936120c; }
.ranked-lesson > img { width: 100%; height: 136px; object-fit: contain; object-position: center; }
.ranked-caption { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 34px 8px 8px 3px; }
.ranked-caption h3 { line-height: 1.12; overflow-wrap: anywhere; }
.ranked-caption .card-arrow { position: static; align-self: flex-end; width: 30px; height: 30px; margin-top: auto; }
.ranked-caption .card-arrow > .icon { width: 21px; height: 21px; }
.rank-badge { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border: 1px solid #f5d8bb; border-radius: 50%; background: linear-gradient(140deg, #fffaf3, #f4e4d5); color: #291d17; font-size: 18px; font-weight: 700; }
.rank-1 { background: linear-gradient(140deg, #ffec99, #ffc443); border-color: #f4c251; }
.rank-2 { background: linear-gradient(140deg, #f1f2f2, #c3c9cc); border-color: #d2d5d7; }
.rank-3 { background: linear-gradient(140deg, #ffc598, #ed9054); border-color: #eba36e; }

.new-card-status { display: flex; align-items: center; padding: 7px 10px 3px; min-height: 34px; }
.new-label { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 11px; border: 1px solid #ffc9b4; border-radius: 25px; color: var(--red); background: #fff8f3; font-size: 15px; line-height: 1.1; }
.new-lesson-card > img { aspect-ratio: 1.4; }
.new-lesson-card .card-caption h3 { overflow-wrap: anywhere; }

.community-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.community-panel { min-width: 0; padding: 15px 18px 16px; border: 1px solid var(--border); border-radius: 8px; background: linear-gradient(115deg, #fff9ef, #fffcf8); }
.community-panel h2 > .icon { color: var(--rust); }
.community-panel .section-heading { align-items: flex-start; }
.panel-title { min-width: 0; }
.panel-title p { margin: 4px 0 0 44px; color: var(--muted); font-size: 17px; line-height: 1.15; }
.users-panel > .section-heading > .all-link { margin: 6px 0 0 auto; font-size: 17px; }
.user-list, .comment-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 7px; background: #fff; overflow: hidden; }
.user-row { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 4px 10px; }
.user-row + .user-row { border-top: 1px solid #fce5ce; }
.user-row > .rank-badge { width: 35px; height: 35px; font-size: 21px; }
.user-avatar { display: block; width: 44px; height: 44px; border: 1px solid #f3e4d8; border-radius: 8px; background: #fff; object-fit: contain; flex-shrink: 0; }
.user-avatar-link { display: block; flex: 0 0 auto; border-radius: 8px; }
.user-info { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.user-name { font-size: 18px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.user-info > .user-name { color: inherit; text-decoration: none; }
.user-info > .user-name:hover { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
.user-rating { white-space: nowrap; color: var(--muted); font-size: 16px; }
.comment-row { display: flex; align-items: center; min-height: 62px; padding: 8px 14px; }
.comment-row + .comment-row { border-top: 1px solid #fce5ce; }
.latest-comment-link { display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; color: inherit; text-decoration: none; }
.latest-comment-link:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.latest-comment-page-icon { display: block; flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid #f3e4d8; border-radius: 8px; background: #fff; object-fit: cover; }
.latest-comment-page-icon-fallback { display: grid; place-items: center; color: var(--muted); }
.latest-comment-page-icon-fallback > .icon { width: 26px; height: 26px; }
.comment-profile-avatar-link { display: block; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; }
.comment-profile-avatar-link:focus-visible,
.user-avatar-link:focus-visible,
.community-profile-link:focus-visible,
.user-info > .user-name:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.comment-avatar-photo { display: block; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.comment-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; color: #fff; font-family: Arial, sans-serif; font-size: 28px; font-weight: 700; }
.avatar-teal { background: linear-gradient(135deg, #79bbb5, #469a93); }
.avatar-purple { background: linear-gradient(135deg, #b19ad7, #8b70ba); }
.avatar-blue { background: linear-gradient(135deg, #77adeb, #3d85ca); }
.avatar-coral { background: linear-gradient(135deg, #eea2a7, #d8707a); }
.comment-body { flex: 1; min-width: 0; padding-top: 3px; }
.comment-body h3 { line-height: 1.15; overflow-wrap: anywhere; }
.latest-comment-author { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.latest-comment-text { display: block; margin-top: 3px; color: #373c55; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.latest-comment-link:hover .latest-comment-author { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
.community-profile-link { color: inherit; text-decoration: none; }
.community-profile-link:hover { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
.comment-body p { font-size: 17px; line-height: 1.25; margin-top: 3px; overflow-wrap: anywhere; }
.comment-empty-row { align-items: center; color: var(--muted); }
.comment-empty-row p { margin: 0; }
.comments-all { margin-top: 13px; }

.top-users-page .top-users-results { margin-top: 18px; }
.top-users-page .top-users-list .user-row { min-height: 66px; padding: 8px 16px; }
.top-users-page .top-users-list .rank-badge { width: 40px; height: 40px; font-size: 22px; }
.top-users-page .top-users-list .user-avatar { width: 50px; height: 50px; border-radius: 8px; object-fit: contain; }
.top-users-page .top-users-list .user-name { font-size: 17px; }
.top-users-page .top-users-list .user-rating { font-size: 15px; }
.top-users-page .top-users-results > .profile-empty-state { margin: 0; padding: 16px; border-radius: 10px; background: #fffaf5; color: #68748d; }

@media (min-width: 761px) and (max-width: 1100px) {
  .daily-top-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-panel { padding: 13px 12px; }
  .user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .user-name { font-size: 17px; }
  .user-rating { font-size: 14px; }
  .user-row { gap: 8px; }
  .user-avatar { width: 39px; height: 39px; }
  .user-row > .rank-badge { width: 31px; height: 31px; font-size: 18px; }
  .comment-row { gap: 10px; padding-inline: 10px; }
  .comment-body p { font-size: 16px; }
  .users-panel > .section-heading > .all-link { font-size: 16px; }
}
@media (max-width: 760px) {
  .community-discovery { margin-top: 24px; }
  .discovery-section { margin-bottom: 24px; }
  .discovery-section > .section-heading,
  .community-panel > .section-heading { gap: 9px; }
  .discovery-section h2, .community-panel h2 { gap: 8px; }
  .discovery-section h2 > .icon, .community-panel h2 > .icon { width: 29px; height: 29px; }
  .community-discovery .all-link { font-size: 16px; }
  .daily-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ranked-lesson { display: flex; flex-direction: column; min-height: 0; }
  .ranked-lesson > img { height: auto; aspect-ratio: 1.4; }
  .ranked-caption { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 6px; padding: 8px; min-height: 64px; }
  .ranked-lesson > .rank-badge { width: 24px; height: 24px; font-size: 16px; }
  .ranked-caption .card-arrow { width: 24px; height: 24px; align-self: center; margin-top: 0; }
  .ranked-caption .card-arrow > .icon { width: 18px; height: 18px; }
  .new-card-status { padding: 6px 8px 3px; min-height: 32px; }
  .new-label { font-size: 14px; min-height: 23px; padding: 3px 9px; }
  .community-panels { grid-template-columns: 1fr; gap: 16px; }
  .community-panel { padding: 13px 12px; }
  .users-panel > .section-heading > .all-link { margin-top: 0; font-size: 16px; }
  .panel-title p { margin-left: 37px; font-size: 16px; }
  .user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .user-row { gap: 8px; padding-inline: 8px; }
  .user-row > .rank-badge { width: 30px; height: 30px; font-size: 18px; }
  .user-avatar { width: 38px; height: 38px; }
  .user-name { font-size: 17px; }
  .user-rating { font-size: 14px; }
  .comment-row { padding: 9px 10px; }
  .latest-comment-link { gap: 12px; }
  .comment-avatar { width: 42px; height: 42px; font-size: 25px; }
  .comment-body p { font-size: 16px; }
}
@media (max-width: 380px) {
  .daily-top-grid { gap: 10px; }
  .ranked-caption { grid-template-columns: minmax(0, 1fr) 22px; gap: 4px; padding-inline: 6px; }
  .ranked-lesson > .rank-badge { width: 22px; height: 22px; font-size: 15px; }
  .ranked-caption .card-arrow { width: 22px; height: 22px; }
}

/* Feedback page */
.feedback-main { padding-bottom: 26px; }
.feedback-main > .breadcrumbs { margin: 16px 0 18px; }
.feedback-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 155px; padding: 20px 30px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 12px; background: radial-gradient(circle at 87% 40%, #fff1dc 0, #fff8ef 18%, transparent 43%), linear-gradient(110deg, #fffaf3, #fff); overflow: hidden; }
.feedback-hero > div:first-child { max-width: 850px; }
.feedback-eyebrow { margin-bottom: 4px; color: var(--red); font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.feedback-hero h1 { padding-right: 0; letter-spacing: -1px; }
.feedback-intro { max-width: 820px; margin-top: 8px; color: var(--muted); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.4; }
.feedback-hero-art { display: grid; width: 152px; height: 112px; flex: 0 0 152px; place-items: center; position: relative; color: var(--rust); }
.feedback-speech { display: grid; width: 86px; height: 76px; place-items: center; border: 2px solid #e8b697; border-radius: 27px; background: #fff; color: #d95735; font-family: Arial, sans-serif; font-size: 48px; line-height: 1; transform: rotate(-5deg); box-shadow: 0 7px 18px #9d48200c; }
.feedback-spark { position: absolute; color: var(--red); font-family: Arial, sans-serif; }
.feedback-spark-one { top: 0; left: 10px; font-size: 30px; }
.feedback-spark-two { right: 2px; bottom: 0; font-size: 34px; transform: rotate(18deg); }
.feedback-composer { padding: 20px 22px 15px; margin-bottom: 25px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(120deg, #fffaf3, #fff); }
.feedback-composer-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.feedback-composer-icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border-radius: 50%; background: #fff0df; color: var(--rust); }
.feedback-composer-icon svg { width: 23px; height: 23px; }
.feedback-composer-heading p { margin-top: 2px; color: var(--muted); font-size: 16px; }
.feedback-name-input { display: block; width: 200px; max-width: 100%; min-height: 46px; padding: 10px 14px; margin-bottom: 10px; border: 1px solid #e6d5c8; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; transition: border-color .18s, box-shadow .18s; }
.feedback-name-input::placeholder { color: #8c91a4; }
.feedback-name-input:focus { border-color: #bd7657; outline: 0; box-shadow: 0 0 0 3px rgb(163 66 37 / .12); }
.feedback-form textarea { display: block; width: 100%; min-height: 62px; max-height: 240px; padding: 14px 15px; resize: vertical; border: 1px solid #e6d5c8; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; line-height: 1.45; transition: min-height .18s ease, border-color .18s, box-shadow .18s; }
.feedback-form textarea::placeholder { color: #8c91a4; }
.feedback-form textarea:focus { min-height: 138px; border-color: #bd7657; outline: 0; box-shadow: 0 0 0 3px rgb(163 66 37 / .12); }
.feedback-form-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 12px; }
.feedback-author-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.feedback-author-note svg { width: 18px; height: 18px; color: var(--rust); }
.feedback-author-note strong { color: var(--ink); }
.feedback-char-count { margin-left: 9px; color: #8c91a4; font-size: 14px; }
.feedback-submit { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 9px 17px; border: 1px solid #a74b2b; border-radius: 8px; background: linear-gradient(125deg, #9c3e23, #ae4c2a); color: #fff; font-size: 17px; font-weight: 700; box-shadow: inset 0 1px 2px #d99b74; transition: filter .15s, transform .15s; }
.feedback-submit:hover { filter: brightness(1.06); }
.feedback-submit:active { transform: translateY(1px); }
.feedback-submit svg { width: 20px; height: 20px; }
.feedback-form-status { min-height: 0; margin-top: 0; color: #438275; font-size: 15px; }
.feedback-form-status:not(:empty) { margin-top: 9px; }
.feedback-list-section { scroll-margin-top: 16px; }
.feedback-list-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 12px; }
.feedback-list-heading .feedback-eyebrow { margin-bottom: 3px; }
.feedback-list-heading h2 { display: flex; align-items: center; gap: 10px; }
.feedback-total { display: inline-grid; min-width: 32px; height: 29px; padding-inline: 7px; place-items: center; border-radius: 20px; background: #fff0df; color: var(--rust); font-size: 16px; line-height: 1; }
.feedback-readonly-note { display: inline-flex; align-items: center; gap: 7px; padding-bottom: 4px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.feedback-readonly-note svg { width: 20px; height: 20px; color: #438275; }
.feedback-list { display: grid; gap: 9px; }
.feedback-comment { display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 15px 17px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.feedback-avatar { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 50%; object-fit: cover; color: #fff; font-family: Arial, sans-serif; font-size: 25px; font-weight: 700; }
.feedback-avatar--lavender { background: linear-gradient(140deg, #b5a3d8, #8468b7); }
.feedback-avatar--blue { background: linear-gradient(140deg, #79b2eb, #4283ca); }
.feedback-avatar--coral { background: linear-gradient(140deg, #efaaa2, #d86f70); }
.feedback-avatar--mint { background: linear-gradient(140deg, #80c1b2, #4a9b8e); }
.feedback-avatar--gold { background: linear-gradient(140deg, #eabf70, #c78d3d); }
.feedback-avatar--purple { background: linear-gradient(140deg, #ba9bd9, #8c69b3); }
.feedback-comment-content { min-width: 0; flex: 1; }
.feedback-comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.feedback-comment-meta h3 { line-height: 1.2; }
.feedback-comment-meta time { color: #8b91a5; font-size: 14px; }
.feedback-comment-content > p { margin-top: 5px; font-size: 17px; line-height: 1.42; overflow-wrap: anywhere; }
.feedback-page .site-footer { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .feedback-main { padding-bottom: 18px; }
  .feedback-main > .breadcrumbs { margin: 12px 0; }
  .feedback-hero { min-height: 0; padding: 19px 18px; margin-bottom: 13px; }
  .feedback-intro { font-size: 17px; }
  .feedback-hero-art { width: 80px; height: 82px; flex-basis: 80px; }
  .feedback-speech { width: 60px; height: 56px; border-radius: 20px; font-size: 36px; }
  .feedback-spark-one { left: -1px; font-size: 22px; }
  .feedback-spark-two { right: -6px; font-size: 26px; }
  .feedback-composer { padding: 15px 13px 13px; margin-bottom: 21px; }
  .feedback-composer-heading { gap: 9px; margin-bottom: 11px; }
  .feedback-composer-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .feedback-composer-heading p { font-size: 14px; }
  .feedback-name-input { min-height: 44px; padding-inline: 12px; font-size: 16px; }
  .feedback-form textarea { min-height: 58px; padding: 12px; font-size: 16px; }
  .feedback-form textarea:focus { min-height: 126px; }
  .feedback-form-bottom { align-items: flex-start; flex-direction: column; gap: 11px; }
  .feedback-submit { width: 100%; min-height: 45px; }
  .feedback-list-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .feedback-readonly-note { padding-bottom: 0; }
  .feedback-list { gap: 8px; }
  .feedback-comment { gap: 11px; padding: 12px 11px; }
  .feedback-avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 21px; }
  .feedback-comment-content > p { margin-top: 4px; font-size: 16px; }
}
@media (max-width: 420px) {
  .feedback-hero { padding-inline: 14px; }
  .feedback-hero-art { width: 54px; flex-basis: 54px; }
  .feedback-speech { width: 51px; height: 48px; font-size: 31px; }
  .feedback-spark-one { left: -5px; }
  .feedback-spark-two { right: -7px; }
  .feedback-comment { gap: 9px; padding-inline: 9px; }
  .feedback-avatar { width: 39px; height: 39px; flex-basis: 39px; font-size: 19px; }
  .feedback-comment-meta { column-gap: 8px; }
  .feedback-comment-meta time { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-name-input, .feedback-form textarea, .feedback-submit { transition: none; }
}

/* Imported lesson page */
/* The imported lesson has full-page drawings and long prose, rather than cutouts. */
.imported-lesson .drawing-step { display: flex; flex-direction: column; aspect-ratio: auto; }
.imported-lesson .step-copy { position: static; width: auto; min-height: 72px; margin: 16px 18px 14px 66px; }
.imported-lesson .step-copy p + p { margin-top: 8px; }
.imported-lesson .drawing-step > img { width: 100%; height: clamp(230px, 24vw, 330px); object-fit: contain; object-position: center; padding: 0 14px 14px; }
.source-variant-content { scroll-margin-top: 90px; }
.source-lesson-intro { padding: 16px 20px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); font-size: 19px; line-height: 1.5; }
.source-lesson-intro p + p { margin-top: 10px; }
.source-lesson-intro ul, .source-lesson-intro ol { margin: 10px 0; padding-left: 24px; list-style: disc; }
.source-lesson-intro li + li { margin-top: 4px; }
.source-original { margin: 0 0 18px; }
.source-original figcaption { margin-bottom: 10px; font-size: 22px; font-weight: 700; }
.source-original img { width: min(100%, 600px); height: 340px; margin-inline: auto; object-fit: contain; }
.source-author { position: relative; display: flex; align-items: center; gap: 14px; width: fit-content; min-height: 90px; max-width: 100%; margin: 22px 0 24px 10px; padding: 10px 18px; border: 1px solid #ffd3b4; border-radius: 18px; background: linear-gradient(110deg, #fff8f2, #fff0e5); box-shadow: 0 5px 13px rgb(163 66 37 / 9%); color: var(--ink); }
.source-author-link { padding-right: 56px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.source-author-link:hover { transform: translateY(-1px); border-color: #ffb98f; box-shadow: 0 8px 18px rgb(163 66 37 / 13%); }
.source-author-avatar { position: relative; display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(140deg, #ff805b, #e84620); box-shadow: 0 2px 6px rgb(163 66 37 / 16%); color: #fff; }
.source-author-initial { color: #fff; font-size: 31px; font-weight: 700; line-height: 1; }
.source-author-avatar-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.source-author-copy { display: grid; min-width: 0; gap: 1px; }
.source-author-label { color: #5776c1; font-size: 17px; line-height: 1.15; }
.source-author-name { color: #e65327; font-size: 27px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.source-author-arrow { position: absolute; top: 50%; right: 18px; width: 24px; height: 24px; transform: translateY(-50%); color: #e65327; }
.source-video { aspect-ratio: 16 / 9; max-width: 960px; margin-inline: auto; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #faf8f5; }
.source-video iframe { display: block; border: 0; width: 100%; height: 100%; }
.source-video-link { display: inline-flex; margin: 12px 0 20px; color: var(--red); font-size: 17px; }
.source-video-link:hover { text-decoration: underline; }
.imported-lesson .lesson-variant { margin-bottom: 16px; }
.imported-lesson .hero-description { max-width: 960px; color: #5776c1; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; }
.variant-picker-hint { margin-bottom: 12px; color: #505b76; font-size: 17px; }
.imported-lesson .variant-choices:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.source-materials { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.source-materials p { font-size: 17px; color: var(--rust); }
.imported-lesson .source-materials ul { display: flex; flex: 1 1 300px; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.imported-lesson .source-materials li + li { margin-top: 0; }
.source-materials li::before { content: "•"; margin-right: 7px; color: var(--rust); }
.imported-lesson .step-copy p { color: #505b76; line-height: 1.5; }
.imported-lesson .variant-summary { display: grid; grid-template-columns: 158px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 5px 18px; padding: 12px 16px; }
.imported-lesson .variant-thumb { display: grid; grid-column: 1; grid-row: 1 / 3; place-items: center; min-width: 0; }
.imported-lesson .variant-thumb > img { display: block; width: auto; max-width: 100%; height: auto; max-height: 126px; border: 0; border-radius: 15px; object-fit: contain; }
.imported-lesson .variant-title { grid-column: 2; grid-row: 1; align-self: end; }
.imported-lesson .variant-subtitle { grid-column: 2; grid-row: 2; margin-top: 0; }
.imported-lesson .variant-action { grid-column: 3; grid-row: 1 / 3; }
.imported-lesson .lesson-variant[open] .variant-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; padding: 0; gap: 12px; align-items: center; }
.imported-lesson .lesson-variant[open] .variant-title { grid-column: 1; grid-row: 1; align-self: center; }
.imported-lesson .lesson-variant[open] .variant-action { grid-column: 2; grid-row: 1; }
.imported-lesson .lesson-tutorials + .next-drawings-group { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); scroll-margin-top: 24px; }
.imported-lesson .next-drawings-group + .next-drawings-group { margin-top: 24px; }
.imported-lesson .lesson-card-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; max-width: 100%; margin-top: 4px; color: var(--rust); line-height: 1; }
.imported-lesson .lesson-card-metric { display: inline-flex; align-items: center; gap: 2px; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.imported-lesson .lesson-card-metric > .icon { flex: 0 0 14px; width: 14px; height: 14px; color: var(--rust); }
.daily-top .ranked-lesson { min-height: 128px; }
.daily-top .ranked-lesson > img { height: 128px; }
.daily-top .lesson-card-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; max-width: 100%; margin-top: 4px; color: var(--rust); line-height: 1; }
.daily-top .lesson-card-metric { display: inline-flex; align-items: center; gap: 2px; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.daily-top .lesson-card-metric > .icon { flex: 0 0 14px; width: 14px; height: 14px; color: var(--rust); }
.daily-top .ranked-caption .lesson-card-metrics { grid-column: 1; grid-row: 2; }
.daily-top .ranked-caption .card-arrow { grid-column: 2; grid-row: 2; }
.imported-lesson .drawing-step { scroll-margin-top: 24px; }
.imported-lesson #variants-heading { scroll-margin-top: 24px; }

.imported-lesson .lesson-comments { margin-top: 28px; padding: clamp(18px, 2.5vw, 30px); border: 1px solid #f0d9c5; border-radius: 14px; background: linear-gradient(145deg, #fffdf9 0%, #fff 72%); }
.lesson-comments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.lesson-comments-heading h2 { margin: 0; color: #101d46; line-height: 1.2; }
.lesson-comments-heading p { margin: 7px 0 0; color: #64799f; font-size: 16px; line-height: 1.45; }
.lesson-comments-count { display: inline-grid; flex: 0 0 auto; min-width: 38px; height: 38px; place-items: center; padding: 0 10px; border-radius: 999px; background: #fff2e4; color: #914020; font-size: 16px; font-weight: 700; }
.lesson-comment-form { margin-bottom: 18px; padding: 18px; border: 1px solid #f1dfce; border-radius: 12px; background: #fff; }
.lesson-comment-login-notice { margin: 0 0 18px; padding: 15px 18px; border: 1px solid #f1dfce; border-radius: 12px; background: #fff; color: #526380; line-height: 1.5; }
.lesson-comment-login-notice a { color: #914020; font-weight: 700; text-underline-offset: 2px; }
.comment-current-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #15234c; }
.comment-current-user > span:last-child { display: grid; gap: 2px; }
.comment-current-user small { color: #7182a3; font-size: 12px; }
.lesson-comment-form textarea, .lesson-reply-form textarea { display: block; width: 100%; min-height: 112px; padding: 11px 12px; resize: vertical; border: 1px solid #d9ddeb; border-radius: 9px; background: #fff; color: #17234a; font: inherit; font-size: 16px; line-height: 1.5; }
.lesson-comment-form textarea::placeholder, .lesson-reply-form textarea::placeholder { color: #8995ad; }
.lesson-comment-form textarea:focus, .lesson-reply-form textarea:focus { border-color: #914020; outline: 3px solid rgb(145 64 32 / 14%); }
.lesson-comment-form textarea { height: 68px; min-height: 68px; transition: height .2s ease, min-height .2s ease; }
.lesson-comment-form textarea:focus, .lesson-comment-form textarea:not(:placeholder-shown) { height: 112px; min-height: 112px; }
.lesson-comment-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.lesson-comment-form-footer > div { display: flex; align-items: center; gap: 14px; }
.lesson-comment-counter { color: #7182a3; font-size: 13px; white-space: nowrap; }
.lesson-comment-submit, .comment-submit-small { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid #914020; border-radius: 9px; background: #914020; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.lesson-comment-submit:hover, .comment-submit-small:hover { background: #7d341a; }
.lesson-comment-submit:active, .comment-submit-small:active { transform: translateY(1px); }
.lesson-comment-submit:focus-visible, .comment-submit-small:focus-visible, .comment-action:focus-visible, .comment-upload-button:focus-within { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 3px; }
.lesson-comment-submit > .icon, .comment-submit-small > .icon { width: 18px; height: 18px; }
.comment-upload-button { display: inline-flex; min-height: 42px; align-items: center; gap: 7px; color: #914020; font-size: 14px; font-weight: 600; cursor: pointer; }
.comment-upload-button > .icon { width: 20px; height: 20px; }
.image-upload-control[hidden] { display: none !important; }
.comment-upload-preview { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; margin-top: 12px; padding: 10px; border: 1px solid #f0e1d5; border-radius: 10px; background: #fffaf7; }
.comment-upload-preview[hidden], .lesson-reply-form[hidden], .lesson-comment-replies[hidden] { display: none !important; }
.comment-upload-preview img { display: block; width: auto; max-width: min(180px, 40vw); max-height: 150px; border: 1px solid #eee1d5; border-radius: 7px; background: #fff; object-fit: contain; }
.comment-upload-preview-copy { display: grid; gap: 7px; min-width: 0; color: #55647d; font-size: 13px; overflow-wrap: anywhere; }
.comment-upload-preview button { justify-self: start; padding: 0; border: 0; background: none; color: #914020; font: inherit; text-decoration: underline; cursor: pointer; }
.lesson-comment-status { min-height: 0; margin: 0; color: #5776c1; font-size: 14px; }
.lesson-comment-status:not(:empty) { margin-top: 12px; }
.lesson-comment-list, .lesson-comment-replies { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.lesson-comment { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 12px; padding: 15px; border: 1px solid #f1e2d4; border-radius: 11px; background: rgb(255 255 255 / 92%); }
.lesson-comment[hidden] { display: none !important; }
.lesson-comment-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; background: #f8e4d3; color: #914020; font-size: 18px; font-weight: 700; object-fit: cover; }
.lesson-comment-profile-avatar-link { display: block; width: 42px; height: 42px; border-radius: 50%; }
.lesson-comment-profile-avatar-link:focus-visible { outline: 2px solid #bd7655; outline-offset: 2px; }
.lesson-comment-profile-avatar-link .lesson-comment-avatar { display: block; width: 100%; height: 100%; flex: none; }
.lesson-comment-content { min-width: 0; }
.lesson-comment-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lesson-comment-header h3 { overflow-wrap: anywhere; margin: 0; color: #13214c; line-height: 1.3; }
.lesson-comment-profile-link { color: inherit; text-decoration: none; }
.lesson-comment-profile-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.lesson-comment-header time { color: #7c8cab; font-size: 12px; }
.lesson-comment-text { margin: 5px 0 0; color: #39496f; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.lesson-comment-artwork { position: relative; width: fit-content; max-width: min(100%, 560px); margin: 11px 0 0; padding: 7px; border: 1px solid #eee1d5; border-radius: 10px; background: #fff; }
.lesson-comment-artwork > a { display: block; }
#lesson-comments .lesson-comment-artwork > a { cursor: zoom-in; }
.lesson-comment-artwork img { display: block; width: auto; max-width: 100%; max-height: 460px; object-fit: contain; border-radius: 6px; }
.comment-action { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #6e7f9f; font: inherit; font-size: 13px; cursor: pointer; }
.comment-action:hover { border-color: #f0d9c5; background: #fff8f0; color: #914020; }
.comment-action.wall-delete-button { color: #a54a45; }
.comment-action.wall-delete-button:hover { border-color: #f0cbc5; background: #fff5f3; color: #8c241f; }
.comment-action.wall-delete-top { width: 30px; min-height: 30px; justify-content: center; padding: 4px; margin-left: auto; }
.wall-delete-confirm { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 1px solid #f0d9c5; border-radius: 16px; background: #fff; color: #17234a; box-shadow: 0 22px 70px rgb(23 35 74 / 22%); }
.wall-delete-confirm::backdrop { background: rgb(23 35 74 / 48%); backdrop-filter: blur(2px); }
.wall-delete-confirm h2 { margin: 0; color: #17234a; font-size: 20px; }
.wall-delete-confirm p { margin: 10px 0 20px; color: #5b6886; font-size: 14px; line-height: 1.5; }
.wall-delete-confirm form { display: flex; justify-content: flex-end; gap: 9px; }
.wall-delete-confirm button { min-height: 40px; padding: 0 15px; border: 1px solid #ead9ca; border-radius: 9px; font: inherit; font-weight: 700; cursor: pointer; }
.wall-delete-confirm .wall-delete-cancel { background: #fff; color: #5b6886; }
.wall-delete-confirm .wall-delete-accept { border-color: #a34225; background: #a34225; color: #fff; }
.wall-delete-confirm button:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 3px; }
.comment-action[data-comment-reaction][aria-pressed="true"], .comment-action[data-wall-like][aria-pressed="true"] { color: #c7372a; }
.comment-action[data-comment-reaction][aria-pressed="true"] .icon, .comment-action[data-wall-like][aria-pressed="true"] .icon { fill: currentColor; }
.comment-action > .icon { width: 17px; height: 17px; }
.comment-action .reaction-icon .icon { width: 17px; height: 17px; }
.comment-action.reply-toggle { min-height: 48px; gap: 8px; padding: 7px 12px; font-size: 18px; font-weight: 600; line-height: 1; }
.comment-action.reply-toggle > .icon { width: 20px; height: 20px; }
.lesson-comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 7px; }
.lesson-comment-artwork .photo-like { position: absolute; right: 13px; bottom: 13px; min-height: 34px; border: 1px solid #f0d9c5; background: rgb(255 255 255 / 94%); color: #914020; }
.lesson-comment-artwork .photo-like[aria-pressed="true"] { color: #c7372a; }
.lesson-comment-artwork .photo-like[aria-pressed="true"] .icon { fill: currentColor; }
.comment-login-dialog { position: fixed; width: min(460px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: visible; border: 1px solid #f2cdbb; border-radius: 22px; background: linear-gradient(145deg, #fffaf6, #fff); color: var(--ink, #17234a); box-shadow: 0 24px 80px rgb(33 43 68 / 28%); }
.comment-login-dialog::backdrop { background: rgb(23 35 74 / 48%); backdrop-filter: blur(3px); }
.comment-login-dialog-copy { display: grid; justify-items: center; gap: 11px; padding: 32px 28px 28px; text-align: center; }
.comment-login-dialog-icon { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid #ffd2bc; border-radius: 50%; background: #fff0e7; color: #dc4d25; }
.comment-login-dialog-icon svg { width: 28px; height: 28px; }
.comment-login-dialog-eyebrow { margin: 0; color: #a34225; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.comment-login-dialog h2 { margin: 0; color: var(--ink, #17234a); font-size: 22px; line-height: 1.25; }
.comment-login-dialog-copy > p:last-of-type { max-width: 360px; margin: 0; color: #65728e; font-size: 15px; line-height: 1.5; }
.comment-login-dialog-actions { display: flex; width: 100%; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 7px; }
.comment-login-dialog-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid #f0cbbb; border-radius: 11px; background: #fff; color: #a34225; font-weight: 750; text-decoration: none; }
.comment-login-dialog-actions a:hover { background: #fff3eb; }
.comment-login-dialog-actions .comment-login-primary { border-color: #dc4d25; background: linear-gradient(145deg, #f26d3e, #dc4d25); color: #fff; }
.comment-login-dialog-actions .comment-login-primary:hover { background: linear-gradient(145deg, #e85d32, #c94220); }
.comment-login-close { position: absolute; top: 11px; right: 11px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #f0d9c5; border-radius: 50%; background: #fff; color: #9c4a2c; font: inherit; font-size: 23px; line-height: 1; cursor: pointer; }
.comment-login-close:hover { background: #fff1e7; }
.comment-login-dialog-actions a:focus-visible, .comment-login-close:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 3px; }
.lesson-comment-replies { gap: 10px; margin: 10px 0 0 14px; padding-left: 14px; border-left: 2px solid #f0d9c5; }
.lesson-comment-replies .lesson-comment { padding: 12px; background: #fffdfa; }
.lesson-reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 10px; }
.reply-form-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.lesson-reply-form .reply-upload-preview { grid-column: 1 / -1; }
.lesson-reply-form textarea { min-height: 68px; font-size: 14px; }
.comment-submit-small { min-height: 38px; padding-inline: 11px; font-size: 13px; }
.comment-submit-small > .icon { width: 15px; height: 15px; }
.lesson-comment-source { margin: 16px 0 0; color: #7c8cab; font-size: 12px; }
.lesson-comment-source a { color: #914020; text-decoration: underline; text-underline-offset: 2px; }
.show-all-comments { display: flex; width: 100%; min-height: 60px; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; padding: 14px 20px; border: 1px solid #914020; border-radius: 12px; background: #914020; color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.show-all-comments:hover { background: #7d341a; transform: translateY(-1px); }
.show-all-comments:focus-visible { outline: 3px solid rgb(145 64 32 / 28%); outline-offset: 3px; }
.lesson-comments .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 761px) and (max-width: 1100px) {
  .imported-lesson .step-copy { margin-left: 52px; }
}


@media (max-width: 760px) {
  .comment-login-dialog-copy { padding: 28px 20px 22px; }
  .comment-login-dialog h2 { font-size: 19px; }
  .comment-login-dialog-actions { flex-direction: column; }
  .comment-login-dialog-actions a { width: 100%; }
  .imported-lesson .lesson-comments { margin-top: 22px; padding: 15px; }
  .lesson-comments-heading { gap: 10px; margin-bottom: 14px; }
  .lesson-comments-heading p { font-size: 14px; }
  .lesson-comments-count { min-width: 34px; height: 34px; font-size: 14px; }
  .lesson-comment-form { padding: 13px; }
  .lesson-comment-form textarea { height: 64px; min-height: 64px; }
  .lesson-comment-form textarea:focus, .lesson-comment-form textarea:not(:placeholder-shown) { height: 100px; min-height: 100px; }
  .lesson-comment-form-footer { align-items: flex-start; flex-direction: column; }
  .lesson-comment-form-footer > div { width: 100%; justify-content: space-between; gap: 8px; }
  .show-all-comments { min-height: 56px; padding: 12px 14px; font-size: 16px; }
  .lesson-comment-submit { min-height: 42px; padding-inline: 12px; font-size: 14px; }
  .lesson-comment-list { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 13px; }
  .lesson-comment { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 10px; }
  .lesson-comment-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 15px; }
  .lesson-comment-profile-avatar-link { width: 34px; height: 34px; }
  .lesson-comment-text { font-size: 14px; }
  .lesson-comment-artwork { max-width: 100%; }
  .lesson-comment-artwork img { max-height: 340px; }
  .lesson-comment-replies { gap: 8px; margin-left: 0; padding-left: 0; border-left: 0; }
  .lesson-comment-replies .lesson-comment { padding: 9px; }
  .lesson-reply-form { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .comment-submit-small { justify-self: end; }
  .imported-lesson .step-copy { margin: 12px 14px 12px 52px; min-height: 0; }
  .imported-lesson .drawing-step > img { height: clamp(200px, 60vw, 300px); padding: 0 10px 10px; aspect-ratio: auto; }
  .source-lesson-intro { padding: 13px 14px; font-size: 17px; }
  .source-original img { height: 280px; }
  .source-author { min-height: 76px; gap: 11px; margin: 18px 0 20px 10px; padding: 8px 14px; }
  .source-author-link { padding-right: 47px; }
  .source-author-avatar { flex-basis: 56px; width: 56px; height: 56px; }
  .source-author-initial { font-size: 27px; }
  .source-author-label { font-size: 15px; }
  .source-author-name { font-size: 23px; }
  .source-author-arrow { right: 14px; width: 22px; height: 22px; }
  .imported-lesson .variant-summary { grid-template-columns: 65px minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px; }
  .imported-lesson .variant-thumb > img { max-height: 68px; }
  .imported-lesson .variant-action { padding: 7px; font-size: 14px; }
  .imported-lesson .variant-action .when-closed { display: none; }
  .imported-lesson .source-materials ul { font-size: 16px; }
}
@media (max-width: 380px) {
  .imported-lesson .step-copy p { font-size: 15px; }
}


/* Reactions and a direct, copyable link for every expanded drawing lesson. */
.lesson-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.lesson-material-anchor { display: block; height: 0; scroll-margin-top: 20px; }
.lesson-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #914020;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.lesson-action-button:hover { border-color: #914020; background: #fff2e4; }
.lesson-action-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lesson-action-button[aria-pressed="true"] { border-color: #914020; background: var(--rust); color: #fff; }
.lesson-action-button .icon { flex: 0 0 19px; width: 19px; height: 19px; }
.lesson-action-count { min-width: 23px; padding: 2px 5px; border-radius: 999px; background: #fff2e4; color: var(--rust); font-size: 13px; font-weight: 700; text-align: center; }
.lesson-action-button[aria-pressed="true"] .lesson-action-count { background: rgba(255,255,255,.2); color: #fff; }
.lesson-share-button { margin-inline-start: auto; border-color: #914020; color: var(--rust); }
.lesson-action-notice { margin: -10px 12px 18px; color: var(--navy); font-size: 14px; line-height: 1.5; }
.lesson-action-notice[hidden] { display: none; }
.lesson-action-notice a { color: var(--rust); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) {
  .lesson-actions { gap: 7px; padding: 9px; }
  .lesson-action-button { flex: 1 1 calc(50% - 7px); gap: 6px; padding: 8px 9px; font-size: 14px; }
  .lesson-share-button { margin-inline-start: 0; }
}
@media (max-width: 380px) {
  .lesson-action-button { font-size: 13px; }
}


/* Compact reaction counts and drawing-step total in collapsed lesson headers. */
.imported-lesson .variant-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 11px; min-width: 0; }
.imported-lesson .variant-reaction-count,
.imported-lesson .variant-steps-count { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: #505b76; font-size: 14px; line-height: 1.2; }
.imported-lesson .variant-reaction-count .icon,
.imported-lesson .variant-steps-count .icon { flex: 0 0 24px; width: 24px; height: 24px; color: #914020; }
.imported-lesson .variant-steps-count { margin-inline-start: 2px; padding-inline-start: 10px; border-inline-start: 1px solid var(--border); }
.imported-lesson .variant-media-label { color: #505b76; font-size: 14px; line-height: 1.2; }
@media (max-width: 760px) {
  .imported-lesson .variant-subtitle { gap: 5px 8px; }
  .imported-lesson .variant-reaction-count,
  .imported-lesson .variant-steps-count,
  .imported-lesson .variant-media-label { font-size: 13px; }
  .imported-lesson .variant-reaction-count .icon,
  .imported-lesson .variant-steps-count .icon { flex-basis: 23px; width: 23px; height: 23px; }
}

@media (max-width: 760px) {
  .daily-top-grid {
    grid-template-columns: none;
    grid-template-rows: 1fr;
    grid-auto-flow: column;
    grid-auto-columns: clamp(220px, 68vw, 280px);
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
    scrollbar-width: thin;
    scrollbar-color: #c9825b #fff2e4;
    padding: 2px 2px 10px;
  }
  .daily-top-grid > li { min-width: 0; scroll-snap-align: start; }
  .daily-top-grid::-webkit-scrollbar { height: 8px; }
  .daily-top-grid::-webkit-scrollbar-track { background: #fff2e4; border-radius: 10px; }
  .daily-top-grid::-webkit-scrollbar-thumb { background: #c9825b; border-radius: 10px; }
  .daily-top-grid:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 7px; }
}

.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--rust);
  border-radius: 50%;
  background: var(--rust);
  color: #fff;
  box-shadow: 0 3px 12px rgba(59, 31, 20, .22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.back-to-top:hover { background: #762d16; border-color: #762d16; }
.back-to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.back-to-top .icon { width: 23px; height: 23px; }
@media (max-width: 760px) {
  .back-to-top { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* Keep the large comment submit button aligned with the shared primary style. */
.lesson-comment-submit {
  min-height: 43px;
  padding: 9px 17px;
  border: 1px solid #a74b2b;
  border-radius: 8px;
  background: linear-gradient(125deg, #9c3e23, #ae4c2a);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: inset 0 1px 2px #d99b74;
}
.lesson-comment-submit:hover { filter: brightness(1.06); background: linear-gradient(125deg, #9c3e23, #ae4c2a); }
body:not(.profile-made-page) .imported-lesson #more-cats,
.imported-lesson #more-kids {
  --related-accent: #ff6745;
  --related-line: #ffdfcf;
  --related-icon-bg: #ffede4;
  position: relative;
  margin: 28px 0 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--related-line);
  border-radius: 20px;
  background: linear-gradient(115deg, #fff8f4 0%, #fff3ed 100%);
}

.imported-lesson #more-kids {
  --related-accent: #ff6745;
  --related-line: #dceeff;
  --related-icon-bg: #e4f2ff;
  background: linear-gradient(115deg, #f2f9ff 0%, #eaf5ff 100%);
}

.imported-lesson #more-cats .section-heading,
.imported-lesson #more-kids .section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
}

.imported-lesson #more-cats .section-heading h2,
.imported-lesson #more-kids .section-heading h2 {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 14px;
  margin: 0;
  color: var(--ink, #111b45);
}

.imported-lesson #more-cats .section-heading h2::before,
.imported-lesson #more-kids .section-heading h2::before {
  display: grid;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 50%;
  background: var(--related-icon-bg);
  color: var(--related-accent);
  font-size: 34px;
  line-height: 1;
}

.imported-lesson #more-cats .section-heading h2::before {
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23ff6745'%3E%3Cellipse cx='32' cy='43' rx='14' ry='10'/%3E%3Cellipse cx='14' cy='28' rx='6' ry='9' transform='rotate(-25 14 28)'/%3E%3Cellipse cx='27' cy='19' rx='6' ry='9' transform='rotate(-8 27 19)'/%3E%3Cellipse cx='40' cy='19' rx='6' ry='9' transform='rotate(8 40 19)'/%3E%3Cellipse cx='51' cy='28' rx='6' ry='9' transform='rotate(25 51 28)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 52% 52%;
}

.imported-lesson #more-kids .section-heading h2::before {
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M14 42 39 17l8 8-25 25-11 3z' fill='%23ff7350' stroke='%23ff7350' stroke-width='2'/%3E%3Cpath d='m14 42 8 8m-8-8-3 11 11-3' fill='%23ffd47a' stroke='%23a87448' stroke-width='2'/%3E%3Cpath d='m25 15 25 25-8 8-25-25z' fill='%235ba7eb' stroke='%235ba7eb' stroke-width='2'/%3E%3Cpath d='m25 15 8 0 0 8m17 17-8 0' fill='none' stroke='%23f4c96b' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60% 60%;
}

.imported-lesson #more-cats .section-heading > a,
.imported-lesson #more-kids .section-heading > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 20px;
  border: 1px solid var(--related-accent);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--related-accent);
  font-size: 16px;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.imported-lesson #more-cats .section-heading > a::after,
.imported-lesson #more-kids .section-heading > a::after {
  content: "→";
  font-size: 22px;
  line-height: 1;
}

.imported-lesson #more-cats .section-heading > a:hover,
.imported-lesson #more-kids .section-heading > a:hover {
  transform: translateY(-1px);
  background: var(--related-accent);
  color: #fff;
}

.related-lesson-cards,
.lesson-page-card-list {
  --related-accent: #ff6745;
  --related-line: #ffdfcf;
  --related-icon-bg: #ffede4;
}

.related-lesson-card {
  height: 100%;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--related-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 3px 12px rgba(30, 55, 88, .035);
}



.related-lesson-card .card-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  grid-template-rows: minmax(38px, auto) 30px;
  align-items: center;
  gap: 4px 6px;
  min-height: 78px;
  padding: 9px 2px 0;
}

.related-lesson-card .card-caption h3 {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: end;
  min-height: 0;
  margin: 0;
  color: var(--ink, #111b45);
  line-height: 1.22;
}

.related-lesson-card .lesson-card-metrics {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #74859f;
}





.related-lesson-card .card-arrow {
  position: static;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--related-line);
  border-radius: 50%;
  background: var(--related-icon-bg);
  color: var(--related-accent);
}

@media (max-width: 760px) {
  body:not(.profile-made-page) .imported-lesson #more-cats,
  .imported-lesson #more-kids {
    margin-top: 20px;
    padding: 12px;
    border-radius: 16px;
  }

  .imported-lesson #more-cats .section-heading,
  .imported-lesson #more-kids .section-heading {
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 10px;
  }

  .imported-lesson #more-cats .section-heading h2,
  .imported-lesson #more-kids .section-heading h2 {
    gap: 10px;
  }

  .imported-lesson #more-cats .section-heading h2::before,
  .imported-lesson #more-kids .section-heading h2::before {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    font-size: 25px;
  }

  .imported-lesson #more-cats .section-heading > a,
  .imported-lesson #more-kids .section-heading > a {
    min-height: 38px;
    margin-left: auto;
    padding: 6px 12px;
    font-size: 14px;
  }

  .related-lesson-card {
    padding: 8px;
    border-radius: 15px;
  }

  .related-lesson-card > img {
    border-radius: 10px;
  }

  .related-lesson-card .card-caption {
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-rows: minmax(34px, auto) 26px;
    min-height: 66px;
    padding-top: 7px;
    gap: 3px;
  }

  .related-lesson-card .lesson-card-metrics {
    gap: 5px;
  }

  .related-lesson-card .lesson-card-metric {
    gap: 2px;
    font-size: 12px;
  }

  .related-lesson-card .lesson-card-metric > .icon {
    width: 15px;
    height: 15px;
  }

  .related-lesson-card .card-arrow {
    width: 36px;
    height: 36px;
  }
}


.related-lesson-card {
  min-width: 0;
}

@media (max-width: 1150px) {
  .related-lesson-cards .lesson-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .related-lesson-cards .lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Restored shared presentation for the two related lesson groups. */


.imported-lesson-page #more-kids{
  --related-line: #dceeff;
  --related-icon-bg: #e4f2ff;
  background: linear-gradient(115deg, #f2f9ff 0%, #eaf5ff 100%);
}

.imported-lesson-page #more-cats .section-heading,
.imported-lesson-page #more-kids .section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.imported-lesson-page #more-cats .section-heading h2,
.imported-lesson-page #more-kids .section-heading h2 {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.imported-lesson-page #more-cats .section-heading h2::before,
.imported-lesson-page #more-kids .section-heading h2::before {
  content: "";
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background-color: var(--related-icon-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58% 58%;
}

.imported-lesson-page #more-cats .section-heading h2::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23ff6745'%3E%3Cellipse cx='32' cy='43' rx='14' ry='10'/%3E%3Cellipse cx='14' cy='28' rx='6' ry='9' transform='rotate(-25 14 28)'/%3E%3Cellipse cx='27' cy='19' rx='6' ry='9' transform='rotate(-8 27 19)'/%3E%3Cellipse cx='40' cy='19' rx='6' ry='9' transform='rotate(8 40 19)'/%3E%3Cellipse cx='51' cy='28' rx='6' ry='9' transform='rotate(25 51 28)'/%3E%3C/g%3E%3C/svg%3E");
}

.imported-lesson-page #more-kids .section-heading h2::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M14 42 39 17l8 8-25 25-11 3z' fill='%23ff7350' stroke='%23ff7350' stroke-width='2'/%3E%3Cpath d='m14 42 8 8m-8-8-3 11 11-3' fill='%23ffd47a' stroke='%23a87448' stroke-width='2'/%3E%3Cpath d='m25 15 25 25-8 8-25-25z' fill='%235ba7eb' stroke='%235ba7eb' stroke-width='2'/%3E%3Cpath d='m25 15 8 0 0 8m17 17-8 0' fill='none' stroke='%23f4c96b' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
}

.imported-lesson-page #more-cats .section-heading > a,
.imported-lesson-page #more-kids .section-heading > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 18px;
  border: 1px solid #ff6745;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  color: #ff6745;
  text-decoration: none;
}

.imported-lesson-page #more-cats .section-heading > a::after,
.imported-lesson-page #more-kids .section-heading > a::after {
  content: none !important;
  display: none !important;
}

.related-lesson-cards .lesson-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 10px;
  overflow: visible;
  overflow-x: visible;
  padding-bottom: 0;
  scroll-snap-type: none;
}

.related-lesson-card {
  min-width: 0;
  height: 100%;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--related-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 12px rgba(30, 55, 88, .035);
}

.related-lesson-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  border: 0;
  border-radius: 12px;
  background: #f7f7f5;
}

.related-lesson-card .card-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(38px, auto) 30px;
  align-items: center;
  gap: 4px;
  min-height: 78px;
  padding: 9px 2px 0;
  text-align: center;
}

.related-lesson-card .card-caption h3 {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  min-height: 0;
  margin: 0;
  text-align: center;
  line-height: 1.22;
}

.related-lesson-card .lesson-card-metrics {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #74859f;
}

.related-lesson-card .lesson-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #74859f;
  font-size: 14px;
  line-height: 1;
}

.related-lesson-card .lesson-card-metric > .icon {
  width: 18px;
  height: 18px;
  color: #91a1b8;
}

.related-lesson-card .card-arrow {
  display: none !important;
}

@media (max-width: 1150px) {
  
}

@media (max-width: 760px) {
  

  

  .imported-lesson-page #more-cats .section-heading h2,
  .imported-lesson-page #more-kids .section-heading h2{
    gap: 9px;
  }

  .imported-lesson-page #more-cats .section-heading h2::before,
  .imported-lesson-page #more-kids .section-heading h2::before{
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  

  .related-lesson-cards .lesson-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  

  

  .related-lesson-card .card-caption{
    grid-template-rows: minmax(34px, auto) 26px;
    min-height: 66px;
    padding-top: 7px;
    gap: 3px;
  }

  

  

  
}
/* Keep the restored layout ahead of older lesson-page overrides. */
.related-lesson-cards .lesson-grid{
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  overflow: visible !important;
  overflow-x: visible !important;
  padding-bottom: 0 !important;
  scroll-snap-type: none !important;
}

.related-lesson-card{
  min-width: 0 !important;
  flex: initial !important;
}

.related-lesson-card .card-caption{
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 4px 8px !important;
  min-height: 78px !important;
  padding: 9px 2px 0 !important;
  text-align: center !important;
}

.related-lesson-card .card-caption h3{
  flex: 0 0 100% !important;
  align-self: flex-end !important;
  margin: 0 !important;
  text-align: center !important;
}

.related-lesson-card .lesson-card-metrics{
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex: 0 1 auto !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

.related-lesson-card .card-arrow{
  display: none !important;
}

.related-lesson-card .card-arrow .icon{
  display: none !important;
}

.related-lesson-card .lesson-card-metric,
  .related-lesson-card .lesson-card-metric > span{
  color: #62758f !important;
  font-weight: 700 !important;
}

.related-lesson-card .lesson-card-metric > .icon{
  flex: 0 0 21px !important;
  width: 21px !important;
  height: 21px !important;
  color: #71839a !important;
  stroke-width: 2.4 !important;
}

.imported-lesson-page #more-cats#more-cats .section-heading > a::after,
  .imported-lesson-page #more-kids#more-kids .section-heading > a::after{
  content: none !important;
  display: none !important;
}

.imported-lesson-page #more-cats#more-cats .section-heading h2::before,
  .imported-lesson-page #more-kids#more-kids .section-heading h2::before{
  flex-basis: 40px !important;
  width: 40px !important;
  height: 40px !important;
  background-size: 58% 58% !important;
}

#top-today.discovery-section .section-heading > .all-link,
  #new-lessons.discovery-section .section-heading > .all-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 18px;
  border: 1px solid #ff6745;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #ff6745;
  font-size: 18px;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

#top-today.discovery-section .section-heading > .all-link:hover,
  #new-lessons.discovery-section .section-heading > .all-link:hover{
  background: #ff6745;
  color: #fff;
}

#top-today.discovery-section .section-heading > .all-link .icon,
  #new-lessons.discovery-section .section-heading > .all-link .icon{
  width: 20px;
  height: 20px;
  color: currentColor;
}

@media (max-width: 1150px) {
  .related-lesson-cards .lesson-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .related-lesson-cards .lesson-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .imported-lesson-page #more-cats#more-cats .section-heading h2::before,
  .imported-lesson-page #more-kids#more-kids .section-heading h2::before{
    flex-basis: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  .related-lesson-card .lesson-card-metrics{
    gap: 5px !important;
  }

  .related-lesson-card .lesson-card-metric{
    gap: 2px !important;
    font-size: 12px !important;
  }

  .related-lesson-card .lesson-card-metric > .icon{
    flex-basis: 18px !important;
    width: 18px !important;
    height: 18px !important;
  }

  .related-lesson-card .card-arrow{
    display: none !important;
  }

  #top-today.discovery-section .section-heading > .all-link,
  #new-lessons.discovery-section .section-heading > .all-link{
    min-height: 38px;
    padding: 6px 12px;
    font-size: 14px;
  }
}
#top-today.discovery-section,
  #new-lessons.discovery-section{
  margin-top: 24px;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: 20px;
}

#top-today.discovery-section{
  border-color: #f1dfb7;
  background: linear-gradient(125deg, #fff9e9 0%, #fff3d7 100%);
}

#new-lessons.discovery-section{
  border-color: #e5ddf6;
  background: linear-gradient(125deg, #f8f5ff 0%, #f1edfc 100%);
}

#top-today .ranked-lesson,
  #new-lessons .new-lesson-card{
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 12px rgba(30, 55, 88, .04);
}

#top-today .ranked-lesson{
  border-color: #f1e5cc;
}

#new-lessons .new-lesson-card{
  border-color: #e8e1f5;
}

@media (max-width: 760px) {
  #top-today.discovery-section,
  #new-lessons.discovery-section{
    margin-top: 18px;
    padding: 12px;
    border-radius: 16px;
  }

  #top-today .ranked-lesson,
  #new-lessons .new-lesson-card{
    border-radius: 14px;
  }
}

/* Cat lesson choice panel styled to match the supplied reference. */
.imported-lesson .variant-picker {
  margin-bottom: 26px;
  padding: 20px 22px 22px;
  border: 1px solid #f7dfca;
  border-radius: 24px;
  background: linear-gradient(125deg, #fff8f1 0%, #fff2e7 100%);
  box-shadow: 0 5px 20px rgba(132, 70, 36, .045);
}

.imported-lesson .variant-picker h2 {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 0 14px;
  min-height: 48px;
  margin: 0;
  color: var(--ink, #111b45);
  line-height: 1.08;
  text-align: left;
}

.imported-lesson .variant-picker h2::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 60px;
  height: 48px;
  background: url("./assets/cat-pencil-header.png") center / 100% 100% no-repeat;
}

.imported-lesson .variant-picker-title {
  grid-column: 2;
  grid-row: 1;
  display: block;
  min-width: 0;
}

.imported-lesson .variant-picker-title::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 48px;
  margin-left: 8px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 52' fill='none' stroke='%23f28a59' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M9 14 19 4M20 24l12-3M15 37l13 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.imported-lesson .variant-picker-hint {
  margin: -1px 48px 18px 74px;
  color: #586983;
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.35;
}

.imported-lesson .variant-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.imported-lesson .variant-choice {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  min-height: 94px;
  padding: 8px 6px;
  border: 1px solid #f8e0cc;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(110, 61, 36, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.imported-lesson .variant-choice:hover {
  border-color: #f5bd92;
  box-shadow: 0 5px 16px rgba(110, 61, 36, .09);
  transform: translateY(-1px);
}

.imported-lesson .variant-choice:focus-visible {
  outline: 3px solid rgba(239, 91, 53, .28);
  outline-offset: 2px;
}

.imported-lesson .variant-choice[aria-current="true"] {
  border-color: #f2a36f;
  box-shadow: 0 0 0 2px rgba(239, 130, 77, .12);
}

.imported-lesson .variant-choice img {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block;
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  clip-path: inset(0 round 12px);
  background: transparent;
}

.imported-lesson .variant-choice h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  margin: 0;
  color: var(--ink, #111b45);
  line-height: 1.15;
  text-align: left;
  overflow-wrap: anywhere;
}

.imported-lesson .choice-cta {
  grid-column: 2;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 20px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #ef5b35;
  font-size: 14px;
  line-height: 1;
}

.imported-lesson .choice-cta > .icon {
  width: 14px;
  height: 14px;
  color: currentColor;
}

.imported-lesson .variant-choice-video {
  border-color: #eadbff;
  background: #fcf9ff;
  box-shadow: 0 4px 14px rgb(103 56 155 / 6%);
}

.imported-lesson .variant-choice-video:hover {
  border-color: #d8c0ff;
  box-shadow: 0 5px 16px rgb(103 56 155 / 12%);
}

.imported-lesson .variant-choice-video[aria-current="true"] {
  border-color: #c9a5ff;
  box-shadow: 0 0 0 2px rgb(137 56 232 / 12%);
}

.imported-lesson .variant-choice-video .choice-cta {
  justify-self: start;
  gap: 5px;
  min-height: 20px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #812fe4;
  font-weight: 600;
  transition: color .18s ease;
}

.imported-lesson .variant-choice-video:hover .choice-cta {
  background: none;
  color: #7024d2;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .imported-lesson .variant-picker {
    padding: 16px;
  }

  .imported-lesson .variant-picker h2 {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 42px;
  }

  .imported-lesson .variant-picker h2::before {
    width: 50px;
    height: 42px;
  }

  .imported-lesson .variant-picker-title::after {
    width: 28px;
    height: 40px;
  }

  .imported-lesson .variant-picker-hint {
    margin-left: 64px;
  }

  .imported-lesson .variant-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (min-width: 761px) and (max-width: 900px) {
  .imported-lesson-page .header-inner {
    gap: 12px;
    min-height: 54px;
  }

  .imported-lesson-page .header-inner > .logo {
    gap: 5px;
    font-size: 21px;
    letter-spacing: -.7px;
  }

  .imported-lesson-page .header-inner > .logo > .icon {
    width: 23px;
    height: 23px;
  }

  .imported-lesson-page .catalog-button {
    gap: 6px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .imported-lesson-page .header-search {
    min-width: 0;
    gap: 8px;
    padding-inline: 9px;
  }

  .imported-lesson-page .header-search > .icon {
    width: 18px;
    height: 18px;
  }

  .imported-lesson-page .header-search > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .imported-lesson-page .add-lesson,
  .imported-lesson-page .login {
    gap: 5px;
    font-size: 14px;
  }

  .imported-lesson-page .add-lesson > .icon,
  .imported-lesson-page .login > .icon {
    width: 19px;
    height: 19px;
  }

  .imported-lesson-page .login-avatar-wrap {
    flex-basis: 19px;
    width: 19px;
    height: 19px;
  }

  .imported-lesson-page .lesson-variant:not([open]) > .variant-summary {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 6px 10px;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-basis: 94px;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-thumb > img {
    height: 76px;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-subtitle {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-action {
    grid-column: 3;
    grid-row: 1 / 3;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .imported-lesson-page .lesson-variant:not([open]) .variant-action > .icon {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 760px) {
  .imported-lesson .variant-picker {
    margin: 18px 0 22px;
    padding: 13px;
    border-radius: 18px;
  }

  .imported-lesson .variant-picker h2 {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0 8px;
    min-height: 38px;
  }

  .imported-lesson .variant-picker h2::before {
    width: 44px;
    height: 38px;
  }

  .imported-lesson .variant-picker-title::after {
    width: 24px;
    height: 32px;
  }

  .imported-lesson .variant-picker-hint {
    margin: 0 0 13px 52px;
    font-size: 15px;
  }

  .imported-lesson .variant-choices {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(230px, 74vw);
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 2px 2px 10px;
  }

  .imported-lesson .variant-choices > li {
    min-width: 0;
    scroll-snap-align: start;
  }

}

/* Closed lesson rows follow the warm lesson-picker design. */
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #ffddc8;
  border-radius: 20px;
  background: #fffdfa;
  box-shadow: 0 4px 14px rgb(139 73 38 / 6%);
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) {
  border-color: #eadbff;
  background: #fcf9ff;
  box-shadow: 0 4px 14px rgb(103 56 155 / 6%);
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) > .variant-summary {
  display: grid;
  grid-template-columns: 210px 64px minmax(0, 1fr) auto;
  grid-template-rows: minmax(62px, auto) auto;
  align-items: center;
  gap: 8px 22px;
  min-height: 166px;
  padding: 12px 20px;
  box-sizing: border-box;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-thumb {
  position: relative;
  display: block;
  grid-column: 1;
  grid-row: 1 / 3;
  width: 210px;
  height: 142px;
  overflow: hidden;
  border-radius: 15px;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-thumb > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  border: 0;
  border-radius: 15px;
  object-fit: contain;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-number {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: #ffeadc;
    color: #e65327;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-number {
  background: #efe3ff;
  color: #8938e8;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-title {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  margin: 10px 0 0 0;
  color: #111d49;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) > .variant-summary:hover .variant-title {
  color: #111d49;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-subtitle {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 22px;
  min-width: 0;
  margin: 0;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count,
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b6284;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count > .icon,
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count > .icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: #4b6284;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count {
  margin-inline-start: 0;
  padding-inline-start: 20px;
  border-inline-start: 1px solid #ffddc8;
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-steps-count {
  border-inline-start-color: #eadbff;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4b6284;
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label > .icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: #4b6284;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action {
    grid-column: 4;
    grid-row: 1 / 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60px;
    padding: 0 25px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, #f16a38, #df4e22);
    box-shadow: 0 5px 12px rgb(204 77 35 / 15%);
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action:hover {
  background: linear-gradient(120deg, #e85d2d, #cc431b);
}
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action > .icon {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-action {
  background: linear-gradient(120deg, #a743f5, #812fe4);
  box-shadow: 0 5px 12px rgb(128 47 228 / 16%);
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-action:hover {
  background: linear-gradient(120deg, #9635e9, #7024d2);
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-thumb::before {
  position: absolute;
  z-index: 1;
  bottom: 7px;
  left: 7px;
  width: 54px;
  height: 54px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #8d35ec;
  box-shadow: 0 2px 7px rgb(41 22 64 / 28%);
  content: "";
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-thumb::after {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 29px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #fff;
  content: "";
}
@media (min-width: 761px) and (max-width: 1100px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) > .variant-summary {
    grid-template-columns: 142px 52px minmax(0, 1fr) auto;
    min-height: 136px;
    gap: 7px 14px;
    padding: 10px 12px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-thumb { width: 142px; height: 104px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-number { width: 52px; height: 52px; font-size: 31px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-subtitle { gap: 4px 12px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label { font-size: 16px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count > .icon,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count > .icon,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label > .icon { flex-basis: 25px; width: 25px; height: 25px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count { padding-inline-start: 11px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action { min-height: 58px; padding-inline: 17px; font-size: 18px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action > .icon { flex-basis: 21px; width: 21px; height: 21px; }
}

@media (max-width: 760px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) > .variant-summary {
    grid-template-columns: 56px 36px minmax(0, 1fr) 32px;
    grid-template-rows: auto auto;
    min-height: 0;
    gap: 5px 8px;
    padding: 9px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-thumb { width: 56px; height: 56px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-number { width: 36px; height: 36px; font-size: 22px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-title {
    align-self: start;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-subtitle { gap: 4px 8px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label { gap: 4px; font-size: 13px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-reaction-count > .icon,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count > .icon,
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-media-label > .icon { flex-basis: 19px; width: 19px; height: 19px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-steps-count { padding-inline-start: 7px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action {
    width: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action > .icon { width: 18px; height: 18px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-thumb::before { bottom: 3px; left: 3px; width: 26px; height: 26px; border-width: 2px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant-video:not([open]) .variant-thumb::after { bottom: 12px; left: 14px; border-top-width: 6px; border-bottom-width: 6px; border-left-width: 9px; }
}

@media (max-width: 380px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) > .variant-summary {
    grid-template-columns: 48px 30px minmax(0, 1fr) 30px;
    gap: 5px 6px;
    padding: 8px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-thumb { width: 48px; height: 48px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-number { width: 30px; height: 30px; font-size: 19px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action { width: 30px; min-height: 30px; }
}

/* Expanded lessons use the same peach header surface as the closed number badges. */
.imported-lesson-page .lesson-tutorials .lesson-variant[open] {
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid #ffddc8;
  border-radius: 20px;
  background: #fff;
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video[open] { border-color: #eadbff; }
.imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid #ffddc8;
  border-radius: 19px 19px 0 0;
  background: #ffeadc;
  box-sizing: border-box;
}
.imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary > .variant-thumb,
.imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary > .variant-subtitle { display: none; }
.imported-lesson-page .lesson-tutorials .lesson-variant-video[open] > .variant-summary { border-bottom-color: #eadbff; }
.imported-lesson-page .lesson-tutorials .lesson-variant:not([open]) .variant-action .when-open { display: none; }
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action .when-closed { display: none; }
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-number {
      display: grid;
    grid-column: 1;
    grid-row: 1;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: #e65327;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.imported-lesson-page .lesson-tutorials .lesson-variant-video[open] .variant-number { background: #8938e8; }
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-title {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  margin: 0;
  color: #111d49;
}
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  min-height: 58px;
  padding: 10px 18px;
  border: 1px solid #e65327;
  border-radius: 999px;
  background: transparent;
  color: #d94c23;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action > .icon { flex: 0 0 24px; width: 24px; height: 24px; }
.imported-lesson-page .lesson-tutorials .lesson-variant-video[open] .variant-action { border-color: #8938e8; color: #8938e8; }
.imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action > .icon { transform: rotate(180deg); }
.imported-lesson-page .lesson-tutorials .drawing-step .step-number {
  background: #e65327;
  color: #fff;
  font-weight: 700;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 12px 14px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-number { width: 52px; height: 52px; font-size: 31px; }
}

@media (max-width: 760px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-number { width: 36px; height: 36px; font-size: 22px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action { width: auto; min-width: 0; min-height: 34px; gap: 3px; padding: 6px 9px; font-size: 14px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action > .icon { width: 18px; height: 18px; }
}

@media (max-width: 380px) {
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] > .variant-summary {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px;
  }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-number { width: 30px; height: 30px; font-size: 19px; }
  .imported-lesson-page .lesson-tutorials .lesson-variant[open] .variant-action { width: auto; min-height: 32px; padding: 5px 7px; font-size: 13px; }
}

/* Expanded drawing steps use a two-column card grid with fixed circular numbers. */
.imported-lesson-page .lesson-tutorials .drawing-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.imported-lesson-page .lesson-tutorials .drawing-step {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffddc8;
  border-radius: 18px;
  background: #fff;
  box-sizing: border-box;
      margin: 10px;
}
.imported-lesson-page .lesson-tutorials .drawing-step .step-number {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 22px;
  display: grid;
  flex: 0 0 58px;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: #e65327;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}
.imported-lesson-page .lesson-tutorials .drawing-step .step-copy { margin: 16px 18px 14px 98px; }

@media (max-width: 760px) {
  .imported-lesson-page .lesson-tutorials .drawing-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .imported-lesson-page .lesson-tutorials .drawing-step .step-number {
    top: 12px;
    left: 12px;
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: 26px;
  }
  .imported-lesson-page .lesson-tutorials .drawing-step .step-copy { margin: 12px 14px 12px 66px; }
}

/* Smaller, consistent type scale for phones; desktop typography stays unchanged. */
@media (max-width: 760px) {
  :root {
      --heading-h1-size: clamp(26px, 8.2vw, 26px);
      --heading-h2-size: clamp(21px, 6vw, 21px);
      --heading-h3-size: clamp(15px, 4vw, 16px);
  }

  h1 { font-size: var(--heading-h1-size); }
  h2 { font-size: var(--heading-h2-size); }
  h3 { font-size: var(--heading-h3-size); }

  body { font-size: 15px; }
  .header-inner > .logo { font-size: 22px; }
  .site-footer .logo { font-size: 20px; }
  .mobile-menu-header .logo { font-size: 25px; }
  .hero-description,
  .imported-lesson .hero-description,
  .feedback-intro,
  .source-lesson-intro { font-size: 15px; line-height: 1.4; }
  .age-links a { font-size: 15px; }
  .kids-all,
  .feedback-submit { font-size: 15px; }
  .source-materials p,
  .source-materials ul,
  .source-author,
  .source-video-link,
  .source-original figcaption { font-size: 15px; }
  .lesson-comments-heading p,
  .lesson-comment-text,
  .feedback-comment-content > p,
  .comment-body p,
  .panel-title p { font-size: 15px; }
  .comment-action.reply-toggle { font-size: 16px; }
  .show-all-comments { font-size: 15px; }
  .community-discovery .all-link,
  .users-panel > .section-heading > .all-link { font-size: 15px; }
  .user-name { font-size: 16px; }
  .feedback-intro { max-width: 100%; }

  .menu-column-title { font-size: 20px; }
  .menu-category { font-size: 18px; }
  .menu-actions > a { font-size: 16px; }
  .menu-back { font-size: 19px; }
  .animal-heading .all-link { font-size: 17px; }
  .domestic-summary,
  .extra-branch > summary,
  .cats-branch > summary,
  .who-column .menu-row,
  .large-column .menu-row { font-size: 19px; }
  .menu-row { font-size: 17px; }
  .tree a { font-size: 16px; }
  .extra-grid .menu-row,
  .category-menu-all { font-size: 16px; }
  .category-search input { font-size: 16px; }
  .no-results { font-size: 16px; }
}

/* Authenticated user profile, built from the shared lesson page shell. */
.profile-page .profile-content { max-width: var(--content); }
.profile-page .profile-page-heading {
  margin: 0 0 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #ffdfc8;
  border-radius: 20px;
  background: linear-gradient(120deg, #fff7ef, #fffdf9 72%);
}
.profile-page .profile-page-heading .breadcrumbs { margin-bottom: 18px; }
.profile-page .profile-title-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-page .profile-avatar {
  display: block;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgb(123 67 42 / 12%);
  object-fit: cover;
}
.profile-page .profile-avatar-link { display: block; flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; }
.profile-page .profile-avatar-link:focus-visible { outline: 3px solid rgb(145 64 32 / 30%); outline-offset: 3px; }
.profile-page .profile-avatar-link .profile-avatar { width: 100%; height: 100%; flex: none; }
.profile-page .profile-title-copy { min-width: 0; }
.profile-page .profile-eyebrow { margin: 0 0 3px; color: var(--rust); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.profile-page .profile-title-copy h1 { max-width: 100%; margin: 0; padding: 0; letter-spacing: -.8px; overflow-wrap: anywhere; }
.profile-page .profile-handle { margin-top: 4px; color: #6e7b94; font-size: 16px; }
.profile-page .profile-handle-link { display: inline-block; text-decoration: none; }
.profile-page .profile-handle-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.profile-page .profile-about { margin-top: 18px; padding-top: 15px; border-top: 1px solid #f0dfcf; }
.profile-page .profile-about h2 { margin: 0 0 9px; color: var(--ink); }
.profile-page .profile-score {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
  gap: 1px;
  margin-left: auto;
  width: 140px;
  padding: 11px 18px;
  border: 1px solid #ffd7ba;
  border-radius: 15px;
  background: #fff;
  color: #8e4226;
}
.profile-page .profile-score span { font-size: 13px; }
.profile-page .profile-score strong { font-size: 22px; line-height: 1.1; }
.profile-page .profile-layout { display: grid; grid-template-columns: minmax(220px, 265px) minmax(0, 1fr); align-items: start; gap: 18px; }
.profile-page .profile-sidebar,
.profile-page .profile-main { display: grid; min-width: 0; gap: 16px; align-content: start; }
.profile-page .profile-sidebar { position: sticky; top: 16px; align-self: start; z-index: 5; }
.profile-page .profile-menu,
.profile-page .profile-gallery {
  min-width: 0;
  padding: 17px;
  border: 1px solid #f0dfcf;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(88 57 36 / 4%);
}
.profile-page .profile-menu h2,
.profile-page .profile-gallery-heading h2 { margin: 0; color: var(--ink); }
.profile-page .profile-menu h2 { margin-bottom: 12px; }
.profile-page .profile-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 18px; margin: 0; }
.profile-page .profile-facts div { display: grid; min-width: 0; gap: 2px; }
.profile-page .profile-facts > div { align-self: start; align-content: start; }
.profile-page .profile-facts dt { color: #75819a; }
.profile-page .profile-facts dd { margin: 0; color: #293a61; font-weight: 600; overflow-wrap: anywhere; }
.profile-page .profile-about-copy { line-height: 1.45; overflow-wrap: anywhere; }
.profile-page .profile-about-copy.is-collapsed { max-height: calc(1.45em * 4); overflow: hidden; }
.profile-page .profile-about-toggle { margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--rust); font: inherit; font-weight: 700; cursor: pointer; }
.profile-page .profile-about-toggle:hover { text-decoration: underline; text-underline-offset: 2px; }
.profile-page .profile-gallery { padding: 16px; }
.profile-page .profile-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.profile-page .profile-gallery-heading-main { display: grid; gap: 4px; min-width: 0; }
.profile-page .profile-gallery-kicker { margin: 0; color: var(--rust); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.profile-page .profile-gallery-intro { margin: 0; color: #67748e; font-size: 14px; line-height: 1.45; }
.profile-page .profile-gallery-count { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; background: #fff2e4; color: #914020; font-size: 13px; font-weight: 700; }
.profile-page .profile-gallery-link { text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.profile-page .profile-gallery-link:hover { background: #ffe8d7; color: #a34225; text-decoration: underline; text-underline-offset: 2px; }
.profile-page .profile-gallery-link:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-page #more-cats .profile-all-count { display: inline-grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; border-radius: 999px; background: #fff0e6; color: #d84f2b; font-size: 13px; font-weight: 700; line-height: 1; }
.profile-page .profile-artwork-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-page .profile-artwork-grid > li { flex: 0 0 clamp(52px, 7vw, 72px); width: clamp(52px, 7vw, 72px); aspect-ratio: 1; overflow: hidden; border: 1px solid #eee1d5; border-radius: 11px; background: #fffdfa; }
.profile-page .profile-artwork-grid > li[hidden] { display: none !important; }
.profile-page .profile-artwork-grid img { display: block; width: 100%; height: 100%; padding: 4px; object-fit: contain; }

@media (max-width: 760px) {
  .profile-page .profile-page-heading { margin-bottom: 14px; padding: 15px; border-radius: 16px; }
  .profile-page .profile-page-heading .breadcrumbs { margin-bottom: 13px; }
  .profile-page .profile-title-row { flex-wrap: wrap; gap: 12px; }
  .profile-page .profile-avatar-link { flex-basis: 62px; width: 62px; height: 62px; }
  .profile-page .profile-avatar { width: 100%; height: 100%; border-width: 3px; }
  .profile-page .profile-title-copy { flex: 1 1 calc(100% - 78px); }
  .profile-page .profile-title-copy h1 { letter-spacing: -.3px; }
  .profile-page .profile-eyebrow { font-size: 12px; }
  .profile-page .profile-handle { font-size: 14px; }
  .profile-page .profile-score { grid-column: 2; justify-items: start; gap: 0 6px; display: flex; flex-wrap: nowrap; width: max-content; max-width: calc(100% - 74px); margin-left: 74px; padding: 6px 10px; white-space: nowrap; }
  .profile-page .profile-score > * { flex: 0 0 auto; }
  .profile-page .profile-score strong { font-size: 16px; white-space: nowrap; }
  .profile-page .profile-about { margin-top: 13px; padding-top: 12px; }
  .profile-page .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .profile-page .profile-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .profile-page .profile-sidebar,
  .profile-page .profile-main { gap: 12px; }
  .profile-page .profile-sidebar { top: 8px; z-index: 10; }
  .profile-page .profile-menu,
  .profile-page .profile-gallery { padding: 13px; border-radius: 13px; }
  .profile-page .profile-menu h2 { margin-bottom: 9px; }
  .profile-page .profile-facts { gap: 8px; }
  .profile-page .profile-artwork-grid { gap: 6px; }
  .profile-page .profile-artwork-grid > li { flex-basis: clamp(52px, 10vw, 64px); width: clamp(52px, 10vw, 64px); border-radius: 9px; }
  .profile-page .profile-gallery-empty { flex: 0 0 auto !important; width: max-content !important; max-width: 100%; overflow: visible !important; }
  .profile-page .profile-gallery-heading { margin-bottom: 9px; }
}
@media (max-width: 380px) {
  .profile-page .profile-facts { grid-template-columns: minmax(0, 1fr); }
  .profile-page .profile-gallery-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .profile-page .profile-artwork-grid > li { flex-basis: 52px; width: 52px; }
}

/* Account entry forms and data-backed user profiles. */
.account-entry-page { padding-bottom: 28px; }
.account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0 26px; }
.account-form-card { min-width: 0; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 5px 20px rgb(40 54 83 / 6%); }
.account-form-card h2 { margin: 0 0 6px; color: var(--ink); }
.account-form-card > p { margin: 0 0 14px; color: #65718a; }
.account-form { display: grid; gap: 9px; margin-top: 18px; }
.account-form label { margin-top: 5px; color: var(--ink); font-weight: 700; }
.account-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #ccd4df; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.account-form input:focus { border-color: var(--red); outline: 3px solid rgb(229 43 18 / 14%); }
.account-submit { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; margin-top: 10px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.account-submit:hover { filter: brightness(.94); }
.account-field-hint { color: #6d7890; font-size: 13px; line-height: 1.4; }
.account-field-error, .account-form-error { color: #a52e21; }
.account-field-error { font-size: 13px; }
.account-form-error, .account-notice { margin: 0 0 12px; padding: 11px 13px; border: 1px solid #f0bdb5; border-radius: 9px; background: #fff4f1; }
.account-notice { border-color: #bdddcf; background: #f0faf5; color: #275d45; }
@media (max-width: 760px) { .account-form-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.profile-page .profile-artwork-grid > li { position: relative; }
.profile-page .profile-artwork-grid > li > a { display: grid; width: 100%; height: 100%; place-items: center; }
.profile-page .profile-artwork-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #bd7655; background: #fff8f1; }
.profile-page .profile-gallery-empty { width: auto !important; height: auto; min-height: 52px; aspect-ratio: auto; display: flex; align-items: center; padding: 8px 4px; border: 0 !important; background: transparent !important; color: #6d7890; font-size: 14px; white-space: nowrap; }
.profile-page .profile-main > .profile-gallery.is-empty { align-self: start !important; height: max-content !important; min-height: 0 !important; }
.profile-page .profile-gallery.is-empty > .profile-artwork-grid { align-self: start; height: auto !important; min-height: 0 !important; align-content: flex-start; }
.profile-page .profile-empty-state { margin: 0; padding: 16px; border-radius: 10px; background: #fffaf5; color: #68748d; }
.profile-page .profile-lesson-grid { margin-top: 14px; }
.profile-page .profile-lesson-placeholder { display: grid; min-height: 140px; place-items: center; background: #fff8f1; color: #bd7655; }
.profile-page .profile-own-lessons-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.profile-page .profile-own-lessons-list > .section-heading { margin-bottom: 14px; }
.profile-page .profile-logout-form { margin: 0; }
.profile-page .profile-action-logout { width: 100%; border: 0; background: transparent; color: #9c3d28; font: inherit; text-align: left; cursor: pointer; }

/* Account actions replace the section shortcuts in the profile sidebar. */
.profile-page .profile-actions {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-page .profile-actions li { min-width: 0; }
.profile-page .profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #edddce;
  border-radius: 11px;
  background: #fff;
  color: #344669;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.profile-page .profile-action > span:not(.profile-action-count) { flex: 1 1 auto; min-width: 0; }
.profile-page .profile-action .icon { flex: 0 0 20px; width: 20px; height: 20px; }
.profile-page .profile-action:hover { transform: translateY(-1px); border-color: #efb899; background: #fff8f2; color: #a34225; }
.profile-page .profile-action[aria-disabled="true"] { cursor: not-allowed; opacity: .58; }
.profile-page .profile-action-count { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #fff2e4; color: #8e4226; font-size: 12px; font-weight: 700; }
.profile-page .profile-action-primary { border-color: #df542e; background: linear-gradient(145deg, #f26d3e, #dc4d25); color: #fff; }
.profile-page .profile-action-primary:hover { border-color: #c94220; background: linear-gradient(145deg, #e85d32, #c94220); color: #fff; }
.profile-page .profile-action-logout { border-color: #f0cbbb; background: #fffaf7; color: #aa482f; }
.profile-page .profile-action:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-page .profile-friend-toggle-form { margin: 0; }
.profile-page button.profile-action { font-family: inherit; text-align: left; cursor: pointer; }
.profile-page button.profile-action:disabled { cursor: wait; opacity: .65; }
.profile-page .profile-friend-action-status { display: block; margin: 5px 2px 0; color: #a34225; font-size: 12px; line-height: 1.35; }
.profile-page .profile-friend-action-status:empty { display: none; }

/* Shared heading scale for profile and other user-only pages. */
.user-internal-page h1 { font-size: 24px; }
.user-internal-page h2 { font-size: 21px; }
.user-internal-page h3 { font-size: 18px; }

@media (max-width: 760px) {
  .profile-page .profile-sidebar { position: static; top: auto; }
  .profile-page .profile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-page .profile-actions li:nth-child(1),
  .profile-page .profile-actions li:nth-child(8) { grid-column: 1 / -1; }
  .profile-page .profile-action { min-height: 40px; padding: 8px 9px; border-radius: 10px; font-size: 14px; }
  .profile-page .profile-own-lessons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    padding: 0;
  }
}
@media (max-width: 380px) {
  .profile-page .profile-actions { grid-template-columns: minmax(0, 1fr); }
  .profile-page .profile-actions li:nth-child(1),
  .profile-page .profile-actions li:nth-child(8) { grid-column: auto; }
}

/* User profile editing page. */
.profile-edit-page .profile-action-edit.is-active { border-color: #e9a27e; background: #fff3eb; color: #a34225; font-weight: 700; }
.profile-edit-page .profile-edit-return { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 10px 13px; border: 1px solid #f0cbbb; border-radius: 999px; background: #fffaf7; color: #a34225; font-size: 14px; font-weight: 700; text-decoration: none; }
.profile-edit-page .profile-edit-return:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-edit-page .profile-edit-return:focus-visible,
.profile-edit-page .profile-edit-upload:focus-visible,
.profile-edit-page .profile-edit-submit:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-edit-page .profile-edit-main { gap: 16px; }
.profile-edit-page .profile-edit-card { padding: 20px; }
.profile-edit-page .profile-edit-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.profile-edit-page .profile-edit-kicker { margin: 0 0 4px; color: var(--rust); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.profile-edit-page .profile-edit-card-heading h2 { margin: 0; color: var(--ink); }
.profile-edit-page .profile-edit-photo { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding: 14px; border: 1px solid #f5e3d4; border-radius: 14px; background: #fffaf5; }
.profile-edit-page .profile-edit-photo-preview { flex: 0 0 104px; width: 104px; height: 104px; border: 1px solid #eee1d5; border-radius: 14px; background: #fff; object-fit: cover; }
.profile-edit-page .profile-edit-photo-copy { display: grid; justify-items: start; gap: 7px; min-width: 0; }
.profile-edit-page .profile-edit-photo-copy h3 { margin: 0; color: var(--ink); }
.profile-edit-page .profile-edit-photo-copy p { margin: 0 0 3px; color: #67748e; font-size: 14px; line-height: 1.45; }
.profile-edit-page .profile-edit-upload { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 13px; border: 1px solid #f1c5ad; border-radius: 10px; background: #fff; color: #a34225; cursor: pointer; font-size: 14px; font-weight: 700; }
.profile-edit-page .profile-edit-upload:hover { border-color: #df7950; background: #fff4eb; }
.profile-edit-page .profile-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.profile-edit-page .profile-edit-field { display: grid; gap: 7px; min-width: 0; color: #394966; font-size: 14px; font-weight: 650; }
.profile-edit-page .profile-edit-field input,
.profile-edit-page .profile-edit-field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #e6e1da; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; }
.profile-edit-page .profile-edit-field textarea { min-height: 122px; resize: vertical; line-height: 1.5; }
.profile-edit-page .profile-edit-field input:focus,
.profile-edit-page .profile-edit-field textarea:focus { border-color: #df7950; outline: 3px solid rgb(223 121 80 / 15%); }
.profile-edit-page .profile-edit-field-wide { grid-column: 1 / -1; }
.profile-edit-page .profile-edit-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.profile-edit-page .profile-edit-status { min-height: 1.35em; margin: 0; color: #8e4226; font-size: 13px; line-height: 1.35; }
.profile-edit-page .profile-edit-status-success { margin: 0 0 15px; padding: 11px 13px; border: 1px solid #aad9b3; border-radius: 10px; background: #f0fbf1; color: #267344; font-size: 15px; }
.profile-edit-page .profile-edit-status-error { margin: 0 0 15px; padding: 11px 13px; border: 1px solid #edb9a9; border-radius: 10px; background: #fff4f0; color: #a33422; font-size: 14px; }
.profile-edit-page .profile-edit-account-locked { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #f1e1d3; border-radius: 12px; background: #fffaf5; }
.profile-edit-page .profile-edit-account-locked > div { display: grid; gap: 4px; min-width: 0; }
.profile-edit-page .profile-edit-account-locked span { color: #71809a; font-size: 12px; }
.profile-edit-page .profile-edit-account-locked strong { overflow-wrap: anywhere; color: var(--ink); font-size: 14px; }
.profile-edit-page .profile-edit-account-locked > p { grid-column: 1 / -1; margin: 0; color: #71809a; font-size: 13px; }
.profile-edit-page .profile-edit-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #dc4d25; border-radius: 11px; background: linear-gradient(145deg, #f26d3e, #dc4d25); color: #fff; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; }
.profile-edit-page .profile-edit-submit:hover { border-color: #c94220; background: linear-gradient(145deg, #e85d32, #c94220); }
.profile-edit-page .profile-edit-submit-secondary { border-color: #f0cbbb; background: #fffaf7; color: #a34225; }
.profile-edit-page .profile-edit-submit-secondary:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-edit-page .profile-password-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .profile-edit-page .profile-edit-card { padding: 14px; }
  .profile-edit-page .profile-edit-return { flex-basis: max-content; margin-left: 74px; }
  .profile-edit-page .profile-edit-fields,
  .profile-edit-page .profile-password-fields { grid-template-columns: minmax(0, 1fr); }
  .profile-edit-page .profile-edit-field-wide { grid-column: auto; }
  .profile-edit-page .profile-edit-form-footer { align-items: stretch; flex-direction: column; gap: 8px; }
  .profile-edit-page .profile-edit-submit { width: 100%; }
  .profile-edit-page .profile-edit-photo { gap: 12px; padding: 11px; }
}
@media (max-width: 380px) {
  .profile-edit-page .profile-edit-photo { align-items: flex-start; flex-direction: column; }
  .profile-edit-page .profile-edit-account-locked { grid-template-columns: minmax(0, 1fr); }
  .profile-edit-page .profile-edit-photo-preview { flex-basis: 84px; width: 84px; height: 84px; }
}

/* Profile inbox page */
.profile-messages-page .profile-message-list { margin: 0; padding: 0; list-style: none; }
.profile-messages-page .profile-message-item + .profile-message-item { border-top: 1px solid #f2e8dd; }
.profile-messages-page .profile-message-item > a { display: grid; grid-template-columns: 56px minmax(0, 1fr) 20px; align-items: center; gap: 14px; min-width: 0; padding: 14px 20px; color: inherit; text-decoration: none; transition: background-color .15s ease; }
.profile-messages-page .profile-message-item > a:hover { background: #fffaf5; }
.profile-messages-page .profile-message-item > a:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: -3px; }
.profile-messages-page .profile-message-avatar { display: block; width: 56px; height: 56px; border: 1px solid #eee1d5; border-radius: 14px; background: #fff8f1; object-fit: cover; }
.profile-messages-page .profile-message-copy { display: grid; gap: 5px; min-width: 0; }
.profile-messages-page .profile-message-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.profile-messages-page .profile-message-meta strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; text-overflow: ellipsis; }
.profile-messages-page .profile-message-meta time { flex: 0 0 auto; color: #7b8494; font-size: 12px; }
.profile-messages-page .profile-message-preview { display: -webkit-box; overflow: hidden; color: #55647d; font-size: 14px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.profile-messages-page .profile-message-arrow { color: #a8afba; }
.profile-messages-page .profile-messages-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid #f2e8dd; background: #fffaf6; }
.profile-messages-page .profile-messages-footer p { margin: 0; color: #67748e; font-size: 13px; }
.profile-messages-page .profile-messages-footer a { display: inline-flex; align-items: center; gap: 7px; color: #a34225; font-size: 14px; font-weight: 700; text-decoration: none; }
.profile-messages-page .profile-messages-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.profile-messages-page .profile-messages-footer a:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 760px) {
  .profile-messages-page .profile-message-item > a { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; padding: 12px 14px; }
  .profile-messages-page .profile-message-avatar { width: 46px; height: 46px; border-radius: 12px; }
  .profile-messages-page .profile-message-arrow { display: none; }
  .profile-messages-page .profile-message-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .profile-messages-page .profile-messages-footer { align-items: flex-start; flex-direction: column; padding: 14px; }
}
@media (max-width: 420px) {
  .profile-messages-page .profile-message-preview { -webkit-line-clamp: 3; }
}
/* Private profile conversation, styled with the shared comment components */
.profile-chat-page .profile-chat-main { display: grid; gap: 14px; }
.profile-chat-page .profile-chat-card { margin-top: 0; }
.profile-chat-page .profile-chat-kicker { margin: 0 0 4px; color: var(--rust); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.profile-chat-page .profile-chat-back-inline { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; border: 1px solid #f0cbbb; border-radius: 999px; background: #fffaf7; color: #a34225; font-size: 13px; font-weight: 700; text-decoration: none; }
.profile-chat-page .profile-chat-back-inline:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-chat-page .profile-chat-back-inline:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-chat-page .profile-chat-transcript { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; height: calc(clamp(260px, 40vh, 420px) + 30px); margin: 0; padding: 4px 8px 4px 2px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; }
.profile-chat-page .profile-chat-transcript:focus-visible { outline: 2px solid rgb(145 64 32 / 35%); outline-offset: 2px; }
.profile-chat-page .profile-chat-message { width: min(100%, 760px); grid-template-columns: 42px minmax(0, 1fr); }
.profile-chat-page .profile-chat-message.is-own { margin-left: auto; grid-template-columns: minmax(0, 1fr) 42px; border-color: #efd6c3; background: #fff8f2; }
.profile-chat-page .profile-chat-message.is-own .profile-chat-avatar-image { grid-column: 2; grid-row: 1; }
.profile-chat-page .profile-chat-message.is-own .lesson-comment-content { grid-column: 1; grid-row: 1; }
.profile-chat-page .profile-chat-avatar-image { width: 42px; height: 42px; border: 0; object-fit: cover; }
.profile-chat-page .profile-chat-message .lesson-comment-artwork { margin-top: 10px; }
.profile-chat-page .profile-chat-message .lesson-comment-artwork img { max-height: 360px; }
.profile-chat-page .profile-chat-video-link { display: inline-flex; margin-top: 7px; color: #a34225; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.profile-chat-page .profile-chat-compose { margin: 0; }
.profile-chat-page .profile-chat-compose textarea { width: 100%; min-height: 82px; padding: 11px 12px; border: 1px solid #d9ddeb; border-radius: 9px; background: #fff; color: #17234a; font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; }
.profile-chat-page .profile-chat-compose textarea:focus { border-color: #914020; outline: 3px solid rgb(145 64 32 / 14%); }
.profile-chat-page .profile-chat-compose .lesson-comment-status:not(:empty) { margin-top: 10px; }
@media (max-width: 760px) {
  .profile-chat-page .profile-chat-card { padding: 14px; }
  .profile-chat-page .profile-chat-transcript { height: calc(clamp(240px, 42vh, 380px) + 30px); padding-right: 4px; }
  .profile-chat-page .lesson-comments-heading { align-items: flex-start; }
  .profile-chat-page .profile-chat-message { width: 100%; grid-template-columns: 36px minmax(0, 1fr); gap: 9px; padding: 12px; }
  .profile-chat-page .profile-chat-message.is-own { grid-template-columns: minmax(0, 1fr) 36px; }
  .profile-chat-page .profile-chat-avatar-image { width: 36px; height: 36px; }
  .profile-chat-page .profile-chat-back-inline { align-self: flex-start; }
  .profile-chat-page .profile-chat-compose { padding: 14px; }
  .profile-chat-page .profile-chat-compose .lesson-comment-form-footer { align-items: flex-start; }
}
@media (max-width: 480px) {
  .profile-chat-page .lesson-comments-heading { flex-direction: column; gap: 10px; }
  .profile-chat-page .profile-chat-message { padding: 10px; }
  .profile-chat-page .profile-chat-message .lesson-comment-text { font-size: 14px; }
  .profile-chat-page .profile-chat-compose .lesson-comment-form-footer { flex-direction: column; }
  .profile-chat-page .profile-chat-compose .lesson-comment-submit { width: 100%; }
}

.profile-messages-page .profile-message-item > a { grid-template-columns: 56px minmax(0, 1fr) auto 20px; }
.profile-messages-page .profile-message-item.is-unread > a { background: #fffaf6; }
.profile-messages-page .profile-message-item.is-unread .profile-message-meta strong { color: #8b321c; }
.profile-messages-page .profile-message-item.is-unread .profile-message-preview { color: var(--ink); font-weight: 600; }
.profile-messages-page .profile-message-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #a34225; color: #fff; font-size: 12px; font-weight: 700; }
.profile-messages-page .profile-messages-more { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid #f0cbbb; border-radius: 999px; background: #fffaf7; color: #a34225; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.profile-messages-page .profile-messages-more:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-messages-page .profile-messages-more:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-messages-page .profile-message-status:empty { display: none; }
.profile-chat-page .profile-chat-empty { padding: 28px 16px; color: #67748e; text-align: center; }
.profile-chat-page .profile-chat-history-status:empty { display: none; }
.profile-chat-page .profile-chat-compose form { display: grid; gap: 10px; }
.profile-chat-page .profile-chat-compose-avatar { width: 42px; height: 42px; border: 0; object-fit: cover; }
.profile-chat-page .profile-chat-compose [data-profile-chat-status]:not(:empty) { margin-top: 10px; }
.profile-chat-page .profile-chat-message .lesson-comment-artwork a { display: inline-flex; max-width: 100%; }
.profile-chat-page .profile-chat-message .lesson-comment-artwork img { cursor: zoom-in; }
.profile-chat-page .profile-chat-archived-note { margin: 0; padding: 14px 16px; border: 1px solid #f0cbbb; border-radius: 10px; background: #fffaf7; color: #67748e; line-height: 1.55; }
@media (max-width: 760px) {
  .profile-messages-page .profile-message-item > a { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .profile-messages-page .profile-message-unread { grid-column: 2; grid-row: 2; justify-self: start; }
  .profile-messages-page .profile-message-arrow { grid-column: 3; grid-row: 1 / span 2; display: block; }
}
@media (max-width: 480px) {
  .profile-messages-page .profile-message-item > a { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  .profile-messages-page .profile-message-avatar { width: 42px; height: 42px; }
  .profile-messages-page .profile-message-arrow { display: none; }
  .profile-messages-page .profile-message-unread { grid-column: 2; }
}

/* Friends list mockup for the internal profile page */
.profile-friends-page .profile-friends-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 18px; list-style: none; }
.profile-friends-page .profile-friend-card { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; min-height: 94px; padding: 11px; border: 1px solid #f1e5d9; border-radius: 13px; background: linear-gradient(135deg, #fff 0%, #fffaf5 100%); }
.profile-friends-page .profile-friend-avatar { display: block; width: 68px; height: 68px; border: 1px solid #eee1d5; border-radius: 12px; background: #fff8f1; object-fit: cover; }
.profile-friends-page .profile-friend-info { display: grid; gap: 8px; min-width: 0; padding-right: 25px; }
.profile-friends-page .profile-friend-name { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 700; text-overflow: ellipsis; }
.profile-friends-page .profile-friend-card > a { display: block; border-radius: 12px; }
.profile-friends-page .profile-friend-card > a:focus-visible,
.profile-friends-page .profile-friend-name a:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-friends-page .profile-friend-name a { color: inherit; text-decoration: none; }
.profile-friends-page .profile-friend-name a:hover { color: #a34225; text-decoration: underline; text-underline-offset: 2px; }
.profile-friends-page .profile-friend-remove-form { position: absolute; top: 6px; right: 6px; z-index: 1; margin: 0; }
.profile-friends-page .profile-friend-remove-button { position: static; width: 30px; min-height: 30px; margin: 0; padding: 4px; }
.profile-friends-page .profile-friend-remove-button:disabled { cursor: wait; opacity: .55; }
.profile-friends-page .profile-friend-status:empty { display: none; }
.profile-friends-page .profile-friend-rating { display: flex; align-items: center; gap: 5px; color: #71809a; font-size: 12px; white-space: nowrap; }
.profile-friends-page .profile-friend-rating .icon { flex: 0 0 auto; color: #e6a33e; }
.profile-friends-page .profile-friend-rating strong { color: #8e4226; font-size: 13px; }
.profile-friends-page .profile-edit-return { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 10px 13px; border: 1px solid #f0cbbb; border-radius: 999px; background: #fffaf7; color: #a34225; font-size: 14px; font-weight: 700; text-decoration: none; }
.profile-friends-page .profile-edit-return:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-friends-page .profile-edit-return:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
@media (max-width: 760px) {
  .profile-friends-page .profile-friends-grid { gap: 9px; padding: 12px; }
  .profile-friends-page .profile-friend-card { grid-template-columns: 56px minmax(0, 1fr); gap: 9px; min-height: 78px; padding: 9px; }
  .profile-friends-page .profile-friend-avatar { width: 56px; height: 56px; border-radius: 10px; }
  .profile-friends-page .profile-friend-name { font-size: 14px; }
  .profile-friends-page .profile-friend-rating { gap: 4px; font-size: 11px; }
  .profile-friends-page .profile-friend-rating strong { font-size: 12px; }
  .profile-friends-page .profile-edit-return { flex-basis: max-content; margin-left: 74px; }
}
@media (max-width: 480px) {
  .profile-friends-page .profile-friends-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Larger lesson cards for the four visible lessons on the profile */
.profile-page.imported-lesson-page #more-cats#more-cats .lesson-grid {
  --related-accent: #ff6745;
  --related-line: #ffdfcf;
  --related-icon-bg: #ffede4;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
@media (max-width: 760px) {
  .profile-page.imported-lesson-page #more-cats#more-cats .lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Keep the profile owner's name and shortcuts consistent on every profile page. */
.profile-page .profile-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.profile-page .profile-name-line h1 {
  min-width: 0;
}

.profile-page .profile-name-edit {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #f0cbbb;
  border-radius: 50%;
  background: #fffaf7;
  color: #a34225;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.profile-page .profile-name-edit:hover {
  transform: translateY(-1px);
  border-color: #e9a27e;
  background: #fff3eb;
}

.profile-page .profile-name-edit:focus-visible {
  outline: 3px solid rgb(145 64 32 / 25%);
  outline-offset: 2px;
}

.profile-page .profile-action.is-active {
  border-color: #e9a27e;
  background: #fff3eb;
  color: #a34225;
  font-weight: 700;
}

/* Add lesson page */
.profile-add-lesson-page .profile-add-lesson-main { gap: 14px; }
.profile-add-lesson-page .lesson-requirements-card,
.profile-add-lesson-page .lesson-submission-card { padding: 20px; }
.profile-add-lesson-page .lesson-requirements-card .profile-gallery-heading,
.profile-add-lesson-page .lesson-submission-card .profile-gallery-heading { margin-bottom: 16px; }
.profile-add-lesson-page .lesson-requirements-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: lesson-rule; }
.profile-add-lesson-page .lesson-requirements-list li { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px; border: 1px solid #f3e7dc; border-radius: 11px; background: #fffdfa; color: #53627b; font-size: 14px; line-height: 1.45; counter-increment: lesson-rule; }
.profile-add-lesson-page .lesson-requirements-list li::before { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #fff0e4; color: #c84e2b; content: counter(lesson-rule); font-size: 13px; font-weight: 800; line-height: 1; }
.profile-add-lesson-page .lesson-requirements-list strong { color: #344669; }
.profile-add-lesson-page .lesson-requirement-copy { display: block; min-width: 0; }
.profile-add-lesson-page .lesson-requirement-copy strong { display: block; margin-bottom: 4px; }
.profile-add-lesson-page .lesson-moderation-note { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 0; padding: 12px; border: 1px solid #f6e5d5; border-radius: 11px; background: #fffaf5; color: #6a7486; font-size: 13px; line-height: 1.45; }
.profile-add-lesson-page .lesson-moderation-note .icon { flex: 0 0 auto; color: #c85634; }
.profile-add-lesson-page .lesson-submission-form { display: grid; gap: 14px; min-width: 0; }
.profile-add-lesson-page .lesson-submission-card { min-width: 0; }
.profile-add-lesson-page .lesson-submission-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.profile-add-lesson-page .lesson-form-field { display: grid; align-content: start; gap: 7px; min-width: 0; color: #394966; font-size: 14px; font-weight: 650; }
.profile-add-lesson-page .lesson-form-field > span:first-child,
.profile-add-lesson-page .lesson-upload-title { color: #344669; font-weight: 700; }
.profile-add-lesson-page .lesson-form-field b,
.profile-add-lesson-page .lesson-upload-title > b { color: #d75432; }
.profile-add-lesson-page .lesson-form-field-wide { grid-column: 1 / -1; }
.profile-add-lesson-page .lesson-form-field input,
.profile-add-lesson-page .lesson-form-field textarea,
.profile-add-lesson-page .lesson-form-field select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #e6e1da; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; }
.profile-add-lesson-page .lesson-form-field textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.profile-add-lesson-page .lesson-form-field input:focus,
.profile-add-lesson-page .lesson-form-field textarea:focus,
.profile-add-lesson-page .lesson-form-field select:focus { border-color: #df7950; outline: 3px solid rgb(223 121 80 / 15%); }
.profile-add-lesson-page .lesson-form-field small,
.profile-add-lesson-page .lesson-upload-copy small { color: #738096; font-size: 12px; font-weight: 400; line-height: 1.45; }
.profile-add-lesson-page .lesson-upload-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; min-width: 0; padding: 13px; border: 1px solid #f0e1d3; border-radius: 12px; background: #fffdfa; }
.profile-add-lesson-page .lesson-upload-copy { display: grid; gap: 4px; min-width: 0; }
.profile-add-lesson-page .lesson-upload-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 14px; }
.profile-add-lesson-page .lesson-upload-control { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 11px; border: 1px solid #f1c5ad; border-radius: 10px; background: #fff; color: #a34225; cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; }
.profile-add-lesson-page .lesson-upload-control:hover { border-color: #df7950; background: #fff4eb; }
.profile-add-lesson-page .lesson-upload-control-secondary { border-color: #e9e3dc; color: #465774; }
.profile-add-lesson-page .lesson-upload-field:focus-within .lesson-upload-control { outline: 3px solid rgb(145 64 32 / 18%); outline-offset: 2px; }
.profile-add-lesson-page .lesson-file-name { grid-column: 1 / -1; overflow-wrap: anywhere; color: #7a8494; font-size: 12px; }
.profile-add-lesson-page .lesson-upload-preview { position: relative; display: block; justify-self: start; grid-column: 1 / -1; width: fit-content; max-width: 100%; padding-top: 3px; }
.profile-add-lesson-page .lesson-upload-preview img { display: block; max-width: 100%; max-height: 230px; border: 1px solid #eee1d5; border-radius: 9px; background: #fff; object-fit: contain; }
.profile-add-lesson-page .lesson-remove-image { position: absolute; top: 10px; right: 8px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid rgb(255 255 255 / 78%); border-radius: 50%; background: #d75230; box-shadow: 0 2px 8px rgb(29 39 61 / 22%); color: #fff; cursor: pointer; }
.profile-add-lesson-page .lesson-remove-image:hover { background: #b94024; }
.profile-add-lesson-page .lesson-remove-image:focus-visible { outline: 3px solid rgb(145 64 32 / 30%); outline-offset: 2px; }
.profile-add-lesson-page .lesson-optional-label { padding: 3px 7px; border-radius: 999px; background: #f4f1ec; color: #758095; font-size: 11px; font-weight: 600; }
.profile-add-lesson-page .lesson-field-error { color: #b63e32; font-size: 12px; font-weight: 600; line-height: 1.4; }
.profile-add-lesson-page .lesson-field-error[hidden],
.profile-add-lesson-page .lesson-form-errors[hidden],
.profile-add-lesson-page .lesson-step-min-error[hidden] { display: none !important; }
.profile-add-lesson-page .lesson-form-field.is-invalid input,
.profile-add-lesson-page .lesson-form-field.is-invalid textarea,
.profile-add-lesson-page .lesson-form-field.is-invalid select { border-color: #cf6252; background: #fffafa; }
.profile-add-lesson-page .lesson-upload-field.is-invalid { border-color: #cf6252; background: #fff8f6; }
.profile-add-lesson-page .lesson-form-errors { padding: 14px 16px; border: 1px solid #e4a195; border-radius: 12px; background: #fff5f2; color: #8f352d; font-size: 14px; }
.profile-add-lesson-page .lesson-form-errors ul { display: grid; gap: 4px; margin: 7px 0 0; padding-left: 20px; }
.profile-add-lesson-page .lesson-form-errors:focus { outline: 3px solid rgb(182 62 50 / 18%); }
.profile-add-lesson-page .lesson-steps-heading { align-items: center; }
.profile-add-lesson-page .lesson-step-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #f1ddca; border-radius: 999px; background: #fff8f0; color: #a34b2d; font-size: 13px; font-weight: 750; }
.profile-add-lesson-page .lesson-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.profile-add-lesson-page .lesson-step-item { min-width: 0; }
.profile-add-lesson-page .lesson-step-card { display: grid; align-content: start; gap: 12px; height: 100%; min-width: 0; padding: 13px; border: 1px solid #f0e1d3; border-radius: 13px; background: linear-gradient(145deg, #fff 0%, #fffdfa 100%); }
.profile-add-lesson-page .lesson-step-card-heading { display: flex; align-items: center; gap: 9px; }
.profile-add-lesson-page .lesson-step-number { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #fff0e4; color: #d75230; font-size: 15px; font-weight: 800; }
.profile-add-lesson-page .lesson-step-card-heading h3 { margin: 0; color: var(--ink); }
.profile-add-lesson-page .lesson-step-description textarea { min-height: 96px; }
.profile-add-lesson-page .lesson-step-upload { grid-template-columns: minmax(0, 1fr); align-items: start; padding: 10px; }
.profile-add-lesson-page .lesson-step-upload .lesson-upload-control { justify-self: start; }
.profile-add-lesson-page .lesson-step-min-error { margin: 12px 0 0; color: #b63e32; font-size: 13px; font-weight: 650; }
.profile-add-lesson-page .lesson-add-step-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 13px; margin-top: 14px; }
.profile-add-lesson-page .lesson-add-step { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 13px; border: 1px solid #efc4ac; border-radius: 10px; background: #fff7f0; color: #a34225; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.profile-add-lesson-page .lesson-add-step:hover { border-color: #df7950; background: #fff0e4; }
.profile-add-lesson-page .lesson-add-step:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-add-lesson-page .lesson-add-step[hidden] { display: none !important; }
.profile-add-lesson-page .lesson-step-hint { color: #758095; font-size: 12px; }
.profile-add-lesson-page .lesson-submission-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 2px; }
.profile-add-lesson-page .lesson-submission-status { margin: 0; color: #438275; font-size: 13px; line-height: 1.45; }
.profile-add-lesson-page .lesson-submission-status[data-state="success"] { color: #238548; font-size: 18px; font-weight: 700; }
.profile-add-lesson-page .lesson-submission-status[data-state="error"] { color: #b63e32; }
.profile-add-lesson-page .lesson-submit-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #dc4d25; border-radius: 11px; background: linear-gradient(145deg, #f26d3e, #dc4d25); color: #fff; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; }
.profile-add-lesson-page .lesson-submit-button:hover { border-color: #c94220; background: linear-gradient(145deg, #e85d32, #c94220); }
.profile-add-lesson-page .lesson-submit-button { flex: 0 0 auto; }
.profile-add-lesson-page .profile-edit-submit:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-add-lesson-page .profile-action-primary.is-active { border-color: #c94220; box-shadow: 0 0 0 2px rgb(255 255 255 / 55%) inset; }
@media (max-width: 760px) {
  .profile-add-lesson-page .lesson-requirements-card,
  .profile-add-lesson-page .lesson-submission-card { padding: 14px; }
  .profile-add-lesson-page .lesson-requirements-list { grid-template-columns: minmax(0, 1fr); }
  .profile-add-lesson-page .lesson-submission-fields { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .profile-add-lesson-page .lesson-form-field-wide { grid-column: auto; }
  .profile-add-lesson-page .lesson-step-list { grid-template-columns: minmax(0, 1fr); }
  .profile-add-lesson-page .lesson-submission-footer { align-items: stretch; flex-direction: column; }
  .profile-add-lesson-page .lesson-submit-button { width: 100%; }
}
@media (max-width: 480px) {
  .profile-add-lesson-page .lesson-upload-field { grid-template-columns: minmax(0, 1fr); }
  .profile-add-lesson-page .lesson-upload-control { justify-self: start; }
  .profile-add-lesson-page .lesson-step-count { align-self: flex-start; }
}

.site-header-redesigned .profile-header-leading { display: flex; align-items: center; gap: 30px; order: 1; flex: 0 1 405px; min-width: 0; }
.site-header-redesigned .profile-header-leading .header-search { min-width: 100px; }
@media (min-width: 1151px) {
  .site-header-redesigned .profile-header-leading { flex-basis: 425px; }
  .site-header-redesigned .profile-header-leading .header-search { max-width: 260px; }
}
.site-header-redesigned .header-inner > .logo { order: 0; flex: 0 0 auto; }
.site-header-redesigned .profile-header-actions { display: flex; align-items: center; gap: 20px; order: 2; flex: 0 0 auto; margin-left: auto; }
.site-header-redesigned .profile-language-switch { display: block; order: 0; flex: 0 0 auto; width: max-content; }
.site-header-redesigned .header-inner .add-lesson { order: 1; }
.site-header-redesigned .header-inner .login { order: 2; }
.profile-language-switch { position: relative; z-index: 20; }
.profile-language-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 9px; border: 1px solid #e7d8cc; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.profile-language-trigger > .icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--red); }
.profile-language-trigger:focus-visible,
.profile-language-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.profile-language-chevron { flex: 0 0 12px; transition: transform .16s ease; }
.profile-language-trigger[aria-expanded="true"] .profile-language-chevron { transform: rotate(180deg); }
.profile-language-menu { position: absolute; top: calc(100% + 8px); right: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; width: max-content; min-width: 160px; max-height: min(70vh, 360px); overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgb(36 30 20 / 16%); }
.profile-language-menu[hidden] { display: none; }
.profile-language-menu a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 14px; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.profile-language-menu a:hover,
.profile-language-menu a[aria-current="page"] { background: #fff3e9; color: var(--red); }
@media (min-width: 761px) and (max-width: 1150px) {
  .site-header-redesigned .header-inner { gap: 10px; }
  .site-header-redesigned .profile-header-leading { gap: 10px; flex-basis: 370px; }
  .site-header-redesigned .header-inner > .logo { gap: 5px; font-size: 22px; }
  .site-header-redesigned .header-inner .catalog-button { padding-inline: 16px; }
  .site-header-redesigned .profile-header-leading .header-search { min-width: 80px; }
  .site-header-redesigned .header-inner .add-lesson,
  .site-header-redesigned .header-inner .login { gap: 4px; font-size: 14px; }
  .site-header-redesigned .profile-header-actions { gap: 10px; }
  .site-header-redesigned .profile-language-trigger { font-size: 13px; }
}
@media (max-width: 760px) {
  .site-header-redesigned .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; justify-content: stretch; column-gap: 0; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
  .site-header-redesigned .profile-header-leading { grid-column: 1; grid-row: 1; justify-self: start; gap: 4px; width: 100%; order: 0; flex: 0 1 auto; }
  .site-header-redesigned .header-inner > .logo { grid-column: 2; grid-row: 1; justify-self: center; order: 1; min-width: 0; gap: 0; font-size: 18px; letter-spacing: -.7px; }
  .site-header-redesigned .header-inner > .logo > span { white-space: nowrap; }
  .site-header-redesigned .header-inner .catalog-button { order: 0; display: flex; flex: 0 0 30px; grid-column: auto; grid-row: auto; width: 30px; height: 36px; min-height: 36px; justify-content: center; padding: 4px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--red); }
  .site-header-redesigned .header-inner .catalog-button > .icon { width: 22px; height: 22px; stroke-width: 2.5px; }
  .site-header-redesigned .header-inner .catalog-button > span { display: none; }
  .site-header-redesigned .profile-header-actions { grid-column: 3; grid-row: 1; justify-self: end; order: 2; flex: 0 0 auto; gap: 5px; margin-left: 0; }
  .site-header-redesigned .profile-language-switch { order: 0; flex: 0 0 auto; grid-column: auto; grid-row: auto; justify-self: auto; width: max-content; }
  .site-header-redesigned .profile-language-trigger { min-height: 34px; gap: 5px; padding: 5px 7px; font-size: 12px; }
  .site-header-redesigned .profile-language-trigger > .icon { flex-basis: 16px; width: 16px; height: 16px; }
  .site-header-redesigned .profile-header-leading .header-search { order: 1; display: flex; flex: 0 0 30px; grid-column: auto; grid-row: auto; justify-self: auto; justify-content: center; width: 30px; height: 36px; min-width: 0; min-height: 36px; padding: 4px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--red); }
  .site-header-redesigned .header-inner .header-search > span { display: none; }
  .site-header-redesigned .header-inner .header-search > .icon { width: 22px; height: 22px; color: currentColor; }
  .site-header-redesigned .header-inner .header-search:focus-visible,
  .site-header-redesigned .header-inner .catalog-button:focus-visible,
  .site-header-redesigned .header-inner .add-lesson:focus-visible,
  .site-header-redesigned .header-inner .login:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 9px; }
  .site-header-redesigned .header-inner .add-lesson { order: 1; display: flex; flex: 0 0 30px; grid-column: auto; grid-row: auto; justify-content: center; width: 30px; height: 36px; min-height: 36px; color: var(--red); }
  .site-header-redesigned .header-inner .add-lesson > .icon { width: 22px; height: 22px; }
  .site-header-redesigned .header-inner .add-lesson > span { display: none; }
  .site-header-redesigned .header-inner .login { order: 2; display: flex; flex: 0 0 40px; grid-column: auto; grid-row: auto; flex-direction: column; justify-content: center; justify-self: auto; gap: 1px; width: 40px; height: 38px; color: var(--red); }
  .site-header-redesigned .header-inner .login > .login-name { display: block; max-width: 40px; overflow: hidden; font-size: 10px; line-height: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .site-header-redesigned .header-inner .login > .icon { width: 22px; height: 22px; }
  .site-header-redesigned .header-inner .login-avatar-wrap { flex-basis: 21px; width: 21px; height: 21px; }
}
@media (max-width: 380px) {
  .site-header-redesigned .header-inner { gap: 0; }
  .site-header-redesigned .profile-header-leading { gap: 2px; }
  .site-header-redesigned .profile-header-actions { gap: 0; }
  .site-header-redesigned .header-inner > .logo { font-size: 16px; letter-spacing: -.6px; }
  .site-header-redesigned .header-inner .login { flex-basis: 36px; width: 36px; }
  .site-header-redesigned .header-inner .login > .login-name { max-width: 36px; }
  .site-header-redesigned .profile-header-leading .catalog-button,
  .site-header-redesigned .profile-header-leading .header-search,
  .site-header-redesigned .header-inner .add-lesson,
  .site-header-redesigned .header-inner .login { flex-basis: 27px; width: 27px; }
  .site-header-redesigned .profile-language-trigger { min-height: 32px; gap: 3px; padding: 4px 3px; font-size: 11px; }
  .site-header-redesigned .profile-language-trigger > .icon { flex-basis: 15px; width: 15px; height: 15px; }
  .site-header-redesigned .profile-language-chevron { flex-basis: 10px; width: 10px; height: 10px; }
}

/* Shared lesson search form, independent from the catalog dialog. */
.header-search-input { flex: 1 1 auto; width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.header-search-input:focus-visible { outline: 0; }
.header-search-input::placeholder { color: #686d87; opacity: 1; }
.header-search-submit,
.category-search-submit { display: grid; flex: 0 0 auto; place-items: center; padding: 0; border: 0; background: transparent; color: inherit; }
.header-search-submit { color: #4f5368; }
.header-search-submit .icon { width: 21px; height: 21px; }
.category-search-submit { color: var(--ink); cursor: pointer; }
.category-search-submit .icon { width: 22px; height: 22px; }
.category-search input { outline: 0; }
.category-search input:focus-visible { outline: 0; }
.search-page { padding-bottom: 28px; }
.search-hero { padding-top: 20px; }
.search-hero h1 { padding-right: 0; }
.search-query-heading { margin-top: 8px; overflow-wrap: anywhere; }
.search-page-form { display: flex; align-items: stretch; gap: 10px; width: min(760px, 100%); margin-top: 18px; }
.search-page-form input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid #e7d8cc; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
.search-page-form input:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 22%, transparent); }
.search-page-form button { flex: 0 0 auto; min-width: 112px; padding: 9px 20px; border: 1px solid #a74b2b; border-radius: 9px; background: linear-gradient(125deg,#9c3e23,#ae4c2a); color: #fff; font-size: 17px; font-weight: 700; }
.search-results-panel { width: 100%; margin: 0 0 24px; padding: 0; border: 0; background: transparent; }
.search-result-grid { margin: 0; }
.search-result-item { position: relative; min-width: 0; }
.search-result-language-badge { position: absolute; z-index: 2; top: 17px; left: 17px; max-width: calc(100% - 34px); padding: 4px 9px; overflow: hidden; border: 1px solid #e5d9ce; border-radius: 20px; background: rgb(255 255 255 / 94%); color: #5b78b8; font-size: 12px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.search-status { padding: 14px 4px 4px; color: var(--muted); }
.search-status:empty { display: none; }
.search-load-more { display: block; min-height: 44px; margin: 16px auto 0; padding: 9px 22px; border: 1px solid #e72b0c; border-radius: 24px; background: #fff; color: #d54525; font-size: 16px; font-weight: 700; }
.search-load-more:hover { background: #fff4ed; }
.search-load-more:disabled { cursor: wait; opacity: .65; }
@media (max-width: 1150px) and (min-width: 951px) {
  .search-result-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 950px) and (min-width: 761px) {
  .search-result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header-redesigned .header-inner .header-search-input { display: none; }
  .site-header-redesigned .header-inner .header-search-submit { width: 30px; height: 36px; color: currentColor; }
  .site-header-redesigned .header-inner .header-search-submit .icon { width: 22px; height: 22px; }
  .site-header-redesigned .profile-header-leading .header-search.is-expanded { position: fixed; z-index: 1200; top: 68px; right: 12px; left: 12px; display: flex; flex: none; justify-content: flex-start; width: auto; max-width: none; min-width: 0; height: auto; min-height: 48px; padding: 8px 12px; border: 1px solid #dac6bb; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgb(8 14 55 / 18%); }
  .site-header-redesigned .header-inner .header-search.is-expanded .header-search-input { display: block; flex: 1 1 auto; width: 100%; min-width: 0; }
  .site-header-redesigned .header-inner .header-search.is-expanded .header-search-submit { flex: 0 0 30px; }
  .search-hero { padding: 12px 2px 18px; }
  .search-hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .search-page-form { gap: 7px; }
  .search-page-form input { min-height: 44px; font-size: 16px; }
  .search-page-form button { min-width: 84px; padding-inline: 13px; font-size: 16px; }
  .search-results-panel { margin: 0 0 20px; padding: 0; }
  .search-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-flow: row; grid-auto-columns: auto; gap: 8px; overflow: visible !important; overflow-x: visible !important; overflow-y: visible !important; padding: 0; scroll-snap-type: none; scrollbar-width: none; }
  .search-result-grid > li { scroll-snap-align: none; }
  .search-result-language-badge { top: 14px; left: 14px; max-width: calc(100% - 28px); }
}
@media (max-width: 480px) {
  .search-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 320px) {
  .site-header-redesigned .header-inner > .logo { font-size: 14px; }
}

/* Shared notification entry point and private profile inbox. */
.site-header-redesigned .header-notifications { position: relative; display: inline-flex; order: 2; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 38px; color: var(--red); text-decoration: none; }
.site-header-redesigned .header-notifications > .icon { width: 23px; height: 23px; }
.site-header-redesigned .header-notifications:hover { color: #8f3219; }
.site-header-redesigned .header-notifications:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 8px; }
.header-notifications-count { position: absolute; top: 0; right: -5px; display: grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border: 2px solid #fff; border-radius: 99px; background: #c84c27; color: #fff; font: 700 10px/1 Arial, sans-serif; }
.profile-notification-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-notification { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .16s ease, background-color .16s ease; }
.profile-notification.is-unread { border-color: #efc09e; background: #fff8f2; }
.profile-notification form { margin: 0; }
.profile-notification-button { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; padding: 13px 52px 13px 13px; border: 0; border-radius: inherit; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.profile-notification-button:hover { background: rgb(255 243 233 / 55%); }
.profile-notification-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.profile-notification-avatar { display: block; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.profile-notification-copy { display: grid; min-width: 0; gap: 4px; }
.profile-notification-title { line-height: 1.4; overflow-wrap: anywhere; }
.profile-notification-title strong { color: var(--ink); }
.profile-notification-context, .profile-notification-date { color: var(--muted); font-size: 13px; line-height: 1.35; }
.profile-notification-excerpt { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.profile-notification-delete-form { position: absolute; top: 8px; right: 8px; z-index: 1; margin: 0; }
.profile-notification-delete { display: inline-flex; }
.profile-notification-dot { position: absolute; top: 23px; right: 45px; display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.profile-notification-pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.profile-notifications-page .profile-gallery { align-self: start; }
.lesson-comment:target { scroll-margin-top: 110px; border-radius: 12px; outline: 2px solid #ef9b69; outline-offset: 5px; background: #fff8f2; }
@media (max-width: 760px) {
  .site-header-redesigned .header-notifications { flex-basis: 30px; width: 30px; height: 36px; }
  .site-header-redesigned .header-inner .login { order: 3; }
  .site-header-redesigned .header-notifications > .icon { width: 21px; height: 21px; }
  .header-notifications-count { top: 1px; right: -2px; min-width: 16px; height: 16px; padding-inline: 3px; font-size: 9px; }
  .profile-notification-button { grid-template-columns: 40px minmax(0, 1fr); gap: 9px; padding: 11px 47px 11px 11px; }
  .profile-notification-avatar { width: 40px; height: 40px; }
  .profile-notification-delete-form { top: 6px; right: 6px; }
  .profile-notification-dot { top: 20px; right: 40px; }
}
@media (max-width: 380px) {
  .site-header-redesigned .header-notifications { flex-basis: 27px; width: 27px; }
}

/* Standalone image lessons have no step card: center the bordered photo at 1.5x scale. */
.imported-lesson-page .lesson-tutorials .single-image-drawing {
  display: grid;
  place-items: center;
  width: 75%;
  max-width: 900px;
  margin: 24px auto;
  padding: 14px;
  box-sizing: border-box;
}
.imported-lesson-page .lesson-tutorials .single-image-drawing > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(345px, 36vw, 495px);
  object-fit: contain;
  object-position: center;
}
@media (max-width: 760px) {
  .imported-lesson-page .lesson-tutorials .single-image-drawing {
    width: 100%;
    max-width: none;
    margin: 14px auto;
    padding: 10px;
    border-radius: 14px;
  }
  .imported-lesson-page .lesson-tutorials .single-image-drawing > img {
    max-height: clamp(300px, 90vw, 450px);
  }
}

/* Clickable lesson photos and the full-screen, per-lesson image viewer. */
.imported-lesson .drawing-step > .lesson-image-trigger {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: transparent;
  line-height: 0;
  cursor: zoom-in;
}
.imported-lesson .drawing-step > .lesson-image-trigger > img {
  display: block;
  width: 100%;
  height: clamp(230px, 24vw, 330px);
  padding: 0 14px 14px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}
.imported-lesson-page .lesson-tutorials .single-image-drawing > .lesson-image-trigger {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: zoom-in;
}
.imported-lesson-page .lesson-tutorials .single-image-drawing > .lesson-image-trigger > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(345px, 36vw, 495px);
  object-fit: contain;
  object-position: center;
}
.lesson-image-trigger:focus-visible {
  outline: 3px solid #e65327;
  outline-offset: 3px;
}
dialog.lesson-photo-viewer {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: rgba(9, 10, 12, .98);
}
dialog.lesson-photo-viewer::backdrop { background: rgba(0, 0, 0, .88); }
dialog.lesson-photo-viewer[open] { display: block; }
.lesson-photo-viewer-layout {
  position: relative;
  width: 100%;
  height: 100%;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
}
.lesson-photo-viewer-close,
.lesson-photo-viewer-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  line-height: 1;
  cursor: pointer;
}
.lesson-photo-viewer-close {
  position: absolute;
  z-index: 2;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  font-size: 36px;
}
.lesson-photo-viewer-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}
.lesson-photo-viewer-arrow[data-lightbox-previous] { left: max(12px, env(safe-area-inset-left)); }
.lesson-photo-viewer-arrow[data-lightbox-next] { right: max(12px, env(safe-area-inset-right)); }
.lesson-photo-viewer-arrow > svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lesson-photo-viewer-close:hover,
.lesson-photo-viewer-arrow:not(:disabled):hover { background: rgba(255, 255, 255, .22); }
.lesson-photo-viewer-close:focus-visible,
.lesson-photo-viewer-arrow:focus-visible { outline: 3px solid #ff9b69; outline-offset: 3px; }
.lesson-photo-viewer-arrow:disabled { opacity: .25; cursor: default; }
.lesson-photo-viewer-figure {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 48px 76px;
  margin: 0;
  box-sizing: border-box;
}
.lesson-photo-viewer-figure > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 112px);
  object-fit: contain;
}
.lesson-photo-viewer-figure > figcaption {
  position: absolute;
  right: max(76px, calc(env(safe-area-inset-right) + 54px));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(76px, calc(env(safe-area-inset-left) + 54px));
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .imported-lesson .drawing-step > .lesson-image-trigger > img { height: clamp(200px, 60vw, 300px); padding: 0 10px 10px; }
  .lesson-photo-viewer-layout { padding: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom)); }
  .lesson-photo-viewer-close,
  .lesson-photo-viewer-arrow { width: 40px; height: 40px; }
  .lesson-photo-viewer-close { font-size: 30px; }
  .lesson-photo-viewer-figure { padding: 48px 42px; }
  .lesson-photo-viewer-figure > img { max-height: calc(100dvh - 100px); }
  .lesson-photo-viewer-figure > figcaption { font-size: 12px; }
}

/* Member-only lesson cards use the same one-column reading flow as public lessons. */
.profile-members-lessons-page .profile-member-lesson-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: clamp(16px, 2.5vw, 26px);
  border: 1px solid #f0d9c5;
  border-radius: 15px;
  background: linear-gradient(145deg, #fffdf9 0%, #fff 72%);
}
.profile-member-lesson-detail > .section-heading,
.profile-member-lesson-detail > h2,
.profile-member-lesson-detail > p { margin: 0; }
.profile-member-lesson-detail > h2 { color: #101d46; font-size: clamp(23px, 3vw, 31px); line-height: 1.2; }
.profile-member-lesson-note { color: #7182a3; font-size: 14px; }
.profile-member-lesson-intro { color: #293a61; line-height: 1.65; white-space: pre-line; }
.profile-member-lesson-reference { display: flex; justify-content: flex-start; margin: 0; }
.profile-member-lesson-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.profile-member-lesson-step { display: grid; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #f0e1d3; border-radius: 13px; background: #fff; }
.profile-member-lesson-step-copy { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.profile-member-lesson-step-copy p { min-width: 0; margin: 4px 0 0; color: #293a61; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.profile-member-lesson-step-number { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #fff0e4; color: #d75230; font-size: 15px; font-weight: 800; }
.profile-member-lesson-reference .profile-member-lesson-photo-trigger,
.profile-member-lesson-step-artwork .profile-member-lesson-photo-trigger { display: block; width: fit-content; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: zoom-in; }
.profile-member-lesson-photo-trigger:hover { box-shadow: none; }
.profile-member-lesson-photo-trigger:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 3px; }
.profile-member-lesson-photo-trigger img { display: block; width: auto; max-width: min(100%, 360px); height: auto; max-height: 340px; margin-inline: auto; border-radius: 6px; object-fit: contain; }
.profile-member-lesson-step-artwork { display: flex; justify-content: flex-start; min-width: 0; margin: 0; }
.profile-member-lesson-comments { margin-top: 4px; }
@media (max-width: 767px) {
  .profile-members-lessons-page .profile-member-lesson-detail { gap: 12px; padding: 13px; border-radius: 13px; }
  .profile-member-lesson-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .profile-member-lesson-step { gap: 9px; padding: 10px; }
  .profile-member-lesson-photo-trigger img { max-width: min(100%, 300px); max-height: 300px; }
}

/* Private-message deletion controls and shared full-screen photo viewer. */
.profile-messages-page .profile-message-item { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; }
.profile-messages-page .profile-message-item > a { width: 100%; min-width: 0; }
.profile-messages-page .profile-message-delete { margin: 0 10px 0 auto; }
.profile-messages-page .profile-message-delete:focus-visible,
.profile-chat-page .profile-chat-message-delete:focus-visible,
.profile-chat-page .profile-chat-delete-conversation:focus-visible { outline: 3px solid rgb(145 64 32 / 25%); outline-offset: 2px; }
.profile-chat-page .lesson-comment-header .profile-chat-message-delete { margin-left: auto; }
.profile-chat-page .profile-chat-message.is-own .lesson-comment-header .profile-chat-message-delete { order: -1; margin-left: 0; margin-right: 0; }
.profile-chat-page .profile-chat-delete-conversation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #f0cbbb;
  border-radius: 999px;
  background: #fffaf7;
  color: #a34225;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.profile-chat-page .profile-chat-delete-conversation:hover { border-color: #e9a27e; background: #fff3eb; }
.profile-chat-page .profile-chat-message .lesson-comment-artwork > a { cursor: zoom-in; }
@media (max-width: 760px) {
  .profile-messages-page .profile-message-item { grid-template-columns: minmax(0, 1fr) 38px; }
  .profile-messages-page .profile-message-delete { margin-right: 6px; }
  .profile-chat-page .profile-chat-delete-conversation { align-self: flex-start; }
}

/* Separate account screens and the public add-lesson information page. */
.account-entry-page .account-form-grid { grid-template-columns: minmax(0, 620px); justify-content: center; }
.account-entry-page .account-form-card { background: linear-gradient(145deg, #fff 0%, #fffaf5 100%); }
.account-page-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0e1d3; }
.account-page-links a,
.public-add-lesson-secondary { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid #efcbb7; border-radius: 10px; background: #fff; color: #9f4428; font-weight: 700; text-decoration: none; }
.account-page-links a:hover,
.public-add-lesson-secondary:hover { background: #fff3eb; border-color: #e3a786; }
.public-add-lesson-content { display: grid; gap: 18px; padding-bottom: 32px; }
.public-add-lesson-content,
.public-add-lesson-content > *,
.public-add-lesson-page .lesson-requirements-list,
.public-add-lesson-page .lesson-requirements-list > li,
.public-add-lesson-page .public-user-lessons-grid,
.public-add-lesson-page .public-user-lessons-grid > li,
.public-add-lesson-page .public-user-lessons-grid .lesson-card { min-width: 0; max-width: 100%; }
.public-add-lesson-hero { padding: clamp(20px, 3vw, 34px); border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(135deg, #fffaf5 0%, #fff 72%); }
.public-add-lesson-hero .profile-gallery-kicker { margin: 0 0 7px; }
.public-add-lesson-hero h1 { margin: 0 0 9px; padding-right: 0; color: var(--ink); overflow-wrap: anywhere; }
.public-add-lesson-hero > p:last-child { max-width: 850px; margin: 0; color: #5f6f8a; font-size: clamp(16px, 2vw, 19px); line-height: 1.5; overflow-wrap: anywhere; }
.public-add-lesson-page .lesson-requirements-card { padding: 20px; }
.public-add-lesson-page .lesson-requirements-card .profile-gallery-heading { margin-bottom: 16px; }
.public-add-lesson-page .lesson-requirements-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: lesson-rule; }
.public-add-lesson-page .lesson-requirements-list li { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px; border: 1px solid #f3e7dc; border-radius: 11px; background: #fffdfa; color: #53627b; font-size: 14px; line-height: 1.45; counter-increment: lesson-rule; }
.public-add-lesson-page .lesson-requirements-list li::before { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #fff0e4; color: #c84e2b; content: counter(lesson-rule); font-size: 13px; font-weight: 800; line-height: 1; }
.public-add-lesson-page .lesson-requirements-list strong { color: #344669; }
.public-add-lesson-page .lesson-requirement-copy { display: block; min-width: 0; overflow-wrap: anywhere; }
.public-add-lesson-page .lesson-requirement-copy strong { display: block; margin-bottom: 4px; }
.public-add-lesson-page .lesson-moderation-note { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 0; padding: 12px; border: 1px solid #f6e5d5; border-radius: 11px; background: #fffaf5; color: #6a7486; font-size: 13px; line-height: 1.45; }
.public-add-lesson-page .lesson-moderation-note .icon { flex: 0 0 auto; color: #c85634; }
.public-add-lesson-page .lesson-moderation-note > span { min-width: 0; overflow-wrap: anywhere; }
.public-add-lesson-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.public-add-lesson-actions .account-submit { margin: 0; text-decoration: none; }
.public-user-lessons { min-width: 0; padding: 20px; }
.public-user-lessons-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.public-user-lessons-grid > li { min-width: 0; }
@media (max-width: 1100px) {
  .public-user-lessons-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .public-user-lessons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .public-add-lesson-page .public-user-lessons-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
    overflow-y: visible;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    padding: 0;
  }
  .public-add-lesson-page .public-user-lessons-grid > li { scroll-snap-align: none; }
}
@media (max-width: 640px) {
  .public-add-lesson-content { gap: 12px; }
  .public-add-lesson-hero { padding: 16px; }
  .public-add-lesson-hero h1 { font-size: clamp(27px, 7.5vw, 34px); }
  .public-add-lesson-hero > p:last-child { font-size: 16px; }
  .public-add-lesson-page .lesson-requirements-card,
  .public-user-lessons { padding: 15px; }
  .public-add-lesson-page .lesson-requirements-list { grid-template-columns: minmax(0, 1fr); }
  .public-add-lesson-page .public-user-lessons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .public-add-lesson-actions { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .public-add-lesson-actions > a { width: 100%; min-height: 44px; }
  .account-entry-page .account-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .public-add-lesson-page .public-user-lessons-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Compact mobile header: reserve separate space for navigation, brand and account controls. */
@media (max-width: 760px) {
  .site-header-redesigned .header-inner {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 5px;
    min-height: 62px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .site-header-redesigned .profile-header-leading {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-self: start;
    gap: 2px;
    width: auto;
    min-width: 0;
  }
  .site-header-redesigned .header-inner > .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    gap: 0;
    font-size: 16px;
    letter-spacing: -.6px;
  }
  .site-header-redesigned .header-inner > .logo > span { white-space: nowrap; }
  .site-header-redesigned .header-inner .catalog-button {
    display: inline-flex;
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #a74b2b;
    border-radius: 8px;
    background: linear-gradient(125deg, #9c3e23, #ae4c2a);
    box-shadow: inset 0 1px 2px #d99b74;
    color: #fff;
  }
  .site-header-redesigned .header-inner .catalog-button > .icon { width: 19px; height: 19px; }
  .site-header-redesigned .header-inner .catalog-button > span {
    display: block;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
  }
  .site-header-redesigned .profile-header-leading .header-search {
    display: none;
    flex: 0 0 0;
    grid-column: auto;
    grid-row: auto;
    width: 0;
    min-width: 0;
  }
  .site-header-redesigned .header-inner .profile-header-actions {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    justify-self: end;
    gap: 3px;
    width: max-content;
    min-width: 0;
    margin-left: 0;
  }
  .site-header-redesigned .profile-language-switch { flex: 0 0 auto; }
  .site-header-redesigned .profile-language-trigger {
    min-height: 34px;
    gap: 4px;
    padding: 4px 6px;
    font-size: 12px;
  }
  .site-header-redesigned .profile-language-trigger > .icon { width: 16px; height: 16px; flex-basis: 16px; }
  .site-header-redesigned .header-inner .add-lesson,
  .site-header-redesigned .header-inner .header-notifications {
    display: inline-flex;
    flex: 0 0 28px;
    grid-column: auto;
    grid-row: auto;
    justify-content: center;
    width: 28px;
    height: 38px;
    min-height: 38px;
  }
  .site-header-redesigned .header-inner .add-lesson > .icon,
  .site-header-redesigned .header-inner .header-notifications > .icon { width: 22px; height: 22px; }
  .site-header-redesigned .header-inner .login {
    display: flex;
    flex: 0 0 39px;
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 39px;
    height: 46px;
    color: var(--red);
  }
  .site-header-redesigned .header-inner .login > .icon { width: 28px; height: 28px; }
  .site-header-redesigned .header-inner .login-avatar-wrap { flex: 0 0 29px; width: 29px; height: 29px; }
  .site-header-redesigned .header-inner .login > .login-name {
    display: block;
    max-width: 39px;
    overflow: hidden;
    font-size: 9px;
    line-height: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .site-header-redesigned .header-inner { column-gap: 3px; }
  .site-header-redesigned .header-inner > .logo { font-size: 14px; letter-spacing: -.5px; }
  .site-header-redesigned .header-inner .catalog-button { gap: 4px; min-height: 36px; height: 36px; padding: 5px 8px; }
  .site-header-redesigned .header-inner .catalog-button > .icon { width: 17px; height: 17px; }
  .site-header-redesigned .header-inner .catalog-button > span { font-size: 14px; }
  .site-header-redesigned .profile-header-leading { gap: 1px; }
  .site-header-redesigned .header-inner .profile-header-actions { gap: 1px; }
  .site-header-redesigned .profile-language-trigger { gap: 2px; padding-inline: 4px; font-size: 11px; }
  .site-header-redesigned .profile-language-trigger > .icon { width: 14px; height: 14px; flex-basis: 14px; }
  .site-header-redesigned .header-inner .add-lesson,
  .site-header-redesigned .header-inner .header-notifications { flex-basis: 25px; width: 25px; }
  .site-header-redesigned .header-inner .login { flex-basis: 34px; width: 34px; }
  .site-header-redesigned .header-inner .login-avatar-wrap { flex-basis: 26px; width: 26px; height: 26px; }
  .site-header-redesigned .header-inner .login > .icon { width: 25px; height: 25px; }
  .site-header-redesigned .header-inner .login > .login-name { max-width: 34px; font-size: 8px; }
}
@media (max-width: 340px) {
  .site-header-redesigned .header-inner .catalog-button { gap: 3px; min-height: 33px; height: 33px; padding: 4px 6px; }
  .site-header-redesigned .header-inner .catalog-button > .icon { width: 15px; height: 15px; }
  .site-header-redesigned .header-inner .catalog-button > span { font-size: 12px; }
}

/* Shared footer: one centered link row on desktop, followed by localized copy. */
.site-footer > .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding: 16px 0 12px;
}
.site-footer .logo { display: none; }
.site-footer nav {
  width: calc(100% - 160px);
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.1vw, 15px);
  margin: 0 auto 12px;
  font-size: clamp(12px, 1vw, 15px);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.site-footer nav a { white-space: nowrap; }
.site-footer .footer-copy-notice,
.site-footer .footer-year {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.site-footer .footer-copy-notice { margin-bottom: 5px; color: #111; font-size: 14px; }
.site-footer .footer-year { font-size: 13px; }
.site-footer nav a:hover,
.site-footer nav a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 701px) and (max-width: 900px) {
  .site-footer nav { width: 100%; gap: 6px; font-size: 12px; }
}
@media (max-width: 700px) {
  .site-footer > .container { display: block; padding: 6px 0 12px; }
  .site-footer nav { width: 100%; flex-wrap: wrap; justify-content: center; gap: 10px 16px; margin: 10px 0 12px; font-size: 14px; white-space: normal; }
  .site-footer nav a { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
  .site-footer .footer-copy-notice { font-size: 13px; }
  .site-footer .footer-flourish { display: block; position: static; width: 130px; margin: 10px 0 0 auto; }
}
