/* ========================================
   i创空间 ·  门户网站
   主样式表
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #1a5fb4;
  --primary-light: #3584e4;
  --primary-dark: #0d3b66;
  --accent: #ff8c42;
  --accent-light: #ffab76;
  --bg: #ffffff;
  --bg-light: #f5f7fa;
  --bg-dark: #0d1b2a;
  --text: #2d3436;
  --text-light: #636e72;
  --text-white: #ffffff;
  --border: #e0e6ed;
  --green: #27ae60;
  --purple: #9b59b6;
  --gold: #f39c12;
  --silver: #bdc3c7;
  --bronze: #e67e22;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm); font-size: 0.95rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  border: 2px solid transparent; text-decoration: none;
  font-family: inherit;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary); color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }

.btn-accent {
  background: var(--accent); color: white;
}
.btn-accent:hover:not(:disabled) { background: #e67a30; }

.btn-outline {
  background: transparent; border-color: var(--primary); color: var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: white; }

.btn-outline-white {
  background: transparent; border-color: white; color: white;
}
.btn-outline-white:hover:not(:disabled) { background: rgba(255,255,255,0.15); }

.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.navbar.scrolled { box-shadow: var(--shadow); }

.nav-container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 700; font-size: 1.05rem;
}
.logo-icon { font-size: 1.4rem; color: var(--accent); }

.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-light);
  font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(26,95,180,0.08); }

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

.mobile-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 4px;
}
.mobile-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* --- Hero Section --- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 50%, #1a5fb4 100%);
}

#particleCanvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.hero-content {
  position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 0 24px;
}

.hero-title {
  font-size: 3.5rem; font-weight: 800; color: white; margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.5); font-size: 0.8rem;
  animation: bounce 2s infinite;
}

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

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Mini Dashboard --- */
.mini-dashboard {
  background: var(--bg); padding: 40px 0; border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}

.stat-card {
  text-align: center; padding: 20px 12px; border-radius: var(--radius);
  background: var(--bg-light); transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* --- Leaderboard --- */
.leaderboard-section { padding: 80px 0; background: var(--bg-light); }

.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}

.leaderboard-tabs {
  display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap;
}

.lb-tab {
  padding: 8px 20px; border-radius: 20px; border: 1.5px solid var(--border);
  background: white; color: var(--text-light); font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.lb-tab.active, .lb-tab:hover { background: var(--primary); color: white; border-color: var(--primary); }

.leaderboard-table-wrap { overflow-x: auto; }

.leaderboard-table {
  width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}

.leaderboard-table th {
  background: var(--primary); color: white; padding: 14px 16px; text-align: left;
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

.leaderboard-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover { background: #f0f4ff; }

.rank-1 td { background: rgba(243,156,18,0.08); }
.rank-2 td { background: rgba(189,195,199,0.08); }
.rank-3 td { background: rgba(230,126,34,0.08); }

.medal { font-size: 1.1rem; }

.leaderboard-hint { text-align: center; color: var(--text-light); margin-top: 16px; font-size: 0.9rem; }

/* --- About Section --- */
.about-section { padding: 80px 0; }

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}

.about-text p { margin-bottom: 1rem; color: var(--text-light); }

.about-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}

.pillar-card {
  padding: 28px 20px; background: var(--bg-light); border-radius: var(--radius);
  text-align: center; transition: transform 0.2s, box-shadow 0.2s;
}
.pillar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar-card:nth-child(5) { grid-column: 1 / -1; justify-self: center; min-width: 200px; }

.pillar-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.pillar-card h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.pillar-card p { font-size: 0.85rem; color: var(--text-light); }

/* --- Assessment Entry --- */
.assessment-entry { padding: 60px 0; }

.assessment-banner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius); padding: 48px; color: white;
}

.assessment-banner-content h2 { font-size: 1.8rem; margin-bottom: 12px; }
.assessment-banner-content p { opacity: 0.9; margin-bottom: 24px; font-size: 1.05rem; }
.assessment-count { margin-top: 16px; font-size: 0.9rem; opacity: 0.7; }

.assessment-banner-visual { display: flex; justify-content: center; }

.radar-placeholder { position: relative; width: 200px; height: 200px; }
.radar-demo { width: 100%; height: 100%; }
.radar-labels { position: absolute; inset: 0; }
.radar-labels span { position: absolute; font-size: 0.7rem; color: rgba(255,255,255,0.7); white-space: nowrap; }

/* --- Courses --- */
.courses-section { padding: 80px 0; background: var(--bg-light); }

.courses-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}

.course-card {
  background: white; border-radius: var(--radius); padding: 32px 24px;
  box-shadow: var(--shadow); text-align: center; transition: transform 0.3s, box-shadow 0.3s;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

.course-icon { font-size: 3rem; margin-bottom: 16px; }
.course-card h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.course-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 16px; line-height: 1.6; }

.course-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

