/* ============================================================
   页面 02 · 学生端首页（1280×800 横屏）
   ============================================================ */

.home-stage {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  background: var(--bg);
}

/* 正式 H5：全屏壳层（无设计稿缩放外框） */
.app-body {
  background: var(--bg);
  overflow: hidden;
}

.home-stage.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.app-shell .main-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ================= 左侧导航（仅平板壳） ================= */

.side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 14px 16px;
  overflow: hidden;
  color: var(--on-dark-2);
  background:
    radial-gradient(420px 300px at 20% 0%, rgba(47, 107, 255, 0.2), transparent 70%),
    linear-gradient(180deg, #0a1428 0%, #0b1a35 100%);
}

.side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 62%);
  mask-image: linear-gradient(180deg, #000, transparent 62%);
  pointer-events: none;
}

.side-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 0;
}

.side-brand .name {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-brand .name b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--on-dark-1);
}

.side-brand .name span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--on-dark-3);
}

.side-label {
  position: relative;
  z-index: 1;
  margin: 30px 10px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--on-dark-3);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--on-dark-2);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition:
    background var(--dur-fast) var(--ease-soft),
    color var(--dur-fast) var(--ease-soft);
}

.nav-item .ico {
  flex: none;
  width: 19px;
  height: 19px;
  opacity: 0.78;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--on-dark-1);
}

.nav-item:hover .ico {
  opacity: 1;
}

.nav-item.is-active {
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.24), rgba(47, 107, 255, 0.07));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(91, 139, 255, 0.26);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-400);
}

.nav-item.is-active .ico {
  color: #9fbaff;
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: rgba(239, 68, 68, 0.16);
  color: #ff9b9b;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.side-watermark {
  position: absolute;
  left: -24px;
  bottom: 112px;
  font-family: var(--font-lang);
  font-size: 190px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  opacity: 0.028;
  pointer-events: none;
}

.side-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.side-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.035);
}

.side-status .dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.14);
}

.side-status b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--on-dark-1);
  letter-spacing: 0.03em;
}

.side-status span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--on-dark-3);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border-radius: var(--r-md);
  text-align: left;
  transition: background var(--dur-fast) var(--ease-soft);
}

.side-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5b8bff, #1e4fd8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.side-user .u-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-user .u-info b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-dark-1);
}

.side-user .u-info span {
  font-size: 10px;
  color: var(--on-dark-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user .chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--on-dark-3);
}

/* ================= 主工作区 ================= */

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

.topbar {
  position: relative;
  z-index: 6;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 28px 0 32px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.context {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctx-main {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 11px 0 8px;
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-soft);
}

.ctx-main:hover {
  background: #f3f6fb;
}

.ctx-flag {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-family: var(--font-lang);
  font-size: 14px;
  font-weight: 600;
}

.ctx-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.ctx-text b {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.ctx-text span {
  font-size: 11.5px;
  color: var(--ink-400);
  letter-spacing: 0.02em;
}

.ctx-main .chev {
  width: 14px;
  height: 14px;
  color: var(--ink-400);
}

.ctx-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.ctx-exam {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--dur-fast) var(--ease-soft);
}

.ctx-exam:hover {
  background: var(--brand-100);
}

.ctx-exam i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-500);
}

.ctx-exam .chev {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all var(--dur-fast) var(--ease-soft);
}

.points:hover {
  border-color: #f5d9a4;
  background: #fffbf2;
}

.points .ico {
  width: 14px;
  height: 14px;
  color: #e8a13a;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-600);
  transition: all var(--dur-fast) var(--ease-soft);
}

.icon-btn:hover {
  background: #f7f9fc;
  color: var(--ink-900);
}

.icon-btn .ico {
  width: 17px;
  height: 17px;
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.top-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line);
}

.top-user {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 7px 0 4px;
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-soft);
}

.top-user:hover {
  background: #f3f6fb;
}

.top-user .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.top-user .chev {
  width: 14px;
  height: 14px;
  color: var(--ink-400);
}

/* ================= 内容区 ================= */

