/* login.css — V2 Round 2 登录体验
   统一 Header（Logo 左上 / 语言右上，不随页面移动）+ 统一 Login Layout / Login Form（学生、教师两种主题）。
   所有尺寸、颜色只从下方设计变量取值；页面不硬编码。
   断点（CSS 变量不能用于 @media，这里集中声明）：
     ≥1280 宽屏 · 1024–1279 笔记本（卡片收窄）· <1024 平板竖屏（上下堆叠）· <640 手机（允许滚动）
     高度 ≤760（笔记本矮屏：Header/卡片内距收紧，不缩字号）· 高度 <600（允许滚动） */

:root {
  /* Brand */
  --lx-stu-a: #7c74fb; --lx-stu-b: #5b4cf0; --lx-stu-ink: #4f40e2; --lx-stu-soft: #efedff;
  --lx-tch-a: #4f79fb; --lx-tch-b: #3456ee; --lx-tch-ink: #2c50dc; --lx-tch-soft: #e8efff;
  /* Neutral（纯中性灰蓝，不带黄 / 绿偏色） */
  --lx-ink: #191d3a; --lx-ink-2: #474d70; --lx-muted: #767c9e; --lx-faint: #9ca1bd;
  --lx-line: #dfe2f0; --lx-line-2: #eceef6; --lx-surface: #ffffff;
  --lx-danger: #d43a55; --lx-danger-ring: rgba(212, 58, 85, .12);
  /* Background */
  --lx-bg-student: radial-gradient(55% 60% at 6% 0%, rgba(241, 229, 255, .95), transparent 70%),
                   radial-gradient(50% 60% at 100% 22%, rgba(214, 225, 255, .9), transparent 72%),
                   linear-gradient(125deg, #f7f5ff 0%, #eff0fe 42%, #e8ecfd 72%, #ebe6ff 100%);
  --lx-bg-teacher: linear-gradient(118deg, #6c66f8 0%, #5868f1 26%, #6480f0 48%, #7aa2f8 72%, #98cdfb 100%);
  /* Typography（字号固定档位；只有标题随视口在区间内伸缩） */
  --lx-fs-xs: 12.5px; --lx-fs-sm: 13.5px; --lx-fs-md: 15px; --lx-fs-lg: 16px; --lx-fs-brand: 20px;
  --lx-fs-h1: clamp(26px, 1.1rem + 1.55vw, 40px);
  --lx-fs-sub: clamp(14.5px, .78rem + .38vw, 17px);
  --lx-fs-entry: clamp(28px, 1.15rem + 1.4vw, 38px);
  /* Spacing */
  --lx-s1: 4px; --lx-s2: 8px; --lx-s3: 12px; --lx-s4: 16px; --lx-s5: 20px; --lx-s6: 24px; --lx-s8: 32px;
  --lx-pad-x: clamp(16px, 3.6vw, 56px);
  --lx-gap-x: clamp(40px, 5.5vw, 96px);
  /* Radius */
  --lx-r-card: 24px; --lx-r-tile: 20px; --lx-r-ctl: 12px; --lx-r-pill: 999px;
  /* Shadow */
  --lx-sh-card: 0 24px 60px rgba(62, 64, 170, .13), 0 2px 6px rgba(62, 64, 170, .05);
  --lx-sh-card-t: 0 28px 70px rgba(22, 32, 128, .26), 0 2px 6px rgba(22, 32, 128, .08);
  --lx-sh-tile: 0 14px 36px rgba(70, 74, 180, .10);
  --lx-sh-btn: 0 10px 22px rgba(91, 76, 240, .26);
  --lx-sh-btn-t: 0 10px 22px rgba(52, 86, 238, .30);
  /* Control */
  --lx-ctl-h: 44px; --lx-btn-h: 46px; --lx-tab-h: 44px; --lx-icon: 18px;
  /* 图片显示上限（不超过素材原始像素，也不超过这里的版式尺寸） */
  --lx-entry-ic: 68px; --lx-campus-w: 620px;
  /* Layout */
  --lx-head-h: 72px; --lx-foot-h: 44px; --lx-maxw: 1280px;
  --lx-card-w: 432px; --lx-card-pad: 26px 32px 20px; --lx-form-gap: 16px;
  /* 插画高度 = 视口高度 − Header − Footer − 左侧文字区，按比例缩放、不超过素材原始尺寸 */
  --lx-hero-text: 290px;
  --lx-hero-w: 640px;   /* 左侧图文容器宽度（插画按此宽度等比缩放，不超过原始像素） */
  /* Motion */
  --lx-dur: 260ms; --lx-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── 外壳：Header / Stage / Footer 三行，Header 只渲染一次 ── */
body.is-auth { background: #eef0fe; }
.lx { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid;
  grid-template-rows: var(--lx-head-h) minmax(0, 1fr) var(--lx-foot-h); color: var(--lx-ink);
  --lx-accent: var(--lx-stu-b); --lx-accent-ink: var(--lx-stu-ink); --lx-accent-soft: var(--lx-stu-soft);
  --lx-accent-border: #a69eff; --lx-accent-ring: rgba(108, 94, 246, .14); }
.lx[data-theme="teacher"] { --lx-accent: var(--lx-tch-b); --lx-accent-ink: var(--lx-tch-ink); --lx-accent-soft: var(--lx-tch-soft);
  --lx-accent-border: #87a1f8; --lx-accent-ring: rgba(52, 86, 238, .14); }
.lx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 背景层：仅装饰，两种主题叠放、透明度交叉过渡 */
.lx-bg { position: absolute; inset: 0; z-index: -1; overflow: clip; pointer-events: none; }
.lx-bg__s, .lx-bg__t { position: absolute; inset: 0; transition: opacity var(--lx-dur) var(--lx-ease); }
.lx-bg__s { background: var(--lx-bg-student); }
.lx-bg__t { background: var(--lx-bg-teacher); opacity: 0; }
.lx[data-theme="teacher"] .lx-bg__t { opacity: 1; }
.lx-bg__waves { position: absolute; left: 0; bottom: 0; width: 100%; height: 30%; display: block; }

/* Header */
.lx-head { display: flex; align-items: center; justify-content: space-between; gap: var(--lx-s4); padding: 0 var(--lx-pad-x); }
.lx-brand { display: inline-flex; align-items: center; gap: var(--lx-s3); color: var(--lx-ink); text-decoration: none; border-radius: 12px; transition: color var(--lx-dur) var(--lx-ease); }
.lx-brand__logo { width: 40px; height: 40px; border-radius: 10px; display: block; flex: none; box-shadow: 0 6px 16px rgba(47, 84, 235, .22); }
.lx-brand__name { font-size: var(--lx-fs-brand); font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.lx-brand__sub { font-size: var(--lx-fs-sm); color: var(--lx-muted); padding-left: var(--lx-s3); border-left: 1px solid var(--lx-line); white-space: nowrap; transition: color var(--lx-dur), border-color var(--lx-dur); }
.lx[data-theme="teacher"] .lx-brand { color: #fff; }
.lx[data-theme="teacher"] .lx-brand__sub { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .35); }
.lx-lang select { appearance: none; height: 36px; min-width: 92px; padding: 0 32px 0 14px; border-radius: 10px; border: 1px solid var(--lx-line); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23474d70' fill='none' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--lx-ink); font: inherit; font-size: var(--lx-fs-sm); font-weight: 650; transition: background-color var(--lx-dur), border-color var(--lx-dur), color var(--lx-dur); }
.lx[data-theme="teacher"] .lx-lang select { background-color: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' fill='none' stroke-width='1.6'/%3E%3C/svg%3E"); }
.lx-lang option { color: var(--lx-ink); background: #fff; }

/* Stage（切换页面时只替换这里） */
.lx-stage { min-height: 0; display: grid; align-items: center; padding: 0 var(--lx-pad-x); }
.lx-stage > * { animation: lx-in var(--lx-dur) var(--lx-ease) both; }
@keyframes lx-in { from { opacity: 0; transform: translateY(6px); } }

/* Footer：单行，演示账号为折叠浮层，不占布局 */
.lx-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 14px; padding: 0 var(--lx-pad-x); font-size: var(--lx-fs-xs); color: var(--lx-muted); transition: color var(--lx-dur); }
.lx[data-theme="teacher"] .lx-foot { color: #fff; text-shadow: 0 1px 2px rgba(20, 28, 110, .38); }
.lx-foot a { color: inherit; display: inline-flex; align-items: center; gap: 2px; }
.lx-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lx-foot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 统一登录：左侧 Hero（插画 + 文案），右侧表单卡片（位置、尺寸两种角色完全相同） ── */
.lx-login { width: 100%; max-width: var(--lx-maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) var(--lx-card-w);
  column-gap: var(--lx-gap-x); align-items: center; }
/* 左侧图文：角色标签、标题、说明、插画放在同一个定宽容器（--lx-hero-w）中，容器在左栏内水平居中；
   学生 / 教师两个容器叠放在同一格，宽度相同，切换时文字起点不变 */
.lx-hero { display: grid; justify-items: center; min-width: 0; }
.lx-hero__item { transition: opacity var(--lx-dur) var(--lx-ease), transform var(--lx-dur) var(--lx-ease), visibility 0s linear var(--lx-dur); }
.lx-hero__item { grid-area: 1 / 1; width: min(100%, var(--lx-hero-w)); display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.lx[data-theme="student"] [data-for="teacher"], .lx[data-theme="teacher"] [data-for="student"] { opacity: 0; visibility: hidden; transform: translateY(6px); }
.lx[data-theme="student"] [data-for="student"], .lx[data-theme="teacher"] [data-for="teacher"] { transition-delay: 0s; }
.lx-badge { display: inline-flex; align-items: center; gap: var(--lx-s2); height: 34px; padding: 0 16px; border-radius: var(--lx-r-pill); font-size: var(--lx-fs-md); font-weight: 750; letter-spacing: .08em; }
.lx-badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lx-hero h1 { font-size: var(--lx-fs-h1); font-weight: 800; line-height: 1.25; letter-spacing: .04em; margin: var(--lx-s4) 0 var(--lx-s3); }
.lx-hero p { font-size: var(--lx-fs-sub); line-height: 1.75; margin: 0; }
.lx-hero__item[data-for="student"] .lx-badge { background: rgba(124, 108, 250, .14); color: var(--lx-stu-ink); }
.lx-hero__item[data-for="student"] h1 { color: var(--lx-ink); }
.lx-hero__item[data-for="student"] p { color: var(--lx-ink-2); }
.lx-hero__item[data-for="teacher"] .lx-badge { background: rgba(255, 255, 255, .92); color: #27308f; box-shadow: 0 8px 22px rgba(24, 34, 130, .16); }
.lx-hero__item[data-for="teacher"] h1 { color: #fff; text-shadow: 0 2px 12px rgba(24, 28, 120, .16); }
.lx-hero__item[data-for="teacher"] p { color: rgba(255, 255, 255, .93); }
.lx-hero__fig { margin: clamp(10px, 2.4vh, 28px) 0 0; width: 100%; }
/* 等比缩放：宽度取 列宽 / 原始宽 / 可用高度×宽高比 三者最小，高度 auto —— 绝不放大位图 */
.lx-hero__img { --lx-fig-h: max(132px, calc(100dvh - var(--lx-head-h) - var(--lx-foot-h) - var(--lx-hero-text)));
  display: block; width: min(100%, var(--nat-w), calc(var(--lx-fig-h) * var(--ar))); height: auto; user-select: none; }

/* 卡片 */
.lx-panel { min-width: 0; }
.lx-card { position: relative; background: var(--lx-surface); border-radius: var(--lx-r-card); box-shadow: var(--lx-sh-card); padding: var(--lx-card-pad); transition: box-shadow var(--lx-dur); }
.lx[data-theme="teacher"] .lx-card { box-shadow: var(--lx-sh-card-t); }
.lx-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--lx-line-2); margin: -2px 0 var(--lx-s5); }
.lx-tabs [role="tab"] { height: var(--lx-tab-h); border: 0; background: none; padding: 0; font: inherit; font-size: var(--lx-fs-lg); font-weight: 600; color: var(--lx-ink-2); cursor: pointer; border-radius: 10px 10px 0 0; transition: color var(--lx-dur); }
.lx-tabs [role="tab"]:hover { color: var(--lx-accent-ink); }
.lx-tabs [role="tab"][aria-selected="true"] { color: var(--lx-accent-ink); font-weight: 750; }
.lx-tabs [role="tab"]:focus-visible { outline: 2px solid var(--lx-accent); outline-offset: -2px; }
.lx-tabs[aria-busy="true"] [role="tab"] { cursor: progress; }
.lx-tabs__ind { position: absolute; left: 0; bottom: -1px; width: 50%; height: 3px; display: flex; justify-content: center; pointer-events: none; transition: transform var(--lx-dur) var(--lx-ease); }
.lx-tabs__ind::after { content: ""; width: 56px; height: 3px; border-radius: 3px; background: var(--lx-accent); transition: background-color var(--lx-dur); }
.lx[data-theme="teacher"] .lx-tabs__ind { transform: translateX(100%); }

/* 学生 / 教师共用同一个表单：字段、尺寸、位置不随角色变化 */
.lx-form { display: flex; flex-direction: column; gap: var(--lx-form-gap); min-width: 0; }
.lx-field { display: grid; gap: 6px; }
.lx-label { font-size: var(--lx-fs-sm); font-weight: 650; color: var(--lx-ink); }
.lx-ctl { display: flex; align-items: center; gap: 10px; height: var(--lx-ctl-h); padding: 0 6px 0 14px; border: 1px solid var(--lx-line); border-radius: var(--lx-r-ctl); background: #fff; transition: border-color .15s, box-shadow .15s; }
.lx-ctl:hover { border-color: #cdd1e5; }
.lx-ctl:focus-within { border-color: var(--lx-accent-border); box-shadow: 0 0 0 3px var(--lx-accent-ring); }
.lx-field.is-invalid .lx-ctl { border-color: var(--lx-danger); box-shadow: 0 0 0 3px var(--lx-danger-ring); }
.lx-ctl > svg { width: var(--lx-icon); height: var(--lx-icon); flex: none; fill: none; stroke: var(--lx-faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lx-ctl input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: var(--lx-fs-md); color: var(--lx-ink); padding: 0; }
.lx-ctl input::placeholder { color: var(--lx-faint); }
/* 浏览器自动填充默认是黄 / 蓝底色，这里统一为白底 */
.lx-ctl input:-webkit-autofill { -webkit-text-fill-color: var(--lx-ink); box-shadow: 0 0 0 100px #fff inset; caret-color: var(--lx-ink); }
.lx-eye { flex: none; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; display: grid; place-items: center; color: var(--lx-faint); cursor: pointer; }
.lx-eye:hover { color: var(--lx-accent-ink); background: var(--lx-accent-soft); }
.lx-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lx-row { display: flex; justify-content: space-between; align-items: center; gap: var(--lx-s3); min-height: 24px; }
.lx-chk { display: inline-flex; align-items: center; gap: 8px; font-size: var(--lx-fs-sm); color: var(--lx-ink-2); cursor: pointer; user-select: none; }
.lx-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lx-chk i { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #c6c9e0; background: #fff; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.lx-chk input:checked + i { background: var(--lx-accent); border-color: var(--lx-accent); }
.lx-chk input:checked + i::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.lx-chk input:focus-visible + i { outline: 2px solid var(--lx-accent); outline-offset: 2px; }
.lx-link { border: 0; background: none; padding: 2px 0; font: inherit; font-size: var(--lx-fs-sm); font-weight: 600; color: var(--lx-accent-ink); cursor: pointer; border-radius: 4px; }
.lx-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 2026-11-22 站点模式教师端入口（a.lx-link 与按钮同款；分隔点） */
a.lx-link { text-decoration: none; }
.lx-foot-sep { color: var(--lx-muted); padding: 0 4px; }
.lx-link--off, .lx-link--off:hover { color: var(--lx-muted); font-weight: 500; text-decoration: none; cursor: not-allowed; }
/* 提示行：错误与说明共用一行预留空间，出现时不推动按钮 */
.lx-msg { min-height: 20px; margin: -6px 0 -8px; font-size: var(--lx-fs-sm); line-height: 20px; }
.lx-msg p { margin: 0; }
.lx-msg__err { color: var(--lx-danger); font-weight: 600; }
.lx-msg__info { color: var(--lx-ink-2); }
.lx-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--lx-s2); width: 100%; height: var(--lx-btn-h); border: 0; border-radius: var(--lx-r-ctl);
  color: #fff; font: inherit; font-size: var(--lx-fs-lg); font-weight: 700; letter-spacing: .08em; cursor: pointer;
  background: linear-gradient(90deg, var(--lx-stu-a), var(--lx-stu-b)); box-shadow: var(--lx-sh-btn); transition: filter .15s, box-shadow .15s, transform .1s; }
.lx-btn--t { background: linear-gradient(90deg, var(--lx-tch-a), var(--lx-tch-b)); box-shadow: var(--lx-sh-btn-t); }
/* 学生 / 教师共用的登录按钮：教师渐变作为叠层随主题淡入，按钮本身不重绘 */
.lx-btn--role { isolation: isolate; transition: filter .15s, box-shadow var(--lx-dur), transform .1s; }
.lx-btn--role::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, var(--lx-tch-a), var(--lx-tch-b)); opacity: 0; transition: opacity var(--lx-dur) var(--lx-ease); }
.lx[data-theme="teacher"] .lx-btn--role { box-shadow: var(--lx-sh-btn-t); }
.lx[data-theme="teacher"] .lx-btn--role::before { opacity: 1; }
.lx-btn:hover { filter: brightness(1.05); }
.lx-btn:active { transform: translateY(1px); }
.lx-btn:focus-visible { outline: 3px solid var(--lx-accent-ring); outline-offset: 2px; }
.lx-btn:disabled { cursor: progress; filter: saturate(.75) opacity(.88); }
.lx-btn i { display: grid; } .lx-btn i svg, .lx-btn > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lx-btn__spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: lx-spin .8s linear infinite; }
.lx-btn[aria-busy="true"] .lx-btn__spin { display: block; }
.lx-btn[aria-busy="true"] i { display: none; }
@keyframes lx-spin { to { transform: rotate(360deg); } }
.lx-form__foot { margin: auto 0 0; padding-top: var(--lx-s4); border-top: 1px solid var(--lx-line-2); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 6px; font-size: var(--lx-fs-sm); color: var(--lx-muted); }

/* 表单 = 字段组（学校 / 账号 / 密码）+ 操作组（链接行 + 提示行 + 按钮）+ 底部链接 */
.lx-group { display: flex; flex-direction: column; gap: var(--lx-form-gap); }

/* 学校 Select（自定义 combobox + listbox）：列表与输入框同宽、同圆角与边框，浮在表单之上 */
.lx-sel { position: relative; cursor: pointer; padding-right: 10px; }
.lx-sel__btn { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; font-size: var(--lx-fs-md); color: var(--lx-ink); outline: none; user-select: none; }
.lx-sel__val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-sel__btn[aria-disabled="true"] { cursor: progress; }
.lx-sel__chev { display: grid; color: var(--lx-ink-2); pointer-events: none; transition: transform .18s var(--lx-ease); }
.lx-sel__chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-sel:has([aria-expanded="true"]) .lx-sel__chev { transform: rotate(180deg); }
/* 站点模式没有「记住账号」→ 「忘记密码？」靠右 */
.lx-row--end { justify-content: flex-end; }
.lx-sel__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: -1px; right: -1px; margin: 0; padding: 6px; list-style: none; max-height: 240px; overflow-y: auto;
  background: var(--lx-surface); border: 1px solid var(--lx-line); border-radius: var(--lx-r-ctl); box-shadow: 0 16px 36px rgba(40, 44, 120, .16); cursor: default; }
.lx-sel__opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: var(--lx-fs-md); color: var(--lx-ink); cursor: pointer; }
.lx-sel__opt svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--lx-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lx-sel__opt[aria-selected="true"] { color: var(--lx-accent-ink); font-weight: 650; }
.lx-sel__opt[aria-selected="true"] svg { visibility: visible; }
.lx-sel__opt.is-active { background: var(--lx-accent-soft); }

/* 演示账号（原型辅助）：Footer 内的折叠浮层 */
.ldemo { position: relative; }
.ldemo summary { list-style: none; cursor: pointer; padding: 2px 6px; border-radius: 6px; text-decoration: underline dotted; text-underline-offset: 3px; }
.ldemo summary::-webkit-details-marker { display: none; }
.ldemo summary:hover { color: var(--lx-accent-ink); }
.lx[data-theme="teacher"] .ldemo summary:hover { color: #fff; }
.ldemo summary:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.ldemo__p { position: absolute; z-index: 20; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(400px, calc(100vw - 32px));
  background: #fff; color: var(--lx-ink); border: 1px solid var(--lx-line-2); border-radius: 16px; padding: 14px; text-align: left; box-shadow: 0 20px 50px rgba(30, 34, 110, .22); }
.ldemo__p p { margin: 0 0 10px; color: var(--lx-muted); font-size: var(--lx-fs-xs); }
.ldemo__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ldemo__i { text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--lx-line-2); background: #fafbff; display: flex; flex-direction: column; cursor: pointer; font: inherit; color: var(--lx-ink); }
.ldemo__i:hover, .ldemo__i:focus-visible { border-color: var(--lx-accent-border); outline: none; }
.ldemo__i b { font-size: var(--lx-fs-sm); } .ldemo__i small { color: var(--lx-muted); font-size: 11.5px; }

/* ── 登录入口 ── */
.lx-entry { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 2vh; }
.lx-entry__h { font-size: var(--lx-fs-entry); font-weight: 800; letter-spacing: .08em; color: var(--lx-ink); margin: 0 0 clamp(24px, 4.5vh, 44px); }
.lx-entry__cards { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 296px)); justify-content: center; gap: clamp(16px, 2.2vw, 28px); }
.lrole { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 24px 30px; border-radius: var(--lx-r-tile); background: var(--lx-surface);
  border: 1px solid rgba(223, 226, 240, .9); box-shadow: var(--lx-sh-tile); color: var(--lx-ink); text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; }
.lrole:hover, .lrole:focus-visible { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(90, 86, 220, .17); border-color: #d4d0ff; outline: none; }
.lrole:focus-visible { box-shadow: 0 0 0 3px rgba(108, 94, 246, .28), 0 20px 44px rgba(90, 86, 220, .17); }
.lrole__ic { height: min(var(--nat-h), var(--lx-entry-ic)); width: auto; max-width: 100%; margin-bottom: 8px; }
.lrole b { font-size: 19px; font-weight: 750; letter-spacing: .04em; }
.lrole > span { font-size: var(--lx-fs-sm); color: var(--lx-muted); }
.lrole__go { position: absolute; right: 16px; bottom: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lx-stu-soft); color: var(--lx-stu-b); }
.lrole[data-role="teacher"] .lrole__go { background: var(--lx-tch-soft); color: var(--lx-tch-b); }
.lrole__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lx-entry__campus { width: min(var(--nat-w), var(--lx-campus-w), 70%); height: auto; margin-top: clamp(20px, 4vh, 40px); user-select: none; }

/* ── 教师端占位（登录后） ── */
.lx-tph { display: grid; place-items: center; }
.lx-card--tph { width: min(480px, 100%); padding: 40px 40px 36px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--lx-s3); }
.lx-tph__ic { height: min(var(--nat-h), var(--lx-entry-ic)); width: auto; }
.lx-card--tph h1 { font-size: 26px; font-weight: 800; letter-spacing: .1em; color: var(--lx-ink); margin: 0; }
.lx-card--tph p { margin: 0 0 var(--lx-s2); max-width: 380px; color: var(--lx-ink-2); font-size: var(--lx-fs-md); line-height: 1.75; text-wrap: balance; }
.lx-btn--auto { width: auto; padding: 0 28px; }

/* ── 响应式 ── */
@media (max-width: 1279px) {
  :root { --lx-card-w: 400px; --lx-gap-x: 48px; }
}
/* 笔记本矮屏：收紧 Header / 卡片内距，不缩小字号 */
@media (max-height: 760px) {
  :root { --lx-head-h: 64px; --lx-foot-h: 40px; --lx-card-pad: 22px 30px 18px; --lx-form-gap: 14px; --lx-hero-text: 270px; }
  .lx-tabs { margin-bottom: var(--lx-s4); }
}
/* 平板竖屏：上下堆叠，文案居中，插画缩小，表单整卡可见 */
@media (max-width: 1023px) {
  .lx-login { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: clamp(20px, 3vh, 32px); align-content: center; }
  .lx-hero { width: min(600px, 100%); }
  .lx-hero__item { align-items: center; text-align: center; }
  .lx-hero h1 { margin: var(--lx-s3) 0 var(--lx-s2); }
  .lx-hero__fig { display: flex; justify-content: center; }
  .lx-hero__img { --lx-fig-h: min(300px, max(120px, calc(100dvh - 860px))); }
  .lx-panel { width: min(460px, 100%); }
}
@media (max-width: 640px) {
  :root { --lx-head-h: 60px; --lx-card-pad: 20px 18px 16px; }
  .lx-brand__sub { display: none; }
  .lx-stage { padding-block: 8px 16px; }
  .lx-hero p { display: none; }
  .lx-entry__cards { grid-template-columns: minmax(0, 1fr); }
  .ldemo__list { grid-template-columns: minmax(0, 1fr); }
}
/* 极矮屏 / 系统放大字号：允许自然滚动，不裁切 */
@media (max-height: 599px) {
  .lx-hero__img { --lx-fig-h: 132px; }
  .lx-entry__campus { display: none; }
}
@media (max-height: 700px) { .lx-entry__campus { display: none; } }

/* 减少动画偏好；首帧 / 语言切换时不播放过渡 */
@media (prefers-reduced-motion: reduce) {
  .lx, .lx *, .lx *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
.lx--instant, .lx--instant *, .lx--instant *::after { transition: none !important; }
/* 2026-11-18 教师端入口：暂未开放（没有确认可用的正式地址，不跳转、不编造链接） */
.lx-tph__tag { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff4e2; color: #b26a00; }
/* 2026-11-22 按校站点模式（香港 Test）：只有学生 Tab，指示条铺满 */
.lx-tabs--one { grid-template-columns: 1fr; }
.lx-tabs--one .lx-tabs__ind { width: 100%; }