.tag {
  padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600;
}
.tag-blue { background: #dbeafe; color: #1a5fb4; }
.tag-green { background: #d1fae5; color: #27ae60; }
.tag-orange { background: #ffedd5; color: #e67e22; }
.tag-purple { background: #ede9fe; color: #9b59b6; }

/* --- Framework --- */
.framework-section { padding: 80px 0; }

.framework-visual { display: flex; justify-content: center; margin: 40px 0; }
.framework-svg { max-width: 500px; width: 100%; height: auto; }

.framework-note { text-align: center; color: var(--text-light); font-size: 0.9rem; font-style: italic; }

/* --- News --- */
.news-section { padding: 80px 0; background: var(--bg-light); }

.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.news-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-4px); }

.news-image {
  height: 180px; background: #e0e6ed;
}

.news-body { padding: 20px; }
.news-date { font-size: 0.8rem; color: var(--text-light); }
.news-body h3 { font-size: 1.1rem; margin: 8px 0; color: var(--text); line-height: 1.5; }
.news-body p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }
.news-link { font-size: 0.9rem; font-weight: 600; }

/* --- Summit --- */
.summit-section { padding: 40px 0; }

.summit-banner {
  display: flex; align-items: center; gap: 48px;
  background: linear-gradient(135deg, #ff8c42, #e65100);
  border-radius: var(--radius); padding: 48px; color: white;
}
.summit-content { flex: 1; }
.summit-badge {
  display: inline-block; background: rgba(255,255,255,0.2); padding: 4px 16px;
  border-radius: 20px; font-size: 0.85rem; margin-bottom: 12px;
}
.summit-content h2 { font-size: 2rem; margin-bottom: 12px; }
.summit-content p { opacity: 0.9; margin-bottom: 24px; }
.summit-visual { position: relative; }
.summit-glow {
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.15); animation: pulse 2s infinite;
}
.summit-icon-large { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 3rem; }

@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* --- Gallery --- */
.gallery-section { padding: 80px 0; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.gallery-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.3s; background: white;
}
.gallery-card:hover { transform: translateY(-4px); }

.gallery-image { height: 180px; background: #e0e6ed; }
.gallery-info { padding: 16px; }
.gallery-info h4 { font-size: 1rem; margin: 8px 0 4px; }
.gallery-info p { font-size: 0.85rem; color: var(--text-light); }
.likes { color: #e74c3c; }

/* --- Competition Teaser --- */
.competition-teaser { padding: 80px 0; background: var(--bg-light); }

.competition-list { display: flex; flex-direction: column; gap: 12px; }

.competition-item {
  display: flex; align-items: center; gap: 20px; padding: 20px 24px;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.competition-item:hover { transform: translateX(4px); }

.comp-status {
  padding: 4px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.status-open { background: #fee2e2; color: #dc2626; }
.status-upcoming { background: #dbeafe; color: #1a5fb4; }

.comp-info h4 { font-size: 1.05rem; margin-bottom: 4px; }
.comp-info p { font-size: 0.85rem; color: var(--text-light); }

/* --- Honors --- */
.honors-section { padding: 80px 0; }

.honors-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px;
}

.honor-item {
  padding: 20px; text-align: center; background: var(--bg-light); border-radius: var(--radius);
  font-size: 0.95rem; transition: transform 0.2s;
}
.honor-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* --- Contact --- */
.contact-section { padding: 80px 0; background: var(--bg); }

.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 60px; max-width: 560px; margin: 0 auto;
}

.contact-detail {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--text-light);
}
.ci-icon { font-size: 1.2rem; }

.contact-form h3 { margin-bottom: 20px; }

.form-input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; margin-bottom: 12px;
  resize: vertical;
}
.form-input:focus { outline: none; border-color: var(--primary); }

/* --- Footer --- */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.8); padding: 48px 0 24px;
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 32px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 600; color: white; }

.footer-links h4 { color: white; margin-bottom: 16px; font-size: 0.95rem; }
.footer-links a { display: block; color: rgba(255,255,255,0.6); padding: 4px 0; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
  text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.5);
}

/* --- AI Assistant Button --- */
.ai-assistant-btn {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%; background: var(--primary);
  color: white; border: none; font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(26,95,180,0.4); transition: transform 0.2s, box-shadow 0.2s;
}
.ai-assistant-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(26,95,180,0.5); }
.ai-assistant-btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }
.ai-assistant-btn:disabled:hover { transform: none; }

/* --- Placeholder Image --- */
.placeholder-img {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0e6ed 0%, #f0f2f5 100%);
  position: relative; overflow: hidden;
}
.placeholder-img::after {
  content: attr(data-label); font-size: 0.8rem; color: #a0aab4;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal {
  background: white; border-radius: var(--radius); width: 420px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto; padding: 32px; position: relative;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  font-size: 1.2rem; cursor: pointer; color: var(--text-light); width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-light); }

.modal-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border); }

.modal-tab {
  flex: 1; padding: 12px; border: none; background: none; font-size: 1rem;
  font-weight: 600; color: var(--text-light); cursor: pointer; transition: all 0.2s;
  font-family: inherit; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.modal-form { display: none; }
.modal-form.active { display: block; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; color: var(--text); }

.form-hint { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-light); }
.form-hint a { color: var(--primary); font-weight: 600; }

.role-selector { margin-bottom: 16px; }
.role-cards { display: flex; gap: 8px; }
.role-card {
  flex: 1; padding: 10px 8px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); text-align: center; cursor: pointer;
  font-size: 0.85rem; transition: all 0.2s;
}
.role-card:hover, .role-card.selected { border-color: var(--primary); background: rgba(26,95,180,0.05); }

/* --- Responsive --- */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .assessment-banner { grid-template-columns: 1fr; text-align: center; padding: 36px 24px; }
  .assessment-banner-visual { display: none; }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .honors-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  :root { --nav-height: 56px; }

  .hero { min-height: 80vh; }
  .hero-title { font-size: 2rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 240px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px 8px; }
  .stat-number { font-size: 1.4rem; }

  .section-title { font-size: 1.5rem; }

  .leaderboard-table { font-size: 0.85rem; }
  .leaderboard-table th, .leaderboard-table td { padding: 8px 10px; }

  .courses-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .honors-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .about-cards { grid-template-columns: 1fr 1fr; }
  .pillar-card:nth-child(5) { grid-column: span 2; }

  .summit-banner { flex-direction: column; text-align: center; padding: 32px 20px; }

  .ai-assistant-btn { bottom: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.3rem; }
}

