/* ============================================
   首页样式 - Apple 风格设计
   ============================================ */

/* 容器 */
.home-container {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ============================================
   导航栏 - 毛玻璃效果
   ============================================ */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 22px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================
   下拉菜单
   ============================================ */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  max-width: min(260px, calc(100vw - 24px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
  padding: 4px;
}

.dropdown.open .dropdown-menu {
  display: block;
  animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background: var(--danger-alpha);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ============================================
   统一内容区
   ============================================ */
.content-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================
   搜索区域
   ============================================ */
.search-area {
  display: flex;
  justify-content: center;
  padding: 28px 0 16px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 38px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.25s ease;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--ring-color), var(--shadow);
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s;
  padding: 0;
}

.search-clear svg {
  width: 12px;
  height: 12px;
}

.search-clear:hover {
  background: var(--border-hover);
  color: var(--text-primary);
}

/* ============================================
   工具栏
   ============================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Chip 按钮 */
.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle-chip:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.toggle-chip.active {
  background: var(--primary);
  color: white;
}

.toggle-chip-label {
  white-space: nowrap;
  line-height: 1;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-toggle-btn svg {
  width: 13px;
  height: 13px;
}

.filter-toggle-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.filter-toggle-btn.active {
  background: var(--primary-alpha);
  color: var(--primary);
}

/* ============================================
   可折叠筛选面板
   ============================================ */
.filter-panel {
  overflow: hidden;
  animation: filterSlideDown 0.2s ease;
}

@keyframes filterSlideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 80px; }
}

.filter-panel-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 14px;
  flex-wrap: wrap;
}

.filter-select,
.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  min-width: 100px;
  transition: all 0.15s;
  appearance: auto;
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.filter-input {
  width: 130px;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring-color);
}

.btn-text {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 8px;
  transition: color 0.15s;
}

.btn-text:hover {
  color: var(--primary);
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--border-color);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  filter: brightness(1.05);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-danger {
  background: var(--danger-alpha);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 12px;
}

/* ============================================
   帖子列表
   ============================================ */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}

.post-card {
  padding: 16px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
  transition: none;
}

.post-card:last-child {
  border-bottom: none;
}

.post-card.matched {
  border-left: none;
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.post-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.01em;
}

.post-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s;
}

.post-title a:hover {
  color: var(--primary);
}

.post-category {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 8px;
  background: var(--bg-hover);
  border-radius: var(--radius-pill);
}

