/* ==========================================================================
   猫妈妈的小站 - 统一 iOS / Apple 视觉规范样式表 (style.css)
   适用于: index.html / paiban.html / travel_202608.html
   ========================================================================== */

:root {
  /* Apple 系统风格基础调色板 */
  --bg: #f5f5f7;
  --card: #ffffff;
  --card-subtle: #fbfbfd;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);
  
  /* 苹果核心强调色 (iOS System Blue) */
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-light: rgba(0, 113, 227, 0.08);
  --blue-border: rgba(0, 113, 227, 0.25);
  
  /* 柔和的状态/人物色彩 */
  --mom-bg: #fff1ea;
  --mom-text: #c84000;
  --mom-border: rgba(200, 64, 0, 0.16);
  --mom-badge: linear-gradient(135deg, #ff7a45, #fa541c);
  
  --uncle-bg: #eff3f8;
  --uncle-text: #2c3e50;
  --uncle-border: rgba(44, 62, 80, 0.12);
  --uncle-badge: linear-gradient(135deg, #4b5563, #1f2937);
  
  --aunt-bg: #eaf6ed;
  --aunt-text: #167a36;
  --aunt-border: rgba(22, 122, 54, 0.16);
  --aunt-badge: linear-gradient(135deg, #52c41a, #389e0d);
  
  --orange: #f56300;
  --orange-light: #fff2eb;
  --orange-text: #c94a00;
  
  --red: #ff3b30;
  --red-light: #ffebe9;
  --red-text: #d70015;
  
  --green: #34c759;
  --green-light: #ebf8f0;
  --green-text: #1e7e34;
  
  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 9999px;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  
  /* 字体 */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   全局重置与排版
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-system);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

a {
  color: var(--blue);
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ==========================================================================
   统一顶部 Header (Apple 风格毛玻璃)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.site-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.site-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
  border-radius: var(--radius-pill);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 32px;
}

.nav-pill:hover {
  color: var(--text);
}

.nav-pill.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* ==========================================================================
   统一底部导航栏 (iOS Floating Dock)
   ========================================================================== */
.site-dock {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09), 0 1px 2px rgba(0, 0, 0, 0.04);
  z-index: 999;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 48px;
  padding: 2px 6px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.dock-item .dock-icon {
  font-size: 1.25rem;
  line-height: 1.15;
}

.dock-item .dock-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.dock-item:active {
  transform: scale(0.92);
}

.dock-item.active {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
}

.dock-item.active .dock-label {
  font-weight: 700;
}

/* ==========================================================================
   主体容器与通用卡片
   ========================================================================== */
.main-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px 0;
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px 20px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.app-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  margin-bottom: 16px;
}

/* ==========================================================================
   首页专用组件 (index.html)
   ========================================================================== */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.entry-card:active {
  transform: scale(0.985);
  background-color: var(--card-subtle);
}

@media (hover: hover) {
  .entry-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

.entry-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  margin-right: 16px;
}

.entry-icon-box.schedule { background: var(--orange-light); }
.entry-icon-box.travel { background: var(--blue-light); }

.entry-content {
  flex: 1;
  min-width: 0;
}

.entry-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
  line-height: 1.3;
}

.entry-badge.schedule { background: var(--orange-light); color: var(--orange-text); }
.entry-badge.travel { background: var(--blue-light); color: var(--blue); }

.entry-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.entry-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.entry-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-left: 12px;
  flex-shrink: 0;
  font-weight: 600;
  transition: transform 0.2s, color 0.2s;
}

