/*
 * Iris 彩虹信使 · 设计系统
 * 渐变仅用于 Hero / 空状态 / 标题 / Tab 选中 / 品牌栏
 * 长文阅读区保持 cream + 深色文字
 *
 * 主题切换（html data-iris-theme）:
 *   A · 深紫书卷（线上 production 默认）  B · 森绿学院  C · 暖琥珀编辑
 *   document.documentElement.dataset.irisTheme='B'; localStorage.setItem('irisTheme','B')
 */
:root,
[data-iris-theme="A"] {
  --iris-purple: #6B5B95;
  --iris-blue: #7BAFD4;
  --iris-sky: #5B8FB9;
  --iris-petal: #E8C547;
  --iris-cream: #FFF9EF;
  --iris-ink: #273027;
  --iris-line: #2D3329;
  --iris-muted: #6E6B5E;
  --iris-word: #A8703F;
  --iris-daily: #5C614D;
  --iris-academic: #2E7D52;
  --iris-gradient: linear-gradient(135deg, #6B5B95 0%, #5B8FB9 100%);
  --iris-gradient-soft: linear-gradient(135deg, rgba(107, 91, 149, 0.12) 0%, rgba(91, 143, 185, 0.14) 100%);
  --iris-shadow: 6px 6px 0 var(--iris-line);
  --iris-soft: 3px 3px 0 rgba(45, 51, 41, 0.22);
  --iris-petal-clip: polygon(50% 0%, 92% 18%, 100% 55%, 78% 100%, 22% 100%, 0% 55%, 8% 18%);
  --iris-theme-header: #3D3561;
  --iris-theme-header-bg: linear-gradient(135deg, #3D3561 0%, #4A4068 100%);
  --iris-theme-title: #2A2640;
  --iris-theme-tab-bg: #FFF9EF;
  --iris-theme-tab-active-color: #2A2640;
  --iris-theme-tab-active-underline: #E8C547;
  --iris-theme-eyebrow-bg: #3D3561;
  --iris-nav-font: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-iris-theme="B"] {
  --iris-theme-header: #2F4F4F;
  --iris-theme-header-bg: linear-gradient(135deg, #2F4F4F 0%, #3D5A5A 100%);
  --iris-theme-title: #1E3333;
  --iris-theme-tab-bg: #FFF8F0;
  --iris-theme-tab-active-color: #1E3333;
  --iris-theme-tab-active-underline: #E8C547;
  --iris-theme-eyebrow-bg: #2F4F4F;
  --iris-gradient-soft: linear-gradient(135deg, rgba(47, 79, 79, 0.1) 0%, rgba(61, 90, 90, 0.12) 100%);
}

[data-iris-theme="C"] {
  --iris-theme-header: #4A3F35;
  --iris-theme-header-bg: linear-gradient(135deg, #4A3F35 0%, #5C4F42 100%);
  --iris-theme-title: #3A3229;
  --iris-theme-tab-bg: #FFF9EF;
  --iris-theme-tab-active-color: #3A3229;
  --iris-theme-tab-active-underline: #7BAFD4;
  --iris-theme-eyebrow-bg: #4A3F35;
  --iris-gradient-soft: linear-gradient(135deg, rgba(74, 63, 53, 0.1) 0%, rgba(123, 175, 212, 0.12) 100%);
}

/* —— 顶栏基础结构（teacher 等仅引 iris-design 的页面依赖此块）—— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--iris-line, #2d3329);
  backdrop-filter: blur(8px);
}

.topbar .top-inner {
  margin: 0 auto;
  padding: 12px clamp(16px, 2vw, 28px);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar .nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.topbar .nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid var(--iris-line, #2d3329);
  background: var(--iris-theme-tab-bg, #fff9ef);
  box-shadow: var(--iris-soft, 3px 3px 0 rgba(45, 51, 41, 0.22));
  color: var(--iris-ink, #273027);
  text-decoration: none;
  padding: 7px 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* —— 品牌顶栏 —— */
.topbar.iris-brand-bar,
.iris-brand-bar.topbar {
  background: var(--iris-theme-header-bg);
  border-bottom-color: color-mix(in srgb, var(--iris-line) 55%, var(--iris-theme-header));
}

.topbar.iris-brand-bar .top-inner {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding-left: clamp(16px, 2vw, 28px);
  padding-right: clamp(16px, 2vw, 28px);
}

.topbar.iris-brand-bar .brand,
.iris-brand-bar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--iris-nav-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.topbar.iris-brand-bar .nav a,
.iris-brand-bar .nav a {
  font-family: var(--iris-nav-font);
  font-size: 14px;
  font-weight: 600;
  background: var(--iris-theme-tab-bg);
  border-color: rgba(45, 51, 41, 0.4);
  color: var(--iris-ink);
}

.iris-brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: drop-shadow(2px 2px 0 rgba(45, 51, 41, 0.35));
}

.topbar.iris-brand-bar .nav a.active,
.iris-brand-bar .nav a.active {
  background: var(--iris-theme-tab-bg);
  color: var(--iris-theme-tab-active-color);
  box-shadow: inset 0 -3px 0 var(--iris-theme-tab-active-underline);
  font-weight: 700;
}

.topbar.iris-brand-bar .nav a:hover,
.iris-brand-bar .nav a:hover {
  background: #fff;
}

/* —— 北京时间 · 顶栏内嵌（不遮挡 Tab）—— */
.topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 0;
}

.date-chip {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: 10.75rem;
  border: 2px solid var(--iris-line, var(--line, #2d3329));
  background: var(--iris-theme-tab-bg, var(--panel, #fff9ef));
  box-shadow: var(--iris-soft, 3px 3px 0 rgba(45, 51, 41, 0.22));
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--iris-ink, var(--ink, #273027));
  pointer-events: auto;
}

.topbar.iris-brand-bar .date-chip {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

/* Word-exam fixed rail: .tri-date must not pick up topbar .date-chip static layout */
body.exam-mode .tri-date {
  position: fixed;
}

@media (max-width: 900px) {
  .topbar.iris-brand-bar .top-inner {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .topbar.iris-brand-bar .topbar-end {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .topbar.iris-brand-bar .nav {
    flex: 0 1 auto;
    min-width: 0;
  }

  .topbar.iris-brand-bar .date-chip {
    flex-shrink: 0;
    margin-left: auto;
  }
}

/* Student learning Dashboard: dense training ledger, shared Theme A tokens. */
body.iris-dashboard-page {
  min-height: 100vh;
  background: var(--iris-paper, #f4eadc);
  color: var(--iris-ink, #28314e);
}

.iris-dashboard-shell {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 0 64px;
}

.iris-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 16px;
  border-bottom: 3px solid var(--iris-line, #28314e);
}

.iris-dashboard-kicker {
  margin: 0 0 4px;
  color: var(--iris-muted, #735e61);
  font-size: 12px;
  font-weight: 900;
}

.iris-dashboard-head h1 {
  margin: 0;
  color: var(--iris-theme-title, #2a2640);
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
  line-height: 1.15;
}

.iris-dashboard-identity {
  margin: 6px 0 0;
  color: var(--iris-muted, #735e61);
  font-size: 13px;
}

.iris-dashboard-refresh,
.iris-dashboard-state button,
.iris-dashboard-empty-actions a {
  border: 2px solid var(--iris-line, #28314e);
  background: var(--iris-theme-header, #3d3561);
  color: #fff;
  box-shadow: 3px 3px 0 var(--iris-line, #28314e);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  padding: 8px 12px;
  cursor: pointer;
}

.iris-dashboard-app {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.iris-dashboard-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 3px dashed var(--iris-line, #28314e);
  background: var(--iris-surface, #fff9ef);
  text-align: center;
  padding: 28px;
}

.iris-dashboard-state p {
  margin: 0;
  color: var(--iris-muted, #735e61);
}

.iris-dashboard-state--error {
  border-color: var(--bad, #b43b3b);
}

.iris-dashboard-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.iris-dashboard-section {
  min-width: 0;
  border-top: 3px solid var(--iris-line, #28314e);
  background: color-mix(in srgb, var(--iris-surface, #fff9ef) 88%, white);
}

.iris-dashboard-section-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 2px solid var(--iris-line, #28314e);
}

.iris-dashboard-section-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.iris-dashboard-section-head span {
  color: var(--iris-muted, #735e61);
  font-size: 12px;
}

.iris-dashboard-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.iris-dashboard-ledger,
.iris-dashboard-recent {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.iris-dashboard-ledger th,
.iris-dashboard-ledger td,
.iris-dashboard-recent th,
.iris-dashboard-recent td {
  border-right: 1px solid color-mix(in srgb, var(--iris-line, #28314e) 38%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--iris-line, #28314e) 38%, transparent);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.iris-dashboard-ledger tbody th {
  width: 26%;
}

.iris-dashboard-meter {
  width: 100%;
  height: 10px;
  border: 1px solid var(--iris-line, #28314e);
  background: #fff;
}

.iris-dashboard-meter span {
  display: block;
  height: 100%;
  background: var(--ok, #2e7d52);
}

.iris-dashboard-loop {
  border: 3px solid var(--iris-line, #28314e);
  background: var(--iris-theme-header, #3d3561);
  color: #fff;
}

.iris-dashboard-loop dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.iris-dashboard-loop dl > div {
  min-width: 0;
  min-height: 112px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.iris-dashboard-loop dl > div:last-child {
  border-right: 0;
}

.iris-dashboard-loop dt {
  font-size: 12px;
  font-weight: 900;
}

.iris-dashboard-loop dd {
  margin: 7px 0 2px;
  color: #f4cf57;
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.iris-dashboard-loop small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.iris-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 18px;
}

.iris-dashboard-trend {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(12, minmax(22px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 18px 14px 12px;
  overflow-x: auto;
}

.iris-dashboard-trend-item {
  min-width: 22px;
  height: 186px;
  display: grid;
  grid-template-rows: 18px 1fr 20px;
  gap: 4px;
  text-align: center;
}

.iris-dashboard-trend-value,
.iris-dashboard-trend-item small {
  font-size: 10px;
  white-space: nowrap;
}

.iris-dashboard-trend-track {
  position: relative;
  width: 100%;
  min-height: 130px;
  border-bottom: 2px solid var(--iris-line, #28314e);
  background: repeating-linear-gradient(to top, transparent 0, transparent 31px, rgba(40, 49, 78, 0.13) 31px, rgba(40, 49, 78, 0.13) 32px);
}

.iris-dashboard-trend-bar {
  position: absolute;
  right: 3px;
  bottom: 0;
  left: 3px;
  min-height: 4px;
  background: var(--iris-theme-header, #3d3561);
}

.iris-dashboard-trend-bar--daily {
  background: var(--ok, #2e7d52);
}

.iris-dashboard-trend-bar--academic {
  background: #aa2b3a;
}

.iris-dashboard-reasons {
  margin: 0;
  padding: 8px 12px 12px 40px;
}

.iris-dashboard-reasons li {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed color-mix(in srgb, var(--iris-line, #28314e) 45%, transparent);
}

.iris-dashboard-reasons b {
  min-width: 28px;
  text-align: right;
}

.iris-dashboard-inline-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--iris-muted, #735e61);
  padding: 20px;
}

.iris-dashboard-recent {
  min-width: 720px;
}

.iris-ai-tutor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.iris-ai-tutor-head h3,
.iris-ai-tutor-head p {
  margin: 0;
}

.iris-ai-tutor-head h3 {
  font-size: 16px;
}

.iris-ai-tutor-head p {
  margin-top: 4px;
  color: var(--muted, #6e6b5e);
  font-size: 13px;
}

.iris-ai-tutor-head > span {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--ok, #2e7d52) 45%, white);
  background: color-mix(in srgb, var(--ok, #2e7d52) 12%, white);
  color: var(--ok, #2e7d52);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
}

.iris-ai-tutor-boundary,
.iris-ai-tutor-refusal {
  margin: 0 0 10px;
  border-left: 3px solid var(--accent, #5c614d);
  background: color-mix(in srgb, var(--accent, #5c614d) 9%, white);
  padding: 8px 10px;
  color: var(--muted, #6e6b5e);
  font-size: 12px;
}

.iris-ai-tutor-refusal {
  border-left-color: #b87925;
  background: #fbf2e4;
  color: #6b522f;
}

.iris-ai-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.iris-ai-preset {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent, #5c614d) 55%, white);
  border-radius: 4px;
  background: #fff;
  color: var(--ink, #2d3329);
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.iris-ai-preset.active {
  background: var(--accent, #5c614d);
  color: #fff;
}

.iris-ai-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
  margin-bottom: 10px;
}

.iris-ai-question-input {
  min-width: 0;
  border: 1px solid rgba(45, 51, 41, 0.38);
  background: #fff;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
}

.iris-ai-question-send {
  border: 0;
  background: var(--ok, #2e7d52);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* —— 教师看板 · Theme A 轻量 chrome（无桌宠）—— */
body.iris-teacher-lite {
  margin: 0;
  background: color-mix(in srgb, var(--iris-cream) 92%, #fff);
  color: var(--iris-ink);
  font-family: "Times New Roman", "Songti SC", "SimSun", serif;
  line-height: 1.5;
}

body.iris-teacher-lite .topbar.iris-brand-bar .brand {
  flex: 1 1 auto;
  min-width: 0;
}

body.iris-teacher-lite .brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

body.iris-teacher-lite .brand-site {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.88;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

body.iris-teacher-lite .brand-head {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

body.iris-teacher-lite .topbar.iris-brand-bar .topbar-end {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  body.iris-teacher-lite .topbar.iris-brand-bar .brand {
    flex: 1 1 100%;
    max-width: 100%;
  }

  body.iris-teacher-lite .topbar.iris-brand-bar .topbar-end {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.iris-teacher-lite .brand-site {
    display: none;
  }
}

body.iris-teacher-lite .iris-teacher-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 2vw, 24px) 48px;
}

body.iris-teacher-lite .iris-teacher-hero {
  margin: 0 0 20px;
  padding: 22px 24px;
  border: 3px solid color-mix(in srgb, var(--iris-purple) 40%, var(--iris-line));
  background: var(--iris-cream);
  box-shadow: var(--iris-soft);
}

body.iris-teacher-lite .iris-teacher-eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border: 2px solid var(--iris-line);
  background: var(--iris-theme-eyebrow-bg);
  color: #fff;
  font-family: var(--iris-nav-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

body.iris-teacher-lite .iris-teacher-hero h1 {
  margin: 0 0 8px;
  font-family: var(--iris-nav-font);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--iris-theme-title);
  line-height: 1.15;
}

body.iris-teacher-lite .iris-teacher-tagline {
  margin: 0;
  color: var(--iris-muted);
  font-size: 15px;
}

body.iris-teacher-lite .iris-teacher-panel {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 3px solid color-mix(in srgb, var(--iris-purple) 32%, var(--iris-line));
  border-radius: 0;
  background: var(--iris-cream);
  box-shadow: var(--iris-soft);
}

body.iris-teacher-lite .iris-teacher-panel:last-child {
  margin-bottom: 0;
}

body.iris-teacher-lite .iris-teacher-kicker {
  margin: 0 0 12px;
  color: var(--iris-purple);
  font-family: var(--iris-nav-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

body.iris-teacher-lite .iris-teacher-toolbar {
  display: grid;
  gap: 10px;
  align-items: center;
}

body.iris-teacher-lite .iris-teacher-toolbar--pin {
  grid-template-columns: 180px 1fr auto auto;
}

body.iris-teacher-lite .iris-teacher-toolbar--accounts {
  grid-template-columns: 1fr 1fr 1fr auto auto auto;
}

body.iris-teacher-lite .iris-teacher-toolbar--class {
  grid-template-columns: 1fr 1fr auto auto;
}

body.iris-teacher-lite .iris-teacher-toolbar--bulk {
  grid-template-columns: 1fr auto;
  margin-top: 10px;
}

body.iris-teacher-lite .iris-teacher-toolbar--codes {
  grid-template-columns: repeat(3, 1fr) auto;
}

body.iris-teacher-lite .iris-teacher-toolbar--codes-extra {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
}

body.iris-teacher-lite .iris-teacher-toolbar--push {
  grid-template-columns: 1fr 2fr 1fr auto;
}

body.iris-teacher-lite .iris-teacher-toolbar input,
body.iris-teacher-lite .iris-teacher-toolbar select,
body.iris-teacher-lite .iris-teacher-textarea {
  border: 2px solid var(--iris-line);
  background: #fff;
  padding: 10px 12px;
  border-radius: 0;
  font: inherit;
  font-size: 15px;
  color: var(--iris-ink);
}

body.iris-teacher-lite .iris-teacher-textarea {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
}

body.iris-teacher-lite .iris-teacher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--iris-line);
  background: var(--iris-theme-header);
  color: #fff;
  border-radius: 0;
  padding: 10px 14px;
  font-family: var(--iris-nav-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--iris-soft);
}

body.iris-teacher-lite .iris-teacher-btn:hover {
  filter: brightness(1.06);
}

body.iris-teacher-lite .iris-teacher-btn--ghost {
  background: #fff;
  color: var(--iris-ink);
}

body.iris-teacher-lite .iris-teacher-btn--danger {
  background: #fff;
  color: #B43B3B;
  border-color: color-mix(in srgb, #B43B3B 55%, var(--iris-line));
}

body.iris-teacher-lite .iris-teacher-btn--sm {
  padding: 6px 10px;
  font-size: 13px;
  box-shadow: none;
}

body.iris-teacher-lite .iris-teacher-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

body.iris-teacher-lite .iris-teacher-metric {
  border: 2px solid color-mix(in srgb, var(--iris-purple) 25%, var(--iris-line));
  background: #fff;
  padding: 14px 16px;
  box-shadow: var(--iris-soft);
}

body.iris-teacher-lite .iris-teacher-metric b {
  display: block;
  font-family: var(--iris-nav-font);
  font-size: 28px;
  font-weight: 700;
  color: var(--iris-theme-title);
  line-height: 1.1;
}

body.iris-teacher-lite .iris-teacher-metric span {
  display: block;
  margin-top: 4px;
  color: var(--iris-muted);
  font-size: 13px;
}

body.iris-teacher-lite .iris-teacher-table-wrap {
  overflow: auto;
  border: 2px solid var(--iris-line);
  background: #fff;
}

body.iris-teacher-lite .iris-teacher-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

body.iris-teacher-lite .iris-teacher-table-wrap table[style*="min-width"] {
  min-width: inherit;
}

body.iris-teacher-lite .iris-teacher-table-wrap th,
body.iris-teacher-lite .iris-teacher-table-wrap td {
  border-bottom: 1px solid color-mix(in srgb, var(--iris-line) 70%, transparent);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

body.iris-teacher-lite .iris-teacher-table-wrap th {
  background: color-mix(in srgb, var(--iris-purple) 12%, var(--iris-cream));
  font-family: var(--iris-nav-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--iris-theme-title);
}

body.iris-teacher-lite .iris-teacher-leaderboard {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid color-mix(in srgb, var(--iris-purple) 35%, var(--iris-line));
  background: #fff;
  box-shadow: var(--iris-soft);
}

body.iris-teacher-lite .iris-teacher-leaderboard h3 {
  margin: 0 0 10px;
  font-family: var(--iris-nav-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--iris-theme-title);
}

body.iris-teacher-lite .iris-teacher-leaderboard table {
  min-width: 0;
}

body.iris-teacher-lite .iris-teacher-name {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--iris-nav-font);
}

body.iris-teacher-lite .iris-teacher-pill {
  display: inline-block;
  border: 1px solid color-mix(in srgb, var(--iris-line) 80%, transparent);
  border-radius: 999px;
  padding: 3px 9px;
  margin: 2px 4px 2px 0;
  background: #fff;
  color: var(--iris-muted);
  font-size: 12px;
  font-weight: 600;
}

body.iris-teacher-lite .iris-teacher-pill--word {
  border-color: color-mix(in srgb, var(--iris-word) 45%, var(--iris-line));
  color: color-mix(in srgb, var(--iris-word) 80%, var(--iris-ink));
}

body.iris-teacher-lite .iris-teacher-pill--daily {
  border-color: color-mix(in srgb, var(--iris-daily) 45%, var(--iris-line));
  color: color-mix(in srgb, var(--iris-daily) 80%, var(--iris-ink));
}

body.iris-teacher-lite .iris-teacher-pill--academic {
  border-color: color-mix(in srgb, var(--iris-academic) 45%, var(--iris-line));
  color: color-mix(in srgb, var(--iris-academic) 80%, var(--iris-ink));
}

body.iris-teacher-lite .iris-teacher-pill.bad {
  border-color: color-mix(in srgb, #B43B3B 45%, var(--iris-line));
  color: #B43B3B;
}

body.iris-teacher-lite .ok {
  color: var(--iris-academic);
  font-weight: 700;
}

body.iris-teacher-lite .bad {
  color: #B43B3B;
  font-weight: 700;
}

body.iris-teacher-lite .iris-teacher-submission {
  border: 2px solid color-mix(in srgb, var(--iris-line) 75%, transparent);
  padding: 10px 12px;
  margin: 0 0 8px;
  background: #fff;
}

body.iris-teacher-lite .iris-teacher-submission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

body.iris-teacher-lite .iris-teacher-submission-head-title {
  font-family: var(--iris-nav-font);
  font-weight: 700;
  font-size: 13px;
  color: var(--iris-ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

body.iris-teacher-lite .iris-teacher-submission-head-hint {
  font-weight: 600;
}

body.iris-teacher-lite .iris-teacher-submission-toggle {
  border: 2px solid var(--iris-line);
  background: #fff;
  color: var(--iris-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--iris-nav-font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

body.iris-teacher-lite .iris-teacher-wrong {
  margin-top: 6px;
  color: var(--iris-muted);
  font-size: 14px;
}

body.iris-teacher-lite .iris-teacher-note {
  white-space: pre-wrap;
  color: var(--iris-muted);
  font-size: 14px;
}

body.iris-teacher-lite .iris-teacher-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--iris-muted);
}

body.iris-teacher-lite .iris-teacher-empty--left {
  text-align: left;
  padding: 12px 0;
}

body.iris-teacher-lite .iris-teacher-hint {
  padding: 0;
  text-align: left;
  font-size: 13px;
  color: var(--iris-muted);
}

body.iris-teacher-lite .iris-teacher-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

body.iris-teacher-lite .iris-teacher-qa-reply {
  width: 100%;
  min-width: 220px;
  border: 2px solid var(--iris-line);
  border-radius: 0;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
}

body.iris-teacher-lite .iris-teacher-code-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  body.iris-teacher-lite .iris-teacher-toolbar--pin,
  body.iris-teacher-lite .iris-teacher-toolbar--accounts,
  body.iris-teacher-lite .iris-teacher-toolbar--class,
  body.iris-teacher-lite .iris-teacher-toolbar--codes,
  body.iris-teacher-lite .iris-teacher-toolbar--codes-extra,
  body.iris-teacher-lite .iris-teacher-toolbar--push,
  body.iris-teacher-lite .iris-teacher-toolbar--bulk {
    grid-template-columns: 1fr;
  }

  body.iris-teacher-lite .iris-teacher-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  body.iris-teacher-lite .iris-teacher-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Hero / 封面 —— */
.iris-hero-home {
  border-color: color-mix(in srgb, var(--iris-purple) 45%, var(--iris-line));
  background: var(--iris-cream);
  overflow: visible;
}

.iris-hero-home .eyebrow {
  background: var(--iris-theme-eyebrow-bg);
  border-color: var(--iris-line);
  color: #fff;
  font-family: var(--iris-nav-font);
  font-weight: 600;
}

.iris-hero-home h1 {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--iris-theme-title);
  font-family: var(--iris-nav-font);
  font-weight: 700;
}

.iris-rainbow-hero {
  position: relative;
  margin: -6px 0 18px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.iris-rainbow-arc {
  width: min(360px, 94%);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 0 rgba(45, 51, 41, 0.1));
}

.iris-rainbow-arc .arc-track {
  transition: opacity 0.35s ease;
}

.iris-rainbow-arc .arc-seg {
  transition: opacity 0.35s ease, stroke-width 0.35s ease, filter 0.35s ease;
}

.iris-rainbow-arc .arc-seg.done {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(107, 91, 149, 0.35));
}

.iris-rainbow-arc .arc-seg.pending {
  opacity: 0.34;
}

.iris-rainbow-arc .iris-flower {
  transition: transform 0.35s ease;
}

.iris-rainbow-markers {
  display: flex;
  gap: 28px;
  margin-top: -2px;
  justify-content: center;
  align-items: flex-start;
}

.iris-rainbow-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
}

.iris-rainbow-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--iris-line);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.iris-rainbow-dot.done {
  transform: scale(1.12);
  background: var(--dot-color, var(--iris-purple));
  box-shadow: 0 0 0 2px rgba(255, 249, 239, 0.85), 0 2px 0 rgba(45, 51, 41, 0.12);
}

.iris-rainbow-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--iris-muted);
  line-height: 1;
}

.iris-rainbow-marker[data-mod="word"] .iris-rainbow-dot.done { --dot-color: var(--iris-word); }
.iris-rainbow-marker[data-mod="daily"] .iris-rainbow-dot.done { --dot-color: var(--iris-daily); }
.iris-rainbow-marker[data-mod="academic"] .iris-rainbow-dot.done { --dot-color: var(--iris-academic); }

.iris-rainbow-marker[data-mod="word"] .iris-rainbow-label { color: color-mix(in srgb, var(--iris-word) 75%, var(--iris-ink)); }
.iris-rainbow-marker[data-mod="daily"] .iris-rainbow-label { color: color-mix(in srgb, var(--iris-daily) 75%, var(--iris-ink)); }
.iris-rainbow-marker[data-mod="academic"] .iris-rainbow-label { color: color-mix(in srgb, var(--iris-academic) 75%, var(--iris-ink)); }

.hero.iris-module-hero .eyebrow {
  background: var(--iris-gradient-soft);
  color: var(--iris-purple);
  border-color: color-mix(in srgb, var(--iris-purple) 40%, var(--iris-line));
}

.hero.iris-module-hero h1 {
  color: var(--iris-ink);
}

/* —— 空状态 —— */
.iris-empty-state {
  text-align: center;
  padding: 32px 20px;
  border: 3px solid color-mix(in srgb, var(--iris-purple) 35%, var(--iris-line));
  background: var(--iris-gradient-soft);
  box-shadow: var(--iris-soft);
}

.iris-empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
  background: var(--iris-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.iris-empty-state p {
  margin: 0;
  color: var(--iris-muted);
  font-size: 14px;
}

/* —— 花瓣徽章框 —— */
.iris-petal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 2px solid var(--iris-line);
  background: var(--iris-cream);
  clip-path: var(--iris-petal-clip);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.2;
  min-width: 52px;
  min-height: 36px;
  box-shadow: var(--iris-soft);
}

.iris-petal-badge.lv {
  background: var(--iris-gradient);
  color: #fff;
  border-color: var(--iris-line);
}

.iris-petal-badge.achievement {
  background: color-mix(in srgb, var(--iris-petal) 35%, var(--iris-cream));
  color: var(--iris-ink);
}

.iris-gam-lv.iris-petal-badge,
.iris-gam-boss-badge.iris-petal-badge {
  clip-path: var(--iris-petal-clip);
}

/* —— Iris 任务板 —— */
.iris-task-board {
  margin: 12px 0 10px;
}

.iris-task-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--iris-muted);
}

.iris-wood-sign {
  display: none;
}

.iris-tri-color-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 8px;
  border: 2px solid var(--iris-line);
  overflow: hidden;
  background: #fff;
}

.iris-tri-color-bar span:nth-child(1) { background: var(--iris-word); }
.iris-tri-color-bar span:nth-child(2) { background: var(--iris-daily); }
.iris-tri-color-bar span:nth-child(3) { background: var(--iris-academic); }

/* —— 升级弹窗 · 3D 徽章 + 错峰入场 —— */
.iris-gam-level-mask {
  animation: irisLevelMaskIn 0.35s ease forwards;
}

.iris-gam-level-mask.iris-level-static {
  animation: none;
}

.iris-gam-level-card.iris-level-frame {
  position: relative;
  padding-top: 56px;
  border-color: color-mix(in srgb, var(--iris-purple) 50%, var(--iris-line));
  transform: scale(0.94);
  opacity: 0;
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-gam-level-card.iris-level-frame {
  animation: irisLevelCardPop 0.55s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

.iris-gam-level-mask.iris-level-static .iris-gam-level-card.iris-level-frame {
  transform: none;
  opacity: 1;
}

.iris-level-badge-scene {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 92px;
  perspective: 720px;
  pointer-events: none;
  z-index: 2;
}

.iris-level-badge-3d {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(-14deg) rotateX(4deg);
  will-change: transform;
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-badge-3d {
  animation:
    irisLevelBadgeEnter 1.05s cubic-bezier(0.34, 1.35, 0.64, 1) forwards,
    irisLevelBadgeIdle 10s ease-in-out 1.15s infinite;
}

.iris-level-silhouette {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 10px auto 0;
  border: 3px solid var(--iris-line);
  background: var(--iris-gradient);
  clip-path: var(--iris-petal-clip);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 rgba(45, 51, 41, 0.28);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.iris-level-silhouette svg {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25));
}

.iris-level-shine {
  position: absolute;
  inset: 0;
  clip-path: var(--iris-petal-clip);
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.iris-level-shine::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -130%;
  width: 55%;
  height: 220%;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 72%
  );
  transform: skewX(-18deg);
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-shine::after {
  animation: irisLevelShine 1.1s ease-out 0.42s 1;
}

.iris-level-sparkles {
  position: absolute;
  inset: -10px;
  pointer-events: none;
}

.iris-level-sparkles span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--iris-line);
  background: var(--iris-petal, #e8c547);
  opacity: 0;
  box-shadow: 0 0 6px rgba(232, 197, 71, 0.55);
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-sparkles span {
  animation: irisLevelSpark 0.75s ease-out forwards;
}

.iris-level-stagger {
  opacity: 0;
  transform: translateY(12px);
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-stagger-1 {
  animation: irisLevelFadeUp 0.48s ease forwards 0.52s;
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-stagger-2 {
  animation: irisLevelFadeUp 0.48s ease forwards 0.66s;
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-stagger-3 {
  animation: irisLevelFadeUp 0.48s ease forwards 0.8s;
}

.iris-gam-level-mask.iris-level-animate.iris-level-ready .iris-level-stagger-4 {
  animation: irisLevelFadeUp 0.48s ease forwards 0.94s;
}

.iris-gam-level-mask.iris-level-static .iris-level-stagger {
  opacity: 1;
  transform: none;
}

.iris-gam-level-card.iris-level-frame h2 {
  background: var(--iris-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes irisLevelMaskIn {
  from { background: rgba(39, 48, 39, 0); }
  to { background: rgba(39, 48, 39, 0.55); }
}

@keyframes irisLevelCardPop {
  0% { transform: scale(0.92) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes irisLevelBadgeEnter {
  0% {
    transform: rotateY(-540deg) rotateX(18deg) scale(0.32);
    opacity: 0;
  }
  52% {
    transform: rotateY(-18deg) rotateX(6deg) scale(1.1);
    opacity: 1;
  }
  72% {
    transform: rotateY(10deg) rotateX(-2deg) scale(0.97);
  }
  100% {
    transform: rotateY(-12deg) rotateX(3deg) scale(1);
    opacity: 1;
  }
}

@keyframes irisLevelBadgeIdle {
  0%, 100% { transform: rotateY(-12deg) rotateX(3deg); }
  50% { transform: rotateY(12deg) rotateX(-2deg); }
}

@keyframes irisLevelShine {
  0% { left: -130%; }
  100% { left: 150%; }
}

@keyframes irisLevelSpark {
  0% {
    opacity: 0;
    transform: scale(0) translate(0, 0);
  }
  35% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 0;
    transform: scale(0.35) translate(var(--lv-sx, 0), var(--lv-sy, 0));
  }
}

@keyframes irisLevelFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .iris-level-badge-scene {
    perspective: 520px;
    width: 80px;
    height: 80px;
    top: -30px;
  }

  .iris-level-silhouette {
    width: 64px;
    height: 64px;
    margin-top: 8px;
  }

  .iris-level-silhouette svg {
    width: 38px;
    height: 38px;
  }

  .iris-level-sparkles span {
    width: 5px;
    height: 5px;
  }
}

/* —— 移动 Tab 选中渐变 —— */
#iris-mobile-tabbar a.active {
  background: var(--iris-gradient) !important;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

#iris-mobile-tabbar a.active.iris-tab-badge-dot::after {
  border-color: var(--iris-petal);
  background: var(--iris-petal);
}

/* —— 阅读区：保持 cream，禁止渐变正文 —— */
.source-pane,
.source-pane .source,
.source-pane .passage,
.passage,
.reader .source {
  background: var(--iris-cream, #FFF9EF) !important;
  color: var(--iris-ink, #273027) !important;
}

.insertion-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--iris-muted, #5a635a);
}

/* —— 生活阅读结构化排版（广告/通知/邮件等 OCR 文本） —— */
.passage-text {
  line-height: 1.55;
}

.passage-text .passage-heading {
  margin: 0 0 12px;
  font-size: 1.05em;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.passage-text .passage-subheading {
  margin: 14px 0 6px;
  font-size: 0.98em;
  font-weight: 700;
}

.passage-text .passage-meta {
  margin: 0 0 8px;
  font-weight: 700;
}

.passage-text .passage-paragraph {
  margin: 0 0 10px;
}

.passage-text .passage-bullets {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.passage-text .passage-bullets li {
  position: relative;
  margin: 0 0 6px;
  padding-left: 1.15em;
}

.passage-text .passage-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.passage-text.layout-ad .passage-heading {
  text-align: center;
}

.passage-text.layout-notice .passage-heading {
  text-align: center;
}

.passage-text.layout-email .passage-meta + .passage-paragraph {
  margin-top: 12px;
}

.passage-text.layout-ad .passage-paragraph:last-child,
.passage-text.layout-notice .passage-paragraph:last-child {
  margin-bottom: 0;
}

.answer-list.insertion-positions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.answer-list.insertion-positions .choice {
  text-align: center;
  padding: 12px 8px;
}

.insertion-choice-label {
  display: block;
  font-size: 11px;
  color: var(--iris-muted, #5a635a);
  margin-top: 4px;
}

.iris-insertion-marker {
  display: inline-block;
  min-width: 1.1em;
  text-align: center;
  font-weight: 900;
  background: #111;
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 2px;
  line-height: 1.2;
  vertical-align: baseline;
}

.iris-insertion-marker.hover,
.iris-insertion-marker.selected {
  outline: 2px solid var(--iris-accent, #6b8f71);
  outline-offset: 2px;
}

.iris-insertion-marker.correct-target {
  background: #1a7f4b;
}

.iris-insertion-marker.selected.wrong {
  background: #b42318;
}

.iris-gam-panel {
  border-color: color-mix(in srgb, var(--iris-line) 85%, var(--iris-purple));
}

.iris-gam-panel .guide-label {
  background: color-mix(in srgb, var(--iris-purple) 85%, var(--iris-ink));
}

/* —— 桌宠 · 水滴精灵 —— */
#iris-mascot-root {
  --iris-pet-w: 96px;
  --iris-pet-h: 128px;
  position: fixed;
  z-index: 10060;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  touch-action: none;
  user-select: none;
  font-family: "Courier New", "Songti SC", monospace;
  transition: transform 0.15s ease;
}

#iris-mascot-root.is-dragging {
  transition: none;
}

#iris-mascot-root.is-minimized {
  opacity: 0.72;
}

#iris-mascot-root.is-minimized .iris-mascot-sprite-wrap {
  transform: scale(0.55);
  transform-origin: bottom right;
}

#iris-mascot-root.is-hidden {
  display: none !important;
}

.iris-mascot-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.iris-mascot-toolbar {
  display: flex;
  gap: 4px;
  opacity: 0.85;
}

.iris-mascot-btn {
  width: 22px;
  height: 22px;
  border: 2px solid var(--iris-line);
  background: var(--iris-cream);
  color: var(--iris-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  border-radius: 2px;
}

.iris-mascot-sprite-wrap {
  position: relative;
  width: var(--iris-pet-w);
  height: var(--iris-pet-h);
  cursor: grab;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(3px 5px 0 rgba(45, 51, 41, 0.15));
}

.iris-mascot-sprite-wrap:active {
  cursor: grabbing;
}

.iris-mascot-pixel {
  width: var(--iris-pet-w);
  height: var(--iris-pet-h);
  position: relative;
  image-rendering: pixelated;
}

.iris-mascot-pixel canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.iris-mascot-bubble {
  position: absolute;
  right: calc(var(--iris-pet-w) + 10px);
  bottom: 18px;
  width: min(420px, calc(100vw - var(--iris-pet-w) - 44px));
  min-width: min(320px, calc(100vw - var(--iris-pet-w) - 44px));
  max-width: 420px;
  padding: 12px 14px;
  border: 2px solid var(--iris-line);
  background: var(--iris-cream);
  box-shadow: var(--iris-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.iris-mascot-bubble.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.iris-mascot-bubble::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 28px;
  border: 6px solid transparent;
  border-left-color: var(--iris-line);
}

.iris-mascot-bubble q {
  display: block;
  margin: 0 0 10px;
  font-style: normal;
  font-weight: 800;
  color: var(--iris-purple);
  white-space: normal;
  writing-mode: horizontal-tb;
}

.iris-mascot-reminder {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 2px solid var(--iris-line);
  background: #fff;
  font-weight: 800;
}

.iris-mascot-reminder--complete {
  border-color: var(--iris-academic);
  background: color-mix(in srgb, var(--iris-academic) 12%, #fff);
  color: var(--iris-academic);
}

.iris-mascot-reminder--word { border-bottom: 3px solid var(--iris-word); }
.iris-mascot-reminder--daily { border-bottom: 3px solid var(--iris-daily); }
.iris-mascot-reminder--academic { border-bottom: 3px solid var(--iris-academic); }
.iris-mascot-reminder--chest { border-bottom: 3px solid var(--iris-purple); }

.iris-mascot-reminder-text {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--iris-ink);
}

.iris-mascot-reminder-link {
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  color: var(--iris-purple);
  text-decoration: none;
}

.iris-mascot-nudge {
  position: absolute;
  right: calc(var(--iris-pet-w) + 10px);
  bottom: 210px;
  width: min(320px, calc(100vw - var(--iris-pet-w) - 44px));
  max-width: 320px;
  padding: 8px 28px 8px 10px;
  border: 2px solid var(--iris-line);
  background: var(--iris-cream);
  box-shadow: var(--iris-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  writing-mode: horizontal-tb;
  color: var(--iris-ink);
  cursor: pointer;
  animation: irisMascotNudgeIn 0.35s ease;
}

.iris-mascot-nudge p { margin: 0; }

.iris-mascot-nudge-dismiss {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--iris-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.iris-mascot-nudge::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 10px;
  border: 5px solid transparent;
  border-left-color: var(--iris-line);
}

.iris-pet-auto-quote {
  position: absolute;
  right: calc(var(--iris-pet-w) + 10px);
  bottom: 252px;
  width: min(340px, calc(100vw - var(--iris-pet-w) - 44px));
  max-width: 340px;
  padding: 8px 28px 8px 10px;
  border: 2px solid var(--iris-purple);
  background: color-mix(in srgb, var(--iris-purple) 8%, var(--iris-cream));
  box-shadow: var(--iris-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: normal;
  writing-mode: horizontal-tb;
  color: var(--iris-ink);
  animation: irisMascotNudgeIn 0.35s ease;
  z-index: 1;
}

.iris-pet-auto-quote p { margin: 0; }

.iris-pet-auto-quote-dismiss {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--iris-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.iris-pet-auto-quote::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 10px;
  border: 5px solid transparent;
  border-left-color: var(--iris-purple);
}

@keyframes irisMascotNudgeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

#iris-mascot-root.iris-mascot-has-reminder .iris-mascot-sprite-wrap {
  filter: drop-shadow(2px 3px 0 rgba(168, 112, 63, 0.25));
}

.iris-mascot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.iris-mascot-links a {
  display: inline-flex;
  padding: 5px 8px;
  border: 2px solid var(--iris-line);
  background: #fff;
  color: var(--iris-ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 11px;
}

.iris-mascot-links a[data-mod="word"] { border-bottom: 3px solid var(--iris-word); }
.iris-mascot-links a[data-mod="daily"] { border-bottom: 3px solid var(--iris-daily); }
.iris-mascot-links a[data-mod="academic"] { border-bottom: 3px solid var(--iris-academic); }

.iris-mascot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 10px;
}

.iris-mascot-tabs button {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid var(--iris-line);
  background: #fff;
  color: var(--iris-ink);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 6px;
  cursor: pointer;
}

.iris-mascot-tabs button.active {
  background: var(--iris-purple);
  color: #fff;
  border-color: var(--iris-line);
}

.iris-mascot-tab-panel[hidden] {
  display: none !important;
}

.iris-mascot-tab-panel q {
  display: block;
  margin: 0 0 10px;
  font-style: normal;
  font-weight: 800;
  color: var(--iris-purple);
}

.iris-mascot-ask textarea {
  width: 100%;
  min-height: 72px;
  border: 2px solid var(--iris-line);
  background: #fff;
  color: var(--iris-ink);
  font: inherit;
  font-size: 11px;
  padding: 8px;
  box-sizing: border-box;
  resize: vertical;
}

.iris-mascot-ask-btn {
  width: 100%;
  margin-top: 8px;
  border: 2px solid var(--iris-line);
  background: var(--iris-purple);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.iris-mascot-ask-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.iris-mascot-msg {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 800;
  color: #B43B3B;
  min-height: 14px;
}

.iris-mascot-msg.ok {
  color: var(--iris-green);
}

.iris-mascot-replies-list {
  max-height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iris-mascot-reply-item {
  border: 2px solid var(--iris-line);
  background: #fff;
  padding: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.iris-mascot-reply-item.unread {
  border-color: #B43B3B;
  box-shadow: inset 3px 0 0 #B43B3B;
}

.iris-mascot-reply-item .q-meta,
.iris-mascot-reply-item .a-meta {
  font-size: 10px;
  color: #6E6B5E;
  margin-bottom: 4px;
}

.iris-mascot-reply-item .q-text {
  font-weight: 800;
  margin-bottom: 6px;
}

.iris-mascot-reply-item .a-text {
  color: var(--iris-ink);
}

.iris-mascot-login-hint {
  font-size: 11px;
  line-height: 1.45;
  color: #6E6B5E;
}

.iris-mascot-login-hint button {
  margin-top: 8px;
  border: 2px solid var(--iris-line);
  background: #fff;
  color: var(--iris-purple);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  cursor: pointer;
  width: 100%;
}

.iris-pet-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #D32F2F;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

.iris-pet-badge[hidden] {
  display: none !important;
}

.iris-tab-badge {
  display: inline-block;
  min-width: 14px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 999px;
  background: #D32F2F;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  vertical-align: middle;
}

.iris-tab-badge[hidden] {
  display: none !important;
}

body.iris-mobile #iris-mascot-root {
  right: 10px;
  bottom: calc(var(--iris-tab-h, 52px) + 12px + env(safe-area-inset-bottom, 0px));
  transform: scale(0.5);
  transform-origin: bottom right;
}

@media (max-width: 380px) {
  body.iris-mobile #iris-mascot-root {
    transform: scale(0.45);
  }
}

body.iris-mobile.mobile-focus #iris-mascot-root {
  bottom: calc(var(--iris-tab-h, 52px) + 8px + env(safe-area-inset-bottom, 0px));
  opacity: 0.85;
  pointer-events: auto;
}

body.iris-mobile.mobile-focus #iris-mascot-root .iris-mascot-bubble {
  width: min(320px, calc(100vw - var(--iris-pet-w) - 32px));
  min-width: min(240px, calc(100vw - var(--iris-pet-w) - 32px));
  max-width: 320px;
}

/* 静态帧 · 减少动效 */
#iris-mascot-root.iris-mascot-static .iris-mascot-pixel canvas {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .iris-rainbow-arc .arc-seg,
  .iris-rainbow-dot,
  .iris-gam-tri-svg.tri-animate .tri-seg,
  #iris-mascot-root,
  .iris-mascot-nudge,
  .iris-gam-level-mask,
  .iris-gam-level-mask .iris-gam-level-card,
  .iris-gam-level-mask .iris-level-badge-3d,
  .iris-gam-level-mask .iris-level-shine::after,
  .iris-gam-level-mask .iris-level-sparkles span,
  .iris-gam-level-mask .iris-level-stagger {
    animation: none !important;
    transition: none !important;
  }

  .iris-gam-level-mask .iris-gam-level-card,
  .iris-gam-level-mask .iris-level-stagger {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* —— 封面 · Web 双栏 —— */
.home-page.wrap {
  max-width: none;
  width: 100%;
  padding-top: 22px;
  padding-bottom: 40px;
  padding-left: clamp(16px, 2.5vw, 32px);
  padding-right: clamp(16px, 2.5vw, 32px);
}

.home-mobile-tabs {
  display: none;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
  width: 100%;
}

.home-col {
  min-width: 0;
}

.home-col-guide .home-guide-header {
  margin-bottom: 16px;
  max-width: 42rem;
}

.home-col-guide .home-guide {
  gap: 14px;
  max-width: 42rem;
}

.home-col-guide .guide-block {
  padding: 18px;
}

.home-col-guide .guide-block h2 {
  font-size: clamp(18px, 1.6vw, 22px);
}

.home-col-guide .guide-teaser {
  display: none;
}

.home-gam-header {
  border: 3px solid color-mix(in srgb, var(--iris-purple) 45%, var(--iris-line));
  background: var(--iris-cream);
  box-shadow: var(--iris-shadow);
  padding: 16px 18px 10px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.home-gam-header .iris-rainbow-hero {
  margin: 0;
  min-height: 88px;
}

.home-col-gam .iris-gam-panel {
  margin-bottom: 0;
}

@media (min-width: 960px) {
  .home-split {
    max-height: calc(100vh - 108px);
    grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 1fr);
  }

  .home-col {
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .home-col-guide .guide-block:last-child {
    margin-bottom: 0;
  }

  .home-col-gam .home-gam-header,
  .home-col-gam .iris-gam-panel {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .iris-hero-home h1 {
    font-size: clamp(22px, 5vw, 32px);
  }

  .iris-rainbow-hero {
    min-height: 92px;
  }

  .iris-rainbow-markers {
    gap: 18px;
  }
}