/* --- Utility: Scroll-reveal --- */
.reveal {
  opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========================================
   第1层：用户系统 & 管理后台
   ======================================== */

/* --- 表单消息 --- */
.form-message { display: none; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 12px; }
.msg-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }
.msg-success { background: #e8f8f0; color: #1e8449; border: 1px solid #b8e6cc; }

/* --- 导航栏用户徽章 --- */
.user-chip {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px; cursor: pointer;
  background: var(--bg-light); border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.user-chip:hover { box-shadow: var(--shadow); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
}
.user-name { font-size: 0.9rem; font-weight: 600; }
.user-role-badge {
  font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.role-student { background: #e3f2fd; color: #1565c0; }
.role-teacher { background: #e8f5e9; color: #2e7d32; }
.role-parent { background: #fff3e0; color: #e65100; }
.role-admin { background: #f3e5f5; color: #7b1fa2; }

.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  min-width: 160px; overflow: hidden; z-index: 1000;
}
.user-dropdown.show { display: block; }
.user-dropdown-item {
  display: block; padding: 10px 16px; font-size: 0.9rem; color: var(--text);
}
.user-dropdown-item:hover { background: var(--bg-light); }

/* --- 状态徽章 --- */
.status-badge { font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff8e1; color: #f57f17; }
.status-rejected { background: #fdecea; color: #c0392b; }

/* --- 管理后台 --- */
.admin-body { background: var(--bg-light); min-height: 100vh; }
.admin-main { padding: calc(var(--nav-height) + 32px) 0 64px; }

.admin-denied {
  text-align: center; padding: 80px 24px; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.admin-denied h2 { margin-bottom: 12px; }
.admin-denied p { color: var(--text-light); margin-bottom: 24px; }

.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.admin-stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  text-align: center; box-shadow: var(--shadow);
}
.as-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.as-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 0.95rem; font-weight: 600;
  color: var(--text-light); box-shadow: var(--shadow); transition: all 0.2s;
}
.admin-tab.active { background: var(--primary); color: #fff; }

.admin-panel { display: none; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.admin-panel.active { display: block; }

.admin-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.admin-panel-header h3 { font-size: 1.15rem; }

.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.form-input-sm { padding: 7px 12px; font-size: 0.88rem; width: auto; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th {
  text-align: left; padding: 10px 12px; background: var(--bg-light);
  font-weight: 600; white-space: nowrap;
}
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--border); }
.admin-table tr:hover td { background: #fafbfd; }
.td-empty { text-align: center; color: var(--text-light); padding: 32px !important; }
.td-profile { color: var(--text-light); font-size: 0.85rem; }
.td-actions { white-space: nowrap; }
.td-actions .btn { margin-right: 6px; }

.btn-xs { padding: 4px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-danger { background: #e74c3c; color: #fff; border: none; cursor: pointer; }
.btn-danger:hover { background: #c0392b; }

/* --- 批量导入 --- */
.import-guide {
  background: var(--bg-light); border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 20px; font-size: 0.9rem;
}
.import-guide ol { padding-left: 20px; }
.import-guide li { margin: 4px 0; }
.import-actions .form-input { margin-bottom: 12px; }
.import-actions textarea { font-family: Consolas, monospace; font-size: 0.85rem; }

.import-result { margin-top: 20px; }
.import-summary {
  background: #e8f8f0; border: 1px solid #b8e6cc; color: #1e8449;
  padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.import-error {
  background: #fdecea; border: 1px solid #f5c6c0; color: #c0392b;
  padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.import-detail { margin-top: 12px; font-size: 0.88rem; color: var(--text-light); }
.import-detail ul { padding-left: 20px; margin-top: 6px; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .admin-panel { padding: 16px; }
  .admin-panel-header { flex-direction: column; align-items: flex-start; }
  .user-name { display: none; }
}

/* ========================================
   第1层：用户系统 & 管理后台
   ======================================== */

/* --- 表单消息 --- */
.form-message { display: none; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 12px; }
.msg-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }
.msg-success { background: #e8f8f0; color: #1e8449; border: 1px solid #b8e6cc; }

/* --- 导航栏用户徽章 --- */
.user-chip {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px; cursor: pointer;
  background: var(--bg-light); border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.user-chip:hover { box-shadow: var(--shadow); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
}
.user-name { font-size: 0.9rem; font-weight: 600; }
.user-role-badge {
  font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.role-student { background: #e3f2fd; color: #1565c0; }
.role-teacher { background: #e8f5e9; color: #2e7d32; }
.role-parent { background: #fff3e0; color: #e65100; }
.role-admin { background: #f3e5f5; color: #7b1fa2; }

.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  min-width: 160px; overflow: hidden; z-index: 1000;
}
.user-dropdown.show { display: block; }
.user-dropdown-item {
  display: block; padding: 10px 16px; font-size: 0.9rem; color: var(--text);
}
.user-dropdown-item:hover { background: var(--bg-light); }

/* --- 状态徽章 --- */
.status-badge { font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff8e1; color: #f57f17; }
.status-rejected { background: #fdecea; color: #c0392b; }

/* --- 管理后台 --- */
.admin-body { background: var(--bg-light); min-height: 100vh; }
.admin-main { padding: calc(var(--nav-height) + 32px) 0 64px; }

.admin-denied {
  text-align: center; padding: 80px 24px; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.admin-denied h2 { margin-bottom: 12px; }
.admin-denied p { color: var(--text-light); margin-bottom: 24px; }

.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.admin-stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  text-align: center; box-shadow: var(--shadow);
}
.as-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.as-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 0.95rem; font-weight: 600;
  color: var(--text-light); box-shadow: var(--shadow); transition: all 0.2s;
}
.admin-tab.active { background: var(--primary); color: #fff; }

.admin-panel { display: none; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.admin-panel.active { display: block; }

.admin-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.admin-panel-header h3 { font-size: 1.15rem; }

.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.form-input-sm { padding: 7px 12px; font-size: 0.88rem; width: auto; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th {
  text-align: left; padding: 10px 12px; background: var(--bg-light);
  font-weight: 600; white-space: nowrap;
}
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--border); }
.admin-table tr:hover td { background: #fafbfd; }
.td-empty { text-align: center; color: var(--text-light); padding: 32px !important; }
.td-profile { color: var(--text-light); font-size: 0.85rem; }
.td-actions { white-space: nowrap; }
.td-actions .btn { margin-right: 6px; }

.btn-xs { padding: 4px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-danger { background: #e74c3c; color: #fff; border: none; cursor: pointer; }
.btn-danger:hover { background: #c0392b; }

/* --- 批量导入 --- */
.import-guide {
  background: var(--bg-light); border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 20px; font-size: 0.9rem;
}
.import-guide ol { padding-left: 20px; }
.import-guide li { margin: 4px 0; }
.import-actions .form-input { margin-bottom: 12px; }
.import-actions textarea { font-family: Consolas, monospace; font-size: 0.85rem; }

.import-result { margin-top: 20px; }
.import-summary {
  background: #e8f8f0; border: 1px solid #b8e6cc; color: #1e8449;
  padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.import-error {
  background: #fdecea; border: 1px solid #f5c6c0; color: #c0392b;
  padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.import-detail { margin-top: 12px; font-size: 0.88rem; color: var(--text-light); }
.import-detail ul { padding-left: 20px; margin-top: 6px; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .admin-panel { padding: 16px; }
  .admin-panel-header { flex-direction: column; align-items: flex-start; }
  .user-name { display: none; }
}

/* ========================================
   第2层：键盘竞速
   ======================================== */

/* --- 排行榜我的排名行 --- */
.my-rank-row {
  text-align: center; margin-top: 10px; padding: 10px 16px;
  background: #eaf3fd; border: 1px dashed var(--primary);
  border-radius: var(--radius-sm); color: var(--primary);
  font-weight: 600; font-size: 0.92rem;
}

/* --- 打字挑战 Modal --- */
.typing-overlay { z-index: 2000; }
.typing-modal {
  position: relative; background: #fff; border-radius: var(--radius);
  width: min(860px, 94vw); max-height: 92vh; overflow-y: auto;
  padding: 28px 32px; box-shadow: 0 12px 48px rgba(0,0,0,0.2);
}

.typing-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 2px solid var(--bg-light);
}
.typing-category {
  font-size: 1.2rem; font-weight: 700; color: var(--primary);
  background: #eaf3fd; padding: 6px 18px; border-radius: 999px;
}
.typing-stats { display: flex; gap: 24px; }
.typing-stat { text-align: center; }
.ts-label { display: block; font-size: 0.78rem; color: var(--text-light); }
.ts-value { display: block; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- 原文显示区 --- */
.typing-text-wrap {
  background: var(--bg-light); border-radius: var(--radius-sm);
  padding: 24px; max-height: 260px; overflow-y: auto; margin-bottom: 16px;
}
.typing-text {
  font-family: Consolas, "Courier New", "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 1.25rem; line-height: 2; letter-spacing: 0.5px;
  white-space: pre-wrap; word-break: break-all;
}
.typing-text span { transition: background 0.1s; }
.char-correct { color: #27ae60; }
.char-wrong { color: #e74c3c; background: rgba(231,76,60,0.18); border-radius: 3px; }
.char-current {
  color: var(--primary); border-bottom: 3px solid var(--primary);
  animation: cursorBlink 0.9s infinite;
}
@keyframes cursorBlink {
  0%, 100% { border-bottom-color: var(--primary); }
  50% { border-bottom-color: transparent; }
}

/* --- 输入区 --- */
.typing-input {
  width: 100%; padding: 14px 16px; font-size: 1.05rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  resize: none; height: 64px; font-family: inherit;
  transition: border-color 0.2s;
}
.typing-input:focus { outline: none; border-color: var(--primary); }

/* --- 底部进度 --- */
.typing-footer {
  display: flex; align-items: center; gap: 16px; margin-top: 16px;
}
.typing-progress-bar {
  flex: 1; height: 8px; background: var(--bg-light);
  border-radius: 999px; overflow: hidden;
}
.typing-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.2s;
}

/* --- 成绩面板 --- */
.typing-result { text-align: center; padding: 24px 0 8px; }
.result-stars {
  font-size: 2.4rem; color: var(--gold); letter-spacing: 6px; margin-bottom: 20px;
}
.result-grid {
  display: flex; justify-content: center; gap: 48px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.result-number { font-size: 2.6rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.result-number small { font-size: 1rem; font-weight: 600; margin-left: 4px; color: var(--text-light); }
.result-label { color: var(--text-light); font-size: 0.9rem; margin-top: 4px; }
.result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.submit-msg { min-height: 24px; font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.submit-msg.ok { color: #1e8449; }
.submit-msg.err { color: #c0392b; }

/* --- 前三名行动画 --- */
.rank-1 td { animation: rankFlash 2s ease-out; }
.rank-2 td { animation: rankFlash 2s ease-out; }
.rank-3 td { animation: rankFlash 2s ease-out; }
@keyframes rankFlash {
  0% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .typing-modal { padding: 20px 16px; }
  .typing-header { flex-direction: column; align-items: flex-start; }
  .typing-stats { gap: 16px; }
  .typing-text { font-size: 1.05rem; line-height: 1.9; }
  .result-grid { gap: 28px; }
  .result-number { font-size: 2rem; }
}


/* ========================================
   第3层：能力自测平台
   ======================================== */

.assess-body { background: var(--bg-light); min-height: 100vh; }
.assess-main { padding: calc(var(--nav-height) + 32px) 0 64px; }

.assess-card {
  background: #fff; border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow); margin-bottom: 24px;
}

/* --- 测评前 --- */
.intro-card { max-width: 640px; margin: 0 auto 24px; text-align: center; }
.intro-card h1 { font-size: 1.7rem; margin-bottom: 12px; }
.intro-desc { color: var(--text-light); margin-bottom: 24px; }
.intro-steps {
  display: flex; justify-content: center; gap: 20px; margin-bottom: 28px; flex-wrap: wrap;
}
.intro-step {
  background: var(--bg-light); border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 0.9rem; font-weight: 600;
}
.intro-step span { margin-right: 6px; }
.stage-select-group { max-width: 320px; margin: 0 auto 16px; text-align: left; }
.intro-note { font-size: 0.88rem; color: var(--text-light); margin-bottom: 20px; }
.assess-disclaimer { font-size: 0.82rem; color: var(--text-light); margin-top: 20px; }

.teacher-entry { max-width: 640px; margin: 0 auto; text-align: center; }
.teacher-entry p { color: var(--text-light); margin: 8px 0 16px; font-size: 0.92rem; }

/* --- 答题界面 --- */
.quiz-topbar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  background: #fff; padding: 14px 20px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.quiz-dim-badge {
  color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 999px;
  background: var(--primary); white-space: nowrap;
}
.quiz-progress-wrap { flex: 1; display: flex; align-items: center; gap: 12px; }
.quiz-progress-bar {
  flex: 1; height: 8px; background: var(--bg-light); border-radius: 999px; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px; transition: width 0.3s;
}
.quiz-progress-text { font-size: 0.88rem; color: var(--text-light); white-space: nowrap; font-variant-numeric: tabular-nums; }
.quiz-timer { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-light); }

.quiz-card { max-width: 760px; margin: 0 auto; }
.quiz-type-tag {
  display: inline-block; font-size: 0.78rem; color: var(--primary);
  background: #eaf3fd; padding: 3px 12px; border-radius: 999px; margin-bottom: 12px; font-weight: 600;
}
.quiz-title { font-size: 1.25rem; line-height: 1.6; margin-bottom: 24px; }

.quiz-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.quiz-option {
  text-align: left; padding: 14px 18px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; font-size: 1rem;
  cursor: pointer; transition: all 0.15s;
}
.quiz-option:hover { border-color: var(--primary-light); }
.quiz-option.selected {
  border-color: var(--primary); background: #eaf3fd; font-weight: 600;
}
.quiz-option.multi.selected { border-color: var(--accent); background: #fff4ec; }
.quiz-multi-hint { font-size: 0.82rem; color: var(--text-light); }

.quiz-nav { display: flex; gap: 12px; justify-content: space-between; }
.quiz-answered-hint { margin-top: 14px; font-size: 0.85rem; color: var(--text-light); text-align: right; }

/* --- 排序题 --- */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; cursor: grab; transition: border-color 0.15s;
}
.order-item.drag-over { border-color: var(--primary); background: #f2f7fd; }
.order-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; flex-shrink: 0;
}
.order-text { flex: 1; }
.order-btns button {
  border: 1px solid var(--border); background: #fff; border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer; margin-left: 4px;
}
.order-btns button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.order-btns button:disabled { opacity: 0.3; cursor: default; }

/* --- 配对题 --- */
.match-row { display: flex; align-items: center; gap: 14px; }
.match-left {
  min-width: 140px; font-weight: 600; background: var(--bg-light);
  padding: 10px 14px; border-radius: var(--radius-sm);
}
.match-select { flex: 1; }

/* --- 报告页 --- */
.report-card { max-width: 860px; margin: 0 auto; }
.report-stage { color: var(--text-light); font-size: 0.9rem; margin-bottom: 8px; }

.radar-wrap { text-align: center; margin: 20px 0 28px; }
.radar-wrap canvas { max-width: 100%; height: auto; }
.radar-legend { display: flex; justify-content: center; gap: 24px; margin-top: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-light); }
.legend-line { display: inline-block; width: 24px; height: 0; border-top: 3px solid; }
.legend-you { border-color: var(--primary); }
.legend-avg { border-color: rgba(99,110,114,0.6); border-top-style: dashed; }

.dim-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.dim-card {
  background: var(--bg-light); border-radius: var(--radius); padding: 20px;
}
.dim-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dim-icon {
  width: 36px; height: 36px; border-radius: 10px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.dim-score { font-size: 2rem; font-weight: 800; color: var(--text); }
.dim-score small { font-size: 0.9rem; color: var(--text-light); font-weight: 400; }
.dim-level {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; margin: 8px 0;
}
.level-strong { background: #e8f5e9; color: #2e7d32; }
.level-mid { background: #e3f2fd; color: #1565c0; }
.level-weak { background: #fff3e0; color: #e65100; }
.dim-advice { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

.overall-box {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius); padding: 24px 32px; color: #fff; margin-bottom: 28px;
}
.overall-score { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.overall-score small { font-size: 1.1rem; font-weight: 400; margin-left: 4px; }
.overall-level { font-weight: 700; margin-bottom: 6px; }
.overall-box p { font-size: 0.92rem; opacity: 0.92; }

.history-canvas { max-width: 100%; height: auto; background: var(--bg-light); border-radius: var(--radius-sm); }
.improve-note { margin-top: 10px; font-weight: 600; color: var(--primary); }
.report-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* --- 教师面板 --- */
.teacher-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.teacher-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.class-summary { color: var(--text-light); margin-bottom: 18px; font-size: 0.95rem; }

.heatmap-table .heat-cell { font-weight: 700; text-align: center; }
.heat-1 { background: #fdecea; color: #c0392b; }
.heat-2 { background: #fff8e1; color: #f57f17; }
.heat-3 { background: #e8f5e9; color: #2e7d32; }
.heat-4 { background: #c8e6c9; color: #1b5e20; }

.weak-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.weak-dim-btn {
  padding: 7px 18px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; cursor: pointer; font-weight: 600; font-size: 0.88rem;
}
.weak-dim-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.weak-list { padding-left: 20px; line-height: 2; }

/* --- 题目编辑 Modal --- */
.q-modal { max-width: 640px; width: 94vw; max-height: 90vh; overflow-y: auto; }
.q-modal h3 { margin-bottom: 18px; }
.q-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.q-option-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.q-option-row .form-input { flex: 1; margin-bottom: 0; }
.q-radio { display: block; padding: 10px 0; font-size: 1rem; cursor: pointer; }
.q-radio input { margin-right: 8px; }
.q-title-cell { max-width: 320px; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .assess-card { padding: 22px 18px; }
  .quiz-topbar { flex-wrap: wrap; }
  .quiz-progress-wrap { order: 3; flex-basis: 100%; }
  .overall-box { flex-direction: column; text-align: center; gap: 12px; }
  .q-form-row { grid-template-columns: 1fr; }
  .match-left { min-width: 90px; }
}


/* ========================================
   第4层：作品展厅 / 微挑战 / 赛事资源
   ======================================== */

/* --- 通用 --- */
.tag-gray { background: #eceff3; color: #636e72; }
.td-empty { text-align: center; color: var(--text-light); padding: 32px !important; }

/* --- 作品展厅 --- */
.gallery-filter-bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; margin-bottom: 24px;
  background: #fff; padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.gallery-cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-filters-right { display: flex; gap: 10px; }

.gallery-masonry {
  columns: 3; column-gap: 20px;
}
@media (max-width: 1024px) { .gallery-masonry { columns: 2; } }
@media (max-width: 640px) { .gallery-masonry { columns: 1; } }

.work-card {
  break-inside: avoid; margin-bottom: 20px; background: #fff;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
.work-cover { height: 180px; overflow: hidden; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.work-card:hover .work-cover img { transform: scale(1.05); }
.work-cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 3rem; font-weight: 800;
}
.detail-placeholder { height: 220px; border-radius: var(--radius-sm); }
.work-info { padding: 16px 18px; }
.work-info h4 { margin-bottom: 8px; font-size: 1.05rem; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.work-meta {
  display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-light);
}

/* --- 作品详情 --- */
.work-detail-modal { max-width: 720px; width: 94vw; max-height: 90vh; overflow-y: auto; }
.detail-carousel { position: relative; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 20px; }
.carousel-img { display: none; width: 100%; max-height: 380px; object-fit: contain; background: #000; }
.carousel-img.active { display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.45); color: #fff; font-size: 1.4rem; cursor: pointer; z-index: 2;
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.detail-header { margin-bottom: 18px; }
.detail-header h2 { margin-bottom: 10px; }
.work-author { font-size: 0.88rem; color: var(--text-light); }
.detail-section { margin-bottom: 18px; }
.detail-section h4 { margin-bottom: 8px; color: var(--primary); }
.detail-section p { color: var(--text); line-height: 1.8; white-space: pre-wrap; }
.detail-actions { margin: 16px 0; }

.comment-input-row { display: flex; gap: 10px; margin-bottom: 18px; }
.comment-input-row .form-input { flex: 1; margin-bottom: 0; }
.comment-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.comment-head span { font-size: 0.78rem; color: var(--text-light); }
.comment-body p { font-size: 0.92rem; }

/* --- 首页挑战卡片 --- */
.challenge-teaser-section { padding: 20px 0; }
.challenge-teaser {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius); padding: 28px 36px; color: #fff;
  text-decoration: none; transition: transform 0.2s;
}
.challenge-teaser:hover { transform: translateY(-3px); }
.challenge-teaser h3 { font-size: 1.35rem; margin: 10px 0 8px; color: #fff; }
.challenge-teaser p { opacity: 0.9; font-size: 0.92rem; }
.ct-badge {
  background: rgba(255,255,255,0.18); padding: 4px 14px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
}
.ct-right { text-align: right; flex-shrink: 0; }
.ct-countdown { font-size: 1.1rem; margin-bottom: 8px; }
.ct-countdown strong { font-size: 1.8rem; font-weight: 800; }
.ct-count { font-size: 0.88rem; opacity: 0.9; }
.challenge-teaser.empty { flex-direction: column; text-align: center; gap: 8px; }
.challenge-teaser.empty a { color: #fff; text-decoration: underline; }

/* --- 挑战页 --- */
.challenge-hero h1 { font-size: 1.6rem; margin: 12px 0; }
.challenge-head { display: flex; gap: 12px; align-items: center; }
.challenge-week { color: var(--text-light); font-weight: 600; }
.challenge-status { padding: 5px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.challenge-status.status-open { background: #fdecea; color: #c0392b; }
.challenge-status.status-voting { background: #fff8e1; color: #f57f17; }
.challenge-status.status-finished { background: #eceff3; color: #636e72; }
.challenge-meta { display: flex; gap: 8px; margin-bottom: 16px; }
.challenge-desc { line-height: 1.9; color: var(--text); margin-bottom: 14px; }
.challenge-refs { font-size: 0.9rem; margin-bottom: 18px; }
.challenge-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; padding-top: 18px; border-top: 1px solid var(--border);
}
.countdown-box .cd-label { display: block; font-size: 0.82rem; color: var(--text-light); }
.countdown-box .cd-value { font-size: 1.5rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.challenge-actions { display: flex; align-items: center; gap: 16px; }
.sub-count { color: var(--text-light); font-size: 0.9rem; }

.vote-hint { color: var(--text-light); margin-bottom: 16px; }
.submissions-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.submission-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); position: relative;
}
.submission-card.winner { border: 2px solid var(--gold); box-shadow: 0 4px 20px rgba(243,156,18,0.25); }
.winner-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--gold); color: #fff; font-size: 0.8rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.sub-cover { height: 150px; }
.sub-cover-img { width: 100%; height: 100%; object-fit: cover; }
.sub-cover-placeholder {
  width: 100%; height: 100%; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 2.4rem; font-weight: 800;
}
.sub-body { padding: 16px 18px; }
.sub-author { font-size: 0.85rem; color: var(--text-light); margin: 4px 0 8px; }
.sub-note { font-size: 0.88rem; color: var(--text); margin-bottom: 8px; }
.sub-code { margin: 8px 0; font-size: 0.85rem; }
.sub-code summary { cursor: pointer; color: var(--primary); }
.sub-code pre {
  background: var(--bg-dark); color: #a9e5ff; padding: 12px; border-radius: 8px;
  overflow-x: auto; font-size: 0.8rem; margin-top: 8px; white-space: pre-wrap;
}
.sub-link { font-size: 0.85rem; display: inline-block; margin-bottom: 8px; }
.sub-footer { margin-top: 10px; }
.vote-count { color: var(--text-light); font-weight: 600; }
.code-textarea { font-family: Consolas, monospace; font-size: 0.85rem; }

.history-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-main { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.history-count { font-size: 0.82rem; color: var(--text-light); }
.history-winners { font-size: 0.85rem; color: var(--text-light); margin-top: 6px; }

/* --- 赛事时间线 --- */
.comp-timeline { display: flex; flex-direction: column; gap: 16px; }
.comp-card {
  background: #fff; border-radius: var(--radius); padding: 24px 28px;
  box-shadow: var(--shadow); border-left: 4px solid var(--primary);
}
.comp-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.comp-card-head h3 { font-size: 1.2rem; }
.comp-status-lg { padding: 4px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.comp-open { background: #fdecea; color: #c0392b; }
.comp-soon { background: #e3f2fd; color: #1565c0; }
.comp-done { background: #eceff3; color: #636e72; }
.comp-organizer { font-size: 0.88rem; color: var(--text-light); margin-bottom: 8px; }
.comp-dates { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.92rem; margin-bottom: 10px; }
.comp-intro { color: var(--text-light); font-size: 0.92rem; margin: 10px 0; }
.comp-actions { display: flex; gap: 10px; margin-top: 12px; }
.comp-resources {
  margin-top: 14px; background: var(--bg-light); border-radius: var(--radius-sm); padding: 16px 20px;
}
.resource-item { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.resource-item:last-child { border-bottom: none; }
.resource-item p { font-size: 0.9rem; color: var(--text-light); margin-top: 4px; }

/* --- 荣誉墙 --- */
.honors-timeline { max-width: 720px; margin: 24px auto 0; }
.honor-row {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.honor-row:last-child { border-bottom: none; }
.honor-year {
  font-weight: 800; color: var(--primary); font-size: 1.1rem;
  min-width: 56px; text-align: center;
}
.honor-icon { font-size: 1.6rem; }
.honor-body strong { display: block; margin-bottom: 4px; }
.honor-level {
  display: inline-block; background: #fff8e1; color: #b8860b;
  font-size: 0.8rem; font-weight: 700; padding: 2px 12px; border-radius: 999px; margin-bottom: 6px;
}
.honor-body p { font-size: 0.88rem; color: var(--text-light); }

/* --- 管理后台补充 --- */
.challenge-admin-form {
  background: var(--bg-light); border-radius: var(--radius-sm);
  padding: 20px; margin-bottom: 20px;
}
.q-form-4 { grid-template-columns: repeat(4, 1fr); }
.honor-admin-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center;
}
.honor-admin-row .form-input { flex: 1; min-width: 100px; }

@media (max-width: 768px) {
  .challenge-teaser { flex-direction: column; text-align: center; }
  .ct-right { text-align: center; }
  .challenge-bottom { flex-direction: column; align-items: flex-start; }
  .q-form-4 { grid-template-columns: 1fr 1fr; }
  .comp-dates { flex-direction: column; gap: 4px; }
}

/* ========================================
   第5层：AI助手 / 数据大屏 / 教研空间
   ======================================== */

/* --- 首页迷你大屏头部 --- */
.mini-dash-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.mini-dash-title { font-weight: 700; color: var(--text-light); font-size: 0.95rem; }
.mini-dash-link { font-size: 0.88rem; font-weight: 600; }

/* --- AI助手 --- */
.ai-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 3000;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--primary); font-size: 1.6rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(26,95,180,0.4);
  transition: transform 0.2s;
}
.ai-fab:hover { transform: scale(1.08); }
.ai-dot {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #e74c3c; border: 2px solid #fff;
}
.ai-chat {
  position: fixed; right: 24px; bottom: 92px; z-index: 3000;
  width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: 70vh;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: none; flex-direction: column; overflow: hidden;
}
.ai-chat.open { display: flex; animation: chatSlideUp 0.25s ease-out; }
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-chat-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--primary); color: #fff; padding: 12px 16px; font-weight: 700;
}
.ai-close { background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; }
.ai-messages {
  flex: 1; overflow-y: auto; padding: 14px; background: var(--bg-light);
  display: flex; flex-direction: column; gap: 10px;
}
.ai-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg-user { flex-direction: row-reverse; }
.ai-avatar { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.ai-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap;
}
.ai-msg-bot .ai-bubble { background: #fff; border: 1px solid var(--border); border-top-left-radius: 4px; }
.ai-msg-user .ai-bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.ai-suggestions {
  display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap;
  background: var(--bg-light); border-top: 1px solid var(--border);
}
.ai-sug-btn {
  font-size: 0.78rem; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--primary-light); background: #fff; color: var(--primary);
  cursor: pointer;
}
.ai-sug-btn:hover { background: #eaf3fd; }
.ai-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.ai-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 0.9rem; outline: none;
}
.ai-input-row input:focus { border-color: var(--primary); }
.ai-input-row button {
  border: none; background: var(--primary); color: #fff;
  border-radius: 999px; padding: 8px 18px; cursor: pointer; font-weight: 600;
}

/* --- 数据大屏 --- */
.dashboard-body {
  background: #0d1b2a; color: #e8f0f8; min-height: 100vh;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dash-header h1 { font-size: 1.3rem; letter-spacing: 2px; }
.dash-back { color: #a8c5e0; font-size: 0.9rem; }
.dash-actions { display: flex; align-items: center; gap: 16px; }
.dash-clock { font-variant-numeric: tabular-nums; color: #a8c5e0; font-size: 0.9rem; }
.dash-btn {
  background: rgba(0,210,255,0.15); color: #00d2ff; border: 1px solid rgba(0,210,255,0.4);
  padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 0.88rem;
}
.dash-btn:hover { background: rgba(0,210,255,0.28); }

.dash-ticker {
  overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03); padding: 10px 0;
}
.ticker-track {
  display: inline-flex; gap: 48px; white-space: nowrap;
  animation: tickerScroll linear infinite;
  padding-left: 100%;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item { color: #a8c5e0; font-size: 0.9rem; }

.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px;
  padding: 20px 28px;
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-col { display: flex; flex-direction: column; gap: 18px; }
.dash-panel {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 18px 20px;
}
.dash-panel h3 { font-size: 0.98rem; margin-bottom: 14px; color: #cfe3f5; }
.dash-panel canvas { width: 100%; height: auto; }
.chart-legend {
  display: flex; gap: 18px; justify-content: center; margin-top: 10px;
  font-size: 0.82rem; color: #a8c5e0;
}
.chart-legend i {
  display: inline-block; width: 12px; height: 4px; margin-right: 6px;
  border-radius: 2px; vertical-align: middle;
}

.activity-list { list-style: none; max-height: 240px; overflow-y: auto; }
.activity-list li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.86rem;
}
.act-msg { flex: 1; color: #cfe3f5; }
.act-time { color: #5a7a9a; font-size: 0.78rem; white-space: nowrap; }
.act-empty { color: #5a7a9a; justify-content: center; }

.dash-heat-wrap { padding: 0 28px 28px; }
.dash-heat-wrap h3 { font-size: 0.98rem; margin-bottom: 14px; color: #cfe3f5; }
.dash-heat-table { width: 100%; border-collapse: collapse; text-align: center; }
.dash-heat-table th {
  padding: 10px; background: rgba(255,255,255,0.06);
  font-size: 0.85rem; color: #a8c5e0; font-weight: 600;
}
.dash-heat-table td {
  padding: 12px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,0.06); font-variant-numeric: tabular-nums;
}

/* --- 教研空间 --- */
.post-row { cursor: pointer; }
.post-detail h2 { margin: 16px 0 10px; }
.post-meta { color: var(--text-light); font-size: 0.88rem; margin-bottom: 18px; }
.post-content { line-height: 1.9; margin-bottom: 24px; }
.reply-item { padding: 12px 0; border-top: 1px solid var(--border); }
.reply-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.reply-head span { font-size: 0.8rem; color: var(--text-light); }
.reply-content { font-size: 0.92rem; line-height: 1.7; }
.reply-input-row { display: flex; gap: 10px; margin-top: 16px; align-items: flex-end; }
.reply-input-row textarea { flex: 1; }

.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.case-card {
  background: var(--bg-light); border-radius: var(--radius); padding: 22px;
  border-top: 3px solid var(--primary);
}
.case-head h4 { margin-bottom: 8px; font-size: 1.05rem; }
.case-desc { font-size: 0.92rem; line-height: 1.7; margin: 10px 0; }
.case-block {
  background: #fff; border-radius: var(--radius-sm); padding: 12px 16px;
  margin: 10px 0; font-size: 0.88rem;
}
.case-block p { color: var(--text-light); margin-top: 4px; line-height: 1.7; }
.case-footer { font-size: 0.82rem; color: var(--text-light); margin-top: 12px; }

@media (max-width: 768px) {
  .ai-chat { right: 8px; bottom: 76px; }
  .dash-grid { padding: 14px; }
  .cases-grid { grid-template-columns: 1fr; }
}

/* ========================================
   第6层：优化打磨
   ======================================== */

/* --- Toast --- */
.toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 10px 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15); font-size: 0.92rem; font-weight: 600;
  opacity: 0; transform: translateY(-16px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border: 1px solid #b8e6cc; color: #1e8449; }
.toast-error { border: 1px solid #f5c6c0; color: #c0392b; }
.toast-info { border: 1px solid #bdd7f0; color: #1565c0; }

/* --- 404页 --- */
.notfound-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 24px; background: var(--bg-light);
}
.notfound-code {
  font-size: 6rem; font-weight: 800; color: var(--primary);
  line-height: 1; letter-spacing: 8px;
}
.notfound-icon { font-size: 3rem; margin: 12px 0; }
.notfound-wrap h1 { margin-bottom: 10px; }
.notfound-wrap p { color: var(--text-light); margin-bottom: 28px; }
.notfound-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* --- 移动端底部标签栏 --- */
.mobile-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2500;
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.mtab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 6px; font-size: 0.72rem; color: var(--text-light);
  text-decoration: none; min-height: 44px; justify-content: center; gap: 2px;
}
.mtab span { font-size: 1.2rem; }
.mtab:active { color: var(--primary); }

@media (max-width: 767px) {
  .mobile-tabbar { display: flex; }
  body.has-mobile-tabbar { padding-bottom: 62px; }
  body.has-mobile-tabbar .ai-fab { bottom: 76px; }
  body.has-mobile-tabbar .ai-chat { bottom: 140px; }

  /* Hero高度调整 */
  .hero { min-height: 60vh !important; }

  /* Modal全屏化 */
  .modal-overlay .modal,
  .typing-modal,
  .q-modal,
  .work-detail-modal {
    width: 100vw !important; max-width: 100vw !important;
    min-height: 100vh; max-height: 100vh !important;
    border-radius: 0 !important; margin: 0 !important;
  }

  /* 管理页签横向滚动 */
  .admin-tabs {
    flex-wrap: nowrap !important; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 6px;
  }
  .admin-tab { white-space: nowrap; flex-shrink: 0; }

  /* 卡片间距缩小、字体下限14px */
  body { font-size: 14px; }
  .assess-card { padding: 18px 14px; }

  /* 触摸区域 */
  .btn, .lb-tab, .weak-dim-btn { min-height: 44px; }

  /* 打字Modal全屏适配（避开移动键盘） */
  .typing-modal { overflow-y: auto; }
  .typing-text-wrap { max-height: 32vh; }
}

/* --- 动画性能提示 --- */
.hero-content, .reveal, .work-card, .gallery-card { will-change: transform, opacity; }
.reveal.visible { will-change: auto; }