.entry-card:hover .entry-arrow {
  transform: translateX(3px);
  color: var(--blue);
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2rem;
  padding: 1rem 0 calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

/* ==========================================================================
   排班页专用组件 (paiban.html)
   ========================================================================== */
.schedule-container {
  max-width: 540px;
  margin: 0 auto;
}

.month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-ctrl-primary {
  background: var(--blue-light);
  color: var(--blue);
}

.btn-ctrl-primary:active {
  background: var(--blue);
  color: #ffffff;
}

.btn-ctrl-secondary {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.btn-ctrl-secondary:active {
  background: rgba(0, 0, 0, 0.08);
}

.month-select-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.month-display-btn {
  width: 100%;
  height: 38px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* 星期头部 */
.weekdays-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

.weekday-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 0;
}

.weekday-tag.weekend {
  color: var(--orange-text);
}

/* 日历 7 列主网格 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-cell {
  aspect-ratio: 0.88;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 4px 1px 3px 1px;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.2s ease, filter 0.2s ease;
  user-select: none;
  min-width: 0;
  overflow: hidden;
}

.day-cell.empty {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: default;
}

.day-cell:not(.empty):active {
  transform: scale(0.92);
}

/* 角色标签颜色 (柔和浅色) */
.style-mom {
  background: var(--mom-bg);
  color: var(--mom-text);
  border: 1px solid var(--mom-border);
}

.style-uncle {
  background: var(--uncle-bg);
  color: var(--uncle-text);
  border: 1px solid var(--uncle-border);
}

.style-aunt {
  background: var(--aunt-bg);
  color: var(--aunt-text);
  border: 1px solid var(--aunt-border);
}

/* 今日状态 */
.day-cell.today-cell {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.today-pill {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.52rem;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 4px;
  line-height: 1.1;
}

.day-number {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 1px;
}

.day-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.day-orig-name {
  font-size: 0.58rem;
  color: var(--text-muted);
  line-height: 1;
  transform: scale(0.92);
  white-space: nowrap;
  opacity: 0.8;
  font-weight: 500;
}

/* 过滤置灰 */
.day-cell.dimmed {
  opacity: 0.20;
  filter: grayscale(85%);
  transform: scale(0.96);
  box-shadow: none !important;
}

/* 统计卡片与双人分组卡片 */
.stats-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pair-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 12px;
}

.pair-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pair-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.pair-diff {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.pair-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pair-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pair-item:active {
  transform: scale(0.96);
}

.pair-item.active-filter {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 1.5px var(--blue);
}

.pair-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.pair-action-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stat-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.stat-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.dot-mom { background: var(--mom-badge); }
.dot-uncle { background: var(--uncle-badge); }
.dot-aunt { background: var(--aunt-badge); }

.stat-count {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

/* 年月选择弹窗专用样式 */
.month-modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 330px;
  padding: 20px 18px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .month-modal-card {
  transform: scale(1);
}

.year-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.year-display-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.month-grid-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.month-select-cell {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
}

.month-select-cell:active {
  transform: scale(0.94);
}

.month-select-cell.current-active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
}

.month-select-cell.is-this-month:not(.current-active) {
  border-color: var(--blue);
  color: var(--blue);
}

/* 代班人选择卡片 */
.sub-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0 16px;
}

.sub-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-option-btn:active {
  transform: scale(0.95);
}

.sub-option-btn.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 1.5px var(--blue);
}

.sub-option-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.sub-option-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.btn-reset-shift {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--red-light);
  color: var(--red-text);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-shift:active {
  opacity: 0.8;
}

/* ==========================================================================
   行程页专用组件 (travel_202608.html)
   ========================================================================== */
.order-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

/* 行程表格（桌面端） */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.plan-table th {
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.plan-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.plan-table tr:last-child td {
  border-bottom: none;
}

.th-handle { width: 36px; }
.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  text-align: center;
  user-select: none;
  font-size: 1.1rem;
}
.drag-handle:hover { color: var(--blue); }
.draggable-row.dragging { opacity: 0.4; background: var(--blue-light); }
.draggable-row.drag-over td { box-shadow: inset 0 2px 0 var(--blue); }
.draggable-row.drag-over-bottom td { box-shadow: inset 0 -2px 0 var(--blue); }

/* 行程手机端时间轴卡片列表 (狭屏时自动替代表格) */
.plan-cards-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.plan-card-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
}

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

.plan-card-time {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.plan-card-time.urgent {
  color: var(--red-text);
}

.plan-card-time.warning {
  color: var(--orange-text);
}

.plan-card-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.pill-urgent {
  background: var(--red-light);
  color: var(--red-text);
}

.pill-warning {
  background: var(--orange-light);
  color: var(--orange-text);
}

.plan-card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.45;
}

/* ==========================================================================
   iOS Segmented Control 分段控制器
   ========================================================================== */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 2px;
  margin-bottom: 16px;
  width: fit-content;
  max-width: 100%;
}

.segmented-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 38px;
}

.segmented-btn:active {
  opacity: 0.8;
}

.segmented-btn.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.22s ease;
}

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

/* ==========================================================================
   通用弹窗与 Toast (Modal & Toast)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 320px;
  padding: 22px 20px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.modal-btn-sec {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.modal-btn-pri {
  background: var(--blue);
  color: #ffffff;
}

.modal-btn:active {
  transform: scale(0.96);
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: max(74px, calc(env(safe-area-inset-bottom) + 60px));
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(29, 29, 31, 0.92);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2100;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   移动端响应式微调 (重点兼容 390~430px 及更小屏幕)
   ========================================================================== */
@media (max-width: 640px) {
  .site-header-inner {
    padding: 0 12px;
  }
  .main-container {
    padding: 14px 12px 0;
  }
  .hero-card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }
  .hero-title {
    font-size: 1.28rem;
  }
  
  /* 行程表格在手机端隐藏，显示卡片列表 */
  .table-wrapper {
    display: none;
  }
  .plan-cards-list {
    display: flex;
  }
  
  /* 日历网格紧凑防挤出 */
  .calendar-grid {
    gap: 4px;
  }
  .day-cell {
    padding: 4px 1px 3px 1px;
    border-radius: 8px;
  }
  .day-number {
    font-size: 0.95rem;
  }
  .day-name {
    font-size: 0.68rem;
  }
  .today-pill {
    font-size: 0.48rem;
    padding: 1px 2px;
  }
  .btn-ctrl {
    padding: 0 8px;
    font-size: 0.82rem;
  }
}
