@media (max-width: 980px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }

  /* Mobile Card Styles */
  .mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-card {
    background: var(--card);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

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

  .m-card-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
  }

  .m-card-amount {
    font-weight: bold;
    color: var(--accent);
    font-size: 1.1rem;
  }

  .m-card-note {
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(148, 163, 184, 0.05);
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.5;
  }

  .m-card-time {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: right;
    margin-top: 4px;
  }
  
  /* Reset Wall Styles for Mobile (Clean up previous attempts) */
  .wall-row, .wall-head, .col-name, .col-amount, .col-time, .col-note {
    /* No longer used in mobile view, but kept for desktop safely ignored */
  }

  .site-header {
    padding: 20px 5vw;
  }

  main {
    padding: 0 5vw 100px;
  }

  /* Navigation Bar - Bottom Fixed */
  .nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(12, 18, 28, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    padding: 12px 16px;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  }

  .nav a {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 8px;
    text-align: center;
  }
  
  .nav a.active, .nav a:hover {
    color: var(--accent);
  }
  
  .nav .btn.ghost {
    display: none;
  }

  /* Hero Section */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 20px;
    gap: 40px;
  }
  
  .hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .actions {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .bg-picker {
    justify-content: center;
  }
  
  .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  /* Panel */
  .panel {
    padding: 20px;
  }

  /* Transparency / Ledger */
  .transparency-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  /* Wall Tables -> Cards */
  .wall-head {
    display: none;
  }
  
  .wall-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    align-items: flex-start; /* 确保内容左对齐 */
  }
  
  /* Style specific columns */
  .col-name {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text);
    margin-right: 100px; /* 防止名字太长盖住金额 */
  }
  
  .col-amount {
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.15rem;
  }
  
  .col-time {
    font-size: 0.8rem;
    color: var(--muted);
    order: 4; /* 时间放最后 */
    margin-top: 4px;
    text-align: right; /* 时间右对齐 */
    width: 100%;
  }
  
  .col-note {
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(148, 163, 184, 0.05);
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 6px;
    order: 3; /* 留言放中间 */
    line-height: 1.6;
    width: 100%; /* 占满宽度 */
    display: block; /* 确保是块级元素 */
    white-space: normal; /* 允许换行 */
  }

  /* Expense Table Specifics */
  #exp-table .wall-row {
    grid-template-columns: 1fr;
  }
  
  .col-exp-name {
    font-weight: 600;
    font-size: 1.05rem;
  }
  
  .col-exp-amount {
    color: var(--text);
    position: absolute;
    top: 16px;
    right: 16px;
    font-weight: bold;
  }
  
  .col-exp-date {
    font-size: 0.85rem;
    color: var(--muted);
  }

  /* Pagination */
  .pagination {
    flex-direction: column;
    gap: 16px;
  }
  
  .pager-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .pager-actions button {
    flex: 1;
  }

  /* Channels */
  .channel-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Footer */
  .site-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding-bottom: 90px;
  }
}

/* Small adjustments for very small screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}
