/* ==========================================================================
   LKWM redesign — page-specific layouts. Every colour comes from the theme
   tokens in lkwm-theme.css so Day / Evening / Night share one layout.
   ========================================================================== */

/* ---------------------------------------------------------------- Home */
.lk-home-main { padding-bottom: 8px; }
.lk-shortcuts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.lk-short {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 10px 18px;
  background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: 20px; box-shadow: var(--lk-shadow);
  text-decoration: none; color: var(--lk-ink); transition: transform .18s ease, box-shadow .18s ease;
}
.lk-short i { font-size: 28px; color: var(--lk-accent); margin-bottom: 8px; }
.lk-short strong { font-size: 15.5px; font-weight: 700; }
.lk-short span { font-size: 13px; color: var(--lk-muted); }
.lk-short:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(60, 40, 140, .16); }
.lk-row { display: grid; gap: 22px; margin-top: 24px; }
.lk-row > * { min-width: 0; }
.lk-row-6040 { grid-template-columns: 1.5fr 1fr; }
.lk-row-5050 { grid-template-columns: 1fr 1fr; }
.lk-block { padding: 20px 20px 22px; }
.lk-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lk-featured { position: relative; border-radius: 22px; overflow: hidden; min-height: 230px; display: flex; align-items: stretch; color: #fff;
  background: linear-gradient(120deg, #2b1a6b 0%, #4a2aa0 50%, #2b1a6b 100%); box-shadow: var(--lk-shadow); }
.lk-featured-art { position: absolute; inset: 0 0 0 22%; background-size: cover; background-position: 40% 30%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
.lk-featured-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #2f1d74 0%, rgba(47,29,116,.75) 22%, rgba(47,29,116,0) 60%); }
.lk-featured-copy { position: relative; padding: 24px 26px; max-width: 360px; display: flex; flex-direction: column; justify-content: center; }
.lk-featured-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.lk-pill-glass { background: rgba(255,255,255,.18); color: #fff; }
.lk-featured h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 0 0 8px; line-height: 1.05; }
.lk-featured p { margin: 0 0 18px; color: #e6defc; line-height: 1.5; font-size: 15px; }
.lk-btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.45); align-self: flex-start; }
.lk-btn-light:hover { background: rgba(255,255,255,.26); }
.lk-why { padding: 20px; }
.lk-why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lk-why-item { text-align: center; }
.lk-why-ic { width: 54px; height: 54px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; border-radius: 16px; font-size: 24px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.lk-why-item h3 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--lk-ink); }
.lk-why-item p { font-size: 12.5px; line-height: 1.45; margin: 0; color: var(--lk-muted); }
.lk-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.lk-level, .lk-book, .lk-tile { text-decoration: none; color: var(--lk-ink); display: flex; flex-direction: column; gap: 3px; border-radius: 16px; transition: transform .18s ease; }
.lk-level:hover, .lk-book:hover, .lk-tile:hover { transform: translateY(-3px); }
.lk-level img { aspect-ratio: 4 / 3 !important; object-position: center 30%; }
.lk-level img, .lk-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; margin-bottom: 8px; background: var(--lk-surface-2); }
.lk-level strong, .lk-book strong, .lk-tile strong { font-size: 14px; font-weight: 700; line-height: 1.25; }
.lk-level span, .lk-tile span { font-size: 12.5px; color: var(--lk-muted); }
.lk-bar { display: block; height: 6px; border-radius: 6px; background: var(--lk-accent-soft); margin-top: 8px; overflow: hidden; }
.lk-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--lk-accent); transition: width .5s ease; }
.lk-level-count { font-style: normal; font-size: 11.5px; color: var(--lk-muted); margin-top: 3px; }
.lk-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lk-book img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; margin-bottom: 8px; box-shadow: 0 6px 16px rgba(40,28,100,.14); }
.lk-book span { align-self: flex-start; font: 700 12px/1.3 'Noto Sans KR', sans-serif; color: #8a5300; background: #fff3bf; border: 1.5px solid #f0b429; border-radius: 7px; padding: 1px 7px; margin-top: 4px; }
.lk-partners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lk-tile img { aspect-ratio: 4 / 5; object-position: center 20%; }

/* existing curriculum, restyled in place (markup + JS unchanged) */
.lk-home .curriculum-section { margin-top: 48px; scroll-margin-top: 90px; }
.lk-home .curriculum-section > h2 { font-family: 'DM Serif Display', Georgia, serif !important; font-weight: 400 !important; font-size: clamp(36px, 4.4vw, 52px) !important; color: var(--lk-ink); margin-bottom: 28px !important; }
.lk-home .curriculum-section > details { scroll-margin-top: 90px; border-radius: 20px !important; box-shadow: var(--lk-shadow) !important; background: var(--lk-surface); }
.lk-home .curriculum-section details summary { background: var(--lk-surface) !important; border-color: var(--lk-line) !important; border-radius: 18px; color: var(--lk-ink); }
.lk-home .curriculum-section > details > summary { font-size: 22px; padding: 1.35rem 1.6rem; }
.lk-home .curriculum-section details summary:hover { background: var(--lk-surface-2) !important; }
.lk-home .curriculum-section details summary::after { color: var(--lk-accent) !important; }
.lk-home .lesson-content { background: var(--lk-surface) !important; border-color: var(--lk-line) !important; }
.lk-home .lesson-item { background: var(--lk-surface-2) !important; border-color: var(--lk-line) !important; border-radius: 14px !important; }
.lk-home .lesson-item:hover { background: #fff !important; }
.lk-home .curriculum-section .bg-gradient-to-r { background-image: linear-gradient(100deg, var(--lk-accent), color-mix(in srgb, var(--lk-accent) 60%, #ec4899)) !important; border-radius: 20px !important; }
.lk-home #resume-bar { background: var(--lk-surface) !important; border-color: var(--lk-line) !important; border-radius: 18px !important; box-shadow: var(--lk-shadow); }

/* premium banner — full-bleed scenery, no seated character */
.lk-premium { position: relative; margin-top: 56px; padding: 64px 0 70px; overflow: hidden; isolation: isolate; }
.lk-premium-art { position: absolute; inset: 0; z-index: -2; background: var(--lk-scene-banner) center right / cover no-repeat; }
.lk-premium::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lk-hero-wash); }
.lk-premium-inner { color: var(--lk-hero-ink); }
.lk-premium h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin: 0 0 22px; background: var(--lk-hero-title); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lk-perks { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 10px 26px; max-width: 560px; }
.lk-perks li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; width: 104px; font-size: 13.5px; font-weight: 600; }
.lk-perks i { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: rgba(255,255,255,.75); color: var(--lk-accent); box-shadow: 0 4px 12px rgba(60,40,140,.12); }
html[data-tod="night"] .lk-perks i { background: rgba(255,255,255,.14); color: #e2d8ff; }
.lk-perks small { display: block; font-weight: 500; font-size: 11.5px; opacity: .8; }
.lk-premium + #ai-tutor-button, .lk-premium ~ footer { margin-top: 0; }
.lk-premium ~ .lk-footer { margin-top: 0; }
.lk-premium ~ .lk-footer .lk-footer-scene { display: none; }
.lk-premium { padding-bottom: 96px; }
/* nested level <details>: only the element's own state drives its chevron/corners */
.lk-home .curriculum-section details:not([open]) > summary::after { transform: none !important; }
.lk-home .curriculum-section details[open] > summary::after { transform: rotate(180deg) !important; }
.lk-home .curriculum-section details:not([open]) > summary { border-bottom: 1px solid var(--lk-line) !important; border-radius: 18px !important; }
.lk-home .curriculum-section details[open] > summary { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }

@media (max-width: 1024px) {
  .lk-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lk-row-6040, .lk-row-5050 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lk-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lk-levels { grid-template-columns: repeat(5, 132px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .lk-level { scroll-snap-align: start; }
  .lk-partners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lk-why-grid { grid-template-columns: 1fr; text-align: left; }
  .lk-why-item { display: grid; grid-template-columns: 54px 1fr; gap: 2px 12px; text-align: left; }
  .lk-why-ic { grid-row: span 2; margin: 0; }
  .lk-featured-art { inset: 0; opacity: .55; }
  .lk-featured-copy { max-width: none; }
  .lk-premium::before { background: var(--lk-hero-wash-m); }
  .lk-home .curriculum-section > details > summary { font-size: 18px; padding-right: 3rem; }
  .lk-home .lesson-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lk-home .lesson-item > .flex { flex-direction: row !important; align-items: center !important; gap: 8px; }
  .lk-home .lesson-item > .flex > * { margin: 0 !important; }
}

/* --------------------------------------------------------- Story Books */
.lk-stories .key { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 10px 16px; border-radius: 14px;
  background: rgba(255, 251, 235, .92); border: 1px solid #fde68a; font-size: 14px; color: #92400e; box-shadow: 0 4px 14px rgba(120, 80, 0, .08); }
.lk-stories .key i { color: #d97706; }
.lk-stories .tools { max-width: none; padding: 18px 20px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; position: relative; }
.lk-stories .tools .search { flex: 1 1 100%; padding: 13px 16px 13px 44px; border-radius: 14px; border-color: var(--lk-line); background: var(--lk-surface-2); color: var(--lk-ink); font-size: 15px; }
.lk-stories .sb-search-ic { position: absolute; left: 36px; top: 34px; color: var(--lk-accent); }
.lk-stories .chip { border-color: var(--lk-line); color: var(--lk-ink); background: var(--lk-surface); padding: 8px 15px; }
.lk-stories .chip:hover { border-color: var(--lk-accent); color: var(--lk-accent); }
.lk-stories .chip.on { background: var(--lk-accent); border-color: var(--lk-accent); color: #fff; }
.lk-stories .count { color: var(--lk-muted); }
.sb-banner { margin-top: 22px; display: grid; grid-template-columns: minmax(280px, 1fr) 1.45fr; border-radius: 22px; overflow: hidden; min-height: 170px;
  background: linear-gradient(100deg, #efe9ff 0%, #f6f0ff 40%, #fdf2f8 100%); border: 1px solid var(--lk-line); box-shadow: var(--lk-shadow); }
html[data-tod="evening"] .sb-banner { background: linear-gradient(100deg, #f9e6ef 0%, #fbeff2 45%, #fff3ea 100%); }
html[data-tod="night"] .sb-banner { background: linear-gradient(100deg, #2a2266 0%, #352a7a 50%, #3d2f86 100%); border-color: #3d3486; }
.sb-banner-copy { padding: 24px 28px; color: var(--lk-ink); display: flex; flex-direction: column; justify-content: center; }
html[data-tod="night"] .sb-banner-copy { color: #f1edff; }
.sb-banner-ic { font-size: 30px; color: var(--lk-accent); margin-bottom: 8px; }
html[data-tod="night"] .sb-banner-ic { color: #c4b5fd; }
.sb-banner h2 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.08; margin: 0 0 10px; }
.sb-banner p { margin: 0; font-size: 14.5px; line-height: 1.55; opacity: .9; }
.sb-banner-art { background: url('img/stories-reading.jpg') center / cover no-repeat; min-height: 170px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%); mask-image: linear-gradient(90deg, transparent 0, #000 16%); }
.lk-stories main { padding-top: 10px; }
.lk-stories .groupname { color: var(--lk-accent); font-size: 15px; margin-top: 34px; }
.lk-stories .groupname::after { background: var(--lk-line); }
.lk-stories .card { border-color: var(--lk-line); border-radius: 18px; box-shadow: var(--lk-shadow); background: var(--lk-surface); }
.lk-stories .card .tt { color: var(--lk-ink); }
.lk-stories .lv { background: rgba(36, 26, 79, .72); }
@media (max-width: 760px) {
  .sb-banner { grid-template-columns: 1fr; }
  .sb-banner-art { order: -1; min-height: 140px; -webkit-mask-image: none; mask-image: none; }
  .lk-stories .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; width: 100%; }
  .lk-stories .chip { white-space: nowrap; }
  .lk-stories main { padding-left: 16px; padding-right: 16px; }
  .lk-stories .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lk-stories .tools .search { font-size: 16px; }
  .lk-stories .key { display: block; line-height: 1.8; }
  .lk-stories .key i { margin-right: 6px; }
}

/* ---------------------------------------------------------- Vocabulary */
.lk-vocab .vocab-app { height: min(860px, calc(100vh - 40px)); min-height: 620px; border-radius: 24px; }
.lk-vocab #sidebar { background: var(--lk-surface); border-color: var(--lk-line); }
.lk-vocab #sidebar > div:first-child { background: var(--lk-surface-2); border-color: var(--lk-line); }
.lk-vocab #sidebar h2 { color: var(--lk-ink); font-size: 17px; }
.lk-vocab .category-btn h3 { color: var(--lk-ink); }
.lk-vocab .category-btn:hover { background: var(--lk-surface-2) !important; border-color: var(--lk-line) !important; }
.lk-vocab .category-btn.active { background: var(--lk-accent-soft) !important; border-color: color-mix(in srgb, var(--lk-accent) 35%, white) !important; }
.lk-vocab .category-btn.active h3 { color: var(--lk-accent); }
.lk-vocab main { background: var(--lk-surface) !important; }
.lk-vocab #active-view, .lk-vocab #active-view > div:first-child { background: var(--lk-surface) !important; border-color: var(--lk-line) !important; }
.lk-vocab #active-view > div:first-child { box-shadow: none; }
.lk-vocab #current-icon-container { background: var(--lk-accent-soft) !important; border-radius: 16px; }
.lk-vocab #current-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400 !important; font-size: 30px !important; color: var(--lk-ink); }
.lk-vocab #active-view > div:first-child > .flex.bg-slate-100 { background: var(--lk-surface-2) !important; gap: 6px; }
.lk-vocab #btn-flashcard, .lk-vocab #btn-list { border-radius: 12px; }
.lk-vocab #btn-flashcard.text-blue-600, .lk-vocab #btn-list.text-blue-600 { color: var(--lk-accent) !important; border-color: color-mix(in srgb, var(--lk-accent) 30%, white) !important; background: var(--lk-accent-soft) !important; }
.lk-vocab #view-flashcard { background: linear-gradient(180deg, var(--lk-surface) 0%, var(--lk-surface-2) 100%); }
.lk-vocab #view-list, .lk-vocab #view-list .sticky { background: var(--lk-surface) !important; }
.lk-vocab #card-progress { background: var(--lk-accent) !important; }
.lk-vocab #card-progress { box-shadow: none; }
.lk-vocab #card-progress.parentNode, .lk-vocab #view-flashcard .bg-slate-200 { background: var(--lk-accent-soft) !important; }
.lk-vocab #card-counter { color: var(--lk-muted); }
.lk-vocab #flashcard-inner > div:first-child { border-color: var(--lk-line) !important; }
.lk-vocab #flashcard-inner > div:first-child > div:first-child { background: var(--lk-surface-2) !important; }
.lk-vocab #flashcard-inner .text-blue-500 { color: var(--lk-accent) !important; }
.lk-vocab #flashcard-inner > div:last-child { background: linear-gradient(160deg, #2a2266, #1d1747) !important; border-color: #3d3486 !important; }
.lk-vocab #flashcard-inner > div:last-child button { background: var(--lk-accent) !important; }
.lk-vocab #view-flashcard button[onclick="shuffleCards()"] { background: #241a4f !important; }
.lk-vocab #view-flashcard button[onclick="prevCard()"], .lk-vocab #view-flashcard button[onclick="nextCard()"] { color: var(--lk-accent) !important; border-color: var(--lk-line) !important; }
.lk-vocab #list-search { border-color: var(--lk-line) !important; background: var(--lk-surface-2); }
.lk-vocab #view-list table { border-color: var(--lk-line); }
.lk-vocab #view-list thead { background: var(--lk-surface-2) !important; }
.lk-vocab #vocab-list-body button:not(.star-btn) { background: var(--lk-accent-soft) !important; color: var(--lk-accent) !important; }
.lk-vocab #welcome-state > div:first-child { background: var(--lk-accent-soft) !important; color: var(--lk-accent) !important; }
.lk-vocab #welcome-state h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400 !important; }
@media (max-width: 767px) {
  .lk-vocab .vocab-app { flex-direction: column; height: auto; min-height: 0; }
  .lk-vocab #sidebar { position: static !important; transform: none !important; width: 100% !important; height: auto !important; box-shadow: none !important; border-right: 0; border-bottom: 1px solid var(--lk-line); }
  .lk-vocab #sidebar > div:first-child button { display: none; }
  .lk-vocab #category-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; }
  .lk-vocab #category-list > * + * { margin-top: 0 !important; }
  .lk-vocab .category-btn { width: auto !important; flex: 0 0 auto; border: 1px solid var(--lk-line) !important; }
  .lk-vocab #sidebar-overlay { display: none !important; }
  .lk-vocab main { height: auto !important; min-height: 660px; }
  .lk-vocab #welcome-state { position: static; padding: 48px 20px; }
  .lk-vocab #active-view { min-height: 0; }
  /* Let the card area grow with the page instead of scrolling inside a fixed box. */
  .lk-vocab #active-view > .flex-grow { overflow: visible; }
  .lk-vocab #view-flashcard { position: static; overflow: visible; justify-content: flex-start; padding: 18px 14px 26px; }
  .lk-vocab #view-flashcard > .mb-6 { margin-bottom: 14px; }
  .lk-vocab #view-flashcard > .group { margin-bottom: 20px; }
  .lk-vocab #view-list { position: static; overflow: visible; }
  .lk-vocab #view-list > div { padding: 14px; }
  .lk-vocab #active-view > div:first-child { padding: 14px 16px; }
  .lk-vocab #current-title { font-size: 26px !important; }
}

/* ------------------------------------------------------ Talking Partner */
.tp-panel { padding: 36px 32px 32px; }
.tp-root { max-width: 1060px; margin: 0 auto; }
.tp-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(34px, 4vw, 50px); line-height: 1.05; color: var(--lk-ink); margin: 0 0 8px; }
.lk-partner .tp-root > .fade-in > .text-center p { color: var(--lk-muted) !important; }
.tp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tp-card { position: relative; display: grid; grid-template-columns: 46% 1fr; min-height: 230px; padding: 0; border-radius: 22px; overflow: hidden; text-align: left;
  border: 1px solid var(--lk-line); background: var(--lk-surface); box-shadow: var(--lk-shadow); cursor: pointer; }
.tp-card:hover { box-shadow: 0 18px 40px rgba(60,40,140,.18) !important; }
.tp-photo { position: relative; display: block; }
.tp-photo .avatar.tp-avatar { position: absolute; inset: 0; border-radius: 0 !important; border: 0 !important; box-shadow: none !important; width: 100%; height: 100%; }
.tp-photo .avatar img { object-position: center 18%; }
.tp-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, var(--tp-tint)); }
.tp-body { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 22px; background: var(--tp-tint); }
.tp-name { font-family: 'DM Serif Display', Georgia, serif; font-size: 34px; line-height: 1; color: var(--lk-ink); padding-right: 30px; }
.tp-chip { align-self: flex-start; font: 700 13px/1 'Inter', sans-serif; padding: 7px 13px; border-radius: 999px; background: var(--tp-chip-bg); color: var(--tp-chip); }
.tp-desc { font-size: 15px; line-height: 1.5; color: var(--lk-muted); }
.tp-deco { position: absolute; top: 22px; right: 22px; font-size: 22px; color: var(--tp-chip); opacity: .55; }
.tp-go { margin-top: auto; align-self: flex-end; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tp-chip-bg); color: var(--tp-chip); font-size: 18px; transition: transform .2s; }
.tp-card:hover .tp-go { transform: translateX(3px); }
.tp-ha-neul { --tp-tint: #fff4f9; --tp-chip-bg: #fde2ef; --tp-chip: #c0267a; }
.tp-do-hyun { --tp-tint: #f5f6fb; --tp-chip-bg: #e3e7f3; --tp-chip: #3f4a6b; }
.tp-ji-ho { --tp-tint: #fffaf0; --tp-chip-bg: #fdefc6; --tp-chip: #a16207; }
.tp-seo-yeon { --tp-tint: #f3f7ff; --tp-chip-bg: #dfe9fd; --tp-chip: #2f5bc4; }
.tp-perks { list-style: none; margin: 26px 0 0; padding: 20px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
  border: 1px solid var(--lk-line); border-radius: 20px; background: var(--lk-surface-2); }
.tp-perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--lk-muted); line-height: 1.45; }
.tp-perks i { font-size: 24px; color: var(--lk-accent); margin-top: 2px; }
.tp-perks strong { display: block; color: var(--lk-accent); font-size: 14.5px; margin-bottom: 2px; }
/* chat + topic steps: keep their layout, adopt the theme accent */
.lk-partner .tp-root .bg-indigo-600, .lk-partner .tp-root .bg-blue-600 { background-color: var(--lk-accent) !important; }
.lk-partner .tp-root .bg-indigo-600:hover, .lk-partner .tp-root .bg-blue-600:hover { background-color: var(--lk-accent-hover) !important; }
.lk-partner #msgs { background: var(--lk-surface-2) !important; }
@media (max-width: 860px) {
  .tp-grid { grid-template-columns: 1fr; }
  .tp-perks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .tp-panel { padding: 22px 14px; }
  .tp-card { grid-template-columns: 34% 1fr; min-height: 190px; }
  .tp-name { font-size: 27px; }
  .tp-body { padding: 18px 16px; gap: 8px; }
  .tp-desc { font-size: 13.5px; }
  .tp-go { width: 42px; height: 42px; }
  .tp-perks { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ Homework */
.hw-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.hw-mastery { width: 330px; flex-shrink: 0; padding: 22px 24px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); align-self: flex-end; margin-bottom: 10px; }
.hw-mastery-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hw-mastery-label { font: 700 12px/1 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--lk-muted); margin: 0 0 8px; }
.hw-mastery h3 { font: 800 32px/1 'Inter', sans-serif; color: var(--lk-ink); margin: 0; }
.hw-mastery-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--lk-accent-soft); color: var(--lk-accent); font-size: 18px; }
.hw-mastery-track { height: 10px; border-radius: 10px; background: var(--lk-accent-soft); margin: 18px 0 14px; overflow: hidden; }
.hw-mastery-track > div { height: 100%; border-radius: 10px; background: var(--lk-accent); transition: width 1s ease; }
.hw-mastery-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--lk-muted); }
.hw-mastery-foot strong { color: var(--lk-ink); }
.lk-homework .hw-body { position: relative; z-index: 2; margin-top: -30px; }
.lk-homework aside > div:first-child { background: var(--lk-surface) !important; border: 1px solid var(--lk-line) !important; border-radius: 22px !important; box-shadow: var(--lk-shadow) !important; }
.lk-homework aside h3 { color: var(--lk-ink) !important; font-size: 18px !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 800 !important; }
.lk-homework .filter-btn { color: var(--lk-ink) !important; }
.lk-homework .filter-btn.bg-blue-50 { background: var(--lk-accent-soft) !important; color: var(--lk-accent) !important; border-color: color-mix(in srgb, var(--lk-accent) 25%, white) !important; }
.lk-homework .filter-btn:hover { background: var(--lk-surface-2) !important; }
.hw-streak { border: 1px solid var(--lk-line); border-radius: 18px; padding: 18px; background: linear-gradient(160deg, var(--lk-surface) 0%, var(--lk-surface-2) 100%); }
.hw-streak-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.hw-streak-head i { font-size: 30px; color: #f97316; }
.hw-streak-head h4 { margin: 0; font-size: 17px; font-weight: 800; color: var(--lk-ink); }
.hw-streak-head p { margin: 2px 0 0; font-size: 13px; color: var(--lk-muted); line-height: 1.4; }
.hw-streak-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hw-streak-stats > div { text-align: center; background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: 14px; padding: 10px 4px; }
.hw-streak-stats strong { display: block; font-size: 24px; font-weight: 800; color: var(--lk-ink); }
.hw-streak-stats span { font-size: 11px; color: var(--lk-muted); line-height: 1.25; display: block; }
.hw-modules-title { font: 800 24px/1.2 'Inter', sans-serif; color: var(--lk-ink); margin: 0; }
.lk-homework #homework-container > div { border-radius: 22px !important; border-color: var(--lk-line) !important; box-shadow: var(--lk-shadow) !important; background: var(--lk-surface) !important; }
.lk-homework #homework-container h3 { color: var(--lk-ink) !important; }
.lk-homework #homework-container .bg-blue-600 { background-color: var(--lk-accent) !important; }
.lk-homework #homework-container .divide-y > div:hover { background: var(--lk-surface-2) !important; }
.lk-homework #homework-view { background: var(--lk-page) !important; }
.lk-homework #homework-view > div:first-child { z-index: 70; }
@media (max-width: 900px) {
  .hw-hero-inner { flex-direction: column; align-items: stretch; }
  .hw-mastery { width: auto; align-self: stretch; }
}

/* -------------------------------------------------------------- Review */
.rv-root { position: relative; z-index: 2; margin-top: -54px; min-height: 300px; }
.rv-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.rv-stat { background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: 20px; box-shadow: var(--lk-shadow); padding: 18px 10px 16px; text-align: center; }
.rv-stat-ic { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: currentColor; margin-bottom: 6px; }
.rv-stat-ic i { color: #fff; }
.rv-stat-ic.text-blue-600 { color: #4f6bed !important; } .rv-stat-ic.text-purple-600 { color: #9b6bf2 !important; }
.rv-stat-n { font: 800 34px/1.1 'Inter', sans-serif; }
.rv-stat-l { font-size: 14px; color: var(--lk-ink); font-weight: 500; }
.rv-h { font: 800 26px/1.2 'Inter', sans-serif; color: var(--lk-ink); margin: 0; }
.rv-sub { color: var(--lk-muted); margin: 4px 0 16px; }
.rv-queue { display: grid; gap: 14px; margin-bottom: 40px; }
.rv-card { display: flex; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: 20px; box-shadow: var(--lk-shadow); }
.rv-thumb { width: 170px; height: 110px; background-position: center 30% !important; flex-shrink: 0; border-radius: 14px; background: var(--lk-accent-soft) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--lk-accent); }
.rv-title { font: 800 19px/1.3 'Inter', sans-serif; color: var(--lk-ink); margin: 0; }
.rv-card .text-slate-600 { color: var(--lk-muted) !important; }
.rv-actions { display: flex; gap: 10px; flex-shrink: 0; }
.rv-btn { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 'Inter', sans-serif; padding: 13px 18px; border-radius: 14px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.rv-btn-ghost { color: var(--lk-accent); border-color: var(--lk-line); background: var(--lk-surface); }
.rv-btn-ghost:hover { border-color: var(--lk-accent); }
.rv-btn-primary { background: var(--lk-accent); color: #fff; padding-left: 22px; padding-right: 22px; }
.rv-btn-primary:hover { background: var(--lk-accent-hover); }
.lk-review .rv-root .bg-blue-600 { background-color: var(--lk-accent) !important; }
.lk-review .rv-root > .fade-in > .bg-white, .lk-review .rv-root > .bg-white { border-radius: 20px; box-shadow: var(--lk-shadow); border-color: var(--lk-line) !important; }
@media (max-width: 860px) {
  .rv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rv-card { flex-wrap: wrap; }
  .rv-thumb { width: 100%; height: 110px; }
  .rv-actions { width: 100%; }
  .rv-actions > * { flex: 1; justify-content: center; }
}
@media (max-width: 480px) { .rv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- Notes */
body.lk-notes { height: auto; display: block; }
.notes-app { height: min(760px, calc(100vh - 60px)); min-height: 560px; }
.lk-notes .notes-app > aside, .lk-notes .notes-app > section { border-radius: 22px !important; border-color: var(--lk-line) !important; box-shadow: var(--lk-shadow) !important; background: var(--lk-surface) !important; }
.lk-notes .notes-app > aside > div:first-child { background: var(--lk-surface-2) !important; border-color: var(--lk-line) !important; }
.notes-h { font: 800 17px/1.2 'Inter', sans-serif; color: var(--lk-ink); margin: 0; }
.lk-notes .notes-app .bg-blue-600 { background-color: var(--lk-accent) !important; }
.lk-notes #search-notes { background: var(--lk-surface-2) !important; }
.lk-notes #note-title { color: var(--lk-ink); background: transparent; }
.lk-notes #note-content { background: repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--lk-accent) 9%, transparent) 31px 32px); background-attachment: local; line-height: 32px; color: var(--lk-ink); }
.lk-notes .note-item.bg-blue-50, .lk-notes .note-item.active { background: var(--lk-accent-soft) !important; }
@media (max-width: 767px) {
  .notes-app { height: auto; min-height: 0; }
  .lk-notes .notes-app > section { min-height: 420px; }
  .lk-notes .notes-app > aside { max-height: 360px; }
}

/* ---------------------------------------------------------- Animations */
.an-main { display: grid; gap: 24px; }
.an-featured { position: relative; min-height: 300px; border-radius: 24px; overflow: hidden; display: flex; align-items: flex-end; color: #fff; background: #2b1a6b; box-shadow: var(--lk-shadow); }
.an-featured-art { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.an-featured-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,20,80,.88) 0%, rgba(30,20,80,.5) 40%, rgba(30,20,80,0) 70%), linear-gradient(0deg, rgba(20,14,60,.55), transparent 50%); }
.an-featured-copy { position: relative; padding: 30px 32px; max-width: 460px; }
.an-featured h2 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1; margin: 0 0 8px; }
.an-featured p { margin: 0; color: #e6defc; font-size: 16px; }
.an-soon-badge { position: absolute; top: 22px; right: 22px; font: 800 15px/1 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; padding: 12px 18px; border-radius: 14px; border: 2px solid rgba(255,255,255,.75); background: rgba(124,77,255,.55); backdrop-filter: blur(6px); }
.an-library { padding: 22px; }
.an-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.an-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--lk-line); border-radius: 18px; overflow: hidden; background: var(--lk-surface); cursor: pointer; color: var(--lk-ink); }
.an-card.is-placeholder { cursor: default; }
.an-thumb { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-size: 26px; color: color-mix(in srgb, var(--lk-accent) 45%, white); background: var(--lk-accent-soft) center / cover no-repeat; }
.an-card-body { padding: 12px 14px 14px; display: grid; gap: 7px; }
.an-line { height: 10px; border-radius: 6px; background: var(--lk-accent-soft); width: 80%; }
.an-line.short { width: 45%; }
.an-empty { grid-column: 1 / -1; margin: 4px 0 0; text-align: center; color: var(--lk-muted); font-weight: 500; }
.lk-anim .shimmer { background: linear-gradient(90deg, var(--lk-accent-soft) 0%, var(--lk-surface) 50%, var(--lk-accent-soft) 100%); background-size: 1000px 100%; }
.an-meantime { text-align: center; padding: 10px 0 0; }
.an-meantime p { color: var(--lk-muted); max-width: 640px; margin: 8px auto 18px; line-height: 1.6; }
.an-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.an-player { width: min(960px, 94vw); padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #0f0b2a; color: #fff; }
.an-player::backdrop { background: rgba(10, 8, 30, .75); }
.an-player-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.an-player-head h3 { margin: 0; font-size: 16px; }
.an-close { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.an-player video { display: block; width: 100%; background: #000; }
@media (max-width: 860px) { .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .an-soon-badge { top: 14px; right: 14px; font-size: 12px; padding: 9px 12px; } .an-featured-copy { padding: 22px 18px; } }

/* partner photos: frame faces (portrait art) */
.lk-partner .avatar img { object-position: center 14% !important; }
.tp-photo .avatar img { object-position: center 12% !important; }
.lk-tile img[src*='partners/'] { object-position: center 12%; }
/* small round avatars: zoom in on the face */
.lk-partner .avatar:not(.tp-avatar) img { transform: scale(2); transform-origin: 50% 17%; }

/* -------------------------------------------------------------- Contact */
.ct-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
.ct-grid > * { min-width: 0; }
.ct-form-card { padding: 26px 26px 22px; }
.ct-head, .ct-info { display: flex; gap: 16px; align-items: flex-start; }
.ct-ic { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: var(--lk-accent-soft); color: var(--lk-accent); }
.ct-head h2, .ct-info h2 { font-size: 26px; line-height: 1.15; margin: 2px 0 6px; color: var(--lk-ink); }
.ct-head p, .ct-info p { margin: 0; color: var(--lk-muted); font-size: 14.5px; line-height: 1.55; }
#ct-form { display: grid; margin-top: 20px; }
#ct-form label { font-weight: 700; font-size: 14.5px; color: var(--lk-ink); margin: 14px 0 6px; }
#ct-form label span { color: #e11d48; }
#ct-form input, #ct-form select, #ct-form textarea { width: 100%; box-sizing: border-box; font: 15px/1.4 'Inter', sans-serif; color: var(--lk-ink); background: var(--lk-surface); border: 1.5px solid var(--lk-line); border-radius: 12px; padding: 12px 14px; }
#ct-form textarea { resize: vertical; min-height: 130px; }
#ct-form input:focus, #ct-form select:focus, #ct-form textarea:focus { outline: none; border-color: var(--lk-accent); box-shadow: 0 0 0 3px var(--lk-accent-soft); }
#ct-form [aria-invalid="true"] { border-color: #e11d48; }
.ct-select { position: relative; }
.ct-select select { appearance: none; -webkit-appearance: none; padding-right: 40px !important; }
.ct-select i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--lk-muted); pointer-events: none; font-size: 13px; }
.ct-count { text-align: right; color: var(--lk-muted); font-size: 13px; margin-top: 6px; }
.ct-error { color: #be123c; font-weight: 600; font-size: 14px; margin: 8px 0 0; }
.ct-send { margin-top: 14px; width: 100%; border-radius: 14px; padding: 16px; font-size: 16px; }
.ct-note { text-align: center; color: var(--lk-muted); font-size: 13.5px; margin: 14px 0 0; }
.ct-note i { margin-right: 6px; } .ct-note a { color: var(--lk-accent); }
.ct-side { display: grid; gap: 22px; }
.ct-info { padding: 22px; }
.ct-mail { display: inline-block; margin-top: 10px; font: 400 24px/1.2 'DM Serif Display', Georgia, serif; color: var(--lk-accent); text-decoration: none; word-break: break-all; }
.ct-mail:hover { text-decoration: underline; }
.ct-copy { display: inline-flex; gap: 7px; align-items: center; margin-top: 12px; font: 600 13px/1 'Inter', sans-serif; color: var(--lk-accent); background: var(--lk-accent-soft); border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.ct-links { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; }
.ct-links a { color: var(--lk-accent); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.ct-links a:hover { text-decoration: underline; }
@media (max-width: 860px) { .ct-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ct-form-card, .ct-info { padding: 18px; } .ct-head h2, .ct-info h2 { font-size: 22px; } #ct-form input, #ct-form select, #ct-form textarea { font-size: 16px; } }

/* vocab stars: gray = not starred, gold = starred */
.lk-vocab .star-btn { color: #cbd5e1 !important; }
.lk-vocab .star-btn:hover { color: #f59e0b !important; }
.lk-vocab .star-btn[aria-pressed="true"] { color: #f59e0b !important; background: #fffbeb !important; box-shadow: 0 0 0 2px #fde68a; }
