﻿:root {
    --lw-ink: #203029;
    --lw-green: #355e4b;
    --lw-green-dark: #284a3a;
    --lw-cream: #f4efe5;
    --lw-paper: #fffdf8;
    --lw-mustard: #d9a441;
    --lw-border: #ded7ca;
    --lw-soft: #ebe4d7;
    --lw-muted: #6f746f;
    --lw-sticky-header-offset: 0px;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { margin: 0; color: var(--lw-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
button, input, select { font: inherit; }

.lw-landing-body, .lw-app-body { background: var(--lw-cream); min-height: 100vh; }
.lw-app-body { overflow-x: clip; }
.lw-public-header { background: rgba(255,253,248,.96); border-bottom: 1px solid var(--lw-border); }
.lw-public-inner, .lw-app-header-inner { max-width: 1500px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lw-logo { font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -1.6px; color: var(--lw-green-dark); }
.lw-logo span { color: var(--lw-mustard); }
.lw-logo-small { font-size: 29px; }
.lw-brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lw-brand-icon { display: block; width: 52px; height: 52px; object-fit: contain; flex: 0 0 auto; }
.lw-brand-wordmark { font-family: Georgia, "Times New Roman", serif; font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -1.4px; white-space: nowrap; }
.lw-brand-wordmark span { color: var(--lw-green-dark); }
.lw-brand-wordmark b { color: var(--lw-mustard); font-weight: 700; }
.lw-brand-lockup-app .lw-brand-icon { width: 48px; height: 48px; }
.lw-brand-lockup-app .lw-brand-wordmark { font-size: 28px; }
.lw-tagline, .lw-header-sub { color: var(--lw-muted); font-size: 14px; }
.lw-public-actions { display: flex; align-items: center; gap: 14px; }
.lw-public-login { min-width: 112px; min-height: 44px; margin-left: 18px; padding: 0 22px; border: 1px solid var(--lw-green); border-radius: 9px; background: transparent; color: var(--lw-green-dark); font-weight: 700; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.lw-public-login:hover, .lw-public-login:focus { background: #edf2ee; outline: none; transform: translateY(-1px); }
.lw-language-select { min-height: 34px; border: 1px solid var(--lw-border); border-radius: 8px; background: #fff; color: var(--lw-ink); padding: 5px 30px 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.lw-language-select:focus { outline: 2px solid rgba(53,94,75,.18); outline-offset: 1px; }

.lw-landing-hero { background: linear-gradient(102deg, #fffdf8 0%, #f5f0e6 100%); border-bottom: 1px solid rgba(222,215,202,.7); }
.lw-landing-hero-inner { width: 100%; max-width: 1320px; min-height: 520px; margin: 0 auto; padding: 42px 28px 34px; display: grid; grid-template-columns: minmax(470px,1fr) minmax(480px,.95fr); align-items: center; gap: 56px; }
.lw-eyebrow { text-transform: uppercase; letter-spacing: .13em; color: var(--lw-green); font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.lw-hero-copy h1 { max-width: 650px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px, 4vw, 66px); line-height: .98; letter-spacing: -2px; margin: 0 0 18px; color: #1f3028; }
.lw-hero-description { max-width: 580px; margin: 0; color: #66726d; font-size: 20px; line-height: 1.45; }
.lw-quick-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; max-width: 590px; margin-top: 26px; }
.lw-quick-feature { min-width: 0; display: flex; align-items: center; gap: 10px; color: #253a31; font-size: 13px; font-weight: 700; line-height: 1.25; }
.lw-feature-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: #f4ead2; color: #173f34; display: inline-flex; align-items: center; justify-content: center; }
.lw-feature-icon svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lw-hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.lw-landing-primary { min-width: 240px; }
.lw-btn.lw-btn-level-test { min-width: 205px; border: 1px solid var(--lw-green); border-radius: 10px; background: rgba(255,255,255,.4); color: var(--lw-green-dark); text-decoration: none !important; }
.lw-btn.lw-btn-level-test:hover, .lw-btn.lw-btn-level-test:focus { background: #edf2ee; color: var(--lw-green-dark); outline: none; }
.lw-hero-reassurance { max-width: 580px; margin: 24px 0 0; color: #66726d; font-size: 20px; line-height: 1.45; }
.lw-hero-visual { position: relative; padding-top: 64px; min-width: 0; max-width: 650px; align-self: center; }
.lw-hero-visual img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.lw-hero-translator-badge { display: inline-flex; margin: 0 0 10px; padding: 4px 10px; border: 1px solid #e2d4b4; border-radius: 20px; background: #f4ead2; color: var(--lw-green-dark); font-size: 12px; font-weight: 700; line-height: 1.3; }
.lw-hero-translator-highlight { margin: 12px 0 0; color: var(--lw-green-dark); font-size: 17px; font-weight: 700; line-height: 1.35; }
.lw-hero-translation { position: absolute; top: 0; left: 6%; width: 270px; max-width: 88%; padding: 12px 14px; border: 1px solid #d9d1c4; border-radius: 16px; background: var(--lw-paper); box-shadow: 0 8px 24px rgba(32,48,41,.1); color: var(--lw-green-dark); pointer-events: none; }
.lw-hero-translation-heading { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.lw-hero-translation-mic { width: 28px; height: 28px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--lw-green); color: var(--lw-paper); }
.lw-hero-translation-mic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lw-hero-translation-wave { margin-left: auto; color: #819b8c; }
.lw-hero-translation-wave svg { display: block; width: 28px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lw-hero-translation-phrases { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); align-items: center; gap: 6px; margin-top: 8px; }
.lw-hero-translation-label { display: block; margin-bottom: 4px; color: #66726d; font-size: 11px; line-height: 1.2; }
.lw-hero-translation-source, .lw-hero-translation-target { display: block; padding: 7px 9px; border-radius: 9px; background: #f2ede3; font-size: 15px; font-weight: 700; line-height: 1.1; }
.lw-hero-translation-target { background: #e6eee8; }
.lw-hero-translation-arrow { color: #819b8c; font-size: 16px; text-align: center; }

.lw-btn { border: 0; border-radius: 10px; min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; transition: .16s ease; text-transform: none; box-shadow: none; }
.lw-button-icon { display: inline-flex; align-items: center; margin-right: 7px; font-size: 16px; line-height: 1; }
.lw-btn:hover { transform: translateY(-1px); }
.lw-btn-primary { background: var(--lw-green); color: #fff; }
.lw-btn-primary:hover { background: var(--lw-green-dark); color: #fff; }
.lw-btn-secondary { background: transparent; color: var(--lw-green-dark); border: 1px solid var(--lw-green); }
.lw-btn-danger { background: transparent; color: #963f3b; border: 1px solid #b76a65; }
.lw-btn-danger:hover, .lw-btn-danger:focus { background: #f7e8e6; color: #782f2b; outline: none; }
.lw-btn-full { width: 100%; margin-top: 18px; }

.lw-learning-flow { padding: 28px max(28px,calc((100vw - 1500px)/2)) 42px; background: #fffdfa; }
.lw-learning-flow h2 { margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; color: #174638; font-size: 29px; font-weight: 700; text-align: center; }
.lw-learning-steps { display: grid; grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr); align-items: center; }
.lw-learning-step { position: relative; min-height: 132px; padding: 19px 16px 17px 60px; border: 1px solid #e4ded3; border-radius: 9px; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: start; gap: 12px; background: rgba(255,255,255,.72); }
.lw-step-number { position: absolute; top: 18px; left: 17px; width: 29px; height: 29px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lw-mustard); color: #fff; font-size: 14px; font-weight: 800; }
.lw-learning-step .lw-feature-icon { background: #f3f4ef; }
.lw-learning-step h3 { margin: 7px 0 6px; color: #24382f; font-size: 15px; font-weight: 800; line-height: 1.25; }
.lw-learning-step p { margin: 0; color: #66716c; font-size: 13px; line-height: 1.45; }
.lw-step-arrow { color: #829087; font-size: 25px; text-align: center; }
.lw-founder-section { padding: 78px 28px; background: #f5f0e6; border-bottom: 1px solid rgba(222,215,202,.75); }
.lw-founder-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: start; gap: 62px; }
.lw-founder-identity { padding-top: 37px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lw-founder-portrait { display: block; width: 150px; height: 150px; border: 3px solid #d5b66e; border-radius: 50%; object-fit: cover; object-position: center; }
.lw-founder-identity strong { margin-top: 16px; color: var(--lw-green-dark); font-size: 16px; }
.lw-founder-identity span { margin-top: 3px; color: var(--lw-muted); font-size: 13px; }
.lw-founder-story { max-width: 810px; }
.lw-founder-story h2, .lw-method-section h2 { margin: 0 0 20px; font-family: Georgia, "Times New Roman", serif; color: #174638; font-size: 36px; font-weight: 700; line-height: 1.15; }
.lw-founder-story p { margin: 0 0 16px; color: #52615a; font-size: 16px; line-height: 1.72; }
.lw-founder-story .lw-founder-conclusion { margin-bottom: 0; padding-left: 18px; border-left: 3px solid var(--lw-mustard); color: #29453a; font-weight: 650; }
.lw-method-section { padding: 66px 28px 76px; background: #fffdfa; }
.lw-method-inner { max-width: 1180px; margin: 0 auto; }
.lw-method-section h2 { margin-bottom: 12px; text-align: center; }
.lw-method-intro { max-width: 800px; margin: 0 auto 30px; color: #647069; font-size: 16px; line-height: 1.65; text-align: center; }
.lw-method-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.lw-method-card { min-height: 145px; padding: 24px; border: 1px solid #e3dccf; border-radius: 10px; background: rgba(255,255,255,.75); display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: start; gap: 16px; }
.lw-method-card h3 { margin: 5px 0 8px; color: var(--lw-green-dark); font-size: 17px; font-weight: 800; line-height: 1.25; }
.lw-method-card p { margin: 0; color: #69736e; font-size: 14px; line-height: 1.55; }
.lw-footer { text-align: center; color: var(--lw-muted); font-size: 12px; padding: 34px; }

.lw-modal-backdrop, .lw-explain-backdrop, .lw-news-backdrop { position: fixed; inset: 0; z-index: 10000; background: rgba(26,37,31,.55); align-items: center; justify-content: center; padding: 20px; }
.lw-modal-backdrop, .lw-explain-backdrop, .lw-news-backdrop { display: none; }
.lw-modal-backdrop.show, .lw-explain-backdrop.show, .lw-news-backdrop.show { display: flex; }
#newsModal { display: flex; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .16s ease, visibility .16s ease; }
#newsModal.show { visibility: visible; opacity: 1; pointer-events: auto; }
#onboardingModal { display: flex; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .16s ease, visibility .16s ease; }
#onboardingModal.show { visibility: visible; opacity: 1; pointer-events: auto; }
html.lw-onboarding-open, body.lw-onboarding-open { overflow: hidden; }
.lw-modal-card, .lw-explain-card { position: relative; width: min(460px, 100%); background: var(--lw-paper); border-radius: 16px; padding: 30px; box-shadow: 0 25px 75px rgba(0,0,0,.25); }
.lw-modal-card h2 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 4px; font-size: 30px; }
.lw-modal-card label { display: block; font-size: 13px; font-weight: 700; margin: 16px 0 6px; }
.lw-modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #7b817c; font-family: Arial, sans-serif; font-size: 30px; line-height: 1; cursor: pointer; }
.lw-form-error { display: block; color: #a23535; font-weight: 600; font-size: 13px; margin: 8px 0; }
.lw-help, .lw-small { font-size: 12px; }
.lw-muted { color: var(--lw-muted); }

.lw-app-header { background: var(--lw-paper); border-bottom: 1px solid var(--lw-border); position: -webkit-sticky; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 12px rgba(41,52,45,.035); }
.lw-user-area { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.lw-logout { color: var(--lw-green); font-weight: 700; }
.lw-admin-onboarding-test { padding: 3px 8px; border: 1px solid #cfc8ba; border-radius: 999px; background: transparent; color: var(--lw-green); font-size: 10px; font-weight: 750; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.lw-admin-onboarding-test:hover, .lw-admin-onboarding-test:focus { border-color: var(--lw-green); background: #eef3ee; color: var(--lw-green-dark); outline: none; }
.lw-app-shell { width: 100%; max-width: 1280px; min-width: 0; margin: 0 auto; padding: 26px; }
/* Sidebar: keep Stories and Words visible as two independent scroll areas on desktop. */
.lw-sidebar { position: sticky; top: 100px; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; height: calc(100vh - 120px); max-height: calc(100vh - 120px); overflow: hidden; padding-right: 2px; }
.lw-side-card { background: rgba(255,253,248,.78); border: 1px solid var(--lw-border); border-radius: 14px; padding: 16px; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.lw-dashboard-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 24px; align-items: stretch; }
.lw-dashboard-card { height: 520px; max-height: calc(100vh - 150px); min-height: 360px; box-shadow: 0 8px 28px rgba(49,59,52,.045); }
.lw-dashboard-stories { padding: 20px; }
.lw-dashboard-stories > h3 { color: var(--lw-ink); font-size: 18px; font-weight: 800; letter-spacing: .09em; margin-bottom: 15px; }
#historyList, #savedWordsList { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; overscroll-behavior: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
#historyList::-webkit-scrollbar, #savedWordsList::-webkit-scrollbar { width: 0; height: 0; display: none; }
.lw-side-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: #59645e; margin: 0 0 12px; }
.lw-side-card-head { display: flex; align-items: center; justify-content: space-between; }
.lw-pill { min-width: 25px; height: 25px; padding: 0 7px; border-radius: 999px; background: var(--lw-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.lw-history-row { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto 26px; align-items: center; gap: 8px; margin-bottom: 7px; }
.lw-history-item { display: block; min-width: 0; text-decoration: none !important; color: var(--lw-ink); padding: 13px 14px; border: 1px solid #e7e0d5; border-radius: 11px; background: rgba(255,255,255,.64); transition: .15s; }
.lw-history-item:hover { border-color: #cbd5cc; background: #f7f9f4; color: var(--lw-ink); box-shadow: 0 5px 14px rgba(47,66,55,.07); transform: translateY(-1px); }
.lw-history-item.active { border-color: #c8d5cb; background: #e4eadf; }
.lw-history-item.is-news, .lw-history-item.is-book, .lw-history-item.is-story { display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 13px; align-items: center; }
.lw-history-thumbnail { display: none; width: 66px; height: 50px; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: #f1ede4; }
.lw-history-item.is-news .lw-history-thumbnail, .lw-history-item.is-book .lw-history-thumbnail, .lw-history-item.is-story .lw-history-thumbnail { display: flex; }
.lw-history-thumbnail img { width: 58px; height: 44px; object-fit: contain; }
.lw-history-news-icon, .lw-history-story-icon { display: none; }
.lw-history-item.is-news .lw-history-news-icon, .lw-history-item.is-story .lw-history-story-icon { display: block; }
.lw-history-type-icon { width: 58px; height: 44px; overflow: visible; stroke: #343b37; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lw-icon-shadow { fill: rgba(49,59,52,.16); stroke: none; transform: translate(1px, 1px); }
.lw-icon-page { fill: #fffaf0; }
.lw-icon-book-cover { fill: #d8bd74; }
.lw-icon-book-spine { fill: none; stroke: #76591d; stroke-width: 2.8; }
.lw-icon-label { fill: #f8eed3; stroke: #76591d; stroke-width: 1.7; }
.lw-icon-detail { fill: none; stroke: #4c514d; stroke-width: 1.8; }
.lw-icon-spark { fill: #d2ac4e; stroke: #76591d; stroke-width: 1.5; }
.lw-icon-spark-small { fill: none; stroke: #9a7027; stroke-width: 1.8; }
.lw-history-copy { display: block; min-width: 0; }
.lw-history-content-type { display: block; margin-bottom: 3px; color: #9a7027; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.lw-history-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 600; line-height: 1.3; }
.lw-history-meta { display: block; color: var(--lw-muted); font-size: 11px; margin-top: 5px; text-transform: uppercase; letter-spacing: .045em; }
.lw-history-foot { margin-top: 5px; display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.lw-history-foot .lw-history-meta { min-width: 0; margin-top: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-history-quiz-badge { flex: 0 1 auto; min-height: 28px; max-width: 105px; overflow: hidden; padding: 4px 8px; display: flex; align-items: center; justify-content: center; border: 1px solid #d8cfba; border-radius: 7px; background: #f8f3e7; color: #617067; font-family: inherit; font-size: 9px; font-weight: 850; line-height: 1.2; letter-spacing: .045em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.lw-history-quiz-badge:hover, .lw-history-quiz-badge:focus { border-color: #bcae8f; background: #f2ead8; outline: none; }
.lw-history-reading-actions { position: relative; z-index: 2; min-width: 104px; display: flex; align-items: stretch; flex-direction: column; gap: 6px; }
.lw-history-reading-actions .lw-history-quiz-badge { max-width: none; text-align: center; }
.lw-history-discuss { min-height: 28px; padding: 4px 8px; border: 1px solid #9fb1a5; border-radius: 7px; background: #fff; color: var(--lw-green-dark); font-size: 10px; font-weight: 800; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.lw-history-discuss:hover, .lw-history-discuss:focus { border-color: var(--lw-green); background: #edf2ee; outline: none; }
.lw-history-book-continue { min-height: 34px; padding: 5px 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #9fb1a5; border-radius: 7px; background: #fff; color: var(--lw-green-dark); font-size: 10px; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none !important; }
.lw-history-book-continue:hover, .lw-history-book-continue:focus { border-color: var(--lw-green); background: #edf2ee; color: var(--lw-green-dark); outline: none; }
.lw-history-book-actions { min-width: 142px; }
.lw-history-book-remove { padding: 3px 5px; border: 0; background: transparent; color: #7f625c; font: inherit; font-size: 10px; font-weight: 700; line-height: 1.25; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.lw-history-book-remove:hover, .lw-history-book-remove:focus { color: #8f3939; outline: none; }
.lw-reading-empty-state { padding: 54px 18px; text-align: center; color: var(--lw-muted); }
.lw-reading-empty-title, .lw-reading-empty-text { display: block; }
.lw-reading-empty-title { color: var(--lw-green-dark); font-family: Georgia,"Times New Roman",serif; font-size: 21px; font-weight: 700; }
.lw-reading-empty-text { margin-top: 8px; font-size: 15px; line-height: 1.55; }
.lw-saved-word { border-top: 1px solid #e8e1d6; padding: 9px 2px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: center; gap: 7px; font-size: 13px; }
.lw-saved-word span { color: var(--lw-muted); text-align: right; overflow-wrap: anywhere; }
.lw-saved-word-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 26px; }
.lw-pronounce-button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--lw-green); display: inline-flex; align-items: center; justify-content: center; font-family: "Segoe UI Symbol", "Apple Color Emoji", sans-serif; font-size: 15px; line-height: 1; cursor: pointer; opacity: .62; transition: background .15s ease, color .15s ease, opacity .15s ease, transform .15s ease; }
.lw-pronounce-button:hover, .lw-pronounce-button:focus { background: #e7eee9; color: var(--lw-green-dark); opacity: 1; outline: none; transform: scale(1.04); }
.lw-pronounce-button:active { transform: scale(.94); }
.lw-delete-item { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #9a9a91; font-family: Arial, sans-serif; font-size: 18px; line-height: 22px; text-align: center; cursor: pointer; opacity: .38; transition: .15s ease; }
.lw-delete-item:hover, .lw-delete-item:focus { opacity: 1; color: #9b3f3f; background: #f5e6e3; outline: none; }
.lw-history-row:hover .lw-delete-item, .lw-saved-word:hover .lw-delete-item { opacity: .8; }
.lw-delete-item:disabled { opacity: .2; cursor: default; }

.lw-main, .lw-create-card, .lw-reader-card, .lw-empty-card { min-width: 0; max-width: 100%; }
.lw-create-card, .lw-reader-card, .lw-empty-card { background: var(--lw-paper); border: 1px solid var(--lw-border); border-radius: 16px; box-shadow: 0 8px 28px rgba(49,59,52,.055); }
.lw-create-card { padding: 16px 20px; margin-bottom: 22px; }
.lw-create-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 9px; }
.lw-create-head > div:first-child { min-width: 0; }
.lw-create-level-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; max-width: 100%; }
.lw-create-head h1 { font-family: Georgia, "Times New Roman", serif; font-size: 26px; margin: 0; }
.lw-create-tip { color: var(--lw-muted); font-size: 12px; max-width: 350px; text-align: right; }
.lw-form-stack { display: grid; gap: 8px; }
.lw-form-row { display: grid; gap: 12px; align-items: end; }
.lw-form-row > div { min-width: 0; }
.lw-form-row label, .lw-topic-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: #5e6862; }
.lw-form-row-topic { grid-template-columns: minmax(340px, 2.25fr) minmax(220px, .9fr) minmax(170px, .72fr); }
.lw-form-row-options { grid-template-columns: repeat(3, minmax(175px, 1fr)) minmax(520px, auto); }
.lw-topic-field { width: 100%; min-width: 0; }
.lw-quick-action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; margin-top: 14px; }
.lw-discovery-groups, .lw-discovery-group, .lw-discovery-options, .lw-dashboard-quick-topics, .lw-dashboard-news-sources { display: flex; align-items: center; min-width: 0; }
.lw-discovery-groups { flex: 1 1 auto; flex-wrap: nowrap; gap: 7px; }
.lw-discovery-group { flex: 0 1 auto; gap: 6px; }
.lw-news-discovery-group { flex: 0 0 auto; }
.lw-dashboard-quick-topics, .lw-dashboard-news-sources { flex-wrap: nowrap; gap: 5px; }
.lw-dashboard-news-options { gap: 5px; }
.lw-discovery-label { color: #667069; font-size: 12px; font-weight: 800; white-space: nowrap; }
.lw-discovery-divider { align-self: stretch; width: 1px; min-height: 34px; background: #ddd5c8; }
.lw-news-source-badge { min-height: 36px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cfc8ba; border-radius: 999px; background: #fff; color: var(--lw-green-dark); font: inherit; font-size: 12px; font-weight: 750; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.lw-news-source-badge:hover, .lw-news-source-badge:focus { border-color: var(--lw-green); background: #eef3ee; outline: none; transform: translateY(-1px); }
.lw-news-source-badge:focus-visible { outline: 3px solid rgba(53,94,75,.22); outline-offset: 2px; }
.lw-news-source-logo { display: block; flex: 0 0 22px; width: 22px; height: 22px; object-fit: contain; object-position: center; }
.lw-news-more-badge { background: #faf8f3; color: #657069; }
.lw-genre-field, .lw-level-field { min-width: 0; }
.lw-input { min-height: 44px; border-radius: 9px; border-color: #d9d3c8; background: #fff; font-size: 14px; }
/* MDB versions used by the existing site can hide styled selects unless browser-default is present.
   Keep Langwhich selects native and explicit so they are visible without JS initialization. */
select.lw-select { display: block !important; width: 100% !important; height: 44px !important; min-height: 44px !important; padding: 7px 30px 7px 10px !important; border: 1px solid #d9d3c8 !important; border-radius: 9px !important; background-color: #fff !important; color: var(--lw-ink) !important; opacity: 1 !important; visibility: visible !important; -webkit-appearance: menulist !important; appearance: auto !important; }
.lw-generate-actions { display: flex; flex: 0 0 auto; gap: 7px; align-items: stretch; min-width: 0; max-width: 100%; }
.lw-generate-btn.is-submitting { pointer-events: none; opacity: .72; }
.lw-quick-action-row .lw-btn { min-height: 38px; padding: 0 13px; border-radius: 9px; font-size: 13px; white-space: nowrap; }
.lw-quick-action-row .lw-generate-btn { min-width: 138px; }
.lw-quick-action-row .lw-bonus-open-btn { min-width: 76px; }
.lw-create-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 27px; }
.lw-current-settings-summary { flex: 1 1 0; min-width: 0; color: #788079; font-size: 12px; line-height: 1.35; }
.lw-quick-levels { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lw-quick-level-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lw-quick-levels label { min-width: 32px; height: 32px; margin: 0; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; background: #eeeade; color: var(--lw-green-dark); font-size: 11px; font-weight: 650; line-height: 1; cursor: pointer; transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.lw-quick-levels label:hover { border-color: #d8c487; background: #f7efd8; transform: translateY(-1px); }
.lw-quick-level-input:checked + label { border-color: var(--lw-green); background: #fff; color: var(--lw-green-dark); font-weight: 850; box-shadow: 0 2px 8px rgba(43,68,55,.1); }
.lw-quick-level-input:focus + label, .lw-quick-level-input:focus-visible + label { outline: 3px solid rgba(53,94,75,.22); outline-offset: 2px; }
.lw-level-test-link { flex: 0 0 auto; min-height: 32px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d5bd79; border-radius: 999px; background: #fbf3dc; color: var(--lw-green-dark); font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; text-decoration: none !important; transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.lw-level-test-link:hover, .lw-level-test-link:focus { border-color: var(--lw-mustard); background: #f6e9c4; color: var(--lw-green-dark); box-shadow: 0 3px 10px rgba(63,74,55,.08); outline: none; transform: translateY(-1px); }
.lw-level-test-link:focus-visible { outline: 3px solid rgba(53,94,75,.22); outline-offset: 2px; }
.lw-create-secondary-actions { display: flex; flex: 1 1 0; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; }
.lw-active-genre-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 27px; padding: 3px 5px 3px 10px; border: 1px solid #d7cfb8; border-radius: 999px; background: #f7f2e4; color: var(--lw-green-dark); font-size: 12px; font-weight: 750; line-height: 1; white-space: nowrap; }
.lw-active-genre-badge[hidden] { display: none !important; }
.lw-active-genre-remove { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--lw-green); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.lw-active-genre-remove:hover, .lw-active-genre-remove:focus { background: rgba(47,95,77,.1); color: var(--lw-green-dark); outline: 2px solid transparent; }
.lw-more-options-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 2px; border: 0; background: transparent; color: var(--lw-green); font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.lw-more-options-toggle:hover, .lw-more-options-toggle:focus { color: var(--lw-green-dark); text-decoration: underline; text-underline-offset: 3px; outline: none; }
.lw-more-options-chevron { display: inline-block; font-size: 13px; line-height: 1; transition: transform .16s ease; }
.lw-more-options-toggle[aria-expanded="true"] .lw-more-options-chevron { transform: rotate(180deg); }
.lw-more-options-panel { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding-top: 5px; }
.lw-more-options-panel[hidden] { display: none !important; }
.lw-hidden-submit { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }

.lw-news-card { position: relative; width: min(850px, 100%); max-height: 88vh; overflow: auto; background: var(--lw-paper); border-radius: 16px; padding: 30px; box-shadow: 0 25px 75px rgba(0,0,0,.25); }
.lw-news-card h2 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 8px; font-size: 30px; }
.lw-news-intro { margin: 0; color: var(--lw-muted); line-height: 1.55; }
.lw-news-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 16px; }
.lw-news-controls label, .lw-favorite-source-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: #5e6862; }
.lw-news-favorite-actions { display: flex; gap: 14px; align-items: center; margin: -4px 0 14px; }
.lw-link-button { padding: 0; border: 0; background: transparent; color: var(--lw-green); font-size: 12px; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lw-link-button:hover { color: var(--lw-green-dark); }
.lw-link-danger { color: #9a4d49; }
.lw-favorite-source-form { background: #f5f1e8; border: 1px solid #e4ddd1; border-radius: 11px; padding: 14px; margin: 0 0 14px; }
.lw-favorite-source-grid { display: grid; grid-template-columns: minmax(170px, .75fr) minmax(280px, 1.7fr) auto; gap: 10px; align-items: end; }
.lw-favorite-add-cell { display: flex; align-items: end; }
.lw-btn-small { min-height: 44px; padding: 9px 15px; white-space: nowrap; }
.lw-favorite-hint { color: var(--lw-muted); font-size: 11px; line-height: 1.45; margin-top: 8px; }
.lw-news-status { min-height: 21px; color: var(--lw-muted); font-size: 13px; margin: 6px 0 10px; }
.lw-news-headlines { display: grid; gap: 9px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.lw-news-item { width: 100%; display: flex; align-items: flex-start; gap: 14px; border: 1px solid #e4ddd1; background: #fff; color: var(--lw-ink); border-radius: 11px; padding: 14px 16px; text-align: left; cursor: pointer; transition: .15s ease; }
.lw-news-item:hover, .lw-news-item:focus { border-color: #b8c6bc; background: #f7f9f4; outline: none; transform: translateY(-1px); }
.lw-news-item-image { display: block; flex: 0 0 112px; width: 112px; height: 78px; object-fit: cover; border-radius: 8px; background: #eee9df; }
.lw-news-item-content { display: block; flex: 1 1 auto; min-width: 0; }
.lw-news-item-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; line-height: 1.3; }
.lw-news-item-meta { display: block; color: var(--lw-muted); font-size: 11px; margin-top: 5px; text-transform: uppercase; letter-spacing: .05em; }
.lw-news-item-summary { display: block; color: #58625c; font-size: 13px; line-height: 1.45; margin-top: 7px; }
.lw-news-item-action { display: block; color: var(--lw-green); font-size: 12px; font-weight: 800; margin-top: 8px; }
.lw-news-footnote { border-top: 1px solid #ebe4d8; margin-top: 16px; padding-top: 12px; color: var(--lw-muted); font-size: 11px; line-height: 1.45; }
.lw-onboarding-card { position: relative; width: min(920px, 100%); max-height: 90vh; overflow-y: auto; background: var(--lw-paper); border: 1px solid var(--lw-border); border-radius: 20px; padding: 34px 38px 38px; box-shadow: 0 28px 85px rgba(22,37,29,.28); }
.lw-onboarding-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; color: var(--lw-ink); }
.lw-onboarding-intro { margin: 9px 0 0; color: #58645d; font-size: 17px; line-height: 1.5; }
.lw-onboarding-server-status:empty { display: none; }
.lw-onboarding-server-status { margin: 16px 0 0; padding: 9px 11px; border: 1px solid #f2c9c5; border-radius: 8px; background: #fff0ef; }
.lw-onboarding-section { margin-top: 24px; }
.lw-onboarding-section h3 { margin: 0 0 12px; color: var(--lw-green-dark); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lw-onboarding-topics { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
.lw-onboarding-topic, .lw-dashboard-quick-topic { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 6px 10px; border: 1px solid #cfc8ba; border-radius: 999px; background: #fff; color: var(--lw-green-dark); font-size: 12px; font-weight: 750; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.lw-onboarding-topic:hover, .lw-onboarding-topic:focus, .lw-dashboard-quick-topic:hover, .lw-dashboard-quick-topic:focus { transform: translateY(-1px); border-color: var(--lw-green); background: #eef3ee; box-shadow: 0 5px 15px rgba(40,74,58,.09); outline: none; }
.lw-onboarding-topic:active, .lw-dashboard-quick-topic:active { transform: translateY(0) scale(.98); box-shadow: none; }
.lw-onboarding-topic-icon { display: inline-flex; align-items: center; justify-content: center; width: 17px; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-size: 15px; font-weight: 400; line-height: 1; }
.lw-onboarding-topic:focus-visible, .lw-dashboard-quick-topic:focus-visible, .lw-onboarding-news-item:focus-visible { outline: 3px solid rgba(53,94,75,.24); outline-offset: 2px; }
.lw-onboarding-topic-surprise { border-color: #d6b66d; background: #fbf4df; }
.lw-onboarding-topic:disabled, .lw-dashboard-quick-topic:disabled, .lw-onboarding-news-item:disabled { opacity: .56; cursor: wait; transform: none; }
.lw-onboarding-divider { display: flex; align-items: center; gap: 13px; margin: 25px 0 0; color: #8a8d89; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lw-onboarding-divider::before, .lw-onboarding-divider::after { content: ''; height: 1px; flex: 1 1 auto; background: #e6dfd3; }
.lw-onboarding-news-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.lw-onboarding-news-heading h3 { margin-bottom: 8px; }
.lw-onboarding-news-heading span { color: var(--lw-muted); font-size: 12px; }
.lw-onboarding-news-status { min-height: 20px; margin-bottom: 8px; color: var(--lw-muted); font-size: 13px; }
.lw-onboarding-news-items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.lw-onboarding-news-item { display: flex; align-items: stretch; gap: 13px; min-width: 0; min-height: 100px; padding: 10px; border: 1px solid #e2dbcf; border-radius: 12px; background: #fff; color: var(--lw-ink); text-align: left; cursor: pointer; overflow: hidden; transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.lw-onboarding-news-item:hover, .lw-onboarding-news-item:focus { transform: translateY(-1px); border-color: #abc0b3; background: #f5f8f4; outline: none; }
.lw-onboarding-news-item:hover { box-shadow: 0 7px 18px rgba(40,74,58,.08); }
.lw-onboarding-news-item:active { transform: translateY(0) scale(.99); box-shadow: none; }
.lw-onboarding-news-thumb { display: flex; flex: 0 0 112px; width: 112px; height: 78px; overflow: hidden; border-radius: 8px; background: #eee9df; }
.lw-onboarding-news-image { display: block; width: 100%; height: 78px; object-fit: cover; }
.lw-onboarding-news-image.is-fallback { padding: 12px; object-fit: contain; background: #f3eee3; opacity: .82; }
.lw-onboarding-news-content { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; padding: 3px 4px 3px 0; }
.lw-onboarding-news-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-family: Georgia, "Times New Roman", serif; font-size: 16px; font-weight: 700; line-height: 1.3; }
.lw-onboarding-news-meta { margin-top: auto; padding-top: 8px; color: var(--lw-muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.lw-reader-heading { min-width: 0; flex: 1 1 auto; }
.lw-reader-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lw-story-controls { display: inline-flex; align-items: center; gap: 6px; }
.lw-story-speak, .lw-story-stop { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--lw-green); border-radius: 50%; background: transparent; color: var(--lw-green-dark); padding: 0; font-size: 13px; line-height: 1; cursor: pointer; }
.lw-story-speak.is-idle { width: auto; min-width: 104px; height: 38px; border-radius: 999px; padding: 0 15px; gap: 7px; background: var(--lw-green); color: #fff; border-color: var(--lw-green); font-size: 13px; font-weight: 800; }
.lw-story-speak.is-idle:hover, .lw-story-speak.is-idle:focus { background: var(--lw-green-dark); color: #fff; }
.lw-story-stop { color: #8d4f43; border-color: #b77c70; font-size: 11px; }
.lw-story-speak:not(.is-idle):hover, .lw-story-speak:not(.is-idle):focus, .lw-story-stop:hover, .lw-story-stop:focus { background: #e7eee9; outline: none; }
.lw-story-source { color: var(--lw-green); font-size: 12px; font-weight: 700; text-decoration: none; }
.lw-story-source:hover { color: var(--lw-green-dark); text-decoration: underline; }
.lw-error-block { background: #fff0ef; border: 1px solid #f2c9c5; border-radius: 8px; padding: 8px 10px; }
.lw-error-block:empty { display: none; }

.lw-empty-card { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: var(--lw-muted); }
.lw-empty-card h2 { font-family: Georgia, "Times New Roman", serif; color: var(--lw-ink); margin: 16px 0 8px; }
.lw-empty-icon { width: 66px; height: 66px; border-radius: 50%; background: #e7eadf; display: flex; align-items: center; justify-content: center; color: var(--lw-green); font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 700; }

.lw-reader-card { padding: 40px clamp(28px, 6vw, 88px) 70px; }
.lw-reader-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid #e7e0d4; }
.lw-reader-meta { font-size: 12px; font-weight: 800; color: var(--lw-green); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 7px; }
.lw-reader-header h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0; }
.lw-reader-help { max-width: 760px; margin-top: 14px; color: #58645d; font-size: 14pt; line-height: 1.45; text-align: left; }
.lw-reader-help-line { display: block; position: relative; padding-left: 15px; }
.lw-reader-help-line + .lw-reader-help-line { margin-top: 3px; }
.lw-reader-help-line::before { content: '\2022'; position: absolute; left: 0; color: var(--lw-mustard); font-weight: 800; }
.lw-onboarding-reader-tip { position: relative; max-width: 820px; margin: -10px auto 28px; padding: 16px 46px 15px 18px; border: 1px solid #ddc98f; border-radius: 12px; background: #fbf3dd; color: #34443c; font-size: 13px; line-height: 1.5; }
.lw-onboarding-reader-tip[hidden] { display: none !important; }
.lw-onboarding-reader-tip > strong { display: block; margin-bottom: 5px; color: var(--lw-green-dark); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lw-onboarding-reader-tip ul { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px 18px; margin: 0; padding: 0; list-style: none; }
.lw-onboarding-reader-tip li { position: relative; padding-left: 13px; }
.lw-onboarding-reader-tip li::before { content: '\2022'; position: absolute; left: 0; color: var(--lw-mustard); font-weight: 900; }
.lw-onboarding-tip-close { position: absolute; top: 7px; right: 9px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6f746f; font-size: 21px; line-height: 1; cursor: pointer; }
.lw-onboarding-tip-close:hover, .lw-onboarding-tip-close:focus { background: rgba(53,94,75,.1); color: var(--lw-green-dark); outline: none; }
.lw-onboarding-tip-touch { display: none; }
.lw-reader-body { display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 820px); justify-content: center; align-items: start; gap: clamp(28px, 4vw, 64px); }
.lw-reader-main-column { width: 100%; max-width: 820px; min-width: 0; }
.lw-story-saved-words { position: -webkit-sticky; position: sticky; top: 24px; align-self: start; max-height: calc(90vh - 88px); overflow-y: auto; padding: 15px 14px; border: 1px solid #e1d9ca; border-radius: 12px; background: #f8f4ea; color: var(--lw-ink); scrollbar-width: thin; }
.lw-story-saved-head, .lw-story-saved-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lw-story-saved-head h3, .lw-story-saved-mobile-head h3 { margin: 0; color: var(--lw-green-dark); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.lw-story-saved-count { min-width: 23px; height: 23px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #e6eadf; color: var(--lw-green-dark); font-size: 11px; font-weight: 800; }
.lw-story-saved-empty { margin: 13px 0 2px; color: var(--lw-muted); font-size: 12px; line-height: 1.45; }
.lw-story-saved-list { margin-top: 8px; }
.lw-story-saved-row { padding: 9px 0; border-top: 1px solid #e4dccd; }
.lw-story-saved-word { display: block; color: var(--lw-ink); font-size: 13px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.lw-story-saved-translation { display: block; margin-top: 2px; color: var(--lw-muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.lw-story-text { width: 100%; max-width: 820px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.86; letter-spacing: .005em; color: #27332d; user-select: text; }
.lw-story-text p { margin: 0 0 1.35em; }
.lw-reader-quiz-cta { margin-top: 34px; padding: 19px 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #ded6c8; }
.lw-reader-quiz-cta h3 { margin: 0; color: var(--lw-green-dark); font-size: 14px; font-weight: 800; }
.lw-reader-quiz-cta p { margin: 5px 0 0; color: #717971; font-size: 12px; }
.lw-reader-quiz-cta .lw-btn { flex: 0 0 auto; min-height: 42px; padding: 0 18px; }
.lw-reader-finished-actions { flex: 0 0 auto; display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.lw-word { border:0; cursor:pointer; background:transparent; border-radius:2px; }
#storyText .lw-word:hover, #storyText .lw-word:focus { background:#fff0bd; }
#storyText .lw-word.is-saved, #bookReaderText .lw-book-word.is-saved { background:#e2ecdf; box-shadow:inset 0 -2px #86a58d; }
.lw-word:focus { outline: 2px solid rgba(53,94,75,.25); outline-offset: 2px; }

html.lw-reading-modal-open, body.lw-reading-modal-open { overflow: hidden; }
.lw-story-modal-backdrop { padding: 20px; }
.lw-story-modal-card { position: relative; width: 90vw; max-width: 1600px; height: 90vh; overflow: hidden; background: var(--lw-paper); border: 1px solid var(--lw-border); border-radius: 18px; box-shadow: 0 25px 75px rgba(0,0,0,.28); }
.lw-story-modal-close { z-index: 3; top: 16px; right: 18px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,253,248,.92); }
.lw-story-modal-close:hover, .lw-story-modal-close:focus { color: var(--lw-green-dark); background: #edf2ee; outline: none; }
.lw-reader-modal-content { width: 100%; height: 100%; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lw-reader-modal-content .lw-reader-header { padding-right: 38px; }
.lw-story-saved-mobile { display: none; }

.lw-word-tooltip { display: none; position: fixed; z-index: 15000; width: min(310px, calc(100vw - 24px)); background: #23362d; color: #fff; border-radius: 12px; padding: 15px; box-shadow: 0 18px 45px rgba(0,0,0,.24); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.lw-word-tooltip { overflow-y:auto; overflow-wrap:anywhere; }
.lw-word-tooltip.show { display: block; }
.lw-tooltip-word { font-size: 16px; font-weight: 800; }
.lw-tooltip-translation { color: #f0c66f; font-size: 15px; font-weight: 700; margin-top: 2px; }
.lw-tooltip-explanation { color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.45; margin-top: 6px; }
.lw-save-word { width: 100%; margin-top: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 7px; padding: 7px 9px; cursor: pointer; font-weight: 700; font-size: 12px; }
.lw-save-word:disabled { opacity: .65; }
.lw-book-tooltip-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lw-book-word-tooltip .lw-pronounce-button { flex: 0 0 auto; color: #f0c66f; opacity: .9; }
.lw-book-word-tooltip .lw-pronounce-button:hover, .lw-book-word-tooltip .lw-pronounce-button:focus { background: rgba(255,255,255,.12); color: #fff; }
.lw-book-tooltip-status { min-height: 18px; margin-top: 5px; color: rgba(255,255,255,.76); font-size: 12px; }
.lw-book-tooltip-warning { margin-top: 7px; color: #f4d88e; font-size: 11px; line-height: 1.4; }
.lw-book-tooltip-actions { display: flex; gap: 8px; margin-top: 12px; }
.lw-book-tooltip-actions[hidden] { display: none; }
.lw-book-tooltip-actions .lw-save-word, .lw-book-tooltip-more { width: auto; min-height: 38px; flex: 1 1 0; margin: 0; border-radius: 7px; padding: 8px 10px; font-size: 12px; font-weight: 700; }
.lw-book-tooltip-more { border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff; cursor: pointer; }
.lw-book-tooltip-more:hover, .lw-book-tooltip-more:focus { background: rgba(255,255,255,.1); outline: none; }

.lw-selection-action { display: none; position: fixed; z-index: 14000; max-width: calc(100vw - 16px); border: 0; background: var(--lw-green-dark); color: #fff; border-radius: 999px; padding: 9px 14px; box-shadow: 0 8px 25px rgba(0,0,0,.2); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.lw-selection-action.show { display: block; }
.lw-explain-card { width: min(620px, 100%); max-height: 85vh; overflow: auto; }
.lw-selected-quote { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 19px; line-height: 1.55; background: #f1eadc; padding: 14px 16px; border-radius: 9px; margin: 12px 0 20px; }
.lw-explain-section { padding: 14px 0; border-top: 1px solid #ebe4d8; line-height: 1.55; }
.lw-explain-section label { display: block; margin-bottom: 4px; color: var(--lw-green); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }

.lw-busy-overlay { display: none; position: fixed; inset: 0; z-index: 20000; background: rgba(27,39,33,.52); align-items: center; justify-content: center; padding: 20px; }
.lw-busy-overlay.show { display: flex; }
.lw-busy-card { background: var(--lw-paper); border-radius: 14px; min-width: 290px; padding: 28px 34px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); font-weight: 700; }
.lw-busy-card small { display: block; color: var(--lw-muted); font-weight: 400; margin-top: 5px; }
.lw-spinner { width: 42px; height: 42px; margin: 0 auto 14px; border: 4px solid #e1ddd3; border-top-color: var(--lw-green); border-radius: 50%; animation: lwSpin .8s linear infinite; }
@keyframes lwSpin { to { transform: rotate(360deg); } }

/* Story / News Quick Quiz */
.lw-quick-quiz-backdrop { z-index: 16000; }
.lw-quick-quiz-card { width: min(900px, 100%); max-height: 92vh; overflow-y: auto; padding: clamp(28px, 5vw, 48px); }
.lw-quick-quiz-card h2 { margin: 10px 0 0; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 4vw, 38px); line-height: 1.22; }
.lw-quick-quiz-counter { margin-top: 10px; color: #616a64; font-size: 14px; font-weight: 700; }
.lw-quick-quiz-progress { height: 6px; margin: 18px 0 30px; overflow: hidden; border-radius: 999px; background: #e9e4da; }
.lw-quick-quiz-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lw-mustard); transition: width .2s ease; }
.lw-quick-quiz-type { color: var(--lw-green); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.lw-quick-quiz-question-text { max-width: 780px; }
.lw-quick-quiz-translate { margin-top: 12px; color: #64736a; font-size: 12px; text-decoration: underline; }
.lw-quick-quiz-translation { margin: 8px 0 0; padding: 10px 13px; border-left: 3px solid #d9b45f; background: #fbf6e8; color: #5e6862; font-size: 14px; line-height: 1.5; }
.lw-quick-quiz-options { display: grid; gap: 10px; margin: 25px 0 0; padding: 0; list-style: none; }
.lw-quick-quiz-options li { position: relative; display: block; }
.lw-quick-quiz-options input[type="radio"] { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; margin: 0 !important; opacity: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.lw-quick-quiz-options label { position: relative; width: 100%; min-height: 56px; margin: 0; padding: 14px 18px 14px 50px; display: flex; align-items: center; border: 1px solid #ddd5c8; border-radius: 12px; background: #fff; color: var(--lw-ink); font-size: 16px; line-height: 1.45; cursor: pointer; transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.lw-quick-quiz-options label::before { content: ''; position: absolute; left: 19px; width: 18px; height: 18px; border: 1px solid #aeb6af; border-radius: 50%; background: #fff; }
.lw-quick-quiz-options input:checked + label { border-color: var(--lw-green); background: #eef3ee; box-shadow: 0 4px 14px rgba(44,72,57,.07); }
.lw-quick-quiz-options input:checked + label::before { border: 5px solid var(--lw-green); }
.lw-quick-quiz-options input:focus + label { outline: 3px solid rgba(53,94,75,.2); outline-offset: 2px; }
.lw-quick-quiz-question-actions { min-height: 72px; padding-top: 22px; display: flex; align-items: flex-start; justify-content: flex-end; }
.lw-quick-quiz-question-actions .lw-btn { min-width: 155px; }
.lw-quick-quiz-actions { margin-top: 28px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.lw-quick-quiz-error { text-align: center; }
.lw-quick-quiz-error p { margin: 13px auto 0; max-width: 560px; color: #69716c; line-height: 1.55; }
.lw-quick-quiz-result { text-align: center; }
.lw-quick-quiz-result > h2 { font-size: clamp(34px, 5vw, 48px); }
.lw-quick-quiz-result-score { margin: 9px 0 28px; color: var(--lw-green-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 54px); font-weight: 700; }
.lw-quick-quiz-breakdown { max-width: 620px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; text-align: left; }
.lw-quick-quiz-breakdown > div { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dfd7ca; border-radius: 12px; background: #fff; }
.lw-quick-quiz-breakdown span { color: #5d6861; font-size: 13px; }
.lw-quick-quiz-breakdown strong { color: var(--lw-green-dark); font-size: 18px; }
.lw-quick-quiz-review-toggle { margin-top: 22px; color: var(--lw-green-dark); font-size: 13px; font-weight: 750; text-decoration: underline; }
.lw-quick-quiz-review { margin-top: 18px; display: grid; gap: 11px; text-align: left; }
.lw-quick-quiz-review-item { padding: 16px 17px; border: 1px solid #ded7cb; border-radius: 12px; background: #fff; }
.lw-quick-quiz-review-item.is-correct { border-color: #a8c8b0; background: #f0f7f1; }
.lw-quick-quiz-review-item.is-incorrect { border-color: #ddb0aa; background: #fcf1ef; }
.lw-quick-quiz-review-status { color: var(--lw-green-dark); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.lw-quick-quiz-review-item.is-incorrect .lw-quick-quiz-review-status { color: #963e37; }
.lw-quick-quiz-review-question { margin: 7px 0 10px; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.4; }
.lw-quick-quiz-review-detail { margin: 4px 0; color: #58635c; font-size: 13px; line-height: 1.5; }
.lw-quick-quiz-review-detail strong { color: var(--lw-green-dark); }

/* Story / News Discussion */
.lw-discussion-backdrop { z-index: 17000; }
.lw-discussion-card { width: min(820px, calc(100vw - 32px)); height: min(760px, 90vh); padding: 30px; display: flex; flex-direction: column; overflow: hidden; }
.lw-discussion-header { flex: 0 0 auto; padding-right: 34px; }
.lw-discussion-header h2 { margin: 5px 0 18px; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 4vw, 34px); line-height: 1.2; }
.lw-discussion-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px; border: 1px solid #ded7ca; border-radius: 13px; background: #f8f5ee; overscroll-behavior: contain; }
.lw-discussion-message { max-width: 82%; margin-bottom: 13px; padding: 11px 14px; border-radius: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lw-discussion-message.is-assistant { position: relative; margin-right: auto; padding-right: 38px; border: 1px solid #d8d1c4; border-bottom-left-radius: 4px; background: #fff; color: var(--lw-ink); }
.lw-discussion-message.is-user { margin-left: auto; border-bottom-right-radius: 4px; background: var(--lw-green-dark); color: #fff; }
.lw-discussion-message.is-error { border-color: #dfb1aa; background: #fff2ef; color: #883c35; }
.lw-discussion-message-text, .lw-discussion-follow-up-question { display: block; }
.lw-discussion-follow-up-question { margin-top: 10px; font-weight: 650; }
.lw-discussion-translation-help { position: absolute; right: 9px; bottom: 8px; white-space: normal; }
.lw-discussion-translation-button { width: 22px; height: 22px; padding: 0; border: 1px solid #bdc9c0; border-radius: 50%; background: #f2f6f2; color: var(--lw-green-dark); font-size: 12px; font-weight: 850; line-height: 20px; text-align: center; cursor: help; }
.lw-discussion-translation-button:hover, .lw-discussion-translation-button:focus { border-color: var(--lw-green); background: #e6eee7; outline: 2px solid rgba(53,94,75,.16); }
.lw-discussion-question-translation { position: absolute; right: -2px; bottom: 29px; z-index: 2; width: max-content; max-width: min(340px, calc(100vw - 70px)); padding: 9px 11px; visibility: hidden; opacity: 0; border-radius: 8px; background: #25372e; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 12px; font-weight: 500; line-height: 1.4; pointer-events: none; transition: opacity .12s ease; }
.lw-discussion-translation-help:hover .lw-discussion-question-translation, .lw-discussion-translation-help:focus-within .lw-discussion-question-translation, .lw-discussion-translation-help.is-open .lw-discussion-question-translation { visibility: visible; opacity: 1; }
.lw-discussion-typing { flex: 0 0 auto; min-height: 26px; padding: 7px 3px 0; display: flex; align-items: center; gap: 8px; color: #6b746e; font-size: 12px; }
.lw-discussion-typing[hidden] { display: none !important; }
.lw-discussion-spinner { width: 15px; height: 15px; border: 2px solid #d8d4ca; border-top-color: var(--lw-green); border-radius: 50%; animation: lwSpin .8s linear infinite; }
.lw-discussion-compose { flex: 0 0 auto; padding-top: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.lw-discussion-compose textarea { width: 100%; min-height: 52px; max-height: 150px; resize: vertical; padding: 11px 13px; border: 1px solid #cfc8ba; border-radius: 10px; background: #fff; color: var(--lw-ink); font: inherit; line-height: 1.4; }
.lw-discussion-compose textarea:focus { border-color: var(--lw-green); outline: 3px solid rgba(53,94,75,.16); }
.lw-discussion-compose .lw-btn { min-height: 52px; }

/* Level Test */
.lw-level-test-body .lw-brand-lockup { text-decoration: none; }
.lw-level-test-credit { min-height: 32px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid #e1d8c5; border-radius: 999px; background: #f8f2e3; color: #6b6e67; font-size: 12px; font-weight: 700; white-space: nowrap; }
.lw-level-test-shell { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 64px; }
.lw-level-test-card, .lw-level-test-history { background: var(--lw-paper); border: 1px solid var(--lw-border); border-radius: 18px; box-shadow: 0 10px 34px rgba(44,57,49,.07); }
.lw-level-test-card { position: relative; padding: clamp(26px, 5vw, 48px); }
.lw-level-test-close { position: absolute; top: 16px; right: 19px; z-index: 2; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #747b76; font-family: Arial, sans-serif; font-size: 28px; font-weight: 300; line-height: 1; text-decoration: none !important; transition: background .14s ease, color .14s ease; }
.lw-level-test-close:hover, .lw-level-test-close:focus { background: #f0ece4; color: var(--lw-green-dark); outline: none; }
.lw-level-test-close:focus-visible { outline: 3px solid rgba(53,94,75,.2); outline-offset: 2px; }
.lw-level-test-card h1 { margin: 0; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5vw, 50px); line-height: 1.12; letter-spacing: -.025em; }
.lw-level-test-lead { margin: 10px 0 30px; color: #68716b; font-size: 17px; line-height: 1.55; }
.lw-level-test-public-header .lw-level-test-header-login { min-height: 38px; padding: 0 16px; border-radius: 999px; text-decoration: none; }
.lw-anonymous-test-languages { margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lw-anonymous-test-languages label { display: block; margin-bottom: 7px; color: var(--lw-green-dark); font-size: 13px; font-weight: 800; }
.lw-anonymous-test-languages .lw-select { min-height: 50px; border-color: #d9d1c4; border-radius: 12px; background-color: #fff; }
.lw-anonymous-test-used { max-width: 720px; margin: 60px auto; text-align: center; }
.lw-anonymous-test-used .lw-level-test-result-actions { align-items: center; }
.lw-level-test-confirm-backdrop { z-index: 15000; }
.lw-level-test-confirm-card { width: min(650px, 100%); padding: 34px; border: 1px solid #d9d1c4; border-radius: 20px; background: #fffdf9; }
.lw-level-test-confirm-card h2 { margin: 5px 44px 7px 0; color: var(--lw-ink); font-size: 32px; line-height: 1.15; }
.lw-level-test-confirm-intro { margin: 0; color: #68716b; font-size: 14px; line-height: 1.55; }
.lw-level-test-confirm-languages { margin-top: 23px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lw-level-test-confirm-languages label { margin: 0 0 7px; color: var(--lw-green-dark); font-size: 12px; font-weight: 800; }
.lw-level-test-confirm-languages .lw-select { min-height: 50px; border-color: #d9d1c4; border-radius: 12px; background-color: #fff; }
.lw-level-test-confirm-summary { margin-top: 18px; padding: 15px 17px; display: grid; gap: 4px; border: 1px solid #e3d7bd; border-radius: 12px; background: #fbf5e6; }
.lw-level-test-confirm-summary span { color: #747b76; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lw-level-test-confirm-summary strong { color: var(--lw-green-dark); font-size: 14px; }
.lw-level-test-confirm-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; }
.lw-level-test-fieldset { margin: 0; padding: 24px 0; border: 0; border-top: 1px solid #e8e0d3; }
.lw-level-test-fieldset legend { width: auto; margin: 0 0 15px; color: var(--lw-green-dark); font-size: 14px; font-weight: 800; letter-spacing: .04em; }
.lw-level-test-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lw-level-test-category-grid > span, .lw-level-test-direction-list > span { position: relative; display: block; }
.lw-level-test-category-grid input[type="checkbox"], .lw-level-test-direction-list input[type="radio"], .lw-level-test-options input[type="radio"] { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; pointer-events: none !important; }
.lw-level-test-category-grid label { position: relative; min-height: 48px; margin: 0; padding: 0 15px 0 42px; display: flex; align-items: center; border: 1px solid #d9d1c4; border-radius: 12px; background: #fff; color: var(--lw-ink); font-size: 14px; font-weight: 700; cursor: pointer; transition: .14s ease; }
.lw-level-test-category-grid label::before { content: ''; position: absolute; left: 15px; width: 18px; height: 18px; border: 1px solid #aeb6af; border-radius: 5px; background: #fff; }
.lw-level-test-category-grid input:checked + label { border-color: #9fb5a7; background: #edf3ee; }
.lw-level-test-category-grid input:checked + label::before { border-color: var(--lw-green); background: var(--lw-green); box-shadow: inset 0 0 0 4px #edf3ee; }
.lw-level-test-category-grid input:focus + label, .lw-level-test-direction-list input:focus + label, .lw-level-test-options input:focus + label { outline: 3px solid rgba(53,94,75,.2); outline-offset: 2px; }
.lw-level-test-category-note { margin: 12px 0 0; color: #7a7f7b; font-size: 12px; line-height: 1.5; }
.lw-level-test-direction-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lw-level-test-direction-list label { position: relative; min-height: 46px; margin: 0; padding: 0 12px 0 38px; display: flex; align-items: center; border: 1px solid #ddd5c8; border-radius: 12px; background: #fff; color: #46534c; font-size: 13px; cursor: pointer; }
.lw-level-test-direction-list label::before { content: ''; position: absolute; left: 14px; width: 16px; height: 16px; border: 1px solid #aeb6af; border-radius: 50%; background: #fff; }
.lw-level-test-direction-list input:checked + label { border-color: #9fb5a7; background: #f1f5f1; color: var(--lw-green-dark); font-weight: 700; }
.lw-level-test-direction-list input:checked + label::before { border: 5px solid var(--lw-green); }
.lw-level-test-config-footer { padding-top: 24px; border-top: 1px solid #e8e0d3; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.lw-level-test-config-footer > span { color: #767d78; font-size: 13px; }
.lw-level-test-question { min-height: 560px; display: flex; flex-direction: column; }
.lw-level-test-question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.lw-level-test-counter { color: #616a64; font-size: 14px; font-weight: 700; }
.lw-level-test-cancel { color: #7b817c; font-size: 12px; font-weight: 700; }
.lw-level-test-progress { height: 6px; margin: 18px 0 34px; overflow: hidden; border-radius: 999px; background: #e9e4da; }
.lw-level-test-progress span { display: block; height: 100%; border-radius: inherit; background: var(--lw-mustard); transition: width .2s ease; }
.lw-level-test-category-label { color: var(--lw-green); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lw-level-test-question-text { max-width: 760px; margin-top: 9px !important; font-size: clamp(27px, 4vw, 38px) !important; line-height: 1.24 !important; letter-spacing: -.015em !important; }
.lw-level-test-options { display: grid; gap: 10px; margin: 28px 0 24px; padding: 0; list-style: none; }
.lw-level-test-options > li { position: relative; display: block; }
.lw-level-test-options label { width: 100%; min-height: 54px; margin: 0; padding: 14px 18px 14px 50px; display: flex; align-items: center; border: 1px solid #ddd5c8; border-radius: 12px; background: #fff; color: var(--lw-ink); font-size: 16px; line-height: 1.45; cursor: pointer; transition: .14s ease; }
.lw-level-test-options label::before { content: ''; position: absolute; left: 19px; width: 18px; height: 18px; border: 1px solid #aeb6af; border-radius: 50%; background: #fff; }
.lw-level-test-options input:checked + label { border-color: var(--lw-green); background: #eef3ee; box-shadow: 0 4px 14px rgba(44,72,57,.07); }
.lw-level-test-options input:checked + label::before { border: 5px solid var(--lw-green); }
.lw-level-test-feedback label { cursor: default; opacity: 1 !important; }
.lw-level-test-feedback input[data-answer-state="correct"] + label, .lw-level-test-feedback [data-answer-state="correct"] > label, .lw-level-test-feedback li[data-answer-state="correct"] label { border-color: #65a277 !important; background: #e8f5eb !important; color: #245f37 !important; box-shadow: 0 4px 14px rgba(36,95,55,.08); }
.lw-level-test-feedback input[data-answer-state="incorrect"] + label, .lw-level-test-feedback [data-answer-state="incorrect"] > label, .lw-level-test-feedback li[data-answer-state="incorrect"] label { border-color: #c97770 !important; background: #faeae8 !important; color: #8a332d !important; box-shadow: 0 4px 14px rgba(138,51,45,.07); }
.lw-level-test-feedback input[data-answer-state="correct"] + label::before, .lw-level-test-feedback [data-answer-state="correct"] > label::before, .lw-level-test-feedback li[data-answer-state="correct"] label::before { border-color: #65a277 !important; background: #e8f5eb !important; }
.lw-level-test-feedback input[data-answer-state="incorrect"] + label::before, .lw-level-test-feedback [data-answer-state="incorrect"] > label::before, .lw-level-test-feedback li[data-answer-state="incorrect"] label::before { border: 5px solid #a3433c !important; background: #fff !important; box-shadow: none !important; }
.lw-level-test-feedback input[data-answer-state="correct"] + label::after, .lw-level-test-feedback [data-answer-state="correct"] > label::after, .lw-level-test-feedback li[data-answer-state="correct"] label::after { content: '\2713'; position: absolute; right: 18px; color: #2f7a47; font-size: 21px; font-weight: 800; }
.lw-level-test-feedback input[data-answer-state="incorrect"] + label::after, .lw-level-test-feedback [data-answer-state="incorrect"] > label::after, .lw-level-test-feedback li[data-answer-state="incorrect"] label::after { content: '\00d7'; position: absolute; right: 18px; color: #a3433c; font-size: 25px; font-weight: 700; }
.lw-level-test-answer-feedback { margin: 18px 0 0; padding: 15px 18px; display: grid; gap: 4px; border: 1px solid #d8d2c7; border-radius: 12px; background: #faf8f3; color: #47534c; }
.lw-level-test-answer-feedback strong { color: var(--lw-green-dark); font-size: 17px; }
.lw-level-test-answer-feedback span { font-size: 14px; font-weight: 700; }
.lw-level-test-answer-feedback p { margin: 5px 0 0; color: #68716b; font-size: 13px; line-height: 1.5; }
.lw-level-test-answer-feedback p:empty { display: none; }
.lw-level-test-question-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 0; padding-top: 22px; }
.lw-level-test-question-actions .lw-btn { min-width: 150px; }
.lw-level-test-question-actions .lw-btn.is-submitting { opacity: .72; cursor: wait; }
.lw-level-test-answer-busy { display: inline-flex; align-items: center; gap: 8px; color: #68716b; font-size: 13px; font-weight: 700; }
.lw-level-test-answer-busy[hidden] { display: none; }
.lw-level-test-answer-busy i { width: 17px; height: 17px; display: inline-block; border: 2px solid #d7d2c8; border-top-color: var(--lw-green); border-radius: 50%; animation: lwSpin .8s linear infinite; }
.lw-level-test-result { text-align: center; }
.lw-level-test-result-language { margin: 20px 0 4px; color: #677069; font-size: 17px; }
.lw-level-test-result-level { color: var(--lw-green-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 7vw, 64px); font-weight: 700; line-height: 1.08; }
.lw-level-test-result-total { margin: 9px 0 32px; color: #646c67; font-size: 16px; font-weight: 700; }
.lw-level-test-result-content { min-width: 0; }
.lw-level-test-result.is-anonymous { width: min(1120px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.lw-level-test-result.is-anonymous .lw-level-test-result-content { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: stretch; gap: 20px; }
.lw-level-test-result-details { min-width: 0; }
.lw-level-test-score-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; text-align: left; }
.lw-level-test-result.is-anonymous .lw-level-test-score-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lw-level-test-score-section { padding: 20px; border: 1px solid #e1d9cc; border-radius: 13px; background: #fff; }
.lw-level-test-score-section h2 { margin: 0 0 13px; color: var(--lw-green-dark); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.lw-level-test-score-row { padding: 8px 0; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #eee8de; font-size: 13px; }
.lw-level-test-score-row:first-of-type { border-top: 0; }
.lw-level-test-score-row strong { color: var(--lw-green-dark); }
.lw-level-test-level-breakdown { margin-top: 16px; padding: 20px; border: 1px solid #e1d9cc; border-radius: 13px; background: #fff; text-align: left; }
.lw-level-test-level-breakdown h2 { margin: 0 0 13px; color: var(--lw-green-dark); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.lw-level-test-level-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.lw-level-test-result.is-anonymous .lw-level-test-level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lw-level-test-level-item { padding: 11px; border: 1px solid #e6dfd4; border-radius: 10px; background: #faf9f6; }
.lw-level-test-level-item.is-recommended { border-color: #8caa9a; background: #edf4ef; box-shadow: inset 0 0 0 1px rgba(51,103,80,.08); }
.lw-level-test-level-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.lw-level-test-level-item-head strong { color: var(--lw-green-dark); font-size: 14px; }
.lw-level-test-level-item-head span { color: #68716b; font-size: 10px; font-weight: 750; white-space: nowrap; }
.lw-level-test-level-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e8e4dc; }
.lw-level-test-level-track i { height: 100%; display: block; border-radius: inherit; background: var(--lw-gold); }
.lw-level-test-level-item.is-recommended .lw-level-test-level-track i { background: var(--lw-green); }
.lw-level-test-recommendation { max-width: 690px; margin: 30px auto 0; padding: 23px; border: 1px solid #e3cf94; border-radius: 14px; background: #fbf4df; }
.lw-level-test-result.is-anonymous .lw-level-test-recommendation { max-width: none; }
.lw-level-test-recommendation > span { display: block; color: #74776f; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.lw-level-test-recommendation > strong { display: block; margin-top: 5px; color: var(--lw-green-dark); font-family: Georgia, "Times New Roman", serif; font-size: 34px; }
.lw-level-test-recommendation p { margin: 10px 0 0; color: #4f5a53; font-size: 14px; line-height: 1.55; }
.lw-level-test-result-actions { margin-top: 24px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.lw-anonymous-result-actions { padding: 24px 22px; border: 1px solid #d6d5ad; border-radius: 14px; background: linear-gradient(145deg, #fbf9e9, #f1f6e9); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lw-anonymous-result-icon { width: 62px; height: 52px; margin-bottom: 10px; overflow: visible; fill: none; stroke: var(--lw-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lw-anonymous-result-icon path:last-child { stroke: var(--lw-mustard); stroke-width: 2.5; }
.lw-anonymous-result-actions h2 { margin: 0; color: var(--lw-green-dark); font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 700; line-height: 1.25; }
.lw-anonymous-result-actions > p { margin: 14px 0 0; color: #68716b; font-size: 14px; line-height: 1.58; }
.lw-anonymous-result-actions .lw-level-test-result-actions { width: 100%; margin-top: 22px; display: grid; grid-template-columns: 1fr; gap: 9px; }
.lw-anonymous-result-actions .lw-btn { width: 100%; min-height: 50px; }
.lw-anonymous-result-actions .lw-btn-primary { justify-content: space-between; }
.lw-anonymous-result-actions .lw-btn-primary::after { content: '\2192'; margin-left: 12px; font-size: 21px; font-weight: 400; }
.lw-anonymous-result-actions .lw-level-test-back-link { min-height: 36px; padding: 2px 8px 0; }
.lw-level-test-back-link { display: inline-flex; min-height: 46px; padding: 0 10px; align-items: center; justify-content: center; color: #6b746e; font-size: 13px; font-weight: 700; text-decoration: underline; }
.lw-level-test-history { margin-top: 22px; padding: 24px 28px; }
.lw-level-test-history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.lw-level-test-history-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; }
.lw-level-test-history-list { margin-top: 17px; border-top: 1px solid #e4ddd1; }
.lw-level-test-history-row { min-height: 52px; display: grid; grid-template-columns: 130px 1fr 75px 160px; align-items: center; gap: 14px; border-bottom: 1px solid #e9e2d7; color: #5d665f; font-size: 13px; text-decoration: none !important; }
.lw-level-test-history-row:hover, .lw-level-test-history-row:focus { color: var(--lw-green-dark); background: #f7f8f3; outline: none; }
.lw-level-test-history-row strong { color: var(--lw-ink); }
.lw-level-test-mini-progress { height: 58px; display: flex; align-items: flex-end; gap: 7px; }
.lw-level-test-mini-item { width: 34px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.lw-level-test-mini-item i { width: 9px; max-height: 42px; display: block; border-radius: 999px; background: #acc1b1; }
.lw-level-test-mini-item:last-child i { background: var(--lw-mustard); }
.lw-level-test-mini-item small { color: #7a7e7a; font-size: 8px; white-space: nowrap; }

@media (max-width: 1200px) {
    .lw-landing-hero-inner { grid-template-columns: minmax(410px,1fr) minmax(430px,.95fr); gap: 24px; }
    .lw-hero-copy h1 { font-size: clamp(42px,4.6vw,58px); }
    .lw-quick-features { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 470px; }
    .lw-learning-steps { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
    .lw-step-arrow { display: none; }
    .lw-app-header-inner { width: 100%; min-width: 0; flex-wrap: wrap; row-gap: 12px; }
    .lw-app-header-inner > div:first-child { flex: 1 1 auto; }
    .lw-app-header-inner > .lw-user-area { min-width: 0; flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 10px 13px; }
}
@media (max-width: 1100px) {
    .lw-quick-action-row { align-items: flex-start; flex-wrap: wrap; gap: 9px 14px; }
    .lw-discovery-groups { flex-wrap: wrap; }
    .lw-dashboard-quick-topics, .lw-dashboard-news-sources { flex-wrap: wrap; }
    .lw-generate-actions { margin-left: auto; }
}
@media (max-width: 900px) {
    .lw-app-header-inner { flex-wrap: wrap; row-gap: 12px; }
    .lw-app-header-inner > div:first-child { flex: 1 1 auto; }
    .lw-app-header-inner > .lw-user-area { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 10px 13px; }
    .lw-landing-hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 22px; padding-top: 50px; }
    .lw-hero-copy { text-align: center; }
    .lw-hero-copy h1, .lw-hero-description, .lw-hero-reassurance, .lw-quick-features { margin-left: auto; margin-right: auto; }
    .lw-hero-actions { justify-content: center; }
    .lw-hero-visual { width: 100%; max-width: 620px; margin: 0 auto; }
    .lw-hero-visual img { width: 100%; }
    .lw-founder-inner { gap: 38px; }
    .lw-method-cards { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
    .lw-method-card { min-height: 0; }
    .lw-app-shell { grid-template-columns: 1fr; }
    .lw-dashboard-grid { grid-template-columns: 1fr; gap: 18px; }
    .lw-dashboard-card { height: 360px; min-height: 360px; max-height: none; }
    .lw-onboarding-topics { flex-wrap: wrap; justify-content: flex-start; }
    .lw-sidebar { position: static; top: auto; height: auto; max-height: none; overflow: visible; grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 360px; order: 2; }
    .lw-side-card { height: 360px; }
    .lw-main { order: 1; }
    .lw-create-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .lw-create-level-actions { flex-wrap: wrap; gap: 8px 14px; }
    .lw-more-options-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lw-reader-body { display: block; }
    .lw-story-saved-words { display: none; }
    .lw-story-text { margin: 0 auto; }
    .lw-reader-main-column { margin: 0 auto; }
    .lw-reader-modal-content { padding-bottom: 100px; }
    .lw-story-saved-mobile { position: absolute; inset: 0; z-index: 4; display: block; pointer-events: none; }
    .lw-story-saved-mobile-toggle { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); min-height: 42px; padding: 0 17px; border: 1px solid var(--lw-green); border-radius: 999px; background: var(--lw-green-dark); color: #fff; box-shadow: 0 8px 24px rgba(31,52,41,.22); font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; pointer-events: auto; }
    .lw-story-saved-mobile-toggle:hover, .lw-story-saved-mobile-toggle:focus { background: var(--lw-green); outline: 3px solid rgba(53,94,75,.2); outline-offset: 2px; }
    .lw-story-saved-mobile.is-open .lw-story-saved-mobile-toggle { display: none; }
    .lw-story-saved-mobile-sheet { position: absolute; right: 0; bottom: 0; left: 0; max-height: min(55vh, 430px); overflow-y: auto; padding: 19px 20px 24px; border-top: 1px solid #d8cfbf; border-radius: 16px 16px 0 0; background: var(--lw-paper); box-shadow: 0 -14px 40px rgba(31,42,35,.2); pointer-events: auto; }
    .lw-story-saved-mobile-sheet[hidden] { display: none !important; }
    .lw-story-saved-mobile-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6f746f; font-family: Arial, sans-serif; font-size: 25px; line-height: 1; cursor: pointer; }
    .lw-story-saved-mobile-close:hover, .lw-story-saved-mobile-close:focus { background: #edf2ee; color: var(--lw-green-dark); outline: none; }
    .lw-story-saved-mobile-sheet .lw-story-saved-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px; }
    .lw-story-saved-mobile-sheet .lw-story-saved-translation { margin-top: 0; text-align: right; }
    .lw-level-test-score-sections { grid-template-columns: 1fr; }
    .lw-level-test-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lw-level-test-result.is-anonymous { width: min(760px, calc(100vw - 40px)); }
    .lw-level-test-result.is-anonymous .lw-level-test-result-content { display: flex; flex-direction: column; }
    .lw-level-test-result.is-anonymous .lw-anonymous-result-actions { order: -1; margin-bottom: 2px; }
    .lw-level-test-result.is-anonymous .lw-level-test-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lw-level-test-history-row { grid-template-columns: 105px 1fr 65px 135px; gap: 9px; }
}
@media (max-width: 650px) {
    .lw-public-inner { padding: 13px 12px; gap: 8px; }
    .lw-app-header-inner { position: relative; display: block; padding: 12px 18px 10px; }
    .lw-app-header-inner > div:first-child { min-height: 42px; padding-right: 126px; display: flex; align-items: center; }
    .lw-app-header-inner .lw-user-area { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 9px 13px; padding-top: 10px; margin-top: 9px; border-top: 1px solid var(--lw-border); }
    .lw-app-header-inner .lw-account-button { position: absolute; top: 17px; right: 18px; width: 116px; padding: 3px 0; text-align: right; line-height: 1.25; white-space: normal; }
    .lw-brand-icon { width: 44px; height: 44px; }
    .lw-brand-wordmark { font-size: 27px; }
    .lw-brand-lockup-public { gap: 6px; }
    .lw-brand-lockup-public .lw-brand-icon { width: 36px; height: 36px; }
    .lw-brand-lockup-public .lw-brand-wordmark { font-size: 23px; letter-spacing: -1px; }
    .lw-brand-lockup-app .lw-brand-icon { width: 40px; height: 40px; }
    .lw-brand-lockup-app .lw-brand-wordmark { font-size: 24px; }
    .lw-tagline, .lw-header-sub { display: none; }
    .lw-public-actions { gap: 8px; }
    .lw-public-login { min-width: 70px; min-height: 38px; margin-left: 1px; padding: 0 12px; font-size: 13px; }
    .lw-language-select { max-width: 120px; }
    .lw-landing-hero-inner { gap: 10px; padding: 22px 18px 20px; }
    .lw-hero-copy h1 { font-size: clamp(36px,10.5vw,46px); line-height: 1.02; letter-spacing: -1px; }
    .lw-hero-description, .lw-hero-reassurance { font-size: 17px; }
    .lw-landing-hero-inner { position: relative; }
    .lw-quick-features { position: absolute; bottom: 14px; left: 18px; right: 18px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; }
    .lw-quick-features .lw-quick-feature { gap: 5px; font-size: 11.5px; text-align: left; }
    .lw-quick-features .lw-feature-icon { width: 24px; height: 24px; }
    .lw-quick-features .lw-feature-icon svg { width: 16px; height: 16px; }
    .lw-hero-copy h1 { margin-bottom: 12px; }
    .lw-hero-translator-badge { margin-bottom: 8px; padding: 3px 9px; font-size: 11px; }
    .lw-hero-translator-highlight { margin-top: 8px; font-size: 14px; }
    .lw-hero-visual { padding-top: 52px; }
    .lw-hero-translation { width: 218px; padding: 8px 10px; border-radius: 13px; }
    .lw-hero-translation-heading { gap: 7px; font-size: 11px; }
    .lw-hero-translation-mic { width: 22px; height: 22px; }
    .lw-hero-translation-mic svg { width: 15px; height: 15px; }
    .lw-hero-translation-wave svg { width: 23px; height: 16px; }
    .lw-hero-translation-phrases { margin-top: 5px; gap: 4px; }
    .lw-hero-translation-label { margin-bottom: 3px; font-size: 10px; }
    .lw-hero-translation-source, .lw-hero-translation-target { padding: 5px 7px; font-size: 13px; }
    .lw-quick-feature { font-size: 12px; }
    .lw-feature-icon { width: 42px; height: 42px; }
    .lw-feature-icon svg { width: 22px; height: 22px; }
    .lw-hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .lw-landing-primary, .lw-btn.lw-btn-level-test { width: 100%; min-width: 0; }
    .lw-hero-reassurance { margin-top: 8px; }
    .lw-hero-actions { margin-top: 16px; }
    .lw-hero-visual { max-width: 500px; }
    .lw-learning-flow { padding: 25px 18px 32px; }
    .lw-learning-flow h2 { font-size: 25px; }
    .lw-learning-steps { grid-template-columns: 1fr; }
    .lw-learning-step { min-height: 0; }
    .lw-founder-section { padding: 50px 18px; }
    .lw-founder-inner { grid-template-columns: 1fr; gap: 28px; }
    .lw-founder-identity { padding-top: 0; }
    .lw-founder-portrait { width: 138px; height: 138px; }
    .lw-founder-story { text-align: left; }
    .lw-founder-story .lw-eyebrow { text-align: center; }
    .lw-founder-story h2, .lw-method-section h2 { font-size: 30px; text-align: center; }
    .lw-founder-story p { font-size: 15px; line-height: 1.65; }
    .lw-method-section { padding: 48px 18px 54px; }
    .lw-method-intro { font-size: 15px; text-align: left; }
    .lw-method-card { padding: 20px; }
    .lw-app-shell { padding: 14px; }
    .lw-quick-action-row { display: block; }
    .lw-discovery-groups { margin-bottom: 10px; }
    .lw-discovery-group { align-items: flex-start; flex-wrap: wrap; }
    .lw-discovery-divider { display: none; }
    .lw-news-discovery-group { margin-top: 8px; }
    .lw-news-source-logo { flex-basis: 20px; width: 20px; height: 20px; }
    .lw-quick-action-row .lw-generate-actions { display: grid; grid-template-columns: 1fr; width: 100%; margin-left: 0; }
    .lw-quick-action-row .lw-generate-btn, .lw-quick-action-row .lw-bonus-open-btn { width: 100%; min-width: 0; }
    .lw-create-meta-row { align-items: flex-start; flex-wrap: wrap; }
    .lw-current-settings-summary { flex: 1 1 100%; }
    .lw-quick-levels { flex: 0 0 auto; }
    .lw-level-test-link { min-height: 34px; }
    .lw-create-secondary-actions { flex: 1 1 auto; margin-left: auto; flex-wrap: wrap; }
    .lw-more-options-panel { grid-template-columns: 1fr; }
    .lw-news-card { padding: 24px 18px; }
    .lw-onboarding-backdrop { padding: 0; }
    .lw-onboarding-card { width: 100%; max-height: 100vh; min-height: 100vh; border: 0; border-radius: 0; padding: 58px 20px 28px; }
    .lw-onboarding-card h2 { font-size: 31px; }
    .lw-onboarding-intro { font-size: 15px; }
    .lw-onboarding-topics { gap: 8px; }
    .lw-onboarding-topic { min-height: 44px; padding: 9px 14px; }
    .lw-onboarding-news-heading { display: block; }
    .lw-onboarding-news-heading span { display: block; margin: -3px 0 8px; }
    .lw-onboarding-news-items { grid-template-columns: 1fr; }
    .lw-onboarding-news-item { min-height: 92px; }
    .lw-onboarding-news-thumb { flex-basis: 104px; width: 104px; height: 72px; }
    .lw-onboarding-news-image { height: 72px; }
    .lw-news-headlines { max-height: 58vh; }
    .lw-news-item { gap: 10px; padding: 12px; }
    .lw-news-item-image { flex-basis: 82px; width: 82px; height: 62px; }
    .lw-reader-card { padding: 28px 20px 50px; }
    .lw-reader-header { flex-direction: column; align-items: start; }
    .lw-reader-help { text-align: left; }
    .lw-reader-side { align-items: flex-start; }
    .lw-news-controls { grid-template-columns: 1fr; }
    .lw-favorite-source-grid { grid-template-columns: 1fr; }
    .lw-favorite-add-cell .lw-btn { width: 100%; }
    .lw-story-text { font-size: 19px; line-height: 1.78; }
    .lw-reader-quiz-cta { align-items: stretch; flex-direction: column; }
    .lw-reader-quiz-cta .lw-btn { width: 100%; }
    .lw-reader-finished-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .lw-sidebar { grid-template-columns: 1fr; grid-auto-rows: 320px; }
    .lw-side-card { height: 320px; }
    .lw-dashboard-card { height: 320px; min-height: 320px; }
    .lw-history-title { font-size: 16px; }
    .lw-history-row { grid-template-columns: minmax(0,1fr) 95px 24px; gap: 5px; }
    .lw-history-reading-actions { min-width: 0; }
    .lw-history-discuss { padding-right: 4px; padding-left: 4px; white-space: normal; }
    .lw-history-item.is-news, .lw-history-item.is-book, .lw-history-item.is-story { grid-template-columns: 56px minmax(0,1fr); gap: 10px; }
    .lw-history-thumbnail { width: 56px; height: 44px; }
    .lw-history-thumbnail img { width: 50px; height: 38px; }
    .lw-history-type-icon { width: 50px; height: 38px; }
    .lw-story-modal-backdrop { padding: 0; }
    .lw-story-modal-card { width: 100vw; max-width: none; height: 100vh; border: 0; border-radius: 0; }
    .lw-reader-modal-content { padding: 62px 20px 100px; }
    .lw-reader-modal-content .lw-reader-header { padding-right: 0; }
    .lw-onboarding-reader-tip { margin-top: -8px; padding: 15px 42px 14px 16px; }
    .lw-onboarding-reader-tip ul { grid-template-columns: 1fr; gap: 5px; }
    .lw-onboarding-tip-desktop { display: none; }
    .lw-onboarding-tip-touch { display: block; }
    .lw-story-modal-close { position: fixed; top: 12px; right: 12px; }
    .lw-quick-quiz-backdrop { padding: 0; }
    .lw-quick-quiz-card { width: 100%; min-height: 100vh; max-height: 100vh; padding: 58px 18px 28px; border: 0; border-radius: 0; }
    .lw-quick-quiz-question-text { font-size: 27px !important; }
    .lw-quick-quiz-options label { min-height: 58px; font-size: 15px; }
    .lw-quick-quiz-question-actions .lw-btn { width: 100%; }
    .lw-quick-quiz-breakdown { grid-template-columns: 1fr; }
    .lw-quick-quiz-actions { display: grid; grid-template-columns: 1fr; }
    .lw-quick-quiz-actions .lw-btn { width: 100%; }
    .lw-discussion-backdrop { padding: 0; }
    .lw-discussion-card { width: 100%; height: 100vh; max-height: 100vh; padding: 54px 14px max(14px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
    .lw-discussion-header h2 { margin-bottom: 12px; font-size: 25px; }
    .lw-discussion-messages { padding: 12px 9px; }
    .lw-discussion-message { max-width: 90%; }
    .lw-discussion-translation-button { cursor: pointer; }
    .lw-discussion-compose { grid-template-columns: minmax(0,1fr) 92px; gap: 7px; }
    .lw-user-area .lw-header-credit-balance { display: none; }
    .lw-level-test-shell { width: 100%; padding: 14px; }
    .lw-level-test-card { padding: 25px 18px; border-radius: 15px; }
    .lw-level-test-result.is-anonymous { width: calc(100vw - 28px); }
    .lw-level-test-result.is-anonymous .lw-level-test-result-total { margin-bottom: 22px; }
    .lw-anonymous-result-actions { padding: 24px 18px; }
    .lw-anonymous-result-actions h2 { font-size: 23px; }
    .lw-level-test-card h1 { font-size: 34px; }
    .lw-level-test-lead { margin-bottom: 24px; font-size: 15px; }
    .lw-anonymous-test-languages { grid-template-columns: 1fr; gap: 12px; }
    .lw-level-test-confirm-backdrop { padding: 12px; }
    .lw-level-test-confirm-card { padding: 28px 18px 20px; }
    .lw-level-test-confirm-card h2 { font-size: 28px; }
    .lw-level-test-confirm-languages { grid-template-columns: 1fr; gap: 12px; }
    .lw-level-test-confirm-actions { display: grid; grid-template-columns: 1fr; }
    .lw-level-test-confirm-actions .lw-btn { width: 100%; }
    .lw-level-test-public-header .lw-public-inner { padding: 12px 14px; }
    .lw-level-test-public-header .lw-brand-icon { width: 42px; height: 42px; }
    .lw-level-test-public-header .lw-brand-wordmark { font-size: 25px; }
    .lw-level-test-category-grid, .lw-level-test-direction-list { grid-template-columns: 1fr; }
    .lw-level-test-category-grid label, .lw-level-test-direction-list label { min-height: 52px; }
    .lw-level-test-config-footer { align-items: stretch; flex-direction: column; }
    .lw-level-test-config-footer .lw-btn { width: 100%; }
    .lw-level-test-question { min-height: calc(100vh - 170px); }
    .lw-level-test-question-text { font-size: 27px !important; }
    .lw-level-test-options label { min-height: 58px; font-size: 15px; }
    .lw-level-test-question-actions .lw-btn { width: 100%; }
    .lw-level-test-result-actions { display: grid; grid-template-columns: 1fr; }
    .lw-level-test-result-actions .lw-btn { width: 100%; }
    .lw-level-test-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lw-level-test-history { padding: 21px 18px; }
    .lw-level-test-history-head { align-items: flex-start; }
    .lw-level-test-mini-progress { display: none; }
    .lw-level-test-history-row { padding: 12px 0; grid-template-columns: 1fr auto; gap: 5px 12px; }
    .lw-level-test-history-row > span:last-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
    .lw-brand-lockup-public .lw-brand-icon { width: 32px; height: 32px; }
    .lw-brand-lockup-public .lw-brand-wordmark { font-size: 20px; }
    .lw-flag-link { width: 27px; height: 26px; }
    .lw-public-login { min-width: 61px; padding: 0 8px; }
}

.lw-explain-save { padding-top: 18px; text-align: right; }
.lw-explain-save .lw-save-word {
    width: auto;
    min-width: 130px;
    margin-top: 0;
    background: var(--lw-green);
    border: 1px solid var(--lw-green);
    color: #fff;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(40,74,58,.14);
}
.lw-explain-save .lw-save-word:hover {
    background: var(--lw-green-dark);
    border-color: var(--lw-green-dark);
}
.lw-explain-save .lw-save-word:disabled {
    opacity: .65;
    cursor: default;
}

/* V2 account, plan and admin */
.lw-account-button { border: 0; background: transparent; color: var(--lw-ink); padding: 5px 2px; cursor: pointer; font-weight: 600; }
.lw-account-button:hover, .lw-account-button:focus { color: var(--lw-green); outline: none; text-decoration: underline; text-underline-offset: 3px; }
.lw-plan-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.lw-plan-badge.free { background: #ece8df; color: #687068; }
.lw-plan-badge.premium { background: #efe1b9; color: #76591d; }
.lw-plan-badge-icon { min-width: 34px; justify-content: center; font-size: 16px; line-height: 1; padding: 3px 8px; }
.lw-plan-badge.admin { background: #dfeae4; color: var(--lw-green-dark); }
.lw-admin-link { color: var(--lw-green); font-weight: 700; text-decoration: none; }
.lw-admin-link:hover { color: var(--lw-green-dark); text-decoration: underline; }

.lw-register-card { width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.lw-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.lw-account-grid-wide { grid-column: 1 / -1; }
.lw-account-grid label { display: block; font-size: 12px; font-weight: 700; margin: 0 0 5px; color: #5e6862; }
html body .lw-email-action { display: flex !important; flex-direction: row !important; align-items: stretch; gap: 8px; width: 100%; }
html body .lw-admin-edit-card .lw-email-action { display: flex !important; flex-direction: row !important; }
html body .lw-admin-edit-card .lw-email-action .lw-input { flex: 1 1 auto; min-width: 0; }
html body .lw-admin-edit-card .lw-block-domain-btn { flex: 0 0 auto; min-height: 44px; padding-left: 14px; padding-right: 14px; }
.lw-register-card .lw-account-grid { margin-top: 18px; }
.lw-plan-note { margin-top: 16px; padding: 11px 13px; background: #f3efe5; border: 1px solid #e2dbcf; border-radius: 9px; color: #626962; font-size: 12px; line-height: 1.45; }

.lw-account-modal-card { width: min(760px, 100%); }
.lw-account-status { display: none; margin: 14px 0; padding: 10px 12px; border-radius: 8px; background: #eaf2ed; color: var(--lw-green-dark); font-size: 13px; font-weight: 600; }
.lw-account-status.error { background: #fff0ef; color: #9b3f3f; }
.lw-account-plan-card { background: #f4efe5; border: 1px solid #e3dccc; border-radius: 11px; padding: 14px 16px; margin: 18px 0; }
.lw-account-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lw-account-plan-head strong { font-size: 17px; }
.lw-account-plan-crown { font-size: 24px !important; line-height: 1; }
.lw-account-usage { color: #58635c; font-size: 12px; line-height: 1.55; margin-top: 7px; }
.lw-account-premium-dates { color: var(--lw-muted); font-size: 11px; margin-top: 4px; }
.lw-account-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.lw-admin-edit-actions { justify-content: space-between; gap: 12px; }
.lw-account-password { border-top: 1px solid #e8e1d6; margin-top: 22px; padding-top: 18px; }
.lw-account-password h3 { font-family: Georgia, "Times New Roman", serif; font-size: 20px; margin: 0 0 12px; }
.lw-account-password .lw-btn { margin-top: 12px; }
.lw-account-danger-zone { border-top: 1px solid #ead5d2; margin-top: 24px; padding-top: 18px; }
.lw-account-danger-zone h3 { margin: 0 0 7px; color: #7f3733; font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.lw-account-danger-zone p { margin: 0 0 12px; color: #6f625f; font-size: 13px; line-height: 1.5; }
.lw-delete-account-backdrop { z-index: 10020; }
.lw-delete-account-modal-card { width: min(580px, 100%); }
.lw-delete-account-copy { margin: 12px 0; color: #525c56; line-height: 1.6; }
.lw-delete-account-warning { margin: 0 0 16px; color: #8e3935; font-weight: 800; }
.lw-delete-account-acknowledgement { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px 14px; border: 1px solid #dfc1bd; border-radius: 9px; background: #fff7f6; color: #563f3c; font-size: 14px; font-weight: 700; line-height: 1.45; cursor: pointer; }
html body .lw-delete-account-acknowledgement input[type="checkbox"] { position: static !important; width: 18px !important; height: 18px !important; flex: 0 0 18px; margin: 1px 0 0 !important; opacity: 1 !important; visibility: visible !important; appearance: auto !important; -webkit-appearance: checkbox !important; pointer-events: auto !important; }
.lw-delete-account-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.lw-delete-account-actions .lw-btn:disabled { opacity: .5; cursor: not-allowed; }
.lw-limit-warning { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff4d9; border: 1px solid #ecd8a2; color: #725916; font-size: 12px; font-weight: 700; line-height: 1.45; }

.lw-admin-shell { max-width: 1500px; margin: 0 auto; padding: 28px; }
.lw-admin-card { background: var(--lw-paper); border: 1px solid var(--lw-border); border-radius: 16px; padding: 24px; box-shadow: 0 8px 28px rgba(49,59,52,.055); }
.lw-admin-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.lw-admin-head h1 { font-family: Georgia, "Times New Roman", serif; margin: 0; font-size: 34px; }
.lw-admin-head p { color: var(--lw-muted); margin: 6px 0 0; }
.lw-admin-search { display: flex; gap: 8px; min-width: min(430px, 100%); }
.lw-admin-search .lw-input { flex: 1 1 auto; }
.lw-admin-count { color: var(--lw-muted); font-size: 12px; margin: 8px 0 12px; }
.lw-admin-table-wrap { overflow-x: auto; }
.lw-admin-table { width: 100%; border-collapse: collapse; min-width: 1120px; }
.lw-admin-table th { text-align: left; padding: 10px 9px; border-bottom: 1px solid #dcd5ca; color: #667069; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.lw-admin-sort-link { display: inline-flex; align-items: center; gap: 5px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none; }
.lw-admin-sort-link:hover, .lw-admin-sort-link:focus { color: var(--lw-green-dark); text-decoration: none; outline: none; }
.lw-admin-sort-indicator { color: var(--lw-gold-dark); font-size: 9px; line-height: 1; }
.lw-admin-table td { padding: 11px 9px; border-bottom: 1px solid #eee8de; font-size: 12px; vertical-align: middle; }
.lw-admin-table tbody tr:hover { background: #faf8f2; }
.lw-admin-action-cell { text-align: right; }
.lw-books-admin { display: grid; gap: 18px; }
.lw-books-admin .lw-admin-card { min-width: 0; }
.lw-books-table { min-width: 760px; }
.lw-books-fetch-grid { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(280px, 1.6fr) 120px auto; gap: 14px; align-items: end; }
.lw-books-fetch-grid label { display: block; margin-bottom: 6px; color: var(--lw-muted); font-size: 12px; font-weight: 700; }
.lw-books-id-field { width: 120px; }
.lw-books-search > label { display: block; margin-bottom: 7px; color: var(--lw-green-dark); font-weight: 800; }
.lw-books-search-row { display: flex; gap: 9px; }
.lw-books-search-row .lw-input { flex: 1 1 auto; }
.lw-books-search-hint { margin: 7px 0 0; color: var(--lw-muted); font-size: 12px; }
.lw-books-search-results { margin-top: 24px; }
.lw-books-search-results h2 { font-family: Georgia, "Times New Roman", serif; font-size: 21px; }
.lw-books-results-table { min-width: 760px; }
.lw-books-direct-fetch { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--lw-border); }
.lw-books-direct-fetch h2 { margin: 0; font-size: 16px; }
.lw-books-direct-fetch > p { margin: 5px 0 13px; color: var(--lw-muted); font-size: 12px; }
.lw-books-readonly { min-height: 46px; display: flex; align-items: center; padding: 0 13px; border: 1px solid var(--lw-border); border-radius: 10px; background: #f3f0e9; }
.lw-books-preview { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--lw-border); }
.lw-books-preview h2, .lw-books-chapter-detail h2 { font-family: Georgia, "Times New Roman", serif; }
.lw-books-preview h3 { margin-top: 22px; font-size: 17px; }
.lw-books-import-cover { display: flex; align-items: center; gap: 14px; margin: 16px 0; color: var(--lw-green-dark); font-size: 12px; font-weight: 800; }
.lw-books-import-cover img { width: 82px; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; box-shadow: 4px 6px 14px rgba(37,50,43,.14); }
.lw-books-cover-warning { display: block; margin: 12px 0; color: #755b18; font-size: 12px; }
.lw-books-preview ol, .lw-books-chapter-list { padding-left: 24px; line-height: 1.75; }
.lw-books-preview p, .lw-books-chapter-detail p { white-space: normal; line-height: 1.72; }
.lw-books-review { margin: 24px 0 14px; }
.lw-books-review label { margin-left: 7px; font-weight: 700; }
html body .lw-books-review input[type="checkbox"] { position: static !important; left: auto !important; top: auto !important; display: inline-block !important; width: 19px !important; height: 19px !important; margin: 0 !important; padding: 0 !important; opacity: 1 !important; visibility: visible !important; clip: auto !important; clip-path: none !important; transform: none !important; appearance: auto !important; -webkit-appearance: checkbox !important; pointer-events: auto !important; vertical-align: middle; }
.lw-books-chapter-detail { margin-top: 24px; padding: 22px; border: 1px solid var(--lw-border); border-radius: 12px; background: #fff; }
.lw-books-adaptation-controls { margin: 20px 0 18px; padding: 18px; border: 1px solid var(--lw-border); border-radius: 12px; background: #faf8f2; }
.lw-books-adaptation-selectors { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, .5fr) auto auto; gap: 12px; align-items: end; }
.lw-books-adaptation-selectors label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.lw-books-selector-action { padding-bottom: 1px; }
.lw-books-adaptation-progress { display: block; margin-top: 14px; color: var(--lw-muted); font-size: 13px; font-weight: 700; }
.lw-books-versions { margin: 20px 0 26px; padding: 18px; border: 1px solid var(--lw-border); border-radius: 12px; background: #faf8f2; }
.lw-books-versions h3, .lw-books-original-text h3, .lw-books-adaptation-text h3 { margin: 0 0 14px; color: var(--lw-green-dark); font-size: 18px; }
.lw-books-version-table { min-width: 620px; }
.lw-books-version-table .lw-btn.is-submitting { pointer-events: none; opacity: .65; cursor: wait; }
.lw-books-version-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #ece9e2; color: #626b65; font-size: 11px; font-weight: 800; }
.lw-books-version-status.ready { background: #e3efe7; color: var(--lw-green-dark); }
.lw-books-version-status.generating { background: #fff1cc; color: #755b18; }
.lw-books-version-status.failed { background: #f8e3e1; color: #8f3b37; }
.lw-books-version-warning { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; background: #fff1cc; color: #755b18; font-size: 12px; font-weight: 700; }
.lw-books-original-text, .lw-books-adaptation-text { padding-top: 20px; border-top: 1px solid var(--lw-border); }
.lw-books-adaptation-text { margin-top: 28px; }
.lw-books-adaptation-meta { color: var(--lw-muted); font-size: 12px; }
.lw-books-original-text p, .lw-books-adaptation-text p { font-size: 17px; line-height: 1.75; }
@media (max-width: 760px) {
    .lw-books-adaptation-selectors { grid-template-columns: 1fr 1fr; }
    .lw-books-selector-action .lw-btn { width: 100%; }
}
.lw-admin-delete-log { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 11px; border: 1px solid #c78a85; border-radius: 999px; background: transparent; color: #963f3b; font-size: 11px; font-weight: 800; white-space: nowrap; }
.lw-admin-delete-log:hover, .lw-admin-delete-log:focus { background: #f7e8e6; color: #782f2b; text-decoration: none; outline: none; }
.lw-admin-template-card { scroll-margin-top: 18px; }
.lw-admin-template-warning { min-height: 42px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #e2aaa4; border-radius: 999px; background: #fff0ee; color: #913b35; font-size: 12px; font-weight: 800; }
.lw-admin-template-warning > span { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #b94c43; color: #fff; font-weight: 900; }
.lw-admin-template-builder { padding: 20px; display: grid; grid-template-columns: minmax(340px, 1.1fr) minmax(260px, .8fr) minmax(220px, .7fr); gap: 20px; align-items: end; border: 1px solid #dfd6c9; border-radius: 14px; background: #faf8f2; }
.lw-admin-template-languages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lw-admin-template-languages label, .lw-admin-template-label { display: block; margin: 0 0 7px; color: var(--lw-green-dark); font-size: 12px; font-weight: 800; }
.lw-admin-template-languages .lw-select { min-height: 46px; border-color: #d9d1c4; border-radius: 10px; background-color: #fff; }
.lw-admin-template-fixed-categories { min-height: 70px; padding: 12px 14px; border: 1px solid #cbd9d1; border-radius: 11px; background: #edf4ef; }
.lw-admin-template-fixed-categories strong { display: block; color: var(--lw-green-dark); font-size: 13px; line-height: 1.35; }
.lw-admin-template-fixed-categories small { display: block; margin-top: 4px; color: #6f7771; font-size: 10px; line-height: 1.4; }
.lw-admin-template-categories .lw-level-test-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.lw-admin-template-categories .lw-level-test-category-grid label { min-height: 42px; padding-left: 37px; font-size: 12px; }
.lw-admin-template-categories .lw-level-test-category-grid label::before { left: 12px; width: 16px; height: 16px; }
.lw-admin-template-create { display: grid; gap: 10px; justify-items: start; }
.lw-admin-template-create p { margin: 0; color: #6f7771; font-size: 11px; line-height: 1.5; }
.lw-admin-template-progress { margin: 14px 0 0; padding: 12px 15px; display: flex; align-items: center; gap: 9px; border: 1px solid #dfc67f; border-radius: 11px; background: #fff8e5; color: #675b37; font-size: 12px; font-weight: 750; }
.lw-admin-template-progress i { width: 17px; height: 17px; display: inline-block; border: 2px solid #dfd3b1; border-top-color: var(--lw-green); border-radius: 50%; animation: lwSpin .8s linear infinite; }
.lw-admin-template-subhead { margin: 22px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.lw-admin-template-subhead h3 { margin: 0; color: var(--lw-green-dark); font-size: 15px; font-weight: 800; }
.lw-admin-template-subhead .lw-admin-count { margin: 0; }
.lw-admin-template-table { min-width: 820px; }
.lw-admin-template-status-panel { margin-top: 24px; padding-top: 1px; border-top: 1px solid #e5ddd1; }
.lw-admin-template-status-table { min-width: 1080px; }
.lw-admin-template-detail { max-width: 350px; color: #656d68; line-height: 1.45; }
.lw-template-status { padding: 4px 8px; display: inline-flex; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.lw-template-status.is-pending { border: 1px solid #d9c27e; background: #fff6dc; color: #66572f; }
.lw-template-status.is-warning { border: 1px solid #e0a39c; background: #fff0ee; color: #963e37; }
.lw-admin-edit-card { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.lw-admin-checks { display: flex; gap: 24px; margin-top: 18px; padding: 12px 0; border-top: 1px solid #e8e1d6; border-bottom: 1px solid #e8e1d6; }
.lw-admin-checks label { display: flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; }
html body .lw-admin-checks input[type="checkbox"] { position: static !important; left: auto !important; top: auto !important; display: inline-block !important; width: 18px !important; height: 18px !important; margin: 0 !important; padding: 0 !important; opacity: 1 !important; visibility: visible !important; clip: auto !important; clip-path: none !important; transform: none !important; appearance: auto !important; -webkit-appearance: checkbox !important; pointer-events: auto !important; }
.lw-form-success { color: var(--lw-green-dark); }

@media (max-width: 900px) {
    .lw-admin-head { flex-direction: column; align-items: stretch; }
    .lw-books-fetch-grid { grid-template-columns: 1fr; }
    .lw-books-fetch-action .lw-btn { width: 100%; }
    .lw-admin-search { min-width: 0; }
    .lw-user-area { gap: 9px; }
    .lw-admin-template-builder { grid-template-columns: 1fr; align-items: stretch; }
    .lw-admin-template-create { justify-items: stretch; }
    .lw-admin-template-create .lw-btn { width: 100%; }
}
@media (max-width: 650px) {
    .lw-account-grid { grid-template-columns: 1fr; }
    .lw-account-grid-wide { grid-column: auto; }
    .lw-account-modal-card, .lw-register-card, .lw-admin-edit-card { padding: 24px 18px; }
    html body .lw-email-action { flex-direction: column !important; }
    html body .lw-admin-edit-card .lw-block-domain-btn { width: 100%; }
    .lw-admin-shell { padding: 14px; }
    .lw-admin-card { padding: 16px; }
    .lw-admin-search { flex-direction: column; }
    .lw-books-search-row { flex-direction: column; }
    .lw-books-search-row .lw-btn { width: 100%; }
    .lw-admin-template-languages { grid-template-columns: 1fr; }
    .lw-admin-template-categories .lw-level-test-category-grid { grid-template-columns: 1fr; }
    .lw-admin-template-warning { border-radius: 12px; }
    .lw-account-button span { display: inline !important; }
    .lw-plan-badge { display: none; }
    .lw-delete-account-actions { flex-direction: column-reverse; }
    .lw-delete-account-actions .lw-btn { width: 100%; }
}

/* V2.1 Bonus vocabulary */
.lw-bonus-open-btn { min-height: 44px; white-space: nowrap; }
.lw-bonus-card { width: min(980px, 100%); }
.lw-bonus-language-summary { display: inline-flex; margin-top: 14px; padding: 6px 10px; border-radius: 999px; background: #edf3ef; color: var(--lw-green-dark); font-size: 12px; font-weight: 800; }
.lw-bonus-categories { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 10px; }
.lw-bonus-category { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; column-gap: 14px; text-align: left; width: 100%; border: 1px solid #ddd6ca; background: #faf7f0; border-radius: 13px; padding: 16px; cursor: pointer; color: var(--lw-ink); transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.lw-bonus-category:hover, .lw-bonus-category:focus { border-color: #9bb3a8; background: #f4f8f5; outline: none; transform: translateY(-1px); }
.lw-bonus-category.active { border-color: var(--lw-green); background: #edf4ef; }
.lw-bonus-category-icon { grid-row: 1 / 3; align-self: center; justify-self: center; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eee4cf; color: #76591d; font-size: 14px; font-weight: 900; letter-spacing: -.02em; }
.lw-bonus-category-title { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 700; }
.lw-bonus-category-text { margin-top: 3px; color: var(--lw-muted); font-size: 12px; line-height: 1.45; }
.lw-bonus-note { color: var(--lw-muted); font-size: 11px; margin: 8px 0 12px; }
.lw-bonus-items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.lw-bonus-item { border: 1px solid #e2dbd0; border-radius: 12px; background: #fffdf9; padding: 15px; min-width: 0; }
.lw-bonus-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lw-bonus-term { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.lw-bonus-translation { margin-top: 3px; color: var(--lw-green-dark); font-weight: 800; font-size: 13px; }
.lw-bonus-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; flex: 0 0 auto; max-width: 45%; }
.lw-bonus-register, .lw-bonus-region { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #ece8df; color: #667067; }
.lw-bonus-register.rude, .lw-bonus-register.very_rude, .lw-bonus-register.extreme, .lw-bonus-register.strong { background: #f7e2de; color: #8a4138; }
.lw-bonus-register.extreme { background: #eed3cf; color: #762f28; }
.lw-bonus-region { background: #e8efeb; color: var(--lw-green-dark); text-transform: none; letter-spacing: 0; }
.lw-bonus-explanation { margin-top: 11px; font-size: 12px; line-height: 1.55; color: #4f5b54; }
.lw-bonus-example { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee8df; font-size: 12px; line-height: 1.5; }
.lw-bonus-example-label { font-weight: 800; color: #606a64; }
.lw-bonus-example-translation { margin-top: 3px; color: var(--lw-muted); font-style: italic; }
.lw-bonus-item-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.lw-bonus-save.saved { background: #e8f0eb; border-color: #b6cbbf; color: var(--lw-green-dark); }

@media (max-width: 1200px) {
    .lw-generate-btn, .lw-bonus-open-btn { flex: 1 1 0; }
}
@media (max-width: 760px) {
    .lw-bonus-categories, .lw-bonus-items { grid-template-columns: 1fr; }
    .lw-bonus-category { grid-template-columns: 48px 1fr; padding: 13px; }
    .lw-bonus-item-head { flex-direction: column; }
    .lw-bonus-badges { max-width: none; justify-content: flex-start; }
    .lw-bonus-term { font-size: 20px; }
}


/* v2.1.2 credits */
.lw-plan-button { border: 0; background: transparent; padding: 0; margin: 0; cursor: pointer; border-radius: 999px; }
.lw-plan-button:hover .lw-plan-badge, .lw-plan-button:focus .lw-plan-badge { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(40, 55, 46, .13); }
.lw-plan-button:focus { outline: none; }
.lw-plan-button .lw-plan-badge { transition: transform .15s ease, box-shadow .15s ease; }
.lw-account-credit-action { margin-top: 12px; display: flex; justify-content: flex-start; }

.lw-credits-modal-card { width: min(1120px, 96vw); max-height: 92vh; overflow-y: auto; }
.lw-credits-intro { max-width: 760px; }
.lw-credits-promise { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 2px 0 20px; padding: 8px 12px; background: #edf4ef; border: 1px solid #d7e5dc; border-radius: 999px; color: #416157; font-size: 12px; font-weight: 700; }
.lw-credits-promise > span:first-child { color: var(--lw-green); font-size: 14px; }
.lw-credits-dot { color: #8f968f; }
.lw-credit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.lw-credit-card { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 22px 19px 18px; border: 1px solid #ddd7cb; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(62, 67, 59, .055); }
.lw-credit-card-free { background: #f8f6f1; box-shadow: none; }
.lw-credit-card-featured { border: 2px solid #b69a4c; padding: 21px 18px 17px; box-shadow: 0 12px 30px rgba(118, 89, 29, .13); }
.lw-credit-popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 5px 11px; border-radius: 999px; white-space: nowrap; background: #b69a4c; color: #fff; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.lw-credit-card-top { padding-bottom: 15px; border-bottom: 1px solid #eee9df; }
.lw-credit-name { color: var(--lw-green-dark); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .075em; }
.lw-credit-price { margin-top: 9px; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; line-height: 1; }
.lw-credit-subtitle { margin-top: 7px; color: #68736c; font-size: 13px; font-weight: 700; }
.lw-credit-features { flex: 1; list-style: none; margin: 17px 0 20px; padding: 0; color: #56605a; font-size: 12px; line-height: 1.45; }
.lw-credit-features li { position: relative; padding: 7px 0 7px 19px; border-bottom: 1px solid #f0ece4; }
.lw-credit-features li:last-child { border-bottom: 0; }
.lw-credit-features li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--lw-green); font-weight: 900; }
.lw-credit-features .lw-credit-gold::before { content: ""; }
.lw-credit-features .lw-credit-gold { padding-left: 0; color: #76591d; font-weight: 800; }
.lw-credit-cta { width: 100%; margin-top: auto; }
.lw-credit-cta:disabled { opacity: .72; cursor: default; }
.lw-credit-footnote { margin-top: 17px; text-align: center; color: #727a74; font-size: 11px; }
.lw-credit-status { margin-top: 14px; margin-bottom: 0; }

.lw-pricing-main { max-width: 1240px; margin: 0 auto; padding: 54px 28px 22px; }
.lw-pricing-hero { max-width: 820px; margin: 0 auto 34px; text-align: center; }
.lw-pricing-hero h1 { margin: 7px 0 13px; color: var(--lw-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 5vw, 62px); font-weight: 400; line-height: 1.06; }
.lw-pricing-hero p { margin: 0 auto; color: #5e6963; font-size: 17px; line-height: 1.6; }
.lw-pricing-promise { justify-content: center; margin-top: 19px; }
.lw-pricing-grid .lw-credit-card { min-height: 345px; }
.lw-pricing-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 26px; }
.lw-pricing-note { max-width: 760px; margin: 18px auto 0; color: #707973; font-size: 12px; line-height: 1.55; text-align: center; }
.lw-pricing-card-link { text-decoration: none; text-align: center; }
.lw-pricing-card-link:hover, .lw-pricing-card-link:focus { color: #fff; text-decoration: none; }

@media (max-width: 980px) {
    .lw-credit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .lw-credits-modal-card { width: 96vw; max-height: 94vh; padding-left: 16px; padding-right: 16px; }
    .lw-credit-grid { grid-template-columns: 1fr; gap: 12px; }
    .lw-credit-card { min-height: 0; }
    .lw-credits-promise { border-radius: 12px; }
    .lw-pricing-main { padding: 34px 14px 14px; }
    .lw-pricing-hero { margin-bottom: 28px; }
    .lw-pricing-hero p { font-size: 15px; }
    .lw-pricing-actions .lw-btn { width: 100%; }
}

/* v2.1.3 credits header / Gold */
.lw-buy-credits-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d9c991;
    border-radius: 999px;
    background: #f7edc8;
    color: #66501b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.lw-buy-credits-header:hover,
.lw-buy-credits-header:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 11px rgba(73, 61, 24, .14);
    background: #fbf2d3;
    outline: none;
}
.lw-buy-credits-crown { font-size: 16px; line-height: 1; }
.lw-header-credit-balance {
    padding-left: 7px;
    border-left: 1px solid rgba(102, 80, 27, .22);
    font-size: 10px;
    font-weight: 700;
    opacity: .86;
}
.lw-account-credit-balance {
    margin-top: 6px;
    color: #66501b;
    font-size: 12px;
    font-weight: 700;
}
.lw-account-plan-gold { color: #76591d; }

@media (max-width: 720px) {
    .lw-buy-credits-header { padding: 6px 9px; }
    .lw-header-credit-balance { display: none; }
}


/* Public landing language flags */
.lw-language-flags {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px;
    border-radius: 999px;
}
.lw-flag-link {
    width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
    opacity: .68;
    transition: opacity .15s ease, transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.lw-flag-link:hover,
.lw-flag-link:focus {
    opacity: 1;
    transform: translateY(-1px);
    background: #f4efe5;
    border-color: #ddd4c4;
    outline: none;
    text-decoration: none;
}
.lw-flag-icon { display: block; width: 23px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(32,48,41,.16); }
.lw-language-flags[data-current="en"] .lw-flag-link[data-lang="en"],
.lw-language-flags[data-current="sv"] .lw-flag-link[data-lang="sv"],
.lw-language-flags[data-current="es"] .lw-flag-link[data-lang="es"] {
    opacity: 1;
    background: #f1ece2;
    border-color: #d8cebd;
    box-shadow: 0 1px 3px rgba(30, 55, 48, .08);
}
@media (max-width: 640px) {
    .lw-public-actions {
        gap: 8px;
    }
    .lw-language-flags {
        gap: 4px;
        padding: 1px;
    }
    .lw-flag-link {
        width: 31px;
        height: 28px;
    }
}

/* Google Ads consent */
.lw-cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 12000;
    display: none;
    width: min(760px, calc(100% - 28px));
    transform: translateX(-50%);
}
.lw-cookie-consent.show { display: block; }
.lw-cookie-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 17px;
    border: 1px solid rgba(35, 63, 51, .2);
    border-radius: 16px;
    background: #fffdf8;
    box-shadow: 0 12px 34px rgba(29, 48, 40, .2);
}
.lw-cookie-consent p {
    margin: 0;
    color: #34463e;
    font-size: 14px;
    line-height: 1.45;
}
.lw-cookie-consent a {
    color: #245b47;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lw-cookie-consent-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}
.lw-cookie-consent-button {
    min-width: 96px;
    min-height: 40px;
    padding: 8px 15px;
}
@media (max-width: 650px) {
    .lw-cookie-consent {
        bottom: 10px;
        width: calc(100% - 20px);
    }
    .lw-cookie-consent-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }
    .lw-cookie-consent-actions {
        width: 100%;
    }
    .lw-cookie-consent-button {
        flex: 1 1 50%;
        min-width: 0;
    }
}

/* Saved-word practice */
.lw-word-head-actions { display: flex; align-items: center; gap: 7px; }
.lw-side-card-head .lw-word-head-actions { margin-bottom: 12px; }

/* Simple logged-in content navigation */
.lw-dashboard-tabs { --lw-dashboard-reading-height: clamp(600px, 70vh, 660px); --lw-dashboard-content-height: clamp(680px, 78vh, 760px); margin-top: 24px; }
.lw-dashboard-tablist { position: -webkit-sticky; position: sticky; top: var(--lw-sticky-header-offset); z-index: 20; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin: 0 0 -1px; padding: 0; border: 0; background: var(--lw-cream); box-shadow: 0 4px 8px -7px rgba(32,48,41,.55); }
.lw-dashboard-tab { min-height: 50px; padding: 10px 14px; border: 1px solid #d9d1c5; border-bottom-color: var(--lw-border); border-radius: 16px 16px 0 0; background: #eeeae3; color: #59625d; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.lw-dashboard-tablist a.lw-dashboard-tab { text-decoration: none; }
.lw-dashboard-tab:hover { background: #f7f4ee; color: #294f47; }
.lw-dashboard-tab.is-active { position: relative; z-index: 2; border-color: transparent; border-bottom: 0; background: #fffdf8; color: #174f45; box-shadow: none; }
.lw-dashboard-tab.is-active::after { content: ''; position: absolute; right: 0; bottom: -2px; left: 0; height: 3px; background: #fffdf8; }
.lw-dashboard-tab-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lw-dashboard-tab:focus-visible, .lw-reading-filter-button:focus-visible { outline: 3px solid #ef9f43; outline-offset: 2px; }
.lw-dashboard-panel { min-height: 510px; padding: 18px; border: 1px solid var(--lw-border); border-radius: 0 0 12px 12px; background: #fffdf8; }
.lw-dashboard-panel[hidden] { display: none !important; }
.lw-dashboard-panel .lw-dashboard-card { width: 100%; height: auto; min-height: 472px; max-height: none; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lw-dashboard-panel #historyList { height: var(--lw-dashboard-reading-height); max-height: var(--lw-dashboard-reading-height); overflow-y: auto; }
.lw-reading-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding-bottom: 13px; border-bottom: 1px solid #ebe5dc; }
.lw-reading-mode-nav { margin: 1px 0 3px; padding-bottom: 7px; }
.lw-reading-mode-nav + .lw-quick-action-row { margin-top: 3px; }
.lw-reading-filter-button { min-height: 40px; padding: 7px 18px; border: 1px solid var(--lw-border); border-radius: 999px; background: #fff; color: #4d5751; font: inherit; font-weight: 650; cursor: pointer; }
.lw-reading-filter a.lw-reading-filter-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.lw-reading-filter-button.is-active { border-color: #20695b; background: #e4f1ed; color: #174f45; }
.lw-reading-special-actions { display: flex; flex: 0 0 auto; gap: 6px; min-width: 0; }
.lw-reading-special-actions .lw-reading-filter-button { flex: 0 0 170px; width: 170px; padding: 7px 12px; font-size: 14px; white-space: nowrap; }
.lw-reading-conversation-action, .lw-reading-translator-action { gap: 7px; }
.lw-reading-translator-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lw-reading-bonus-action, .lw-reading-level-test-action { border-color: #d3b65d; background: #f8edca; color: #654f20; }
.lw-reading-bonus-action:hover, .lw-reading-bonus-action:focus, .lw-reading-level-test-action:hover, .lw-reading-level-test-action:focus { border-color: #b38a25; background: #f2dfaa; color: #493814; }
.lw-bonus-label-mobile, .lw-level-test-label-mobile { display: none; }
@media (max-width: 650px) {
    .lw-bonus-label-desktop, .lw-level-test-label-desktop { display: none; }
    .lw-bonus-label-mobile, .lw-level-test-label-mobile { display: inline; }
}
.lw-reading-create #readingCreationControls[hidden], .lw-reading-create #readingCreationMeta[hidden], .lw-reading-create .lw-story-discovery-group[hidden], .lw-reading-create .lw-news-discovery-group[hidden], .lw-reading-create .lw-discovery-divider[hidden], .lw-reading-create .lw-generate-actions[hidden], .lw-reading-create .lw-custom-story-open[hidden], .lw-reading-create .lw-genre-field[hidden], .lw-reading-create .lw-length-field[hidden], .lw-reading-create .lw-active-genre-badge[hidden] { display: none !important; }

.lw-story-topic-card { width: min(520px, 100%); padding: 30px; border: 1px solid #d8cfbf; }
.lw-story-topic-card .lw-eyebrow { margin-bottom: 5px; color: #9a7027; }
.lw-story-topic-card h2 { color: var(--lw-green-dark); font-size: 27px; }
.lw-story-topic-field { margin-top: 22px; }
.lw-story-topic-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.lw-story-topic-actions .lw-btn { min-height: 44px; }
.lw-custom-story-open { white-space: nowrap; }
.lw-dashboard-intro { margin: -6px 0 12px; color: var(--lw-muted); font-size: 14px; }
.lw-vocabulary-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid #ebe5dc; }
.lw-vocabulary-filter .lw-reading-filter-button { min-height: 34px; padding: 5px 11px; font-size: 12px; }
.lw-progress-card { justify-content: center; }
.lw-progress-level-head { margin-bottom: 18px; text-align: center; }
.lw-progress-level-head > span { display:block; color:#59645e; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.lw-progress-level-head > strong { display:block; margin-top:5px; color:var(--lw-green-dark); font-family:Georgia,"Times New Roman",serif; font-size:48px; line-height:1; }
.lw-progress-level-head > small { display:block; margin-top:7px; color:var(--lw-muted); }
.lw-progress-recommendation { max-width:680px; margin:0 auto 18px; padding:13px 16px; border-radius:11px; background:#edf3ee; color:#375248; text-align:center; }
.lw-progress-recommendation p { margin:4px 0 0; font-size:13px; }
.lw-progress-recommendation-actions { margin-top:11px; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.lw-progress-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 14px; }
.lw-progress-metric { min-height: 135px; padding: 20px; border: 1px solid #e5ded2; border-radius: 13px; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.lw-progress-metric > span { color: #59645e; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.lw-progress-metric strong { display: block; margin-top: 8px; color: #1e544a; font-size: 30px; line-height: 1.15; }
.lw-progress-metric small { display: block; margin-top: 6px; color: var(--lw-muted); font-size: 14px; }
.lw-progress-empty { display: block; margin-top: 18px; color: var(--lw-muted); text-align: center; }

.lw-vocabulary-layout { display: grid; grid-template-columns: minmax(320px,2fr) minmax(0,3fr); gap: 0; height: var(--lw-dashboard-content-height); min-height: 472px; }
.lw-vocabulary-master { min-width: 0; min-height: 0; padding-right: 20px; display: flex; flex-direction: column; }
.lw-vocabulary-list-shell { position: relative; min-height: 0; flex: 1 1 auto; }
.lw-vocabulary-list-shell #savedWordsList { height: 100%; max-height: 100%; padding-right: 30px; overflow-y: auto; }
.lw-word-details-panel { min-width: 0; height: 100%; max-height: 100%; padding: 4px 0 4px 22px; overflow-y: auto; border-left: 1px solid #e5ded2; }
.lw-vocabulary-scroll-indicator { position: absolute; right: 1px; z-index: 3; width: 32px; height: 36px; padding: 8px; border: 0; border-radius: 999px; background: rgba(255,253,248,.9); color: #77817b; box-shadow: 0 1px 5px rgba(42,55,47,.1); cursor: pointer; }
.lw-vocabulary-scroll-indicator[hidden] { display: none !important; }
.lw-vocabulary-scroll-indicator svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lw-vocabulary-scroll-indicator:hover { color: var(--lw-green-dark); background: #fffdf8; }
.lw-vocabulary-scroll-indicator:focus-visible { outline: 3px solid #ef9f43; outline-offset: 1px; }
.lw-vocabulary-scroll-up { top: 2px; }
.lw-vocabulary-scroll-down { bottom: 2px; }
.lw-word-details-empty { min-height: 270px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--lw-muted); text-align: center; }
.lw-word-details-empty h3 { margin: 0 0 8px; color: var(--lw-green-dark); font-family: Georgia,"Times New Roman",serif; font-size: 22px; }
.lw-word-details-empty p { max-width: 390px; margin: 0; line-height: 1.55; }
.lw-word-details-loading, .lw-word-details-error { margin: 28px 8px; color: var(--lw-muted); text-align: center; }
.lw-word-details-loading::before { content: ''; display: inline-block; width: 15px; height: 15px; margin-right: 8px; border: 2px solid #c8d5cb; border-top-color: var(--lw-green); border-radius: 50%; vertical-align: -3px; animation: lwSpin .8s linear infinite; }
.lw-word-details-error { color: #8c4545; }
.lw-word-details-content h3 { margin: 0; color: var(--lw-ink); font-family: Georgia,"Times New Roman",serif; font-size: 25px; }
.lw-word-details-translation { margin: 5px 0 12px; color: var(--lw-muted); font-size: 15px; }
.lw-word-details-meta { margin: 0; color: var(--lw-green-dark); font-weight: 700; }
.lw-word-details-grammar { margin: 5px 0 18px; color: var(--lw-muted); font-size: 14px; line-height: 1.5; }
.lw-word-detail-section { margin-top: 17px; padding-top: 14px; border-top: 1px solid #ebe5dc; }
.lw-word-detail-section h4 { margin: 0 0 9px; color: #59645e; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lw-word-detail-section dl { display: grid; grid-template-columns: minmax(0,auto) minmax(0,1fr); gap: 5px 12px; margin: 0; font-size: 14px; }
.lw-word-detail-section dt { color: var(--lw-muted); font-weight: 600; }
.lw-word-detail-section dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.lw-word-detail-value-only { grid-column: 1 / -1; }
.lw-word-detail-context blockquote { margin: 0; padding-left: 12px; border-left: 3px solid #d7e2da; color: #46524c; font-style: italic; }
.lw-word-follow-up { margin-top: 22px; padding-top: 16px; border-top: 1px solid #dcd5ca; }
.lw-word-follow-up h4 { margin: 0 0 10px; color: #59645e; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lw-word-follow-up-transcript:empty { display: none; }
.lw-word-follow-up-entry { max-width: 94%; margin: 0 0 10px; padding: 9px 11px; border-radius: 9px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lw-word-follow-up-question { margin-left: auto; background: #edf3ee; color: #294f47; }
.lw-word-follow-up-answer { background: #f5f1e9; color: #404b45; }
.lw-word-follow-up-status { margin: 7px 0; color: var(--lw-muted); font-size: 13px; }
.lw-word-follow-up-status.is-error { color: #8c4545; }
.lw-word-follow-up-composer { position: sticky; z-index: 2; bottom: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; margin-top: 10px; padding: 9px 0 2px; background: #fffdf8; }
.lw-word-follow-up-input { width: 100%; min-height: 82px; max-height: 150px; padding: 10px 11px; resize: vertical; border: 1px solid #d8d0c4; border-radius: 8px; background: #fff; color: var(--lw-ink); font: inherit; font-size: 14px; line-height: 1.4; }
.lw-word-follow-up-input:focus { border-color: #6e9b8c; outline: 2px solid rgba(32,105,91,.14); }
.lw-word-follow-up-ask { min-height: 38px; }
.lw-word-details-mobile { display: none; }
.lw-vocabulary-master .lw-saved-word { grid-template-columns: minmax(0,1fr) auto; padding: 6px 8px; border: 1px solid transparent; border-top-color: #e8e1d6; border-radius: 8px; }
.lw-saved-word-select { min-width: 0; padding: 5px 3px; display: grid; grid-template-columns: minmax(90px,.8fr) minmax(0,1.2fr); align-items: center; gap: 8px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lw-vocabulary-master .lw-saved-word:hover { background: #f7f9f4; }
.lw-vocabulary-master .lw-saved-word.is-selected { border-color: #b9cbc0; background: #edf3ee; }
.lw-saved-word-select:focus-visible { outline: 3px solid #ef9f43; outline-offset: 1px; border-radius: 5px; }

@media (max-width: 899px) {
    .lw-dashboard-tabs { --lw-dashboard-reading-height: min(68vh, 580px); --lw-dashboard-content-height: min(68vh, 580px); }
    .lw-vocabulary-layout { display: block; height: auto; min-height: 0; }
    .lw-vocabulary-master { padding-right: 0; }
    .lw-vocabulary-list-shell { height: var(--lw-dashboard-content-height); flex: none; }
    .lw-word-details-panel { display: none; }
    .lw-vocabulary-master .lw-saved-word { grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; }
    .lw-saved-word-select { grid-template-columns: 1fr; gap: 4px; }
    .lw-saved-word-select .lw-saved-word-translation { text-align: left; }
    .lw-vocabulary-master .lw-saved-word-actions { grid-column: 2; grid-row: 1; }
    .lw-word-details-mobile { grid-column: 1 / -1; margin: 8px -2px -3px; padding: 15px 10px 10px; border-top: 1px solid #ccd9d0; cursor: default; }
    .lw-word-details-mobile:not([hidden]) { display: block; }
    .lw-word-follow-up-composer { position: static; }
}

@media (min-width: 900px) and (max-width: 1099px) {
    .lw-dashboard-tabs { --lw-dashboard-reading-height: clamp(520px, 62vh, 620px); --lw-dashboard-content-height: clamp(600px, 70vh, 690px); }
    .lw-vocabulary-layout { grid-template-columns: minmax(320px,.92fr) minmax(0,1fr); }
}

@media (max-width: 520px) {
    .lw-dashboard-tablist { gap: 2px; }
    .lw-dashboard-tab { min-height: 52px; padding: 8px 4px; border-radius: 13px 13px 0 0; gap: 4px; font-size: 14px; line-height: 1.2; white-space: nowrap; }
    .lw-dashboard-tab-icon { width: 15px; height: 15px; flex-basis: 15px; }
    .lw-dashboard-panel { min-height: 0; padding: 14px 12px; border-radius: 0 0 9px 9px; }
    .lw-reading-filter { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .lw-reading-filter-button { padding: 7px 5px; }
    .lw-story-topic-backdrop { align-items: flex-start; padding: 14px 10px; overflow-y: auto; }
    .lw-story-topic-card { width: 100%; max-height: calc(100vh - 28px); padding: 25px 17px 18px; }
    .lw-story-topic-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .lw-story-topic-actions .lw-btn { width: 100%; padding-right: 8px; padding-left: 8px; }
    .lw-dashboard-panel .lw-dashboard-card { min-height: 0; }
    .lw-progress-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .lw-progress-metric { min-height: 120px; padding: 14px; }
    .lw-progress-metric strong { font-size: 25px; }
}

/* Shared Books reader MVP */
.lw-books-user-shell { display: block; }
.lw-books-user-shell .lw-main { width: 100%; margin: 0 auto; }
.lw-books-reading-nav { margin-top: 0; }
.lw-books-dashboard-panel .lw-books-user-card, .lw-books-dashboard-panel .lw-reader-card { padding-right: 2px; padding-left: 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lw-books-user-card { padding: clamp(22px,4vw,42px); border: 1px solid var(--lw-border); border-radius: 16px; background: var(--lw-paper); box-shadow: 0 8px 28px rgba(49,59,52,.055); }
.lw-books-user-card h1, .lw-books-library-item h2, .lw-books-user-chapter h2, .lw-books-reader h1, .lw-books-reader h2 { font-family: Georgia,"Times New Roman",serif; color: var(--lw-ink); }
.lw-books-user-card h1 { margin: 4px 0 8px; font-size: clamp(32px,5vw,48px); }
.lw-books-user-intro { max-width: 620px; color: var(--lw-muted); }
.lw-books-library-grid { display: grid; gap: 18px; margin-top: 24px; }
.lw-books-library-item { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 24px; align-items: center; padding: 22px; border: 1px solid #e4dccf; border-radius: 14px; background: #fffdf8; }
.lw-books-cover-placeholder { width: 110px; aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; border: 1px solid #9c7b3c; border-radius: 5px 10px 10px 5px; background: linear-gradient(145deg,#245b47,#123f34); color: #e8c87d; box-shadow: 6px 8px 16px rgba(37,50,43,.15); font-family: Georgia,"Times New Roman",serif; font-size: 26px; letter-spacing: .08em; }
.lw-books-cover-image { width: 110px; aspect-ratio: 3/4; display: block; object-fit: cover; border-radius: 5px 10px 10px 5px; box-shadow: 6px 8px 16px rgba(37,50,43,.15); }
.lw-books-library-copy h2 { margin: 0 0 5px; font-size: 27px; }
.lw-books-library-copy p { max-width: 620px; margin: 0 0 13px; line-height: 1.55; }
.lw-books-author { color: var(--lw-green-dark); font-weight: 700; }
.lw-books-user-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.lw-books-user-selectors { display: grid; grid-template-columns: minmax(180px,1fr) minmax(120px,.5fr) auto; gap: 12px; align-items: end; margin: 24px 0 14px; padding: 18px; border: 1px solid var(--lw-border); border-radius: 12px; background: #faf8f2; }
.lw-books-user-selectors label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.lw-books-selection-summary { margin: 18px 0 10px; color: var(--lw-green-dark); font-weight: 800; }
.lw-books-user-chapters { display: grid; gap: 9px; }
.lw-books-user-chapter { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid #e5ded2; border-radius: 12px; background: #fff; }
.lw-books-user-chapter h2 { margin: 0 0 3px; font-size: 19px; }
.lw-books-user-chapter p { margin: 0; color: var(--lw-muted); font-size: 13px; }
.lw-books-user-chapter-action { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.lw-btn-prepare { border: 1px solid #b77721; background: #c9872b; color: #fff; }
.lw-btn-prepare:hover, .lw-btn-prepare:focus { border-color: #995f16; background: #b77721; color: #fff; }
.lw-books-preparing { display: inline-flex; align-items: center; gap: 7px; color: #755b18; font-size: 13px; font-weight: 800; }
.lw-books-preparing .lw-books-spinner { border-top-color: #c9872b; }
.lw-books-spinner { width: 16px; height: 16px; display: inline-block; border: 2px solid #d9ccb0; border-top-color: var(--lw-green); border-radius: 50%; animation: lwSpin .8s linear infinite; }
.lw-books-spinner-large { width: 26px; height: 26px; border-width: 3px; }
.lw-books-reader { width: min(980px,100%); margin: 0 auto; }
.lw-books-reader .lw-reader-header { display: flex; justify-content: space-between; gap: 24px; }
.lw-books-reader h1 { margin: 12px 0 2px; font-size: 26px; }
.lw-books-reader h2 { margin: 0; font-size: clamp(29px,4vw,42px); }
.lw-books-reader-context { margin: 10px 0 0; color: var(--lw-green-dark); font-weight: 800; }
.lw-books-reader-text { margin: 30px auto 0; }
.lw-book-word { border-radius: 3px; cursor: pointer; }
.lw-book-word:hover, .lw-book-word:focus { background: #fff0bd; outline: none; }
.lw-books-reader-missing { margin: 30px auto; padding: 28px; border: 1px solid #e3dbce; border-radius: 13px; background: #faf8f2; text-align: center; }
.lw-books-reader-missing h3 { margin: 10px 0 7px; color: var(--lw-green-dark); font-family: Georgia,"Times New Roman",serif; }
.lw-books-reader-navigation { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--lw-border); text-align: center; }
.lw-books-reader-navigation a:last-child { justify-self: end; }
.lw-books-reader-navigation a:first-child { justify-self: start; }
.lw-books-reader-navigation span { color: var(--lw-muted); font-size: 13px; font-weight: 700; }
.lw-books-user-chapter .lw-btn.is-submitting, .lw-books-reader .lw-btn.is-submitting { pointer-events: none; opacity: .65; cursor: wait; }
.lw-books-admin-cover { display: flex; align-items: center; gap: 18px; margin: 16px 0 22px; padding: 16px; border: 1px solid var(--lw-border); border-radius: 12px; background: #faf8f2; }
.lw-books-admin-cover img { width: 82px; aspect-ratio: 3/4; display: block; object-fit: cover; border-radius: 5px; }
.lw-books-admin-cover label { display: block; margin-bottom: 6px; font-weight: 800; }
.lw-books-admin-cover p { margin: 5px 0 10px; color: var(--lw-muted); font-size: 12px; }
@media (max-width: 650px) {
    .lw-books-user-card { padding: 20px 15px; }
    .lw-books-library-item { grid-template-columns: 76px minmax(0,1fr); gap: 15px; padding: 15px; align-items: start; }
    .lw-books-cover-placeholder, .lw-books-cover-image { width: 70px; font-size: 18px; }
    .lw-books-library-copy h2 { font-size: 21px; }
    .lw-books-user-head, .lw-books-reader .lw-reader-header { display: block; }
    .lw-books-user-head > a, .lw-books-reader .lw-reader-header > a { display: inline-block; margin-top: 8px; }
    .lw-books-user-selectors { grid-template-columns: 1fr 1fr; padding: 14px; }
    .lw-books-user-selectors > div:last-child { grid-column: 1 / -1; }
    .lw-books-user-selectors .lw-btn { width: 100%; }
    .lw-books-user-chapter { align-items: flex-start; flex-direction: column; gap: 11px; }
    .lw-books-user-chapter-action { width: 100%; justify-content: flex-start; }
    .lw-books-user-chapter-action .lw-btn { flex: 1 1 105px; width: auto; min-height: 44px; }
    .lw-books-reader { padding: 28px 18px 45px; }
    .lw-books-reader-navigation { grid-template-columns: 1fr 1fr; }
    .lw-books-reader-navigation span { grid-column: 1 / -1; grid-row: 1; }
}
.lw-practice-open { border: 1px solid #d8d0c1; background: #f6f1e8; color: var(--lw-green); border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; line-height: 1.2; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.lw-practice-open:hover, .lw-practice-open:focus { background: #ece6da; color: var(--lw-green-dark); outline: none; }
.lw-remove-word-card { width: min(390px,calc(100vw - 28px)); padding: 26px; text-align: center; }
.lw-remove-word-card h2 { margin: 0 0 20px; color: var(--lw-ink); font-size: 22px; }
.lw-remove-word-actions { display: grid; gap: 9px; }
.lw-practice-card { width: min(920px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.lw-practice-restore { display: none; position: absolute; top: 15px; right: 54px; z-index: 2; min-height: 32px; padding: 4px 9px; border: 1px solid #b9c9bf; border-radius: 999px; background: #edf3ee; color: var(--lw-green-dark); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.lw-practice-restore:hover, .lw-practice-restore:focus { border-color: var(--lw-green); outline: 2px solid rgba(53,94,75,.16); }
.lw-practice-restore[hidden] { display: none !important; }
.lw-practice-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.lw-practice-title-row > div:first-child { min-width: 0; }
.lw-practice-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #ded6c9; background: #f6f1e8; border-radius: 999px; color: #55625b; font-size: 12px; font-weight: 800; cursor: pointer; user-select: none; }
.lw-practice-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.lw-practice-switch { width: 30px; height: 17px; border-radius: 999px; background: #c9c6bd; position: relative; transition: .16s ease; }
.lw-practice-switch:after { content: ""; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .16s ease; }
.lw-practice-toggle input:checked + .lw-practice-switch { background: var(--lw-green); }
.lw-practice-toggle input:checked + .lw-practice-switch:after { transform: translateX(13px); }
.lw-practice-score { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 17px 0 7px; padding: 10px 12px; border-radius: 10px; background: #f4efe5; border: 1px solid #e4ddd1; color: #5b655f; font-size: 12px; }
.lw-practice-score-good { color: #2f6d52; }
.lw-practice-score-bad { color: #9b4b48; }
.lw-practice-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; border-top: 1px solid #e7dfd3; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.lw-practice-list::-webkit-scrollbar { width: 0; height: 0; display: none; }
.lw-practice-row { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.3fr); gap: 18px; align-items: center; padding: 13px 4px; border-bottom: 1px solid #e7dfd3; }
.lw-practice-word-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }
.lw-practice-word { font-family: Georgia, "Times New Roman", serif; font-size: 18px; color: var(--lw-ink); overflow-wrap: anywhere; }
.lw-practice-word-wrap .lw-pronounce-button { flex: 0 0 auto; }
.lw-practice-answer-cell { min-width: 0; }
.lw-practice-translation { color: #6d756f; font-size: 15px; }
.lw-practice-input-wrap { display: grid; grid-template-columns: minmax(0,1fr) 42px; gap: 7px; }
.lw-practice-input { min-width: 0; min-height: 40px; border-radius: 8px; border: 1px solid #d8d2c7; background: #fff; padding: 8px 10px; font-size: 14px; }
.lw-practice-input:focus { border-color: #809b8c; box-shadow: 0 0 0 2px rgba(47,94,75,.09); outline: none; }
.lw-practice-check { width: 42px; min-height: 40px; border: 0; border-radius: 8px; background: var(--lw-green); color: #fff; font-size: 19px; font-weight: 800; cursor: pointer; }
.lw-practice-check:hover, .lw-practice-check:focus { background: var(--lw-green-dark); outline: none; }
.lw-practice-check:disabled { opacity: .55; cursor: default; }
.lw-practice-row.is-correct { background: rgba(68,129,91,.055); }
.lw-practice-row.is-wrong { background: rgba(165,73,68,.055); }
.lw-practice-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lw-practice-result-answer { color: var(--lw-ink); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.lw-practice-result-mark { flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; }
.lw-practice-row.is-correct .lw-practice-result-mark { background: #e3efe7; color: #2f6d52; }
.lw-practice-row.is-wrong .lw-practice-result-mark { background: #f6e5e3; color: #9b4b48; }
.lw-practice-your-answer { margin-top: 4px; color: #9a7a76; font-size: 11px; }
.lw-practice-empty { padding: 28px 8px; color: var(--lw-muted); text-align: center; font-size: 13px; }
.lw-practice-category-filter { flex: 0 0 auto; margin-top: 12px; }
.lw-practice-category-filter .lw-reading-filter-button { min-height: 36px; padding: 6px 13px; font-size: 12px; }
.lw-verb-workspace { display: grid; grid-template-columns: minmax(190px,1fr) minmax(0,2fr); min-height: 390px; }
.lw-verb-chooser { padding: 10px 16px 10px 0; border-right: 1px solid #e7dfd3; }
.lw-verb-choice { display: block; width: 100%; margin: 0 0 5px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--lw-ink); font: inherit; font-family: Georgia,"Times New Roman",serif; font-size: 17px; text-align: left; cursor: pointer; }
.lw-verb-choice:hover,.lw-verb-choice.is-selected { border-color: #b9cbc0; background: #edf3ee; }
.lw-verb-exercise { min-width: 0; padding: 14px 4px 24px 24px; }
.lw-verb-exercise h3 { margin: 4px 0 13px; color: var(--lw-green-dark); font-family: Georgia,"Times New Roman",serif; font-size: 24px; }
.lw-verb-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lw-verb-heading-row h3 { min-width: 0; }
.lw-verb-meaning-toggle { flex: 0 0 auto; margin-top: 3px; padding: 4px 8px; border: 1px solid #d9d1c5; border-radius: 7px; background: transparent; color: #66716b; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.lw-verb-meaning-toggle:hover,.lw-verb-meaning-toggle:focus { border-color: #9fb8aa; color: var(--lw-green-dark); outline: none; }
.lw-back-to-verbs { margin: 0 0 8px; }
.lw-verb-tense-selector { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.lw-verb-tense-selector .lw-reading-filter-button { min-height: 34px; padding: 5px 10px; font-size: 11px; }
.lw-verb-usage { margin: 0 0 10px; color: #59645e; line-height: 1.5; }
.lw-verb-example { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 10px 12px; border-radius: 9px; background: #f5f1e9; color: var(--lw-ink); }
.lw-verb-round-progress { color: var(--lw-muted); font-size: 12px; font-weight: 700; }

@media (min-width: 701px) {
    .lw-practice-list.is-verb-workspace { display: grid; grid-template-rows: minmax(0,1fr); overflow: hidden; }
    .lw-practice-list.is-verb-workspace .lw-verb-workspace { height: auto; min-height: 0; overflow: hidden; }
    .lw-practice-list.is-verb-workspace .lw-verb-chooser,
    .lw-practice-list.is-verb-workspace .lw-verb-exercise { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
}
.lw-verb-prompt { margin: 8px 0 12px; color: var(--lw-ink); font-family: Georgia,"Times New Roman",serif; font-size: 28px; }
.lw-verb-input-wrap { grid-template-columns: minmax(0,1fr) auto; }
.lw-verb-check { width: auto; min-width: 76px; padding: 0 14px; font-size: 14px; }
.lw-verb-feedback { margin-top: 12px; padding: 9px 11px; border-radius: 8px; font-size: 14px; }
.lw-verb-feedback.is-correct { background: #e3efe7; color: #2f6d52; }
.lw-verb-feedback.is-wrong { background: #f6e5e3; color: #8c4545; }
.lw-verb-next { margin-top: 10px; }
.lw-verb-result { margin: 18px 0 12px; color: var(--lw-green-dark); font-size: 20px; }
.lw-verb-paradigm { display: grid; grid-template-columns: minmax(0,auto) minmax(0,1fr); gap: 6px 14px; margin: 0; }
.lw-verb-paradigm dt { color: var(--lw-muted); }
.lw-verb-paradigm dd { margin: 0; font-weight: 650; }
.lw-verb-summary-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }

@media (max-width: 650px) {
    .lw-word-head-actions { gap: 5px; }
    .lw-practice-open { padding: 4px 7px; font-size: 9px; }
    .lw-practice-card { max-height: calc(100vh - 20px); padding: 24px 16px; }
    .lw-practice-title-row { flex-direction: column; gap: 12px; }
    .lw-practice-toggle { align-self: flex-start; }
    .lw-practice-score { gap: 8px 13px; }
    .lw-practice-row { grid-template-columns: 1fr; gap: 7px; padding: 12px 2px; }
    .lw-practice-word { font-size: 17px; }
    .lw-practice-input-wrap { grid-template-columns: minmax(0,1fr) 44px; }
    .lw-practice-category-filter { display: flex; flex-wrap: wrap; }
    .lw-verb-workspace { display: block; min-height: 0; }
    .lw-verb-workspace.has-selection .lw-verb-chooser { display: none; }
    .lw-verb-chooser { padding: 7px 0; border-right: 0; }
    .lw-verb-exercise { padding: 10px 2px 20px; }
    .lw-verb-heading-row { align-items: flex-start; }
    .lw-verb-meaning-toggle { max-width: 45%; white-space: normal; text-align: right; }
    .lw-verb-input-wrap { grid-template-columns: minmax(0,1fr) auto; }
}

/* v2.2.2 - unobtrusive practice answer review */
.lw-practice-review-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; }
.lw-practice-review-btn { border: 0; background: transparent; padding: 2px 5px; color: #6f7871; font-size: 10px; font-weight: 750; cursor: pointer; border-radius: 6px; line-height: 1.35; }
.lw-practice-review-btn:hover, .lw-practice-review-btn:focus { background: #eee9df; color: var(--lw-green-dark); outline: none; }
.lw-practice-review-btn:disabled { opacity: .55; cursor: default; background: transparent; }
.lw-practice-accept-btn { color: #4f725f; }
.lw-practice-ai-btn { color: #7b6a45; }
.lw-practice-next { display: none; width: 100%; min-height: 42px; margin-top: 12px; }
.lw-practice-review-note { margin-top: 6px; color: #6e7771; font-size: 10.5px; line-height: 1.35; }
.lw-practice-review-note.is-good { color: #3f7559; }
.lw-practice-review-note.is-almost { color: #8a6c2e; }
.lw-practice-review-note.is-bad { color: #9a5b56; }

@media (max-width: 575.98px) {
    .lw-practice-review-actions { gap: 4px; }
    .lw-practice-review-btn { padding: 3px 4px; font-size: 10px; }
}
.lw-practice-row.is-almost { background: rgba(183,139,54,.055); }
.lw-practice-row.is-almost .lw-practice-result-mark { background: #f5ecd7; color: #8a6c2e; }

/* v2.2.3 practice direction, peek tooltip and login spinner */
.lw-practice-controls { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.lw-practice-direction { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #68736c; padding: 2px 5px; border-radius: 6px; font-size: 10.5px; font-weight: 750; cursor: pointer; line-height: 1.35; }
.lw-practice-direction:hover, .lw-practice-direction:focus { background: #eee9df; color: var(--lw-green-dark); outline: none; }
.lw-practice-direction.is-reverse { color: var(--lw-green); }
.lw-practice-word.is-cheatable { position: relative; display: inline-block; width: fit-content; max-width: 100%; cursor: help; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: #c69b4d; text-underline-offset: 4px; }
.lw-practice-word.is-cheatable:after { content: attr(data-cheat); position: absolute; left: 0; top: calc(100% + 7px); z-index: 40; min-width: 110px; max-width: 280px; width: max-content; padding: 7px 9px; border-radius: 7px; background: #33483f; color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; font-weight: 500; line-height: 1.35; box-shadow: 0 5px 16px rgba(0,0,0,.16); opacity: 0; visibility: hidden; transform: translateY(-2px); transition: opacity .12s ease, transform .12s ease, visibility .12s ease; pointer-events: none; white-space: normal; }
.lw-practice-word.is-cheatable:hover:after,
.lw-practice-word.is-cheatable:focus:after,
.lw-practice-word.is-cheatable.is-cheat-open:after { opacity: 1; visibility: visible; transform: translateY(0); }

.lw-login-submit { position: relative; margin-top: 20px; }
.lw-login-submit .lw-btn { margin-top: 0; }
.lw-login-loading-overlay { display: none; position: absolute; inset: 0; z-index: 20; border-radius: 16px; background: rgba(250,248,243,.76); align-items: center; justify-content: center; pointer-events: all; }
.lw-login-loading-overlay.show { display: flex; }
.lw-login-spinner { width: 48px; height: 48px; border: 5px solid rgba(53,94,75,.18); border-top-color: var(--lw-green); border-radius: 50%; opacity: 0; visibility: hidden; pointer-events: none; box-shadow: 0 8px 28px rgba(31,58,47,.10); }
.lw-login-spinner.show { opacity: 1; visibility: visible; animation: lw-login-spin .7s linear infinite; }
.lw-login-modal-loading > :not(.lw-login-loading-overlay) { opacity: .42; transition: opacity .15s ease; }
.lw-login-loading { cursor: wait; }
@keyframes lw-login-spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
    .lw-practice-controls { align-items: flex-start; width: 100%; }
    .lw-practice-direction { padding-left: 1px; }
    .lw-practice-word.is-cheatable:after { max-width: min(250px, 74vw); }
}

@media (min-width: 701px) {
    .lw-practice-row.is-reverse-direction .lw-practice-answer-cell { order: 1; }
    .lw-practice-row.is-reverse-direction .lw-practice-word-wrap { order: 2; }
}

/* v2.3 footer and feedback */
.lw-site-footer {
    margin-top: 30px;
    padding: 0 28px 30px;
}
.lw-site-footer-inner {
    max-width: 1700px;
    margin: 0 auto;
    border-top: 1px solid #ded6ca;
    padding: 22px 4px 0;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    color: #68716c;
}
.lw-site-footer-about { max-width: 650px; }
.lw-footer-lockup { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lw-footer-icon { display: block; width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; }
.lw-footer-brand {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -.03em;
    color: var(--lw-green-dark);
    margin-bottom: 0;
}
.lw-footer-brand span { color: var(--lw-green-dark); }
.lw-footer-brand b { color: #a48732; font-weight: 800; }
.lw-site-footer-about p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #77807a;
}
.lw-site-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.lw-footer-link {
    border: 0;
    background: transparent;
    color: var(--lw-green-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 9px;
    cursor: pointer;
    border-radius: 7px;
}
.lw-footer-link:hover, .lw-footer-link:focus {
    background: #eee8dd;
    outline: none;
}
.lw-site-footer-copy {
    font-size: 11px;
    white-space: nowrap;
    color: #8b918d;
}

/* Public legal pages */
.lw-legal-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 54px 28px 20px;
}
.lw-legal-card {
    background: var(--lw-paper);
    border: 1px solid var(--lw-border);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(35, 48, 41, .07);
    padding: 44px 54px;
}
.lw-legal-card h1 {
    margin: 0 0 10px;
    color: var(--lw-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 400;
    line-height: 1.08;
}
.lw-legal-updated {
    margin: 0 0 34px;
    color: var(--lw-muted);
    font-size: 13px;
}
.lw-legal-content {
    color: #3f4b44;
    font-size: 16px;
    line-height: 1.7;
}
.lw-legal-content h2 {
    margin: 34px 0 10px;
    color: var(--lw-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.25;
}
.lw-legal-content h2:first-child { margin-top: 0; }
.lw-legal-content h3 {
    margin: 20px 0 6px;
    color: var(--lw-green-dark);
    font-size: 17px;
    font-weight: 700;
}
.lw-legal-content p { margin: 0 0 14px; }
.lw-legal-content ul { margin: 8px 0 18px; padding-left: 25px; }
.lw-legal-content ol { margin: 8px 0 20px; padding-left: 25px; }
.lw-legal-content li { margin: 5px 0; }
.lw-legal-content a { color: var(--lw-green-dark); font-weight: 700; }
.lw-legal-contact {
    margin-top: 16px;
    padding: 16px 18px;
    background: #f1e6c9;
    border-radius: 10px;
}

/* Public SEO acquisition pages */
.lw-seo-main { background: #fffdfa; }
.lw-seo-hero { border-bottom: 1px solid rgba(222,215,202,.75); background: linear-gradient(102deg,#fffdf8 0%,#f5f0e6 100%); }
.lw-seo-hero-inner { width: 100%; max-width: 1180px; min-height: 510px; margin: 0 auto; padding: 58px 28px; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(330px,.92fr); align-items: center; gap: 64px; }
.lw-seo-eyebrow { margin-bottom: 12px; color: var(--lw-green); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lw-seo-hero h1 { max-width: 720px; margin: 0; color: var(--lw-ink); font-family: Georgia,"Times New Roman",serif; font-size: clamp(44px,5.4vw,68px); font-weight: 400; line-height: 1.03; letter-spacing: -.035em; }
.lw-seo-lead { max-width: 660px; margin: 20px 0 0; color: #5f6964; font-size: 20px; line-height: 1.55; }
.lw-seo-primary { margin-top: 26px; min-width: 220px; text-decoration: none !important; }
.lw-seo-reassurance { margin: 11px 0 0; color: #757f79; font-size: 13px; }
.lw-seo-visual { min-width: 0; padding: 28px; border: 1px solid #ded7ca; border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 16px 40px rgba(35,48,41,.07); }
.lw-seo-levels { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.lw-seo-levels span { min-height: 58px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #edf2ee; color: var(--lw-green-dark); font-size: 18px; font-weight: 800; }
.lw-seo-levels span:nth-child(2),.lw-seo-levels span:nth-child(5) { background: #f4ead2; }
.lw-seo-visual-note { margin: 17px 0 0; color: #69736e; font-size: 14px; line-height: 1.5; text-align: center; }
.lw-seo-news-card { padding: 6px; }
.lw-seo-news-meta { color: var(--lw-green); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lw-seo-news-card h2 { margin: 13px 0 12px; color: var(--lw-ink); font-family: Georgia,"Times New Roman",serif; font-size: 27px; font-weight: 400; line-height: 1.2; }
.lw-seo-news-card p { margin: 0; color: #5d6862; font-size: 15px; line-height: 1.65; }
.lw-seo-word { padding: 1px 4px; border-radius: 4px; background: #f4ead2; color: var(--lw-green-dark); font-weight: 700; }
.lw-seo-word-help { margin-top: 17px; padding: 13px 15px; border-radius: 10px; background: var(--lw-green-dark); color: #fff; font-size: 13px; line-height: 1.45; }
.lw-seo-section { padding: 64px 28px; }
.lw-seo-section.is-soft { border-top: 1px solid rgba(222,215,202,.7); border-bottom: 1px solid rgba(222,215,202,.7); background: #f5f0e6; }
.lw-seo-section-inner { max-width: 1120px; margin: 0 auto; }
.lw-seo-section h2 { margin: 0 0 12px; color: var(--lw-green-dark); font-family: Georgia,"Times New Roman",serif; font-size: 34px; font-weight: 400; line-height: 1.2; text-align: center; }
.lw-seo-section-intro { max-width: 720px; margin: 0 auto 28px; color: #65706a; font-size: 16px; line-height: 1.65; text-align: center; }
.lw-seo-three { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.lw-seo-card { padding: 24px; border: 1px solid #e2dbcf; border-radius: 12px; background: rgba(255,255,255,.78); }
.lw-seo-card-number { width: 34px; height: 34px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--lw-mustard); color: #fff; font-size: 14px; font-weight: 800; }
.lw-seo-card h3 { margin: 0 0 8px; color: var(--lw-ink); font-size: 17px; font-weight: 800; line-height: 1.3; }
.lw-seo-card p { margin: 0; color: #69736e; font-size: 14px; line-height: 1.6; }
.lw-seo-copy { max-width: 790px; margin: 0 auto; color: #46534c; font-size: 16px; line-height: 1.75; }
.lw-seo-copy p { margin: 0 0 16px; }
.lw-seo-copy p:last-child { margin-bottom: 0; }
.lw-seo-copy a,.lw-seo-related a { color: var(--lw-green-dark); font-weight: 700; }
.lw-seo-faq { max-width: 820px; margin: 0 auto; }
.lw-seo-faq details { border-bottom: 1px solid #ddd5c8; }
.lw-seo-faq summary { padding: 18px 34px 18px 0; position: relative; color: var(--lw-ink); font-size: 16px; font-weight: 750; cursor: pointer; list-style: none; }
.lw-seo-faq summary::-webkit-details-marker { display: none; }
.lw-seo-faq summary:after { content: "+"; position: absolute; right: 4px; top: 14px; color: var(--lw-green); font-size: 24px; font-weight: 400; }
.lw-seo-faq details[open] summary:after { content: "−"; }
.lw-seo-faq p { margin: -2px 34px 18px 0; color: #616c66; font-size: 14px; line-height: 1.65; }
.lw-seo-related { margin-top: 34px; color: #68726d; font-size: 14px; line-height: 1.7; text-align: center; }

@media (max-width: 800px) {
    .lw-seo-hero-inner { min-height: 0; padding: 34px 18px 38px; grid-template-columns: 1fr; gap: 30px; }
    .lw-seo-hero h1 { font-size: clamp(40px,12vw,54px); }
    .lw-seo-lead { margin-top: 16px; font-size: 17px; }
    .lw-seo-primary { width: 100%; margin-top: 22px; }
    .lw-seo-visual { padding: 20px; }
    .lw-seo-section { padding: 44px 18px; }
    .lw-seo-section h2 { font-size: 29px; }
    .lw-seo-three { grid-template-columns: 1fr; gap: 12px; }
    .lw-seo-card { padding: 20px; }
}
.lw-legal-contact p:last-child { margin-bottom: 0; }
.lw-delete-account-page .lw-legal-content .lw-btn { margin-top: 3px; text-decoration: none; }

.lw-feedback-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(27, 39, 34, .58);
    z-index: 10080;
}
.lw-feedback-backdrop.show { display: flex; }
.lw-feedback-card {
    position: relative;
    width: min(720px, 100%);
    max-height: min(90vh, 820px);
    overflow-y: auto;
    background: #fffdf9;
    border: 1px solid #ddd4c7;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(18, 32, 27, .28);
    padding: 34px 38px 30px;
}
.lw-feedback-card h2 {
    margin: 4px 46px 7px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1.15;
    color: var(--lw-ink);
}
.lw-feedback-intro, .lw-feedback-mode-intro {
    color: #7d837f;
    line-height: 1.55;
    margin: 0;
}
.lw-feedback-intro { font-size: 13px; }
.lw-feedback-mode-intro { font-size: 12px; margin: 14px 0 18px; }
.lw-feedback-tabs {
    margin-top: 22px;
    display: inline-flex;
    padding: 4px;
    border: 1px solid #ddd5c9;
    background: #f3eee5;
    border-radius: 12px;
    gap: 3px;
}
.lw-feedback-tab {
    border: 0;
    background: transparent;
    color: #66716a;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.lw-feedback-tab.active {
    background: #fffdf9;
    color: var(--lw-green-dark);
    box-shadow: 0 1px 4px rgba(21, 46, 38, .08);
}
.lw-feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.lw-feedback-grid label, .lw-feedback-field label {
    display: block;
    margin: 0 0 6px;
    color: #57645d;
    font-size: 12px;
    font-weight: 700;
}
.lw-feedback-field { margin-top: 14px; }
.lw-feedback-message {
    resize: vertical;
    min-height: 135px;
    line-height: 1.5;
}
.lw-feedback-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    left: -10000px !important;
}
.lw-feedback-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
.lw-feedback-status {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}
.lw-feedback-status.success { background: #eaf2ed; color: var(--lw-green-dark); }
.lw-feedback-status.error { background: #fff0ef; color: #9b3f3f; }

.lw-admin-feedback-message {
    max-width: 560px;
    white-space: pre-wrap;
    line-height: 1.45;
    color: #58635c;
}
.lw-feedback-status-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lw-feedback-status-badge.new { background: #fff1d7; color: #8a6614; }
.lw-feedback-status-badge.handled { background: #e5eee8; color: #356650; }

@media (max-width: 800px) {
    .lw-site-footer { padding: 0 18px 24px; margin-top: 22px; }
    .lw-site-footer-inner {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: start;
    }
    .lw-site-footer-actions { justify-content: flex-start; margin-left: -9px; }
    .lw-feedback-backdrop { padding: 12px; align-items: flex-end; }
    .lw-feedback-card {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 12px 12px;
        padding: 28px 20px 22px;
    }
    .lw-feedback-card h2 { font-size: 28px; }
    .lw-feedback-grid { grid-template-columns: 1fr; gap: 12px; }
    .lw-feedback-tabs { display: flex; width: 100%; }
    .lw-feedback-tab { flex: 1; }
    .lw-legal-main { padding: 28px 14px 10px; }
    .lw-legal-card { padding: 30px 22px; border-radius: 14px; }
    .lw-legal-card h1 { font-size: 38px; }
    .lw-legal-content { font-size: 15px; }
}
.lw-admin-feedback-card { margin-top: 24px; }

/* v2.3.1 Messages */
.lw-messages-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: var(--lw-ink);
    font: inherit;
    font-weight: 700;
    padding: 6px 5px;
    cursor: pointer;
}
.lw-messages-header:hover,
.lw-messages-header:focus { color: var(--lw-green); outline: none; }
.lw-unread-badge,
.lw-admin-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d83b37;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}
.lw-messages-modal-card { width: min(980px, calc(100vw - 28px)); max-height: 88vh; }
.lw-messages-layout {
    display: grid;
    grid-template-columns: 300px minmax(0,1fr);
    min-height: 460px;
    max-height: 62vh;
    border: 1px solid #e4ddd1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-top: 16px;
}
.lw-message-thread-list {
    overflow-y: auto;
    background: #faf8f3;
    border-right: 1px solid #e6dfd4;
    scrollbar-width: none;
}
.lw-message-thread-list::-webkit-scrollbar,
.lw-message-conversation::-webkit-scrollbar { width: 0; height: 0; }
.lw-message-thread {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #ece6dd;
    background: transparent;
    text-align: left;
    padding: 13px 14px;
    cursor: pointer;
    color: var(--lw-ink);
}
.lw-message-thread:hover { background: #f2eee5; }
.lw-message-thread.active { background: #eaf1ed; }
.lw-message-thread.unread { background: #f8f2df; }
.lw-message-thread-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.lw-message-thread-top strong { font-size: 13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lw-message-thread-badge {
    flex: 0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:999px;
    background:#d83b37;
    color:#fff;
    font-size:10px;
    font-weight:800;
}
.lw-message-thread-preview { margin-top:5px; font-size:11px; color:#667069; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lw-message-thread-date { display:block; margin-top:5px; font-size:10px; color:#9a9a91; }
.lw-message-conversation-panel { min-width:0; display:flex; flex-direction:column; background:#fff; }
.lw-message-conversation-panel h3 { margin:0; padding:14px 16px 11px; border-bottom:1px solid #eee8de; font-size:17px; font-family:Georgia,"Times New Roman",serif; }
.lw-message-conversation { flex:1 1 auto; overflow-y:auto; padding:16px; scrollbar-width:none; scroll-behavior:smooth; }
.lw-message-row { display:flex; margin:0 0 12px; }
.lw-message-row.admin { justify-content:flex-start; }
.lw-message-row.user { justify-content:flex-end; }
.lw-message-bubble { max-width:78%; padding:10px 12px; border-radius:12px; line-height:1.48; font-size:13px; }
.lw-message-row.admin .lw-message-bubble { background:#f2eee6; border-bottom-left-radius:4px; }
.lw-message-row.user .lw-message-bubble { background:#e5efe9; border-bottom-right-radius:4px; }
.lw-message-meta { display:flex; gap:9px; align-items:baseline; margin-bottom:4px; color:#667069; font-size:10px; }
.lw-message-meta strong { color:#3d4842; font-size:10px; }
.lw-message-text { white-space:pre-wrap; word-break:break-word; }
.lw-message-reply { flex:0 0 auto; display:flex; align-items:flex-end; gap:9px; border-top:1px solid #eee8de; padding:10px 12px; background:#fbfaf7; }
.lw-message-reply-input { min-height:54px !important; max-height:130px; resize:vertical; }
.lw-message-reply .lw-btn { flex:0 0 auto; min-width:84px; }
.lw-message-status { margin-top:10px; padding:8px 10px; border-radius:7px; background:#eaf2ed; color:var(--lw-green-dark); font-size:12px; font-weight:600; }
.lw-message-status.error { background:#fff0ef; color:#9b3f3f; }
.lw-message-empty { padding:18px 14px; color:#8b918d; font-size:12px; text-align:center; }
.lw-message-empty-large { padding-top:80px; }

/* Admin messages */
.lw-admin-message-head-actions { display:flex; gap:10px; align-items:center; }
.lw-admin-message-row-unread td { background:#fffaf0; }
.lw-admin-message-preview { max-width:440px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lw-admin-message-person small { display:block; color:var(--lw-muted); margin-top:2px; }
.lw-admin-thread-card { width:min(760px, calc(100vw - 30px)); max-height:90vh; overflow:auto; }
.lw-admin-thread-meta { display:flex; flex-wrap:wrap; gap:8px 14px; color:var(--lw-muted); font-size:11px; margin:-4px 0 14px; }
.lw-admin-thread-conversation { max-height:46vh; overflow-y:auto; padding:12px; border:1px solid #e7e0d5; border-radius:10px; background:#fbfaf7; scrollbar-width:none; }
.lw-admin-thread-conversation::-webkit-scrollbar { width:0; }
.lw-admin-thread-reply { margin-top:14px; }
.lw-admin-thread-reply textarea { min-height:90px; }
.lw-admin-thread-reply .lw-btn { margin-top:9px; }
.lw-broadcast-card { width:min(620px, calc(100vw - 30px)); }
.lw-broadcast-card textarea { min-height:150px; resize:vertical; }
.lw-broadcast-note { margin:10px 0 0; color:var(--lw-muted); font-size:11px; line-height:1.45; }

@media (max-width: 820px) {
    .lw-messages-modal-card { width:calc(100vw - 18px); padding:18px 14px; }
    .lw-messages-layout { grid-template-columns:1fr; max-height:none; min-height:0; overflow:visible; }
    .lw-message-thread-list { max-height:230px; border-right:0; border-bottom:1px solid #e6dfd4; }
    .lw-message-conversation-panel { min-height:360px; }
    .lw-message-conversation { max-height:44vh; }
    .lw-message-bubble { max-width:90%; }
}

@media (max-width: 560px) {
    .lw-messages-header span:first-child { display:none; }
    .lw-messages-header::before { content:'\2709'; font-size:18px; }
    .lw-message-reply { align-items:stretch; flex-direction:column; }
    .lw-message-reply .lw-btn { width:100%; }
    .lw-admin-message-head-actions { width:100%; justify-content:flex-start; }
}

.lw-header-message-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    color: var(--lw-green);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.lw-header-message-icon:hover,
.lw-header-message-icon:focus {
    color: var(--lw-green-dark);
    background: #edf2ee;
    text-decoration: none;
    outline: none;
    transform: translateY(-1px);
}
.lw-header-message-svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lw-header-message-icon .lw-admin-unread-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    z-index: 2;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9px;
    box-shadow: 0 0 0 2px var(--lw-paper, #fff);
}
.lw-admin-link-wrap { display:inline-flex; align-items:center; gap:5px; }
@media (max-width:650px) {
    .lw-user-area .lw-unread-badge,
    .lw-user-area .lw-admin-unread-badge { display:inline-flex; }
}


/* v2.3.1.2 User message icon */
button.lw-header-message-icon {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.lw-header-message-icon .lw-unread-badge,
.lw-header-message-icon .lw-admin-unread-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    z-index: 2;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9px;
    box-shadow: 0 0 0 2px var(--lw-paper, #fff);
}
.lw-user-message-icon { margin: 0 1px; }
.lw-user-message-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 4px);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #263a31;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, top .12s ease;
    z-index: 40;
}
.lw-user-message-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 14px);
    transform: translateX(-50%);
    padding: 6px 9px;
    border-radius: 7px;
    background: #263a31;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(24, 42, 34, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, top .12s ease;
    z-index: 40;
}
.lw-user-message-icon:hover::before,
.lw-user-message-icon:focus-visible::before,
.lw-user-message-icon:hover::after,
.lw-user-message-icon:focus-visible::after { opacity: 1; }
.lw-user-message-icon:hover::after,
.lw-user-message-icon:focus-visible::after { top: calc(100% + 12px); }
.lw-messages-modal-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-right: 38px;
}
.lw-messages-modal-heading .lw-news-intro { margin-bottom: 0; }
.lw-message-new-button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 9px 15px;
}
@media (max-width: 650px) {
    .lw-user-message-icon::before,
    .lw-user-message-icon::after { display: none; }
    .lw-messages-modal-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding-right: 34px;
    }
    .lw-message-new-button {
        min-height: 36px;
        padding: 7px 12px;
    }
}

/* Mobile application polish: desktop composition remains unchanged. */
@media (max-width: 767px) {
    .lw-app-header { position: relative; top: auto; }
    .lw-dashboard-tablist { top: 0; }
    .lw-create-level-actions { width: 100%; display: grid; grid-template-columns: minmax(0,1fr); justify-items: stretch; }
    .lw-quick-levels { width: 100%; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
    .lw-quick-levels label { width: 100%; min-width: 0; padding: 0 2px; }
    .lw-level-test-link { justify-self: end; }
    .lw-reading-create > .lw-create-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 12px; }
    .lw-reading-create > .lw-create-head > div:first-child, .lw-reading-create > .lw-create-head > .lw-create-level-actions { display: contents; }
    .lw-reading-create > .lw-create-head h1 { display: none; }
    .lw-reading-create > .lw-create-head .lw-eyebrow { grid-column: 1; grid-row: 1; margin: 0; }
    .lw-reading-create > .lw-create-head .lw-level-test-link { grid-column: 2; grid-row: 1; justify-self: end; }
    .lw-reading-create > .lw-create-head .lw-quick-levels { grid-column: 1 / -1; grid-row: 2; }
    .lw-books-library-header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 12px; }
    .lw-books-library-header > div:first-child, .lw-books-library-header > .lw-create-level-actions { display: contents; }
    .lw-books-library-header h1 { display: none; }
    .lw-books-library-header .lw-eyebrow { grid-column: 1; grid-row: 1; margin: 0; }
    .lw-books-library-header .lw-level-test-link { grid-column: 2; grid-row: 1; justify-self: end; }
    .lw-books-library-header .lw-quick-levels { grid-column: 1 / -1; grid-row: 2; }
    .lw-reading-mode-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .lw-reading-mode-nav .lw-reading-filter-button { width: 100%; min-width: 0; padding-right: 9px; padding-left: 9px; }
    .lw-reading-mode-nav .lw-reading-special-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: 100%; }
    .lw-reading-mode-nav .lw-reading-special-actions .lw-reading-filter-button { width: 100%; min-height: 44px; }

    .lw-discovery-groups { display: grid; grid-template-columns: minmax(0,1fr); gap: 15px; }
    .lw-discovery-group, .lw-news-discovery-group { width: 100%; margin-top: 0; display: block; }
    .lw-discovery-label { display: block; margin-bottom: 7px; text-align: left; }
    .lw-discovery-options { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
    .lw-dashboard-quick-topics .lw-dashboard-quick-topic:nth-child(n+5) { display: none; }
    .lw-dashboard-quick-topic, .lw-news-source-badge { width: 100%; min-width: 0; min-height: 42px; justify-content: flex-start; overflow: hidden; }
    .lw-dashboard-news-sources { display: contents; }
    .lw-news-source-badge span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .lw-news-more-badge { justify-content: center; }

    .lw-history-row { grid-template-columns: minmax(0,1fr) 30px; align-items: stretch; gap: 8px; margin-bottom: 13px; }
    .lw-history-row > .lw-history-item { grid-column: 1 / -1; width: 100%; }
    .lw-history-reading-actions { grid-column: 1; grid-row: 2; min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
    .lw-history-reading-actions .lw-history-quiz-badge, .lw-history-discuss { width: 100%; max-width: none; min-height: 42px; padding: 7px 8px; white-space: normal; }
    .lw-history-row > .lw-delete-story { grid-column: 2; grid-row: 2; align-self: center; justify-self: center; }
    .lw-history-book-actions { grid-template-columns: minmax(0,1fr); }
    .lw-history-book-continue { width: 100%; min-height: 42px; }
    .lw-history-item.is-news, .lw-history-item.is-book, .lw-history-item.is-story { grid-template-columns: 64px minmax(0,1fr); gap: 12px; }
    .lw-history-thumbnail { width: 64px; height: 50px; }
    .lw-history-thumbnail img { width: 56px; height: 43px; }
    .lw-history-type-icon { width: 56px; height: 43px; }
    .lw-history-title { font-size: 18px; }

    .lw-practice-card { height: min(760px, calc(var(--lw-mobile-viewport-height, 100dvh) - 16px)); max-height: calc(var(--lw-mobile-viewport-height, 100dvh) - 16px); padding: 24px 16px; }
    #practiceWordsModal.is-answer-focused { align-items: flex-start; padding: 8px; }
    .lw-practice-card.is-answer-focused { padding-top: 16px; }
    #practiceWordsModal.is-answer-focused .lw-practice-card > .lw-modal-close { display: none; }
    .lw-practice-card.is-answer-focused .lw-practice-restore { top: 12px; right: 14px; }
    .lw-practice-card.is-answer-focused .lw-eyebrow { margin: 0 130px 3px 0; font-size: 10px; }
    .lw-practice-card.is-answer-focused .lw-practice-title-row h2 { margin: 0 130px 5px 0; font-size: 22px; }
    .lw-practice-card.is-answer-focused .lw-practice-title-row .lw-news-intro,
    .lw-practice-card.is-answer-focused .lw-practice-controls,
    .lw-practice-card.is-answer-focused .lw-practice-category-filter,
    .lw-practice-card.is-answer-focused .lw-practice-score,
    .lw-practice-card.is-answer-focused .lw-verb-exercise > .lw-back-to-verbs,
    .lw-practice-card.is-answer-focused .lw-verb-heading-row,
    .lw-practice-card.is-answer-focused .lw-verb-tense-selector,
    .lw-practice-card.is-answer-focused .lw-verb-usage,
    .lw-practice-card.is-answer-focused .lw-verb-example { display: none !important; }
    .lw-practice-card.is-answer-focused .lw-practice-restore { display: inline-flex; align-items: center; gap: 4px; }
    .lw-practice-card.is-answer-focused .lw-practice-list { border-top: 0; }
    .lw-practice-card.is-answer-focused .lw-practice-row:not(.is-active-answer) { display: none; }
    .lw-practice-card.is-answer-focused .lw-practice-row.is-active-answer { padding-top: 8px; }
    .lw-practice-card.is-answer-focused .lw-practice-next { display: block; }
    .lw-practice-card.is-answer-focused .lw-verb-exercise { padding-top: 8px; }
    .lw-practice-card.is-answer-focused .lw-verb-prompt { margin-top: 7px; }

    .lw-discussion-backdrop.show { align-items: flex-start; }
    .lw-discussion-card { width: 100%; height: var(--lw-mobile-viewport-height, 100dvh); max-height: var(--lw-mobile-viewport-height, 100dvh); min-height: 0; padding: max(48px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
    .lw-discussion-header { min-height: 0; }
    .lw-discussion-header h2 { margin-bottom: 9px; font-size: 23px; }
    .lw-discussion-messages { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 12px 9px; }
    .lw-discussion-typing, .lw-discussion-compose { flex-shrink: 0; }
    .lw-discussion-compose { grid-template-columns: minmax(0,1fr) 92px; gap: 7px; padding-top: 8px; }
    .lw-discussion-compose textarea { max-height: 96px; resize: none; }
}

/* My Reading owns the existing creation controls; tabs remain the primary app navigation. */
.lw-dashboard-tabs { margin-top: 0; }
.lw-reading-create {
    margin: 0;
    padding: 4px 2px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.lw-reading-workspace-divider { height: 1px; margin: 0 0 18px; background: #ebe5dc; }

@media (max-width: 767px) {
    .lw-reading-create { padding: 2px 2px 18px; }
    .lw-reading-workspace-divider { margin-bottom: 14px; }
}

/* Compact My Reading controls use the existing mobile breakpoint. */
.lw-mobile-reading-level, .lw-reading-empty-mobile { display: none; }
@media (max-width: 767px) {
    .lw-reading-create > .lw-create-head .lw-quick-levels { display: none; }
    .lw-reading-create > .lw-create-head { gap: 6px 10px; margin-bottom: 6px; }
    .lw-reading-create .lw-mobile-reading-level { display: flex; grid-column: 2; grid-row: 1; align-items: center; justify-self: end; gap: 4px; margin: 0; color: #4d5751; font-size: 13px; font-weight: 400; white-space: nowrap; }
    .lw-mobile-reading-level select { width: auto; min-height: 36px; padding: 3px 2px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
    .lw-mobile-reading-level select:focus-visible { outline: 3px solid #ef9f43; outline-offset: 2px; }
    .lw-reading-empty-desktop { display: none; }
    .lw-reading-empty-mobile { display: block; }
    #dashboardPanelReading .lw-reading-empty-state { padding: 32px 12px; }
    .lw-reading-empty-mobile > p { margin: 14px 0 0; }
}

/* Mobile level disclosure exposes the original radio controls on both reading pages. */
.lw-books-mobile-test { display: none !important; }
@media (max-width: 767px) {
    .lw-reading-create .lw-mobile-reading-level, .lw-books-library-header .lw-mobile-reading-level { display: inline-flex; position: relative; z-index: 3; grid-column: 2; grid-row: 1; align-items: center; justify-self: end; gap: 4px; min-height: 40px; padding: 4px 0 4px 8px; border: 0; background: transparent; color: #4d5751; font: inherit; font-size: 13px; cursor: pointer; }
    .lw-mobile-level-arrow { width: 7px; height: 7px; margin: -3px 3px 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
    .lw-mobile-reading-level[aria-expanded="true"] .lw-mobile-level-arrow { transform: rotate(225deg); margin-top: 3px; }
    .lw-books-library-header .lw-quick-levels { display: none; }
    .lw-reading-create > .lw-create-head .lw-quick-levels.is-mobile-open, .lw-books-library-header .lw-quick-levels.is-mobile-open { display: grid; }
    .lw-books-library-header .lw-level-test-link { display: none; }
    .lw-books-library-header { gap: 6px 10px; margin-bottom: 6px; }
    .lw-books-reading-nav { gap: 8px; }
    .lw-books-reading-nav > .lw-reading-filter-button { width: 100%; min-width: 0; padding: 7px 9px; }
    .lw-books-mobile-test { display: inline-flex !important; align-items: center; justify-content: center; }
}

@media (min-width: 768px) {
    .lw-reading-create .lw-mobile-reading-level, .lw-books-library-header .lw-mobile-reading-level { display: none !important; }
}

/* Shared reading action colors at every screen width. */
.lw-reading-create .lw-reading-mode-nav > .lw-reading-filter-button,
.lw-books-reading-nav > .lw-reading-filter-button { background: #EEEADE; border-color: #d8d2c1; color: #4d5751; }
.lw-reading-create .lw-reading-mode-nav > .lw-reading-filter-button.is-active,
.lw-books-reading-nav > .lw-reading-filter-button.is-active { background: #DED9C8; border-color: #aaa18a; box-shadow: inset 0 0 0 1px #aaa18a; }
.lw-reading-create .lw-reading-special-actions .lw-reading-filter-button,
.lw-books-reading-nav > .lw-reading-bonus-action,
.lw-books-reading-nav > .lw-reading-level-test-action,
.lw-books-library-header .lw-level-test-link { background: #fff; border-color: #d8d8d2; color: #4d5751; }
.lw-reading-create .lw-reading-special-actions .lw-reading-filter-button:hover,
.lw-reading-create .lw-reading-special-actions .lw-reading-filter-button:focus,
.lw-books-reading-nav > .lw-reading-bonus-action:hover,
.lw-books-reading-nav > .lw-reading-bonus-action:focus,
.lw-books-reading-nav > .lw-reading-level-test-action:hover,
.lw-books-reading-nav > .lw-reading-level-test-action:focus,
.lw-books-library-header .lw-level-test-link:hover,
.lw-books-library-header .lw-level-test-link:focus { background: #f7f7f4; border-color: #b6b6ae; color: #4d5751; }

/* Compact Conversation and Translator actions. */
.lw-reading-mode-nav .lw-reading-special-actions { flex: 0 1 auto; flex-wrap: wrap; }
.lw-reading-mode-nav .lw-reading-special-actions .lw-reading-filter-button { flex: 0 1 auto; width: auto; }
.lw-reading-create .lw-reading-special-actions .lw-reading-conversation-action,
.lw-reading-create .lw-reading-special-actions .lw-reading-translator-action { min-height: 36px; padding: 6px 10px; gap: 5px; background: #fffded; border-color: #aaa; color: #333; }
.lw-reading-create .lw-reading-special-actions .lw-reading-conversation-action:hover,
.lw-reading-create .lw-reading-special-actions .lw-reading-conversation-action:focus,
.lw-reading-create .lw-reading-special-actions .lw-reading-translator-action:hover,
.lw-reading-create .lw-reading-special-actions .lw-reading-translator-action:focus { background: #fffded; border-color: #aaa; color: #333; }
.lw-reading-conversation-action .lw-reading-translator-icon,
.lw-reading-translator-action .lw-reading-translator-icon { width: 18px; height: 18px; flex-basis: 18px; }
@media (max-width: 650px) {
    .lw-reading-mode-nav .lw-reading-special-actions .lw-reading-filter-button { width: 100%; min-width: 0; min-height: 44px; }
}
