:root {
  --bg-color: #FFFDF9;
  --card-bg: #FFFFFF;
  --primary: #FF7B90;
  --primary-hover: #FF5E78;
  --primary-light: #FFEBF0;
  --secondary: #FFB347;
  --secondary-light: #FFF4E5;
  --math-color: #10B981;
  --math-bg: #ECFDF5;
  --math-border: #A7F3D0;
  --english-color: #F43F5E;
  --english-bg: #FFF1F2;
  --english-border: #FECDD3;
  --art-color: #8B5CF6;
  --art-bg: #F5F3FF;
  --art-border: #DDD6FE;
  --class-color: #EC4899;
  --class-bg: #FDF2F8;
  --class-border: #FBCFE8;
  --service-color: #0284C7;
  --service-bg: #F0F9FF;
  --service-border: #BAE6FD;
  --free-color: #94A3B8;
  --free-bg: #F8FAFC;
  --free-border: #E2E8F0;
  --text-main: #1E293B;
  --text-sub: #475569;
  --text-muted: #94A3B8;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --radius: 20px;
}

[data-theme="macaron"] {
  --primary: #6366F1;
  --primary-light: #EEF2FF;
  --math-color: #059669;
  --math-bg: #ECFDF5;
  --english-color: #EA580C;
  --english-bg: #FFF7ED;
  --art-color: #7C3AED;
  --art-bg: #F5F3FF;
}

[data-theme="forest"] {
  --primary: #059669;
  --primary-light: #ECFDF5;
  --math-color: #0D9488;
  --math-bg: #F0FDFA;
  --english-color: #D97706;
  --english-bg: #FFFBEB;
  --art-color: #4F46E5;
  --art-bg: #EEF2FF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(#FFE4E6 1.5px, transparent 1.5px),
    radial-gradient(#E0F2FE 1.5px, var(--bg-color) 1.5px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 */
.navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 2px dashed #FECDD3;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.brand-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #FFD1DC, #FFE4E6);
  border: 2px solid #FF8E9E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(255, 142, 158, 0.25);
}

.brand-text h2 {
  font-size: 19px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text p {
  font-size: 12px;
  color: #64748B;
  margin-top: 1px;
}

.nav-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
}

.nav-tab {
  padding: 8px 18px;
  border-radius: 50px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--primary);
}

.nav-tab.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #FF6B8B, #FF8E53);
  color: white;
}

.btn-secondary {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #E2E8F0;
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid #CBD5E1;
  color: #475569;
}

/* 主内容容器 */
.main-container {
  max-width: 1320px;
  width: 100%;
  margin: 20px auto;
  padding: 0 20px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* 纸张卡片 */
.paper-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  border: 3px solid #FFE4E6;
  position: relative;
  margin-bottom: 24px;
}

.washi-tape-left {
  position: absolute;
  top: -10px;
  left: 36px;
  width: 110px;
  height: 26px;
  background: rgba(254, 240, 138, 0.8);
  transform: rotate(-2deg);
  border-left: 2px dashed #FFF;
  border-right: 2px dashed #FFF;
  z-index: 5;
}

.washi-tape-right {
  position: absolute;
  top: -10px;
  right: 36px;
  width: 110px;
  height: 26px;
  background: rgba(187, 247, 208, 0.8);
  transform: rotate(3deg);
  border-left: 2px dashed #FFF;
  border-right: 2px dashed #FFF;
  z-index: 5;
}

/* 实时时间条 */
.realtime-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #FFF1F2 0%, #F0FDF4 50%, #F0F9FF 100%);
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 18px;
  border: 1.5px solid #FECDD3;
  font-size: 13.5px;
}

/* ================================================= */
/* 课表表格与高颜值星期表头 (精美渐变、圆角卡片化、灵动作态) */
/* ================================================= */
.timetable-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px 8px;
  table-layout: fixed;
}

