/* Lexi Parcours UI v2.0 — opt-in, namespaced styles. No application data changes. */
:root {
  --lp-ink: #15243b;
  --lp-ink-subtle: #526279;
  --lp-bg: #f7f8f7;
  --lp-surface: #ffffff;
  --lp-surface-raised: #ffffff;
  --lp-line: #dce4e7;
  --lp-teal: #08786f;
  --lp-teal-on: #ffffff;
  --lp-teal-soft: #e6f5f0;
  --lp-violet: #6559bd;
  --lp-danger: #b53d48;
  --lp-focus: #156fbd;
  --lp-shadow: 0 8px 32px rgb(25 42 69 / 6%);
  --lp-radius-sm: 12px;
  --lp-radius-md: 18px;
  --lp-radius-lg: 24px;
  --lp-spacing-1: 4px;
  --lp-spacing-2: 8px;
  --lp-spacing-3: 12px;
  --lp-spacing-4: 16px;
  --lp-spacing-5: 20px;
  --lp-spacing-6: 24px;
  --lp-spacing-8: 32px;
  --lp-spacing-10: 40px;
  --lp-motion: 180ms cubic-bezier(.2,.7,.2,1);
}
:root[data-lp-theme="dark"] {
  color-scheme: dark;
  --lp-ink: #eaf2f7;
  --lp-ink-subtle: #b3c1cf;
  --lp-bg: #0e1827;
  --lp-surface: #172538;
  --lp-surface-raised: #20324a;
  --lp-line: #30445b;
  --lp-teal: #77dfcd;
  --lp-teal-on: #08271f;
  --lp-teal-soft: #1b403f;
  --lp-violet: #b5aaff;
  --lp-danger: #ff929c;
  --lp-focus: #a5d4ff;
  --lp-shadow: 0 12px 40px rgb(0 0 0 / 18%);
}
.lp-app { color: var(--lp-ink); background: var(--lp-bg); min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
.lp-app *, .lp-app *::before, .lp-app *::after, .lp-mobile-nav *, .lp-mobile-nav *::before, .lp-mobile-nav *::after { box-sizing: border-box; }
.lp-app :where(h1,h2,h3,p), .lp-mobile-nav :where(h2,p) { margin-top: 0; }
.lp-app :where(h1,h2,h3) { color: var(--lp-ink); line-height: 1.23; letter-spacing: -.025em; overflow-wrap: anywhere; }
.lp-app h1 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
.lp-app h2 { font-size: clamp(1.18rem, 2vw, 1.55rem); }
.lp-app :where(p,li) { overflow-wrap: anywhere; }
.lp-app :where(button,a,input,select,textarea):focus-visible, .lp-mobile-nav :where(button,a):focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 3px; }
.lp-content { width: min(100% - 32px, 1240px); margin-inline: auto; padding-block: clamp(20px,4vw,42px); }
.lp-content > * + * { margin-top: clamp(24px,4vw,40px); }
.lp-topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding: 12px clamp(16px,3vw,32px); background:var(--lp-surface); border-bottom:1px solid var(--lp-line); min-height:68px; }
.lp-brand { display:flex; align-items:center; min-width:0; gap:10px; color:var(--lp-ink); font-size:clamp(1.04rem,2vw,1.25rem); font-weight:760; letter-spacing:-.03em; }
.lp-brand-mark { display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:12px; background:var(--lp-teal-soft); color:var(--lp-teal); font-weight:800; }
.lp-control-group { display:flex; align-items:center; gap:8px; }
.lp-icon-button { position:relative; display:grid; place-items:center; flex:none; width:46px; height:46px; min-width:46px; min-height:46px; background:var(--lp-surface); color:var(--lp-ink); border:1px solid var(--lp-line); border-radius:14px; cursor:pointer; transition: background var(--lp-motion), border-color var(--lp-motion); }
.lp-icon-button:hover { background:var(--lp-teal-soft); }
.lp-icon-button[disabled] { opacity:.56; cursor:wait; }
.lp-icon { width:21px; height:21px; display:inline-block; flex:none; }
.lp-panel { min-width:0; padding:clamp(18px,2.5vw,28px); border:1px solid var(--lp-line); border-radius:var(--lp-radius-lg); background:var(--lp-surface); box-shadow:var(--lp-shadow); }
.lp-panel > *:last-child { margin-bottom:0; }
.lp-panel-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.lp-muted { color:var(--lp-ink-subtle); }
.lp-practice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(16px,2.4vw,26px); align-items:stretch; }
.lp-practice-grid > * { min-width:0; }
.lp-card-stack { display:grid; gap:clamp(20px,3vw,28px); }
.lp-dashboard-grid { display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(260px,1fr); gap:clamp(16px,2.4vw,28px); align-items:start; }
.lp-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; max-width:100%; min-height:46px; padding:10px 18px; border:1px solid transparent; border-radius:13px; background:var(--lp-teal); color:var(--lp-teal-on); font:inherit; font-weight:700; text-align:center; text-decoration:none; cursor:pointer; white-space:normal; overflow-wrap:anywhere; transition:transform var(--lp-motion), background var(--lp-motion); }
.lp-button:hover:not(:disabled) { transform:translateY(-1px); }
.lp-button:active:not(:disabled) { transform:translateY(0); }
.lp-button:disabled { opacity:.52; cursor:not-allowed; }
.lp-button--secondary { color:var(--lp-ink); background:var(--lp-surface); border-color:var(--lp-line); }
.lp-mobile-nav { display:none; font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; color:var(--lp-ink); }
.lp-mobile-nav button, .lp-mobile-nav a { -webkit-tap-highlight-color: transparent; }
.lp-bottom-nav { position:fixed; z-index:1000; bottom:0; left:0; right:0; display:flex; align-items:stretch; gap:3px; padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px)); min-height:70px; border-top:1px solid var(--lp-line); background:var(--lp-surface); box-shadow:0 -8px 26px rgb(17 34 50 / 8%); }
.lp-nav-link { min-width:0; flex:1 1 0; border:0; border-radius:13px; min-height:58px; padding:7px 2px; background:transparent; color:var(--lp-ink-subtle); text-decoration:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-family:inherit; font-size:11px; line-height:1.15; font-weight:600; text-align:center; cursor:pointer; }
.lp-nav-link .lp-nav-label { max-width:100%; overflow-wrap:anywhere; }
.lp-nav-link[aria-current="page"], .lp-nav-link[aria-pressed="true"] { color:var(--lp-teal); background:var(--lp-teal-soft); font-weight:750; }
.lp-nav-link[aria-current="page"] .lp-icon, .lp-nav-link[aria-pressed="true"] .lp-icon { stroke-width:2.5; }
.lp-more-layer[hidden] { display:none !important; }
.lp-more-layer { position:fixed; inset:0; z-index:1001; display:flex; align-items:flex-end; }
.lp-more-backdrop { position:absolute; inset:0; border:0; background:rgb(7 21 34 / 56%); cursor:pointer; }
.lp-more-drawer { position:relative; width:100%; max-height:min(82dvh,760px); overflow:auto; padding:18px max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px)); border-radius:24px 24px 0 0; border:1px solid var(--lp-line); background:var(--lp-surface); box-shadow:var(--lp-shadow); }
.lp-more-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.lp-more-heading { font-size:1.15rem; line-height:1.3; font-weight:760; margin:0; }
.lp-more-links { display:grid; gap:16px; }
.lp-more-group { display:grid; gap:6px; }
.lp-more-group-heading { font-size:.78rem; line-height:1.3; font-weight:760; letter-spacing:.05em; text-transform:uppercase; color:var(--lp-ink-subtle); margin:0 2px; }
.lp-more-group-links { display:grid; gap:6px; }
.lp-more-group-links .lp-more-link[hidden] { display:none; }
.lp-more-show-more { min-height:44px; border:1px solid var(--lp-line); background:transparent; color:var(--lp-teal); font-weight:650; font-size:.92rem; border-radius:12px; cursor:pointer; }
.lp-more-show-more:hover { background:var(--lp-teal-soft); }
.lp-more-link { min-height:48px; display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; color:var(--lp-ink); text-decoration:none; border:1px solid transparent; font-weight:650; }
.lp-more-link:hover, .lp-more-link[aria-current="page"] { background:var(--lp-teal-soft); color:var(--lp-teal); }
.lp-more-link .lp-icon { flex:none; }
@media (max-width: 899px) {
  .lp-mobile-nav { display:block; }
  body.lp-has-premium-nav::after { content:""; display:block; height:calc(84px + env(safe-area-inset-bottom,0px)); }
  .lp-dashboard-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width: 600px) {
  .lp-content { width:min(100% - 28px, 1240px); }
  .lp-practice-grid { grid-template-columns:minmax(0,1fr); }
  .lp-topbar { padding-inline:14px; }
  .lp-panel { border-radius:20px; }
}
@media (min-width: 900px) { .lp-mobile-nav { display:none !important; } }
@media (prefers-reduced-motion: reduce) { .lp-app *, .lp-mobile-nav * { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }

/* Integrate the shared design tokens with Lexi Parcours' learning screens. */
:root {
  color: var(--lp-ink);
  background: var(--lp-bg);
  --ink: var(--lp-ink);
  --muted: var(--lp-ink-subtle);
  --paper: var(--lp-surface);
  --line: var(--lp-line);
  --violet: #08786f;
}
:root[data-theme="dark"] {
  color: var(--lp-ink);
  background: #05080d;
  --ink: var(--lp-ink);
  --muted: var(--lp-ink-subtle);
  --paper: var(--lp-surface);
  --line: var(--lp-line);
  --violet: #77dfcd;
  --lp-bg: #05080d;
}
.lp-app :where(button,input,select,textarea) { font: inherit; }
.lp-app :where(button,.pill,.primary,.quiet,.account) {
  min-height: 46px;
  max-width: 100%;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
.lp-app :where(input,select,textarea) { max-width: 100%; min-width: 0; }
.lp-app :where(input,select) { min-height: 46px; }
.lp-app :where(input,textarea) { color: var(--lp-ink); background: var(--lp-surface); border-color: var(--lp-line); }
.lp-app :where(input[type="checkbox"],input[type="radio"]) { min-height: 22px; width: 22px; flex: none; accent-color: var(--lp-teal); }
.lp-app :where(fieldset,legend) { min-inline-size: 0; max-width: 100%; }
.lp-app :where(.row,.spaced)>* { min-width: 0; max-width: 100%; }
.lp-app :where(.panel,.card,.metric,.meter-card,.insight,.topic-workspace) { border-color: var(--lp-line); border-radius: 18px; }
.lp-app :where(.panel,.card) { box-shadow: var(--lp-shadow); }
.lp-app .top { height: auto; min-height: 76px; padding: 12px clamp(14px,2.3vw,34px); background: var(--lp-surface); }
.lp-app .brand { color: var(--lp-ink); flex: 0 1 auto; min-width: 0; }
.lp-app .brand b { color: var(--lp-teal); }
.lp-app .brand small { color: var(--lp-ink-subtle); }
.lp-app .logo { background: var(--lp-teal-soft); color: var(--lp-teal); transform: none; border: 1px solid var(--lp-line); }
.lp-app .tools { flex: none; gap: 10px; }
.lp-app .account { min-height: 46px; background: var(--lp-teal); color: var(--lp-teal-on); padding: 10px 14px; white-space: nowrap; }
.context-strip { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 12px; padding:7px clamp(16px,2.3vw,34px); border-bottom:1px solid var(--lp-line); background:var(--lp-surface); }
.page-location { color:var(--lp-ink-subtle); font-size:.8rem; font-weight:700; }
.lp-app .sync-strip { border:0; min-height:0; padding:0; background:transparent; color:var(--lp-ink-subtle); margin:0; font-size:.76rem; }
.lp-app .sync-strip[data-sync="pending"] { color:var(--lp-danger); }
.lp-app .layout { max-width:1680px; grid-template-columns:auto minmax(0,1fr); margin-inline:auto; }
.lp-app .sidebar { background:var(--lp-surface); border-color:var(--lp-line); }
.lp-app .sidebar button { justify-content:flex-start; text-align:left; color:var(--lp-ink); padding:11px 10px; gap:10px; }
.lp-app .sidebar .nav-toggle { justify-content:center; min-width:28px; min-height:28px; width:28px; height:28px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--lp-ink-subtle); font-size:1rem; }
.lp-app .sidebar .nav-toggle:hover { color:var(--lp-ink); }
.lp-app .layout.nav-compact .sidebar .nav-toggle { border:1px solid var(--lp-line); border-radius:50%; background:var(--lp-surface); box-shadow:0 1px 4px rgb(0 0 0/.14); color:var(--lp-ink); }
.lp-app .sidebar .nav-search-result { flex-direction:column; align-items:flex-start; gap:1px; min-height:0; padding:7px 9px; }
.lp-app .sidebar .nav-search-result:hover { border-color:var(--lp-teal); }
.lp-app .sidebar button .nav-icon { color:var(--lp-teal); }
.lp-app .sidebar button[aria-pressed="true"] { background:var(--lp-teal-soft); color:var(--lp-teal); }
.lp-app main#main { padding:clamp(16px,2.5vw,36px); }
.lp-app .hero { background:linear-gradient(118deg,#18364b,#263b64); padding:clamp(24px,3.4vw,48px); border:1px solid #345269; border-radius:24px; }
.lp-app .hero :where(h1,h2,h3) { color:#f3f9fb; }
.lp-app .hero h1 { font-size:clamp(2.15rem,4.8vw,4.5rem); line-height:1.08; }
.lp-app .hero h1 em { color:#a8eddd; }
.lp-app .hero p { color:#e0ecf2; }
.lp-app .hero .eyebrow { color:#bbd3e0; }
.lp-app .hero::after { color:#72bcce; opacity:.14; }
.lp-app .primary { background:var(--lp-teal); color:var(--lp-teal-on); padding:12px 18px; border-radius:13px; }
.lp-app .hero .primary { background:#a8eddd; color:#10362e; }
.lp-app :where(.pill,.quiet) { background:var(--lp-surface); color:var(--lp-ink); border-color:var(--lp-line); padding:10px 14px; }
.lp-app :where(.choice,.pill,.quiet):hover { background:var(--lp-teal-soft); border-color:var(--lp-teal); }
.lp-app .eyebrow { color:var(--lp-ink-subtle); letter-spacing:.11em; }
.lp-app a { color:var(--lp-teal); }
.lp-app .hero .pill { color:#143840; background:#e8f4f2; }
.lp-app .tile { background:var(--lp-teal-soft); color:var(--lp-teal); }
.lp-app .overview-total { flex-wrap:wrap; }
.lp-app .overview-total strong { color:var(--lp-teal); }
.lp-app .meter-card h3 { font-size:.93rem; }
.lp-app .study-path { background:linear-gradient(115deg,var(--lp-teal-soft),var(--lp-surface)); border-inline-start-color:var(--lp-teal); }
.lp-app .skills-panel .strength { grid-template-columns:minmax(116px,1.15fr) minmax(40px,1fr) minmax(64px,auto); gap:10px; }
.lp-app .skill-row .pill { width:100%; justify-content:center; text-wrap:balance; font-size:.83rem; }
.lp-app .insight-strength { background:#eaf5ef; }
.lp-app .insight-next { background:#f6f0e3; }
.lp-app .quiz-prompt { background:var(--lp-teal-soft); color:var(--lp-ink); line-height:1.4; font-size:clamp(1.35rem,3vw,2.15rem); }
.lp-app .game-quiz { background:var(--lp-surface); }
.lp-app .game-quiz .choice { min-height:64px; justify-content:center; text-align:center; padding:12px; background:var(--lp-surface); color:var(--lp-ink); border-color:var(--lp-line); }
.lp-app .game-quiz .choice:has(.choice-letter) { display:grid; grid-template-columns:28px minmax(0,1fr); gap:10px; }
.lp-app .choice-letter { width:28px; height:28px; color:var(--lp-teal); background:var(--lp-teal-soft); }
.lp-app .game-quiz .choice.good { background:#e3f5e8; border-color:#5b9b70; color:#16412a; }
.lp-app .game-quiz .choice.bad { background:#fbe8e9; border-color:#ca7881; color:#792b35; }
.lp-app .feedback { background:var(--lp-teal-soft); color:var(--lp-ink); }
.lp-app .lab-passage { background:var(--lp-teal-soft); color:var(--lp-ink); }
.lp-app .lab-option { display:flex; align-items:center; gap:12px; min-height:58px; padding:12px; line-height:1.5; }
.lp-app .lab-option input { margin:0; }
.lp-app .lab-plan li { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.lp-app .lab-plan li>div { flex:1 1 210px; width:auto; }
.lp-app .lab-plan li>button { flex:0 1 auto; }
.lp-app .grammar-path ol button { justify-content:flex-start; text-align:left; min-height:46px; }
.lp-app .topic-card { min-height:96px; padding:14px; text-align:left; }
.lp-app .topic-card .topic-text { flex:1 1 0; }
.lp-app .topic-card .topic-count { flex:none; }
.lp-app .number-topic { text-align:left; align-items:flex-start; }
.lp-app .list li { min-height:56px; }
.lp-app footer { background:var(--lp-surface); border-color:var(--lp-line); padding-block:20px; }
.lp-app .profile-streak div span { color:#d8e9ee; }
.lp-app .streak-number { color:#a8eddd; }
.lp-app .report-dialog { background:var(--lp-surface); border-color:var(--lp-line); max-height:85dvh; overflow:auto; }
.lp-app .profile-table { max-width:100%; }
:root[data-lp-theme="dark"] .lp-app :where(.insight-strength,.card:nth-child(3n+2) .tile) { background:#18352e; color:#d2efe3; }
:root[data-lp-theme="dark"] .lp-app :where(.insight-next,.card:nth-child(3n) .tile) { background:#362e21; color:#f3e6c7; }
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice.good { background:#173b2d; color:#bdf1cd; border-color:#63ab82; }
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice.bad { background:#42252d; color:#ffcad1; border-color:#d68a99; }
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice:not(:disabled):hover { background:#23443f; border-color:#77dfcd; }
@media(min-width:900px) {
  .lp-app .layout.nav-compact { --nav-width:68px; }
  .lp-app .nav-compact .sidebar button { justify-content:center; }
}
@media(max-width:899px) {
  .lp-app .layout,.lp-app .layout.nav-compact { display:block; }
  .lp-app .sidebar { display:none; }
  .lp-app .top { min-height:70px; }
  .lp-app .dashboard-insights { grid-template-columns:1fr; }
  .lp-app .profile-columns { grid-template-columns:1fr; }
  .lp-app main#main { padding:20px; }
  .lp-app .lp-mobile-nav a { color:var(--lp-ink-subtle); }
  .lp-app .lp-mobile-nav a[aria-current="page"] { color:var(--lp-teal); }
  .lp-app .lp-mobile-nav a.lp-more-link { color:var(--lp-ink); }
  html { scroll-padding-bottom:100px; }
}
@media(max-width:600px) {
  .lp-app .brand { font-size:1rem; gap:8px; }
  .lp-app .brand small { display:none; }
  .lp-app .logo { width:32px; height:32px; border-radius:10px; }
  .lp-app .top { padding:10px 14px; gap:8px; }
  .lp-app .tools { gap:8px; }
  .lp-app .account { padding:10px; font-size:.82rem; }
  .lp-control-group { gap:6px; }
  .lp-app main#main { padding:16px 14px; }
  .lp-app .panel { padding:18px 16px; }
  .lp-app .hero { padding:26px 22px; }
  .lp-app .hero h1 { font-size:2.35rem; }
  .lp-app .vocabulary-breakdown,.lp-app .skill-insights { grid-template-columns:1fr; }
  .lp-app .games-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lp-app .games-grid .card { padding:16px 12px; }
  .lp-app .games-grid h3 { font-size:1rem; }
  .lp-app .games-grid .pill { align-self:stretch; }
  .lp-app .topics-grid { grid-template-columns:1fr; }
  .lp-app :where(#main>.game-quiz .choices,.game-quiz .choices,.numbers-workspace .choices,.grammar-lesson .choices) { grid-template-columns:1fr; }
  .lp-app .game-quiz .choice { min-height:60px; }
  .lp-app .quiz-prompt { padding:16px; }
  .lp-app .match-grid { gap:8px; }
  .lp-app .match-with-flag { grid-template-columns:minmax(0,1fr); }
  .lp-app .match-flag { width:100%; min-height:38px; padding:6px; }
  .lp-app .number-topics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lp-app .number-topics .number-topic { min-height:86px; }
  .lp-app .overview-total strong { font-size:3.2rem; }
  .lp-app .report-dialog { width:calc(100% - 24px); padding:18px; }
  /* M2 — Mobile dashboard stat buttons: the three Dashboard stats
     (Learning areas, Recorded sessions, Available words) sit 3 across
     as small uniform buttons. Scoped to .dashboard-metrics so the
     Profile page — which reuses .profile-metrics with four metrics —
     keeps its own layout. */
  .lp-app .dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .lp-app .dashboard-metrics .profile-metric { padding:10px 6px; min-height:64px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:2px; }
  .lp-app .dashboard-metrics .profile-metric b { font-size:1.15rem; }
  .lp-app .dashboard-metrics .profile-metric span { font-size:.78rem; }
}
@media(max-width:370px) {
  .lp-app .logo { display:none; }
  .lp-app .brand { font-size:.97rem; }
  .lp-app .tools { gap:6px; }
  .lp-app .games-grid { grid-template-columns:1fr; }
  .lp-app .skills-panel .strength { grid-template-columns:minmax(106px,1fr) minmax(24px,.65fr) minmax(58px,auto); gap:6px; }
}
.import-workspace .hero { margin-bottom:0; }
.import-workspace label { color:var(--lp-ink); font-size:.9rem; font-weight:650; }
.import-input-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:22px; }
.import-file { padding:20px; border:1px dashed var(--lp-teal); border-radius:16px; background:var(--lp-teal-soft); }
.import-file input[type="file"] { width:100%; font-size:.85rem; background:transparent; padding:4px 0; }
.import-file input::file-selector-button { min-height:46px; padding:10px 14px; border-radius:10px; border:1px solid var(--lp-line); background:var(--lp-surface); color:var(--lp-ink); margin-right:10px; cursor:pointer; }
.import-input-grid textarea { margin-block:8px 12px; min-height:146px; }
.import-check { display:flex; align-items:center; gap:10px; line-height:1.5; }
#import-columns { margin-block:16px; align-items:flex-end; }
#import-columns label:not(.import-check) { display:grid; flex:1 1 150px; gap:6px; }
.import-actions { padding-block:18px; margin-block:16px; border-block:1px solid var(--lp-line); }
.import-actions p { margin:.5rem 0 0; }
.import-summary { color:var(--lp-teal); font-weight:750; }
.import-rows { display:grid; gap:12px; }
.import-word { display:grid; grid-template-columns:32px minmax(0,1fr) minmax(0,1.4fr); align-items:start; gap:8px 14px; padding:16px; border:1px solid var(--lp-line); border-radius:14px; }
.import-word label:not(.import-pick) { display:grid; gap:6px; min-width:0; }
.import-pick { display:flex; flex-direction:column; gap:8px; align-items:center; font-variant-numeric:tabular-nums; }
.import-row-status { grid-column:2 / -1; margin:0; font-size:.82rem; color:var(--lp-danger); }
.import-pages,.import-save-row { margin-top:18px; }
.import-word-review { border-inline-start:3px solid var(--lp-danger); }
#import-inputs[hidden],#import-preview[hidden],#import-practice[hidden] { display:none; }
@media(max-width:600px) {
  .import-input-grid { grid-template-columns:1fr; gap:18px; }
  .import-file { padding:16px; }
  .import-word { grid-template-columns:24px minmax(0,1fr); padding:14px 10px; gap:8px 10px; }
  .import-word label:nth-of-type(3) { grid-column:2; }
  .import-save-row .primary { width:100%; }
}
.lp-app [hidden] { display:none !important; }

/* Viewport fit: let content shrink at its actual grid/flex boundaries. */
.lp-app .brand-copy { min-width:0; }
.lp-app .brand-title { display:block; line-height:1.25; }
.lp-app .logo { flex:0 0 auto; }
.lp-app .logo svg { width:26px; height:26px; display:block; }
.lp-app :where(.layout,.stack,.profile-page,.profile-export,.profile-metrics,.profile-columns,.profile-table) { min-width:0; max-width:100%; }
.lp-app :where(.stack,.profile-page,.profile-metrics,.profile-columns) > * { min-width:0; max-width:100%; }
.lp-app .profile-hero { grid-template-columns:minmax(0,1fr) auto; }
.lp-app .profile-streak { min-width:0; max-width:100%; flex-wrap:wrap; }
.lp-app .profile-export { margin-top:20px; }
.lp-app .profile-export > .row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; }
.lp-app .profile-export h2 { overflow-wrap:normal; }
.lp-app .profile-export .subtle { margin-bottom:0; }
.lp-app .profile-table { width:100%; overscroll-behavior-inline:contain; }
.lp-app .hero::after { content:""; width:clamp(150px,26vw,310px); aspect-ratio:1; bottom:-35px; right:8px; background:url('/logo.svg') center/contain no-repeat; opacity:.08; transform:rotate(-12deg); }
.lp-app footer > * { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.lp-app #footer-tcf { display:inline-flex; align-items:center; justify-content:center; min-height:44px; }

@media(max-width:650px) {
  .lp-app .profile-hero { grid-template-columns:minmax(0,1fr); }
  .lp-app .profile-streak { grid-column:1; width:100%; }
  .lp-app .profile-export > .row { grid-template-columns:minmax(0,1fr); }
  .lp-app #profile-export { width:100%; min-height:48px; }
}
/* M1 (mobile top bar): the language toggle carries both a full word
   (desktop pill) and a two-letter code (small-screen round control);
   desktop shows the word, the small-screen rules below show the code. */
.lp-app #language-toggle .lang-label-short { display:none; }
@media(max-width:600px) {
  .lp-app .top {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    width:100%;
    padding:12px max(14px,env(safe-area-inset-right,0px)) 12px max(14px,env(safe-area-inset-left,0px));
  }
  .lp-app .top .brand { grid-column:1; grid-row:1; font-size:1rem; }
  .lp-app .top .brand-title { overflow-wrap:normal; }
  .lp-app .top .logo { display:grid; width:32px; height:32px; }
  /* M1: the top-bar controls stay one flex row beside the brand —
     sound + day/night + language together. The account link is hidden
     here (it lives at the end of the More list and the Profile screen),
     so the old full-width account row is gone. */
  .lp-app .top .tools { display:flex; grid-column:2; grid-row:1; align-items:center; gap:6px; }
  .lp-app .top .account { display:none; }
  /* M1: the language control is the same 46px control as the sound and
     day/night buttons (same surface, border and corner radius), showing
     the two-letter code instead of the full word. */
  .lp-app #language-toggle { width:46px; min-width:46px; height:46px; min-height:46px; padding:0; border-radius:14px; font-size:.85rem; font-weight:800; }
  .lp-app #language-toggle .lang-label-full { display:none; }
  .lp-app #language-toggle .lang-label-short { display:inline; }
  .lp-app .context-strip { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; width:100%; padding:8px max(14px,env(safe-area-inset-right,0px)) 8px max(14px,env(safe-area-inset-left,0px)); }
  .lp-app .context-strip > * { min-width:0; overflow-wrap:anywhere; }
  .lp-app .context-strip .sync-strip { text-align:start; }
  .lp-app .context-strip > :empty { display:none; }
  .lp-app main#main { padding-inline:max(14px,env(safe-area-inset-right,0px)) max(14px,env(safe-area-inset-left,0px)); }
  .lp-app footer { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; width:100%; padding:20px max(14px,env(safe-area-inset-right,0px)) 20px max(14px,env(safe-area-inset-left,0px)); text-align:center; }
  .lp-app footer > .row { display:block; }
  .lp-app #footer-tcf { display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; padding:10px; border:1px solid var(--lp-line); border-radius:12px; }
}

/* Electric Lime palette — colors only; existing layout and behavior retained. */
:root {
  --lp-ink:#263122;
  --lp-ink-subtle:#59664f;
  --lp-bg:#f7faef;
  --lp-surface:#fefff9;
  --lp-surface-raised:#ffffff;
  --lp-line:#dce5d1;
  --lp-teal:#45651a;
  --lp-teal-on:#ffffff;
  --lp-teal-soft:#ebf3d7;
  --lp-violet:#7152ad;
  --lp-focus:#45651a;
  --lp-hero:#263d23;
  --lp-hero-ink:#f6ffe9;
  --lp-hero-accent:#b09cff;
  --lp-hero-muted:#d4e8c8;
  --lp-hero-button:#c5f451;
  --lp-hero-button-on:#1b2910;
  --violet:var(--lp-teal);
}
:root[data-lp-theme="dark"],:root[data-theme="dark"] {
  --lp-ink:#f3f6ef;
  --lp-ink-subtle:#b9c6b6;
  --lp-bg:#141a16;
  --lp-surface:#202920;
  --lp-surface-raised:#29352a;
  --lp-line:#3b4939;
  --lp-teal:#c5f451;
  --lp-teal-on:#1b2910;
  --lp-teal-soft:#344429;
  --lp-violet:#b09cff;
  --lp-focus:#d8ff89;
  --violet:var(--lp-teal);
  background:var(--lp-bg);
}
.lp-app .hero { background:var(--lp-hero); border-color:var(--lp-line); }
.lp-app .hero :where(h1,h2,h3),.lp-app .hero p { color:var(--lp-hero-ink); }
.lp-app .hero h1 em,.lp-app .streak-number { color:var(--lp-hero-accent); }
.lp-app .hero .eyebrow,.lp-app .profile-streak div span { color:var(--lp-hero-muted); }
.lp-app .hero .primary { background:var(--lp-hero-button); color:var(--lp-hero-button-on); }
.lp-app .hero .pill { background:var(--lp-hero-accent); color:#291d40; }
.lp-app .hero::after { color:var(--lp-hero-accent); }
.lp-app .side-note,.lp-app .choice.selected,.lp-app .theme-switch::before { background:var(--lp-teal-soft); color:var(--lp-ink); border-color:var(--lp-line); }
.lp-app .theme-switch,.lp-app .status,.lp-app .sidebar button span { color:var(--lp-teal); }
.lp-app .theme-switch .theme-thumb { background:var(--lp-surface-raised); }
.lp-app .theme-switch[aria-checked="true"] .theme-thumb { background:var(--lp-teal); }
.lp-app .sentence-gap:not(.good):not(.bad) { color:var(--lp-teal); border-color:var(--lp-teal); }
.lp-app .lab-option:has(input:checked),.lp-app .profile-streak { border-color:var(--lp-teal); }
.lp-app .lab-option input { accent-color:var(--lp-teal); }
.lp-app .bar,.lp-app .bank-composition,.lp-app .goal-meter,.lp-app .week-track { background:var(--lp-line); }
.lp-app .bar>span:not(.meter-fill),.lp-app .week-track span { background:var(--lp-teal); }
.lp-app .goal-meter span { background:linear-gradient(90deg,var(--lp-teal),var(--lp-violet)); }
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice:not(.good):not(.bad) { background:var(--lp-surface); border-color:var(--lp-line); }
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice:not(:disabled):not(.good):not(.bad):hover,
:root[data-lp-theme="dark"] .lp-app .game-quiz .choice:not(:disabled):focus-visible { background:var(--lp-teal-soft); border-color:var(--lp-teal); }
/* Vocabulary tools follow the selected palette and existing responsive layout. */
.lp-app .revision-toolbar { margin-block:20px; padding:16px; border-radius:14px; background:var(--lp-teal-soft); }
.lp-app .revision-toolbar h3 { margin-bottom:6px; }
.lp-app .revision-toolbar p { margin-bottom:12px; }
.lp-app .revision-note { padding:12px; border-radius:10px; background:var(--lp-teal-soft); color:var(--lp-teal); font-size:.86rem; }
.lp-app .word-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px; }
.lp-app .word-editor label:not(.import-check) { display:grid; gap:6px; margin-block:12px; }
.lp-app .word-editor [data-evidence] { max-height:260px; overflow:auto; }
.lp-app .word-editor [data-review] { margin-block:14px; }
.lp-app .import-row-status p { margin-bottom:4px; }
@media(max-width:600px) {
  .lp-app #word-list li { flex-wrap:wrap; align-items:flex-start; }
  .lp-app #word-list li > div:first-child { flex:1 1 100%; }
  .lp-app .word-actions { justify-content:flex-start; }
  .lp-app .revision-toolbar .row > * { max-width:100%; }
}
.lp-app input.input,.lp-app textarea,.lp-app select { background:var(--lp-surface); color:var(--lp-ink); border-color:var(--lp-line); }

/* Unified Your space: fluid desktop canvas, adaptive information cards. */
.lp-app .layout {width:100%;max-width:none;}
.lp-app main#main {min-width:0;width:100%;max-width:none;}
.bank-hub {grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));}
.bank-hub .card {display:flex;flex-direction:column;gap:14px;}
.area-tabs {margin-block:0 20px;gap:8px;flex-wrap:wrap;}
.area-tabs [aria-pressed="true"] {background:var(--lp-teal);color:var(--lp-teal-on);}
.table-scroll {overflow-x:auto;}
.area-accuracy {height:9px;border-radius:8px;background:var(--lp-line);overflow:hidden;margin-block:10px;}
.area-accuracy span {display:block;height:100%;background:linear-gradient(90deg,#31b7aa,#a8cc40);}
.profile-bank:nth-child(3n+1) .area-accuracy span {background:linear-gradient(90deg,#8c72d8,#de91bb);}
.profile-bank:nth-child(3n+2) .area-accuracy span {background:linear-gradient(90deg,#e69b46,#e87576);}
@media(min-width:1600px){.lp-app .comparison-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}

/* Roomy vocabulary overview: size cards to their available space, not
   the viewport. Keep counts and actions aligned in either language. */
.lp-app .dashboard-insights { grid-template-columns:minmax(0,1fr); }
.lp-app .dashboard-insights > .panel { height:auto; min-width:0; }
.lp-app .vocabulary-overview { padding:clamp(20px,2vw,32px); }
.lp-app .vocabulary-breakdown {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));
  gap:16px;
  align-items:stretch;
  margin-top:22px;
}
.lp-app .meter-card {
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:22px;
  gap:14px;
}
.lp-app .meter-card > .row {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
}
.lp-app .meter-card h3 { font-size:1rem; line-height:1.4; min-height:2.8em; }
.lp-app .meter-card b { font-size:2.25rem; line-height:1; font-variant-numeric:tabular-nums; }
.lp-app .meter-card .bar { margin:0; flex:none; height:10px; }
.lp-app .meter-card p { font-size:.95rem; line-height:1.6; margin:0; flex:1; }
.lp-app .meter-card .pill { width:100%; min-height:48px; margin-top:4px; }
@media(max-width:540px) {
  .lp-app .vocabulary-breakdown { grid-template-columns:minmax(0,1fr); gap:12px; }
  .lp-app .meter-card { padding:18px; }
  .lp-app .meter-card h3 { min-height:0; }
  .lp-app .meter-card > .row { flex-direction:row; justify-content:space-between; align-items:center; }
}
/* Deliberate 1/2/3/5-column steps avoid an isolated fifth card in a
   four-column row on ordinary desktop windows. */
.lp-app .vocabulary-overview { container-type:inline-size; }
.lp-app .vocabulary-breakdown { grid-template-columns:minmax(0,1fr); }
@container (min-width:460px) { .lp-app .vocabulary-breakdown { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@container (min-width:720px) { .lp-app .vocabulary-breakdown { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@container (min-width:1250px) { .lp-app .vocabulary-breakdown { grid-template-columns:repeat(5,minmax(0,1fr)); } }