.main {
  flex: 1;
  min-height: 0;
  padding: 22px 32px 24px;
  overflow-y: auto;
}

.main::-webkit-scrollbar {
  width: 6px;
}

.main::-webkit-scrollbar-thumb {
  background: rgba(31, 35, 41, 0.14);
  border-radius: 6px;
}

/* ---------- 到期提醒 ---------- */
.banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 8px 0 12px;
  border: 1px solid #f8e3bb;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #fffaef 0%, #fff6e2 100%);
  color: var(--warn-deep);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.banner .ico {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--warn);
}

.banner b {
  font-weight: 600;
}

.banner .link {
  margin-left: 2px;
  color: var(--warn-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.banner .link:hover {
  color: #8a5200;
}

.banner .spacer {
  flex: 1;
}

.banner .close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #b28a4a;
  transition: background var(--dur-fast) var(--ease-soft);
}

.banner .close:hover {
  background: rgba(178, 138, 74, 0.12);
}

.banner .close .ico {
  width: 13px;
  height: 13px;
  color: currentColor;
}

/* ---------- 问候 + 今日任务 ---------- */
.greet-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-top: 16px;
}

.greet {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  padding-left: 2px;
}

.greet-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-400);
}

.greet-date i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.greet h1 {
  margin-top: 9px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

.greet h1 em {
  font-style: normal;
  color: var(--brand-500);
}

.greet-sub {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--ink-400);
}

.today {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 622px;
  flex: none;
  height: 104px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.today-main {
  flex: 1;
  min-width: 0;
}

.today-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}

.today-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand-500);
}

.today-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}

.today-count b {
  font-size: 12px;
  color: var(--ink-900);
}

.today-items {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 12px;
}

.t-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.t-ico .ico {
  width: 15px;
  height: 15px;
}

.t-ico.blue {
  background: var(--brand-050);
  color: var(--brand-600);
}

.t-ico.mint {
  background: #e9f8f2;
  color: var(--success-deep);
}

.t-ico.amber {
  background: #fff5e6;
  color: #d98200;
}

.t-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.t-label {
  margin-left: 4px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.today-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  background: var(--brand-500);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.24);
  transition: all var(--dur-fast) var(--ease-soft);
}

.today-cta:hover {
  background: var(--brand-600);
  box-shadow: 0 8px 20px rgba(30, 79, 216, 0.3);
}

.today-cta .ico {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-base) var(--ease-out);
}

.today-cta:hover .ico {
  transform: translateX(2px);
}

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 20px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-900);
}

.section-head h2 span {
  margin-left: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-300);
}

.section-note {
  font-size: 10.5px;
  color: var(--ink-400);
  letter-spacing: 0.02em;
}

/* ---------- 六语种宫格 ---------- */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lang-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 180px;
  padding: 17px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-soft),
    box-shadow var(--dur-base) var(--ease-soft);
}

.lang-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 120px at 92% 108%, rgba(47, 107, 255, 0.07), transparent 72%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-soft);
  pointer-events: none;
}

.lang-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-lift);
}

.lang-card:hover::before {
  opacity: 1;
}

.lang-card:active {
  transform: translateY(-1px);
}

.card-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lang-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.lang-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-900);
  line-height: 1.2;
}

