/* ═════════════════════════════════════════════════════════
   首页看板：主体容器、问候条、双列布局、主行动卡、今天的星星 / 连击 / 心愿 / 下一节课卡片、积分动力站
   由原 style.css 按顺序拆出（P4.2），规则逐行原样搬移。层叠顺序靠 templates/layout/head.html
   中 01→10 的引用顺序保证，之后才加载 fonts.css 与 css/ui.css；新样式优先写进 css/ui.css。
   ═════════════════════════════════════════════════════════ */
    /* ─── 主体容器微调 ─── */
    .main-container {
      max-width: 1000px;
      width: 100%;
      margin: 10px auto 0;
      padding: 0 16px;
      flex: 1;
    }

    /* ─── 问候与激励微横幅 (方案 A：单行紧凑呼吸条) ─── */
    .greeting-card {
      background: var(--theme-banner-gradient);
      color: white;
      border-radius: var(--radius-full);
      padding: 6px 16px;
      margin: 0 0 14px 0;
      box-shadow: 0 4px 14px rgba(var(--primary-rgb, 2, 132, 199), 0.16);
      transition: background 0.4s ease, box-shadow 0.4s ease;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      position: relative;
      overflow: hidden;
      min-height: 38px;
    }

    .greeting-card::before {
      display: none;
    }

    .greeting-text {
      display: flex;
      align-items: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
      flex: 1;
    }

    .greeting-text h2 {
      font-size: 0.90rem;
      font-weight: 700;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      letter-spacing: 0.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .date-badge {
      background: rgba(255, 255, 255, 0.22);
      backdrop-filter: blur(8px);
      padding: 4px 12px;
      border-radius: var(--radius-full);
      font-size: 0.85rem;
      font-weight: 700;
      white-space: nowrap;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.35);
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      user-select: none;
      flex-shrink: 0;
    }

    .date-badge:hover {
      background: rgba(255, 255, 255, 0.36);
      transform: translateY(-1px);
    }

    /* ─── 首页看板双列/单列现代响应式系统 (T1) ─── */
    .dash-layout-cols {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      margin-bottom: 24px;
    }

    .dash-col-left, .dash-col-right {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    @media (min-width: 768px) {
      .dash-layout-cols {
        grid-template-columns: 1.4fr 1fr;
        gap: 16px;
        align-items: start; /* 禁止等高拉伸，内容自然包裹 */
      }
    }

    /* 窄屏 (<768px) 单列流：左右列 display: contents，由 CSS order 严格排序，不复制 DOM */
    @media (max-width: 767px) {
      .dash-layout-cols {
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .dash-col-left, .dash-col-right {
        display: contents;
      }
      #dashHeroActionCard { order: 1; }
      #dashStarsHubCard   { order: 2; }
      #dashTodayTasksCard { order: 3; }
      #dashDiaryCard      { order: 4; }
      #dashStreakCard     { order: 5; }
      #dashWishCard       { order: 6; }
      #dashLuckyBoxCard   { order: 7; }
      #dashTimetableCard  { order: 8; }

      .hero-action-card {
        flex-direction: column;
      }
      .hero-action-card .btn-hero-action {
        width: 100%;
        margin-top: 6px;
      }
    }

    /* 兼容保留老 dashboard-grid */
    .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      margin-bottom: 24px;
    }

    @media (min-width: 768px) {
      .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
      }
      .grid-col-full {
        grid-column: 1 / -1;
      }
    }

    /* ─── T2: 主行动卡 (Hero Action Card) ─── */
    .hero-action-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      box-shadow: var(--shadow-sm);
      border-radius: var(--radius-lg);
      padding: 18px 22px;
    }
    .hero-action-body {
      flex: 1;
      min-width: 0;
    }
    .hero-action-sub {
      display: block;
      font-weight: 800;
      color: var(--primary);
      font-size: 0.85rem;
      margin-bottom: 2px;
    }
    .hero-action-title {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--text);
      margin: 0;
      line-height: 1.35;
    }
    .btn-hero-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: none;
      border-radius: var(--radius-full);
      padding: 0 24px;
      font-size: 1.05rem;
      font-weight: 800;
      cursor: pointer;
      min-height: 48px;
      min-width: 48px;
      color: var(--c-white);
      background: var(--theme-accent-gradient, var(--primary));
      box-shadow: 0 6px 16px rgba(var(--primary-rgb, 2, 132, 199), 0.28);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      flex-shrink: 0;
      pointer-events: none;
      user-select: none;
    }
    @media (max-width: 767px) {
      .hero-action-card { align-items: stretch; }
    }
    .btn-hero-action:hover,
    .hero-action-card:hover .btn-hero-action {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(var(--primary-rgb, 2, 132, 199), 0.35);
    }
    .btn-hero-action:active,
    .hero-action-card:active .btn-hero-action {
      transform: translateY(1px);
    }
    @keyframes taskHighlightPulse {
      0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 2, 132, 199), 0.7); }
      50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(var(--primary-rgb, 2, 132, 199), 0); }
      100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 2, 132, 199), 0); }
    }
    .task-highlight-pulse {
      animation: taskHighlightPulse 1.2s ease-in-out 2 !important;
      border-color: var(--primary) !important;
    }

    /* ─── T4: 今天的星星卡片 ─── */
    .stars-hub-card {
      border-radius: var(--radius-lg);
      padding: 18px 20px;
    }
    .card.stars-hub-card {
      background: linear-gradient(160deg, var(--c-amber-50) 0%, var(--c-butter) 100%);
      border: 1.5px solid var(--c-amber-300);
    }
    .stars-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .stars-card-title {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--c-amber-900);
    }
    .stars-card-tag {
      font-size: 0.82rem;
      font-weight: 700;
      background: var(--c-amber-100);
      color: var(--c-amber-700);
      border: 1px solid var(--c-amber-300);
      border-radius: var(--radius-full);
      padding: 3px 10px;
      cursor: pointer;
    }
    .stars-tiles-row {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
    }
    .stars-tile {
      flex: 1;
      border-radius: var(--radius-md);
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      min-height: 54px;
    }
    .tile-earned {
      background: linear-gradient(135deg, var(--c-amber-300) 0%, var(--c-amber-500) 100%);
      color: var(--c-amber-900);
      box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    }
    .tile-earned .tile-num {
      font-size: 2rem;
      font-weight: 900;
      line-height: 1.1;
    }
    .tile-earned .tile-label {
      font-size: 0.8rem;
      font-weight: 700;
      opacity: 0.9;
    }
    .tile-money {
      background: linear-gradient(135deg, var(--c-emerald-50) 0%, var(--c-emerald-100) 100%);
      border: 1.5px solid var(--c-green-300);
      color: var(--c-emerald-800);
    }
    .tile-money .tile-label {
      font-size: 0.78rem;
      font-weight: 700;
    }
    .tile-money .tile-num {
      font-size: 1.35rem;
      font-weight: 900;
      margin-top: 4px;
    }
    .stars-sub-row {
      font-size: 0.88rem;
      color: var(--c-amber-800);
      font-weight: 600;
      margin-top: 6px;
    }

    /* ─── T5: 连击卡片 ─── */
    .card.streak-card {
      background: linear-gradient(160deg, var(--c-amber-50) 0%, var(--c-orange-50) 100%);
      border: 1.5px solid var(--c-amber-200);
    }
    .streak-card {
      border-radius: var(--radius-lg);
      padding: 16px 18px;
    }
    .streak-inner-pan {
      width: 100%;
    }
    .streak-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .streak-title-text {
      font-size: 0.95rem;
      font-weight: 800;
      color: var(--c-amber-700);
    }
    .streak-link-more {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--primary);
    }
    .star-mini-day-cell {
      flex: 1;
      min-width: 44px;
      min-height: 48px;
      border-radius: var(--radius-sm);
      background: var(--c-white);
      border: 1px solid var(--c-amber-200);
      padding: 6px 2px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      color: var(--c-stone-500);
      cursor: pointer;
      user-select: none;
      transition: transform 0.15s ease;
    }
    .star-mini-day-cell:hover {
      transform: translateY(-1px);
    }
    .star-mini-day-cell .star-icon {
      font-size: 1.25rem;
      line-height: 1.2;
    }

    /* ─── T6: 心愿卡片 ─── */
    .card.wish-card {
      border: 1.5px solid var(--c-peach-200);
      background: var(--c-white);
    }
    .wish-card {
      border-radius: var(--radius-lg);
      padding: 18px 20px;
    }
    .wish-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }
    .wish-label {
      font-size: 0.95rem;
      font-weight: 800;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .wish-target-tag {
      font-size: 0.8rem;
      font-weight: 700;
      background: var(--c-amber-100);
      color: var(--c-amber-700);
      border: 1px solid var(--c-amber-300);
      border-radius: var(--radius-full);
      padding: 2px 10px;
    }
    .wish-title-row {
      margin-bottom: 8px;
    }
    .wish-item-name {
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--text);
    }
    .wish-stations-bar {
      display: flex;
      gap: 6px;
      margin: 10px 0 6px 0;
    }
    .wish-bar-seg {
      flex: 1;
      height: 10px;
      border-radius: var(--radius-full);
      background: var(--c-lavender);
      display: block;
      transition: background 0.3s ease;
    }
    .wish-bar-seg.on {
      background: linear-gradient(90deg, var(--c-amber-500), var(--c-orange-500));
    }
    .wish-stations-sub {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 6px;
    }
    .wish-hint-msg {
      font-size: 0.95rem;
      font-weight: 800;
      color: var(--c-amber-700);
      line-height: 1.35;
    }

    /* ─── T7: 下一节课卡片 ─── */
    .card.next-class-card {
      background: linear-gradient(160deg, var(--c-orange-50) 0%, var(--c-peach-100) 100%);
      border: 1.5px solid var(--c-orange-300);
    }
    .next-class-card {
      border-radius: var(--radius-lg);
      padding: 14px 18px;
    }
    .next-class-content {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
      width: 100%;
    }
    .next-class-link {
      margin-left: auto;
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--primary);
      white-space: nowrap;
    }

    /* ─── T8: 幸运盒与顶栏齿轮 ─── */
    .card.lucky-card {
      background: var(--c-slate-50);
      border: 1.5px dashed var(--c-slate-300);
    }
    .lucky-card {
      color: var(--text-muted);
      font-size: 0.9rem;
      padding: 12px 18px;
      border-radius: var(--radius-lg);
      cursor: pointer;
    }
    .gear-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      min-height: 44px;
      border-radius: 50%;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      border: 1.5px solid var(--border);
      background: var(--c-white);
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .gear-btn:hover {
      border-color: var(--primary);
      transform: rotate(30deg);
    }

    /* ─── T9: 触控尺寸、字号与减少动效 ─── */
    .task-checkbox-custom,
    .task-check-circle {
      min-width: 48px;
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .bottom-nav-item,
    .nav-item,
    .app-bottom-nav button,
    .bottom-nav button {
      font-size: 13px;
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
      }
    }

    .card {
      background: var(--card-bg);
      border-radius: var(--radius-lg);
      padding: 22px;
      border: 1.5px solid var(--theme-border-glow, var(--c-mist));
      box-shadow: var(--theme-card-shadow, var(--shadow-sm));
      position: relative;
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .card:hover {
      box-shadow: var(--theme-card-hover-shadow, var(--shadow-md));
    }

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

    .card-title {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--c-slate-800);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* ─── 🌟 积分动力站专用样式 ─── */
    .points-hub-card {
      background: linear-gradient(180deg, var(--c-amber-50) 0%, var(--c-white) 100%);
      border: 2px solid var(--c-amber-200);
    }

    .points-stat-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 16px;
    }

    .points-big-badge {
      background: linear-gradient(135deg, var(--c-amber-50) 0%, var(--c-amber-100) 100%);
      border: 1.5px solid var(--c-amber-200);
      padding: 12px 16px;
      border-radius: var(--radius-md);
      box-shadow: 0 3px 10px rgba(245, 158, 11, 0.12);
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all var(--transition);
      min-height: 72px;
    }

    .points-big-badge:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(245, 158, 11, 0.22);
    }

    .points-big-badge .num {
      font-size: 1.85rem;
      font-weight: 900;
      color: var(--c-amber-700);
      line-height: 1.1;
    }

    .points-big-badge .label {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--c-amber-800);
      margin-top: 2px;
    }

    .points-money-badge {
      background: linear-gradient(135deg, var(--c-green-50) 0%, var(--c-green-100) 100%);
      border: 1.5px solid var(--c-green-300);
      padding: 12px 16px;
      border-radius: var(--radius-md);
      box-shadow: 0 3px 10px rgba(16, 185, 129, 0.12);
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all var(--transition);
      min-height: 72px;
    }

    .points-money-badge:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
    }

    .points-money-badge .num {
      font-size: 1.6rem;
      font-weight: 900;
      color: var(--c-green-700);
      line-height: 1.1;
      letter-spacing: -0.5px;
    }

    .points-money-badge .label {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--c-green-800);
      margin-top: 2px;
    }

    .points-today-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: linear-gradient(135deg, var(--c-orange-50) 0%, var(--c-orange-100) 100%);
      border: 1.5px solid var(--c-orange-200);
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--c-orange-700);
    }

    .points-today-pill .num {
      font-weight: 900;
      font-size: 0.86rem;
    }

    .pending-todo-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 12px;
      border-radius: 999px;
      font-size: 0.82rem;
      font-weight: 700;
      transition: all 0.25s ease;
    }

    .pending-todo-badge.warning {
      background: var(--c-red-50);
      color: var(--c-red-600);
      border: 1.5px solid var(--c-red-200);
      box-shadow: 0 2px 6px rgba(220, 38, 38, 0.08);
    }

    .pending-todo-badge.success {
      background: var(--c-emerald-50);
      color: var(--c-emerald-600);
      border: 1.5px solid var(--c-emerald-200);
      box-shadow: 0 2px 6px rgba(5, 150, 105, 0.08);
    }

    .pending-todo-badge.empty {
      background: var(--c-slate-100);
      color: var(--c-slate-500);
      border: 1.5px solid var(--c-slate-200);
    }

    /* 心愿冲刺目标盒子 */
    .wish-box {
      background: var(--c-white);
      border-radius: var(--radius-md);
      padding: 16px 18px;
      border: 1.5px solid var(--c-amber-100);
      box-shadow: 0 2px 12px rgba(245, 158, 11, 0.08);
      margin-bottom: 14px;
    }

    .wish-top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      gap: 10px;
    }

    .wish-label {
      font-size: 0.88rem;
      font-weight: 800;
      color: var(--c-amber-800);
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .wish-target {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--c-amber-700);
      background: var(--amber-light);
      padding: 4px 12px;
      border-radius: var(--radius-full);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .wish-name-row {
      margin-bottom: 8px;
    }

    .wish-item-name {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--c-slate-800);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: block;
      line-height: 1.3;
    }

    .points-today-badge {
      background: var(--c-white);
      border: 2px dashed var(--c-amber-300);
      padding: 12px 18px;
      border-radius: var(--radius-md);
      text-align: center;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .points-big-badge {
      background: linear-gradient(135deg, var(--c-amber-400) 0%, var(--c-amber-500) 100%);
      color: var(--c-white);
      padding: 14px 20px;
      border-radius: var(--radius-md);
      box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      white-space: nowrap;
    }

    /* 进度条 */
    .progress-track {
      background: var(--c-slate-100);
      height: 14px;
      border-radius: var(--radius-full);
      overflow: hidden;
      margin: 8px 0;
      position: relative;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--c-amber-400) 0%, var(--c-amber-500) 100%);
      border-radius: var(--radius-full);
      transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .progress-fill.green {
      background: linear-gradient(90deg, var(--c-emerald-400) 0%, var(--c-emerald-500) 100%);
    }

    .wish-hint {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--c-amber-900);
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
    }