.timetable-grid th {
  padding: 12px 8px 10px 8px;
  border-radius: 14px;
  text-align: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.timetable-grid th:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.timetable-grid th.time-header {
  width: 125px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  color: #334155;
  border: 1.5px solid #CBD5E1;
}
.timetable-grid th.time-header .day-main { color: #1E293B; }
.timetable-grid th.time-header .day-en { color: #64748B; }
.timetable-grid th.time-header .sub { background: #E2E8F0; color: #475569; }

/* 星期一: 晨曦暖桃珊瑚粉 */
.timetable-grid th.day-mon {
  background: linear-gradient(145deg, #FFF1F2 0%, #FFE4E6 100%);
  border: 1.5px solid #FECDD3;
}
.timetable-grid th.day-mon .day-main { color: #BE123C; }
.timetable-grid th.day-mon .day-en { color: #FB7185; }
.timetable-grid th.day-mon .sub { background: rgba(255, 255, 255, 0.85); color: #BE123C; border: 1px solid #FECDD3; }

/* 星期二: 暖阳琥珀金 */
.timetable-grid th.day-tue {
  background: linear-gradient(145deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #FDE68A;
}
.timetable-grid th.day-tue .day-main { color: #B45309; }
.timetable-grid th.day-tue .day-en { color: #D97706; }
.timetable-grid th.day-tue .sub { background: rgba(255, 255, 255, 0.85); color: #B45309; border: 1px solid #FDE68A; }

/* 星期三: 薄荷清幽翠绿 */
.timetable-grid th.day-wed {
  background: linear-gradient(145deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #A7F3D0;
}
.timetable-grid th.day-wed .day-main { color: #047857; }
.timetable-grid th.day-wed .day-en { color: #059669; }
.timetable-grid th.day-wed .sub { background: rgba(255, 255, 255, 0.85); color: #047857; border: 1px solid #A7F3D0; }

/* 星期四: 晴空天际蔚蓝 */
.timetable-grid th.day-thu {
  background: linear-gradient(145deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1.5px solid #BAE6FD;
}
.timetable-grid th.day-thu .day-main { color: #0369A1; }
.timetable-grid th.day-thu .day-en { color: #0284C7; }
.timetable-grid th.day-thu .sub { background: rgba(255, 255, 255, 0.85); color: #0369A1; border: 1px solid #BAE6FD; }

/* 星期五: 梦幻薰衣草紫 */
.timetable-grid th.day-fri {
  background: linear-gradient(145deg, #FAF5FF 0%, #F3E8FF 100%);
  border: 1.5px solid #E9D5FF;
}
.timetable-grid th.day-fri .day-main { color: #7E22CE; }
.timetable-grid th.day-fri .day-en { color: #9333EA; }
.timetable-grid th.day-fri .sub { background: rgba(255, 255, 255, 0.85); color: #7E22CE; border: 1px solid #E9D5FF; }

.day-main {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.day-en {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

.timetable-grid th .sub {
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  padding: 1.5px 8px;
  border-radius: 12px;
  margin-top: 5px;
}

/* 左侧节次与时间单元格 (立体药丸卡片) */
.time-slot-cell {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  text-align: center;
  padding: 8px 6px;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.time-slot-cell .slot-title {
  font-weight: 800;
  font-size: 14px;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.time-slot-cell .slot-hours {
  font-size: 11px;
  color: #0284C7;
  background: #E0F2FE;
  padding: 2px 7px;
  border-radius: 8px;
  margin-top: 4px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  display: inline-block;
}

.course-card {
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  position: relative;
}

.course-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card-math {
  background: linear-gradient(145deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #A7F3D0;
  border-left: 4px solid #059669;
}
.card-math .c-badge { background: #059669; color: #FFF; box-shadow: 0 2px 6px rgba(5,150,105,0.25); }
.card-math .c-title { color: #065F46; }

.card-english {
  background: linear-gradient(145deg, #FFF1F2 0%, #FFE4E6 100%);
  border: 1.5px solid #FECDD3;
  border-left: 4px solid #E11D48;
}
.card-english .c-badge { background: #E11D48; color: #FFF; box-shadow: 0 2px 6px rgba(225,29,72,0.25); }
.card-english .c-title { color: #9F1239; }

.card-art {
  background: var(--art-bg);
  border: 2px solid var(--art-border);
}
.card-art .c-badge { background: var(--art-color); color: #FFF; }
.card-art .c-title { color: #5B21B6; }

.card-reading {
  background: #FFFBEB;
  border: 2px solid #FCD34D;
}
.card-reading .c-badge { background: #D97706; color: #FFF; }
.card-reading .c-title { color: #92400E; }

.card-chinese {
  background: #FFF7ED;
  border: 2px solid #FFEDD5;
}
.card-chinese .c-badge { background: #EA580C; color: #FFF; }
.card-chinese .c-title { color: #9A3412; }

.card-class {
  background: var(--class-bg);
  border: 2px solid var(--class-border);
}
.card-class .c-badge { background: var(--class-color); color: #FFF; }
.card-class .c-title { color: #831843; }

.card-service {
  background: var(--service-bg);
  border: 2px dashed var(--service-border);
}
.card-service .c-badge { background: var(--service-color); color: #FFF; }
.card-service .c-title { color: #075985; }

.card-free {
  background: var(--free-bg);
  border: 2px dashed var(--free-border);
  opacity: 0.8;
}
.card-free .c-title { color: #94A3B8; font-size: 13px; font-weight: normal; }
.card-free .c-loc { color: #CBD5E1; }

.c-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.c-title {
  font-size: 15.5px;
  font-weight: 800;
}

.c-loc {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
}

.rest-row td {
  padding: 3px 0;
}

.rest-bar {
  background: #FEF3C7;
  border: 1.5px dashed #FCD34D;
  border-radius: 10px;
  padding: 5px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}

/* 筛选工具栏 */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.search-box {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #CBD5E1;
  font-size: 13px;
  outline: none;
  width: 220px;
  transition: border 0.2s;
}

.search-box:focus {
  border-color: var(--primary);
}

/* 卡片网格列表 */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.item-card {
  background: #FFFFFF;
  border: 2px solid #F1F5F9;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
  border-color: #FED7AA;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.tag-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.tag-math { background: #ECFDF5; color: #059669; }
.tag-english { background: #FFF1F2; color: #E11D48; }
.tag-art { background: #F5F3FF; color: #7C3AED; }
.tag-type { background: #EFF6FF; color: #2563EB; }
.tag-diff { background: #FEF3C7; color: #D97706; }

.item-title {
  font-size: 16px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 6px;
  line-height: 1.4;
}

.item-snippet {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 38px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #E2E8F0;
  padding-top: 10px;
  margin-top: 8px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.btn-card-action {
  height: 28px;
  line-height: 26px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-card-action.btn-secondary {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
}
.btn-card-action.btn-secondary:hover {
  background: #E2E8F0;
}

.btn-card-action.btn-outline {
  background: #FFFFFF;
  color: #475569;
  border-color: #E2E8F0;
}
.btn-card-action.btn-outline:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.btn-card-action.btn-danger-action {
  color: #EF4444;
  border-color: #FECDD3;
}
.btn-card-action.btn-danger-action:hover {
  background: #FFF1F2;
  border-color: #FDA4AF;
}

.btn-sm {
  height: 28px;
  line-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 3px solid #FFE4E6;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 2px dashed #FECDD3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFF1F2;
  border-radius: 17px 17px 0 0;
}

.modal-header h3 {
  font-size: 18px;
  color: #9F1239;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #94A3B8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #FEE2E2;
  color: #EF4444;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1.5px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #FAFAFA;
  border-radius: 0 0 17px 17px;
}

/* 表单控件 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* 习题试卷组卷浮动栏 */
.paper-cart-bar {
  position: fixed;
  bottom: 24px;
  right: 32px;
  background: #1E293B;
  color: white;
  border-radius: 50px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 90;
  font-size: 14px;
}

.cart-count {
  background: #FF6B8B;
  color: white;
  font-weight: bold;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
}

/* Markdown 渲染排版与高亮样式 */
.md-rendered {
  line-height: 1.8;
  color: #334155;
  font-size: 14.5px;
}

.md-rendered strong, strong {
  font-weight: 700 !important;
  color: #1E293B !important;
  background: #FEF3C7;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  margin: 0 1px;
}

.md-rendered em {
  color: #D97706;
  font-style: italic;
}

.md-rendered h1, .md-h1 {
  font-size: 20px;
  color: #0F172A;
  font-weight: 800;
  border-bottom: 2px solid #FDA4AF;
  padding-bottom: 8px;
  margin: 18px 0 12px 0;
}

.md-rendered h2, .md-h2 {
  font-size: 16.5px;
  color: #E11D48;
  font-weight: 700;
  border-left: 4px solid #FF6B8B;
  padding-left: 10px;
  margin: 18px 0 10px 0;
}

.md-rendered h3, .md-h3 {
  font-size: 15px;
  color: #0284C7;
  font-weight: 700;
  margin: 14px 0 8px 0;
}

.md-rendered p, .md-p {
  margin: 6px 0;
  line-height: 1.75;
}

.md-rendered ul, .md-ul {
  padding-left: 22px;
  margin: 8px 0;
}

.md-rendered ol, .md-ol {
  padding-left: 24px;
  margin: 8px 0;
}

.md-rendered li, .md-li-bullet, .md-li-num {
  margin-bottom: 4px;
}

.md-rendered blockquote, .md-quote {
  background: #FFF1F2;
  border-left: 4px solid #F43F5E;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
  color: #881337;
  font-size: 14px;
}

.md-rendered .inline-code {
  background: #F1F5F9;
  color: #E11D48;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13.5px;
  border: 1px solid #E2E8F0;
}

.md-rendered pre.code-block {
  background: #0F172A;
  color: #F8FAFC;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13.5px;
  overflow-x: auto;
  line-height: 1.6;
  margin: 12px 0;
}

.md-rendered .table-container {
  overflow-x: auto;
  margin: 14px 0;
}

.md-rendered .md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.md-rendered .md-table th {
  background: #FFE4E6;
  color: #9F1239;
  padding: 8px 12px;
  border: 1px solid #FECDD3;
  font-weight: 700;
}

.md-rendered .md-table td {
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
}

.md-rendered .md-table tr:nth-child(even) {
  background: #FFF5F5;
}

.md-rendered hr, .md-hr {
  border: none;
  height: 1.5px;
  background: #E2E8F0;
  margin: 18px 0;
}

/* ============================================== */
/* 教案 Frontmatter 元信息头部卡片 */
/* ============================================== */
.lesson-meta-card {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFFBEB 100%);
  border: 1.5px solid #FECDD3;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.meta-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-subject { background: #E11D48; color: #FFFFFF; }
.badge-unit { background: #FFE4E6; color: #9F1239; border: 1px solid #FECDD3; }
.badge-type { background: #FEF3C7; color: #92400E; }
.badge-time { background: #E0E7FF; color: #3730A3; }

.meta-author {
  font-size: 12.5px;
  font-weight: 700;
  color: #64748B;
}

.meta-lesson-title {
  font-size: 22px;
  font-weight: 800;
  color: #1E293B;
  margin: 6px 0 10px 0;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.meta-quality {
  font-size: 12.5px;
  font-weight: 600;
  color: #059669;
  background: #ECFDF5;
  border: 1px dashed #A7F3D0;
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
}

/* ============================================== */
/* ============================================== */
/* 现代知识库式单元章节工作台 (Unit Chapter Workbench & Outline Table) */
/* ============================================== */
.plans-view-container {
  width: 100%;
  box-sizing: border-box;
}

.lesson-plans-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

/* 左侧单元章节侧边栏 (Unit Chapter Rail) */
.unit-nav-sidebar {
  width: 280px;
  min-width: 260px;
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.03);
  border: 1.5px solid #E2E8F0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  box-sizing: border-box;
}

.unit-nav-header {
  font-size: 13.5px;
  font-weight: 800;
  color: #334155;
  padding: 4px 6px 12px 6px;
  border-bottom: 1.5px solid #F1F5F9;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.unit-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unit-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: #F8FAFC;
  transition: all 0.18s ease;
  user-select: none;
}

.unit-nav-item:hover {
  background: #FFF1F2;
  border-color: #FECDD3;
  transform: translateX(2px);
}

.unit-nav-item.active {
  background: #FFF1F2;
  border-color: #FDA4AF;
  box-shadow: 0 2px 8px rgba(244,63,94,0.1);
}

.unit-badge-idx {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #E2E8F0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
}

.unit-nav-item.active .unit-badge-idx {
  background: #FF6B8B;
  color: #FFFFFF;
}

.unit-title-text {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-nav-item.active .unit-title-text {
  color: #E11D48;
}

.unit-count-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #EDF2F7;
  color: #64748B;
  margin-left: 6px;
  flex-shrink: 0;
}

.unit-nav-item.active .unit-count-pill {
  background: #FFE4E6;
  color: #E11D48;
}

/* 右侧主工作台 (Main Workbench) */
.unit-main-workbench {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* 单元顶部控制横幅 */
.unit-workbench-header {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F7 100%);
  border: 1.5px solid #FECDD3;
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(244,63,94,0.04);
}

.unit-workbench-info h2 {
  font-size: 17px;
  font-weight: 800;
  color: #1E293B;
  margin: 0 0 4px 0;
}

.unit-workbench-info p {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
}

.view-mode-toggle {
  display: flex;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 2px;
  gap: 3px;
}

.btn-mode {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mode.active {
  background: #FF6B8B;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(255,107,139,0.25);
}

/* 大纲清单表格视图 (Outline Table) */
.outline-table-wrapper {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  overflow-x: auto;
  box-sizing: border-box;
}

.outline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.outline-table th {
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1.5px solid #E2E8F0;
  white-space: nowrap;
}

.outline-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.outline-table tr:hover td {
  background: #FFFDFD;
}

.table-idx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #F1F5F9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
}

.table-lesson-title {
  font-size: 14px;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  transition: color 0.15s;
}

.table-lesson-title:hover {
  color: #FF6B8B;
}

.table-points-box {
  line-height: 1.5;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

/* ================================================= */
/* 移动端优先全面自适应与响应式体系 (Mobile-First Architecture) */
/* ================================================= */
.mobile-only-block {
  display: none;
}

.mobile-scroll-tip {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.timetable-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 手机端一屏尽览全周 (Scale to Fit) 模式 */
.timetable-scroll-wrapper.scale-to-fit-mode {
  overflow: hidden !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  height: 520px !important;
  padding: 4px 0 !important;
}

.timetable-scroll-wrapper.scale-to-fit-mode .timetable-grid {
  transform-origin: top center;
  transform: scale(0.48);
  min-width: 740px !important;
  max-width: 740px !important;
  margin-bottom: -320px;
}

.nav-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* 按钮微小号 (用于卡片内直接跳转) */
.btn-mini {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

@media (max-width: 1024px) {
  .lesson-plans-layout {
    flex-direction: column;
    gap: 14px;
  }
  .unit-nav-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
/* 移动端/桌面端显隐实用工具类 */
.no-mobile {
  display: block;
}
.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .no-mobile {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
}

/* ================================================= */
/* 树状快速筛选选择器 (Tree Select Input & Dropdown) */
/* ================================================= */
.tree-filter-container {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tree-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.tree-select-label {
  font-size: 13px;
  font-weight: 800;
  color: #1E293B;
  white-space: nowrap;
  flex-shrink: 0;
}

.tree-select-box {
  flex: 1;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
}

.tree-select-box:focus {
  border-color: #FF6B8B;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 139, 0.15);
}

.tree-count-badge {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  flex-shrink: 0;
}

.tree-count-badge strong {
  color: #E11D48;
}

@media (max-width: 768px) {
  /* 移动端树状下拉框 */
  .tree-filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  .tree-select-wrapper {
    width: 100%;
  }

  .tree-select-box {
    width: 100%;
    font-size: 13.5px;
    padding: 9px 12px;
  }

  .tree-count-badge {
    text-align: right;
    font-size: 11px;
  }

  /* 全局移动端间距与底部留白 (避免被底部 Dock 遮挡) */
  body {
    padding-bottom: 74px;
  }

  .mobile-only-block {
    display: block;
  }

  /* 1. 顶部导航栏移动端极简重构 (完美适配 iPhone 14 Pro 宽度) */
  .navbar {
    padding: 8px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-brand-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }

  .nav-brand {
    gap: 6px;
    min-width: 0;
    flex: 1;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .brand-text {
    min-width: 0;
    overflow: hidden;
  }

  .brand-text h2 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text p {
    display: none;
  }

  /* 移动端隐藏顶部冗长 Tabs，改由底部 Dock 全权承接 */
  .navbar .nav-tabs {
    display: none;
  }

  .nav-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
  }

  .nav-actions .btn {
    padding: 5px 9px;
    font-size: 11.5px;
    border-radius: 12px;
    white-space: nowrap;
  }

  /* 2. 移动端专属悬浮底部导航栏 (iOS 级丝滑 Dock) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid #E2E8F0;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
    justify-content: space-around;
    align-items: center;
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748B;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    height: 100%;
  }

  .mobile-nav-item .nav-icon {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.15s ease;
  }

  .mobile-nav-item .nav-label {
    font-size: 10.5px;
    font-weight: 700;
  }

  .mobile-nav-item:active .nav-icon {
    transform: scale(0.9);
  }

  .mobile-nav-item.active {
    color: #FF6B8B;
  }

  .mobile-nav-item.active .nav-icon {
    transform: translateY(-2px);
  }

  /* 3. 移动端全真豪华日历流卡片 (100% 保持 PC 端丰富内容与交互) */
  .mobile-rich-timetable-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  .mobile-day-switch-bar {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  }

  .day-switch-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 10px;
    border: none;
    background: #F8FAFC;
    color: #475569;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
  }

  .day-switch-tab .day-icon {
    font-size: 14px;
  }

  .day-switch-tab .day-label {
    font-size: 11.5px;
    font-weight: 800;
    margin-top: 2px;
  }

  .day-switch-tab.active {
    background: linear-gradient(135deg, #FF6B8B, #FF8E53);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(255, 107, 139, 0.35);
  }

  .day-switch-tab .today-tag {
    position: absolute;
    top: -5px;
    right: -2px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 8.5px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 6px;
  }

  .day-switch-tab.active .today-tag {
    background: #FFFFFF;
    color: #E11D48;
  }

  .mobile-schedule-banner {
    border-radius: 14px;
    padding: 10px 14px;
    border: 1.5px solid #FECDD3;
    background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
  }

  .banner-head-mon { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%); border-color: #FECDD3; color: #BE123C; }
  .banner-head-tue { background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%); border-color: #FDE68A; color: #B45309; }
  .banner-head-wed { background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%); border-color: #BBF7D0; color: #15803D; }
  .banner-head-thu { background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%); border-color: #BAE6FD; color: #0369A1; }
  .banner-head-fri { background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%); border-color: #E9D5FF; color: #7E22CE; }

  .banner-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .banner-title-row h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
  }

  .banner-tip-badge {
    font-size: 11.5px;
    font-weight: 700;
    opacity: 0.9;
  }

  .mobile-cards-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-rest-banner {
    background: #FEF3C7;
    border: 1px dashed #FCD34D;
    color: #92400E;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
  }

  .mobile-period-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1.5px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .mobile-period-card.card-math {
    border-left: 5px solid #059669;
    background: linear-gradient(145deg, #FFFFFF 0%, #F0FDF4 100%);
  }

  .mobile-period-card.card-english {
    border-left: 5px solid #E11D48;
    background: linear-gradient(145deg, #FFFFFF 0%, #FFF1F2 100%);
  }

  .mobile-period-card.card-art {
    border-left: 5px solid #7C3AED;
    background: linear-gradient(145deg, #FFFFFF 0%, #FAF5FF 100%);
  }

  .mobile-period-card.card-class {
    border-left: 5px solid #D97706;
    background: linear-gradient(145deg, #FFFFFF 0%, #FFFBEB 100%);
  }

  .mobile-period-card.card-free {
    border-left: 5px solid #94A3B8;
    background: #FFFFFF;
  }

  .period-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .period-badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .period-time-badge {
    font-size: 10.5px;
    color: #0284C7;
    background: #E0F2FE;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 800;
  }

  .period-name-badge {
    font-size: 12px;
    font-weight: 800;
    color: #1E293B;
  }

  .period-subject-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    background: #F1F5F9;
    color: #475569;
  }

  .card-math .period-subject-badge { background: #ECFDF5; color: #059669; }
  .card-english .period-subject-badge { background: #FFF1F2; color: #E11D48; }
  .card-art .period-subject-badge { background: #F5F3FF; color: #7C3AED; }
  .card-class .period-subject-badge { background: #FEF3C7; color: #D97706; }

  .period-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .period-course-title {
    font-size: 15px;
    font-weight: 800;
    color: #0F172A;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .period-room-tag {
    font-size: 11.5px;
    color: #64748B;
    font-weight: 600;
  }

  .period-course-desc {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.5;
  }

  .period-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed #E2E8F0;
  }

  .period-card-actions .btn-card-action {
    flex: 1;
    height: 32px;
    line-height: 30px;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
  }

  /* 4. 主容器与卡片样式 */
  .main-container {
    padding: 0 10px;
    margin: 8px auto;
  }

  .paper-card, .paper-board {
    padding: 12px 10px;
    border-radius: 16px;
  }

  .realtime-alert {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 11.5px;
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  /* 5. 移动端隐藏冗余侧边栏，改由顶部树状下拉选择器全权承接 */
  .lesson-plans-layout {
    flex-direction: column;
    gap: 10px;
  }

  .unit-nav-sidebar {
    display: none !important;
  }

  /* 6. 筛选控制栏与动作按钮自适应 */
  .control-bar, .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .filter-group {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
    width: 100%;
    display: flex;
    gap: 5px;
  }

  .filter-group::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .search-box {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .unit-workbench-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .unit-workbench-info h2 {
    font-size: 14px;
  }

  .view-mode-toggle {
    width: 100%;
    justify-content: center;
  }

  .btn-mode {
    flex: 1;
    text-align: center;
    padding: 5px 8px;
    font-size: 11.5px;
  }

  /* 7. 卡片满宽单列展示 (教案/导学案/习题/手账) */
  .items-grid, .memos-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .item-card, .memo-card {
    padding: 12px;
    border-radius: 14px;
  }

  .item-title {
    font-size: 14.5px;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
  }

  .btn-card-action {
    flex: 1;
    text-align: center;
    height: 32px;
    line-height: 30px;
    padding: 0 6px;
    font-size: 11.5px;
  }

  /* 8. 弹窗与表单移动端触控优化 */
  .modal-overlay {
    padding: 10px;
  }

  .modal-card, .modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 90vh !important;
    padding: 0 !important;
    margin: 0 auto;
    border-radius: 18px !important;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-header h3 {
    font-size: 15px;
  }

  .modal-body {
    padding: 14px 16px;
    font-size: 13.5px;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .form-group {
    width: 100% !important;
    margin-bottom: 12px;
  }

  .modal-footer {
    padding: 10px 16px;
    flex-direction: column-reverse;
    gap: 6px;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
    padding: 9px 0;
    font-size: 13px;
  }
}