.lang-native {
  font-family: var(--font-lang);
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status.ok {
  background: var(--success-bg);
  color: var(--success-deep);
}

.status.warn {
  background: var(--warn-bg);
  color: var(--warn-deep);
}

.status.warn i {
  animation: ring-pulse 2.6s infinite;
}

.status.danger {
  background: var(--danger-bg);
  color: var(--danger-deep);
}

.status.off {
  background: #f2f4f8;
  color: var(--ink-600);
}

.lang-chips {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip.ghost {
  background: #f5f7fa;
  color: var(--ink-400);
}

.card-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: auto;
}

.ring {
  --v: 0;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(var(--brand-500) calc(var(--v) * 1%), #edf1f7 0);
}

.ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.ring b {
  position: relative;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ring b small {
  margin-left: 1px;
  font-size: 7.5px;
  font-weight: 600;
  color: var(--ink-400);
}

.ring-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4f6fa;
  color: var(--ink-400);
}

.ring-icon .ico {
  width: 16px;
  height: 16px;
}

.card-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-bottom: 2px;
}

.card-copy b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-copy span {
  font-size: 11px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-go {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
  white-space: nowrap;
}

.card-go .ico {
  width: 13px;
  height: 13px;
  transition: transform var(--dur-base) var(--ease-out);
}

.lang-card:hover .card-go .ico {
  transform: translateX(2px);
}

/* 装饰大字 */
.card-glyph {
  position: absolute;
  right: -10px;
  bottom: -22px;
  z-index: 1;
  font-family: var(--font-lang);
  font-size: 104px;
  font-weight: 300;
  line-height: 1;
  color: var(--brand-500);
  opacity: 0.085;
  transform: rotate(-5deg);
  transition:
    opacity var(--dur-base) var(--ease-soft),
    transform var(--dur-slow) var(--ease-out);
  pointer-events: none;
}

.lang-card:hover .card-glyph {
  opacity: 0.12;
  transform: rotate(-5deg) translate(-3px, -4px);
}

/* 已过期 / 暂未开放 */
.lang-card.is-expired,
.lang-card.is-closed {
  background:
    repeating-linear-gradient(135deg, rgba(31, 35, 41, 0.018) 0 1px, transparent 1px 9px),
    #fbfcfd;
  box-shadow: none;
}

.lang-card.is-expired:hover,
.lang-card.is-closed:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.lang-card.is-expired:hover::before,
.lang-card.is-closed:hover::before {
  opacity: 0;
}

.lang-card.is-expired .lang-name,
.lang-card.is-closed .lang-name {
  color: var(--ink-600);
}

.lang-card.is-expired .card-glyph,
.lang-card.is-closed .card-glyph {
  color: var(--ink-900);
  opacity: 0.035;
}

.lang-card.is-expired:hover .card-glyph,
.lang-card.is-closed:hover .card-glyph {
  opacity: 0.045;
  transform: rotate(-5deg);
}

.lang-card.is-expired .chip,
.lang-card.is-closed .chip {
  background: #f1f3f7;
  color: var(--ink-400);
}

.lang-card.is-expired .card-go {
  color: var(--danger-deep);
}

.lang-card.is-closed .card-go {
  color: var(--ink-400);
}

.lang-card.is-expired .card-copy b,
.lang-card.is-closed .card-copy b {
  color: var(--ink-600);
  font-weight: 500;
}

/* ---------- 数据摘要条 ---------- */
.summary {
  display: flex;
  align-items: center;
  height: 72px;
  margin-top: 18px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.sum-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  height: 42px;
  padding-right: 26px;
  margin-right: 26px;
  border-right: 1px solid var(--line-soft);
}

.sum-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}

.sum-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.sum-value small {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-400);
  letter-spacing: 0;
}

.sum-aux {
  margin-left: 7px;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-400);
  letter-spacing: 0;
}

.sum-delta {
  margin-left: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--success-deep);
  letter-spacing: 0;
}

.sum-chart {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.sum-chart .cap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ink-400);
  text-align: right;
}

.sum-chart .cap b {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-600);
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 96px;
  height: 32px;
}

.spark i {
  flex: 1;
  border-radius: 2px 2px 1px 1px;
  background: var(--brand-100);
}

.spark i.is-now {
  background: var(--brand-500);
}

/* ================= 弹层 ================= */

.modal-mask {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--mask);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--dur-base) var(--ease-soft),
    visibility var(--dur-base) var(--ease-soft);
}

.modal-mask.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 384px;
  padding: 26px 26px 22px;
  border-radius: var(--r-2xl);
  background: #fff;
  box-shadow: var(--shadow-float);
  transform: translateY(12px) scale(0.985);
  transition: transform var(--dur-base) var(--ease-out);
}

.modal-mask.open .modal {
  transform: translateY(0) scale(1);
}

.modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--ink-400);
  transition: background var(--dur-fast) var(--ease-soft);
}

.modal-x:hover {
  background: #f4f6fa;
  color: var(--ink-700);
}

.modal-x .ico {
  width: 14px;
  height: 14px;
}

.modal-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--warn-bg);
  color: var(--warn-deep);
}

.modal-ico .ico {
  width: 21px;
  height: 21px;
}

.modal h3 {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.modal p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-600);
}

.teacher {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: #f7f9fc;
}

.teacher .t-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 700;
}

.teacher .t-info b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}

.teacher .t-info span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-400);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-600);
  font-size: 10.5px;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease-soft);
}

.copy-btn:hover {
  border-color: var(--brand-200);
  color: var(--brand-600);
  background: var(--brand-050);
}

.copy-btn .ico {
  width: 12px;
  height: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-ghost,
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 40px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--dur-fast) var(--ease-soft);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-600);
}

.btn-ghost:hover {
  background: #f7f9fc;
  color: var(--ink-900);
}

.btn-solid {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.24);
}

.btn-solid:hover {
  background: var(--brand-600);
}

/* ================= 入场动效 ================= */

.rise {
  animation: fade-up 0.55s var(--ease-out) backwards;
}

.r1 {
  animation-delay: 0.04s;
}

.r2 {
  animation-delay: 0.1s;
}

.r3 {
  animation-delay: 0.16s;
}

.r4 {
  animation-delay: 0.22s;
}

.r5 {
  animation-delay: 0.28s;
}

.r6 {
  animation-delay: 0.34s;
}

.r7 {
  animation-delay: 0.4s;
}

.r8 {
  animation-delay: 0.46s;
}

/* 通用图标 */
.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================= 正式 H5 响应式 ================= */