.post-memo {
  margin: 0 0 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.post-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-meta-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

/* 高亮样式 - 分类和作者匹配时使用 */
.post-category.highlight {
  background: var(--warning-alpha);
  color: var(--warning);
  font-weight: 600;
}

.post-creator.highlight {
  color: var(--success);
  font-weight: 600;
}

/* ============================================
   标签
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.tag-green {
  background: var(--success-alpha);
  color: var(--success);
}

.tag-orange {
  background: var(--warning-alpha);
  color: var(--warning);
}

.tag-gray {
  background: var(--bg-hover);
  color: var(--text-muted);
}

.tag-blue {
  background: var(--primary-alpha);
  color: var(--primary);
}

.post-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.post-sub-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-sub-tags .tag {
  font-size: 12px;
  padding: 2px 8px;
}

.push-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.push-status-pending {
  background: var(--primary-alpha);
  color: var(--primary);
}

.push-status-done {
  background: var(--success-alpha);
  color: var(--success);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.35;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   分页
   ============================================ */
.pagination-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0 32px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

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

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

.pagination-btn.icon-only {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn.icon-only svg {
  width: 18px;
  height: 18px;
}

.page-numbers {
  display: flex;
  gap: 2px;
}

.page-number {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.page-number:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.page-number.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

/* ============================================
   抽屉组件
   ============================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-overlay.overlay-visible {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  background: var(--bg-primary);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
}

.drawer.drawer-open {
  transform: translateX(0);
}

.drawer.drawer-large {
  max-width: 520px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.drawer-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-hover);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.drawer-close svg {
  width: 16px;
  height: 16px;
}

.drawer-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ============================================
   表单样式
   ============================================ */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-row .input-field {
  flex: 1;
}

.form-card {
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.form-section-title {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* 模式选择器 */
.mode-selector {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mode-option {
  flex: 1;
  cursor: pointer;
  margin: 0;
}

.mode-option input[type="radio"] {
  display: none;
}

.mode-label {
  display: block;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  transition: all 0.15s;
  white-space: nowrap;
}

.mode-option:last-child .mode-label {
  border-right: none;
}

.mode-option input[type="radio"]:checked + .mode-label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}


.input-field {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring-color);
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-content {}

.checkbox-label {
  font-weight: 500;
  font-size: 14px;
}

.checkbox-description {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   信息网格
   ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.info-item strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   订阅管理表单
   ============================================ */
.sub-form {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-form-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.sub-form-row-action {
  justify-content: flex-start;
  padding-top: 4px;
}

.sub-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sub-form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.sub-keywords-inputs {
  display: flex;
  gap: 8px;
  width: 100%;
}

.sub-keywords-inputs .input-field {
  flex: 1;
  min-width: 0;
}

/* ============================================
   订阅列表
   ============================================ */
.subscriptions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-sm);
}

.subscription-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.subscription-keywords {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.subscription-filters {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.subscription-filters span::before {
  content: "·";
  margin-right: 4px;
  color: var(--text-muted);
}

.subscription-filters span:first-child::before {
  content: none;
}

/* ============================================
   统计信息抽屉
   ============================================ */
.stats-grid-simple {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card-simple .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.stat-card-simple .stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 480px) {
  .sub-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sub-keywords-inputs {
    flex-direction: column;
  }

  .sub-form-row-action .btn {
    width: 100%;
  }

  .subscription-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid-simple {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   骨架屏
   ============================================ */
.skeleton-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-color) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-title {
  height: 18px;
  width: 70%;
  margin-bottom: 12px;
}

.skeleton-line {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-badge {
  width: 50px;
  height: 22px;
}

/* ============================================
   Toast 通知
   ============================================ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 280px;
  max-width: 360px;
  animation: slideIn 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast-exit {
  animation: slideOut 0.2s ease forwards;
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.toast-close {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  font-size: 15px;
}

.toast-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(20px); opacity: 0; }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .home-header {
    padding: 10px 14px;
    gap: 8px;
  }

  .logo-text {
    display: none;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
  }

  .icon-btn svg {
    width: 20px;
    height: 20px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    width: auto;
    margin-left: auto;
  }

  .content-wrapper {
    padding: 0 16px;
  }

  .search-area {
    padding: 20px 0 12px;
  }

  .search-input {
    min-height: 42px;
    font-size: 16px;
  }

  .toolbar {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-left {
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
  }

  .toolbar-right {
    margin-left: auto;
  }

  .filter-panel-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-select,
  .filter-input,
  .btn-text {
    width: 100%;
  }

  .pagination-wrapper {
    gap: 10px;
    padding: 12px 0 20px;
  }

  .pagination-controls {
    gap: 4px;
  }

  .drawer {
    max-width: 100%;
    height: 100dvh;
  }

  .drawer-content {
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .drawer-close {
    width: 40px;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .drawer-close svg {
    width: 20px;
    height: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: calc(12px + env(safe-area-inset-top));
  }

  .toast {
    max-width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .home-header {
    padding: 8px 12px;
    gap: 4px;
  }

  .content-wrapper {
    padding: 0 12px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .dropdown-menu {
    width: min(220px, calc(100vw - 16px));
    min-width: 0;
    right: 0;
    margin-top: 4px;
  }

  .dropdown-item {
    padding: 14px 16px;
    font-size: 15px;
    min-height: 48px;
  }

  .dropdown-divider {
    margin: 6px 0;
  }
}

/* ============================================
   登录抽屉
   ============================================ */
#loginModal {
  max-width: 380px;
}

#loginModal .form-label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

#loginModal .form-actions {
  margin-top: 8px;
}

/* ============================================
   初始化页面
   ============================================ */
.init-container {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.init-card {
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.init-header {
  text-align: center;
  margin-bottom: 24px;
}

.init-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.init-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.init-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.login-message {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.login-message.info {
  background: var(--primary-alpha);
  color: var(--primary);
}

.login-message.success {
  background: var(--success-alpha);
  color: var(--success);
}

.login-message.error {
  background: var(--danger-alpha);
  color: var(--danger);
}