@media (max-width: 1180px) {
  .app-shell .today {
    width: 560px;
  }

  .app-shell .today-items {
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  .app-shell .main {
    padding: 18px 22px 20px;
  }

  .app-shell .greet-row {
    flex-direction: column;
    gap: 14px;
  }

  .app-shell .today {
    width: 100%;
  }

  .app-shell .lang-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-shell .summary {
    height: auto;
    flex-wrap: wrap;
    gap: 14px 0;
    padding: 14px 20px;
  }

  .app-shell .sum-item {
    height: auto;
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }

  .app-shell .sum-chart {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .app-shell .topbar {
    padding: 0 16px;
  }

  .app-shell .ctx-text span,
  .app-shell .points,
  .app-shell .top-divider {
    display: none;
  }

  .app-shell .main {
    padding: 16px 16px 18px;
  }

  .app-shell .lang-grid {
    grid-template-columns: 1fr;
  }

  .app-shell .banner {
    height: auto;
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

/* ============================================================
   手机壳（<1024 或 ?shell=mobile）
   顶部栏 44 + 单列内容 + 底部 Tab 56 + 安全区
   ============================================================ */

.mobile-tabbar {
  display: none;
}

html.is-mobile .home-stage.app-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  max-width: var(--content-max-m);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
}

html.is-mobile .side {
  display: none;
}

/* ---------- 手机顶栏 ---------- */
html.is-mobile .topbar {
  height: var(--topbar-h-m);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.94);
}

html.is-mobile .context {
  gap: 2px;
  min-width: 0;
}

html.is-mobile .ctx-main {
  height: 44px;
  padding: 0 4px;
  gap: 6px;
  border-radius: 8px;
}

html.is-mobile .ctx-flag {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
}

html.is-mobile .ctx-text b {
  font-size: 15px;
}

html.is-mobile .ctx-text span {
  display: none;
}

html.is-mobile .ctx-main .chev {
  width: 13px;
  height: 13px;
}

html.is-mobile .ctx-divider {
  height: 16px;
  margin: 0 2px;
}

html.is-mobile .ctx-exam {
  position: relative;
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
}

html.is-mobile .ctx-exam::after {
  content: "";
  position: absolute;
  inset: -7px -4px;
}

html.is-mobile .ctx-exam .chev {
  width: 11px;
  height: 11px;
}

html.is-mobile .top-actions {
  flex: none;
  gap: 2px;
}

/* 覆盖 ≤900 断点对积分胶囊的隐藏，手机壳顶栏必须保留积分 */
html.is-mobile .points {
  position: relative;
  display: inline-flex;
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
}

html.is-mobile .points::after {
  content: "";
  position: absolute;
  inset: -7px -3px;
}

html.is-mobile .points .ico {
  width: 13px;
  height: 13px;
}

html.is-mobile .icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}

html.is-mobile .icon-btn .ico {
  width: 20px;
  height: 20px;
}

html.is-mobile .icon-btn .badge {
  top: 4px;
  right: 4px;
}

html.is-mobile #settingsBtn,
html.is-mobile .top-divider,
html.is-mobile .top-user {
  display: none;
}

/* ---------- 手机内容区 ---------- */
html.is-mobile .main {
  padding: 12px 16px 16px;
}

html.is-mobile .main-inner {
  max-width: 100%;
}

html.is-mobile .banner {
  height: auto;
  min-height: 34px;
  padding: 6px 6px 6px 10px;
  gap: 6px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

html.is-mobile .banner .ico {
  align-self: flex-start;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

html.is-mobile .banner .link {
  flex: none;
  font-size: 12px;
}

html.is-mobile .banner .spacer {
  display: none;
}

html.is-mobile .banner .close {
  flex: none;
  margin-left: auto;
}

html.is-mobile .banner-extra {
  display: none;
}

/* 手机关闭问候区，首屏直接给今日任务与语种卡 */
html.is-mobile .greet-row {
  display: block;
  margin-top: 10px;
}

html.is-mobile .greet {
  display: none;
}

/* ---------- 手机今日任务 ---------- */
html.is-mobile .today {
  width: 100%;
  height: 88px;
  padding: 10px 12px;
  gap: 10px;
  border-radius: 14px;
}

html.is-mobile .today-title {
  font-size: 13px;
}

html.is-mobile .today-title::before {
  height: 11px;
}

html.is-mobile .today-count {
  font-size: 12px;
}

html.is-mobile .today-count b {
  font-size: 12px;
}

html.is-mobile .today-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

html.is-mobile .t-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 5px;
  row-gap: 2px;
  min-width: 0;
}

html.is-mobile .t-ico {
  grid-row: 1 / span 2;
  align-self: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

html.is-mobile .t-ico .ico {
  width: 13px;
  height: 13px;
}

html.is-mobile .t-num {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  line-height: 1;
}

html.is-mobile .t-label {
  grid-column: 2;
  grid-row: 2;
  margin-left: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

html.is-mobile .today-cta {
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

html.is-mobile .today-cta .cta-text {
  display: none;
}

html.is-mobile .today-cta .ico {
  width: 17px;
  height: 17px;
}

/* ---------- 手机区块标题与语种宫格 ---------- */
html.is-mobile .section-head {
  margin-top: 14px;
  margin-bottom: 10px;
}

html.is-mobile .section-head h2 {
  font-size: 15px;
}

html.is-mobile .section-head h2 span,
html.is-mobile .section-note {
  display: none;
}

html.is-mobile .lang-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html.is-mobile .lang-card {
  height: 132px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 30, 60, 0.03), 0 4px 12px rgba(15, 30, 60, 0.04);
}

html.is-mobile .lang-card:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(15, 30, 60, 0.03), 0 4px 12px rgba(15, 30, 60, 0.04);
}

html.is-mobile .card-head {
  position: static;
  display: block;
}

html.is-mobile .lang-title {
  display: block;
}

html.is-mobile .lang-name {
  font-size: 17px;
  line-height: 1.2;
}

html.is-mobile .lang-native {
  display: none;
}

/* 状态角标固定在卡片左下，避让右上角进度环 */
html.is-mobile .status {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 3;
  height: 20px;
  padding: 0 6px;
  gap: 4px;
  border-radius: 5px;
  font-size: 12px;
}

html.is-mobile .status i {
  width: 4px;
  height: 4px;
}

html.is-mobile .lang-chips {
  position: static;
  gap: 5px;
  margin-top: 9px;
  overflow: hidden;
}

html.is-mobile .chip {
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
}

html.is-mobile .card-foot {
  position: static;
  margin: 0;
}

/* 进度环 / 状态图标：右上角 28px，环内不显示数字 */
html.is-mobile .card-foot .ring,
html.is-mobile .card-foot .ring-icon {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  width: 28px;
  height: 28px;
}

html.is-mobile .ring::before {
  inset: 3px;
}

html.is-mobile .ring b {
  display: none;
}

html.is-mobile .ring-icon .ico {
  width: 13px;
  height: 13px;
}

html.is-mobile .card-copy,
html.is-mobile .card-go {
  display: none;
}

html.is-mobile .card-glyph {
  right: -2px;
  bottom: 0;
  font-size: 60px;
  opacity: 0.07;
}

html.is-mobile .lang-card.is-expired .card-glyph,
html.is-mobile .lang-card.is-closed .card-glyph {
  opacity: 0.04;
}

/* ---------- 手机数据摘要 ---------- */
html.is-mobile .summary {
  height: 72px;
  margin-top: 12px;
  padding: 0 10px;
  border-radius: 14px;
}

html.is-mobile .sum-item {
  flex: 1;
  height: auto;
  gap: 3px;
  padding: 0 8px;
  margin: 0;
  border-right: 1px solid var(--line-soft);
}

html.is-mobile .sum-item:first-child {
  padding-left: 2px;
}

html.is-mobile .sum-item:nth-child(3) {
  padding-right: 2px;
  border-right: 0;
}

html.is-mobile .sum-label {
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

html.is-mobile .sum-value {
  font-size: 18px;
}

html.is-mobile .sum-value small {
  font-size: 12px;
}

html.is-mobile .sum-aux,
html.is-mobile .sum-delta,
html.is-mobile .sum-chart {
  display: none;
}

/* ---------- 手机底部 Tab ---------- */
html.is-mobile .mobile-tabbar {
  position: relative;
  z-index: 7;
  flex: none;
  display: flex;
  align-items: stretch;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

html.is-mobile .tab-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: var(--tabbar-h);
  color: var(--ink-400);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--dur-fast) var(--ease-soft);
}

html.is-mobile .tab-item .ico {
  width: 21px;
  height: 21px;
}

html.is-mobile .tab-item.is-active {
  color: var(--brand-600);
  font-weight: 600;
}

html.is-mobile .tab-item.is-active .ico {
  stroke-width: 1.9;
}

html.is-mobile .tab-item:active {
  background: #f4f7fc;
}

html.is-mobile .tab-badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 7px);
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

/* ---------- 手机 Toast / 弹层 ---------- */
html.is-mobile .toast {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  font-size: 13px;
}

html.is-mobile .modal-mask {
  padding: 20px;
}

html.is-mobile .modal {
  width: 100%;
  max-width: 342px;
  padding: 22px 20px 18px;
  border-radius: 20px;
}

html.is-mobile .modal h3 {
  font-size: 18px;
}

html.is-mobile .modal p {
  font-size: 13px;
}

html.is-mobile .btn-ghost,
html.is-mobile .btn-solid {
  height: 44px;
  font-size: 13px;
}

/* ---------- 电脑上的手机预览外框（不缩放、不套 1280 画布） ---------- */
html.is-forced-mobile body.app-body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(760px 520px at 50% -8%, rgba(47, 107, 255, 0.22), transparent 64%),
    radial-gradient(680px 480px at 92% 108%, rgba(30, 79, 216, 0.16), transparent 62%),
    #070c16;
}

html.is-forced-mobile .home-stage.app-shell {
  width: 390px;
  height: min(844px, calc(100vh - 64px));
  height: min(844px, calc(100dvh - 64px));
  max-width: 390px;
  border-radius: 30px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 40px 90px rgba(0, 0, 0, 0.55);
}
