/* ============================================================
   398200.xyz - 中华万年历 · 日期计算器 · VPS 剩余价值计算器
   设计语言：现代化纯净明亮白天模式 (Clean Light Mode)
   参考权威中文日历标准设计 · 微网格底纹 · 层次分明的卡片体系
============================================================ */

:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-muted: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-primary-bg: #f0f9ff;
  --accent-primary-border: #bae6fd;

  --accent-red: #f43f5e;
  --accent-red-hover: #e11d48;
  --accent-red-bg: #fff1f2;
  --accent-red-border: #fecdd3;

  --accent-green: #059669;
  --accent-green-bg: #ecfdf5;
  --accent-green-border: #a7f3d0;

  --accent-amber: #f59e0b;

  --font-sans: "MiSans VF", "MiSans", "Xiaomi Lanting Pro", "MI Lanting", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "MiSans VF", "MiSans", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}

/* 彻底隐藏所有数字输入框的原生加减上下小箭头，防止手动输入时误触 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  background-image: 
    linear-gradient(to right, rgba(203, 213, 225, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.35) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.ui-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ================= 顶部导航与时钟条 ================= */
.site-header {
  margin-bottom: 20px;
  padding: 16px 22px;
}

.header-container-grid {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
}

.header-left-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.brand-domain-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.brand-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* 核心 Tab 切换器 (精简紧凑，绝不出现横向滑动条) */
.tab-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  overflow: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
  display: none;
}

/* 右侧全高时钟卡片（字大而不重，清爽舒适） */
.header-clock-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  align-self: stretch;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(15, 23, 42, 0.02);
}

.clock-time-large {
  font-family: var(--font-sans);
  font-size: 42px;
  font-weight: 500;
  color: #1e293b;
  letter-spacing: 0.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-date-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}

.clock-solar-large {
  font-size: 15px;
  font-weight: 500;
  color: #334155;
  line-height: 1.3;
}

.clock-lunar-large {
  font-size: 13.5px;
  font-weight: 400;
  color: #0284c7;
  line-height: 1.3;
}

.tab-btn {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tab-btn:hover {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.tab-btn.active .tab-badge-accent {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-badge-accent {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

.tab-pane {
  display: none;
}

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

/* ================= TAB 1: 核心节日高光卡片 (清新晴蓝设计) ================= */
.hero-fest-card {
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid #e0f2fe;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.04);
}

.h-fest-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.h-fest-icon {
  font-size: 48px;
  line-height: 1;
}

.h-fest-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h-fest-name {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
}

.h-fest-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 500;
  border: 1px solid #bae6fd;
}

.h-fest-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.h-fest-dates {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 400;
}

.h-fest-timer-days {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #bae6fd;
  padding: 10px 22px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.08);
  flex-shrink: 0;
}

.timer-days-prefix {
  font-size: 15px;
  font-weight: 500;
  color: #0284c7;
}

.timer-days-num {
  font-size: 40px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: #0284c7;
  line-height: 1;
}

.timer-days-unit {
  font-size: 16px;
  font-weight: 500;
  color: #0284c7;
}

/* 节日滑动速览 */
.festivals-strip {
  margin-bottom: 20px;
  padding: 16px 20px;
}

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

.strip-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fest-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.fest-mini-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fest-mini-card:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.f-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.f-badge-days {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7; /* 与上方倒计时天数 100% 统一色彩 */
}

.f-badge-days.today {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #f43f5e;
}

.f-dates {
  font-size: 12px;
  color: var(--text-secondary);
}

.f-dates span {
  color: #0284c7;
}

/* ================= 参照用户截图：纯正现代中国日历组件 ================= */
.calendar-layout {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 20px;
  margin-bottom: 28px; /* 增加充足的呼吸间距，彻底解决“两栏离得很近” */
}

.cal-card-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

/* 顶部操作工具栏 (完全匹配参考截图) */
.cal-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

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

.select-pill {
  height: 38px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 28px 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px 11px;
}

.select-pill:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.holiday-pill {
  color: #1e293b;
  font-weight: 500;
}

.month-stepper-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  height: 38px;
  padding: 0 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.month-stepper-group .select-pill {
  border: none;
  box-shadow: none;
  height: 100%;
  padding: 0 4px;
  background-image: none;
  text-align: center;
  min-width: 52px;
}

.btn-arrow {
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-arrow:hover {
  background: #f0f9ff;
  color: #0284c7;
}

.btn-today-pill {
  height: 38px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s;
}

.btn-today-pill:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

/* 星期表头 (六日柔和珊瑚粉，清爽不刺眼) */
.cal-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.cal-weekday-row span.weekend-col {
  color: #f43f5e;
  font-weight: 500;
}

/* 日历 42 格矩阵 */
.cal-matrix-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-grid-cell {
  background: transparent;
  min-height: 68px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
  padding: 4px;
}

.day-grid-cell:hover {
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.cell-solar-num {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
  color: #1e293b;
  letter-spacing: -0.3px;
}

.cell-lunar-text {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
}

/* 周末柔和珊瑚红 */
.day-grid-cell.is-weekend-day .cell-solar-num {
  color: #f43f5e;
  font-weight: 500;
}

/* 1. 法定公休放假 (休)：清新柔和蜜桃粉底 + 珊瑚红[休]角标 */
.day-grid-cell.is-statutory-rest {
  background: #fff1f2 !important;
  border-radius: 10px;
}

.day-grid-cell.is-statutory-rest .cell-solar-num {
  color: #f43f5e !important;
  font-weight: 500;
}

.day-grid-cell.is-statutory-rest .cell-lunar-text {
  color: #f43f5e !important;
  font-weight: 400;
}

/* 2. 法定调休上班 (班)：白底 + 清爽石板灰[班]角标 */
.day-grid-cell.is-statutory-work {
  background: transparent;
}

.day-grid-cell.is-statutory-work .cell-solar-num {
  color: #1e293b !important;
  font-weight: 500;
}

.day-grid-cell.is-statutory-work .cell-lunar-text {
  color: #475569 !important;
  font-weight: 400;
}

/* 角标定位 (休与班，右上角精致小方标) */
.badge-corner,
.badge-rest,
.badge-work {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.badge-corner.rest,
.badge-rest {
  background: #f43f5e !important;
  color: #ffffff !important;
}

.badge-corner.work,
.badge-work {
  background: #64748b !important;
  color: #ffffff !important;
}

/* 3. 今天 (今)：清新天青蓝边框 + 右上角蓝色[今]角标 */
.day-grid-cell.is-today-cell {
  border: 2px solid #0284c7 !important;
  background: #f0f9ff !important;
  border-radius: 10px;
}

.day-grid-cell.is-today-cell .cell-solar-num {
  color: #0284c7;
  font-weight: 500;
}

.day-grid-cell.is-today-cell .cell-lunar-text {
  color: #0284c7;
  font-weight: 500;
}

.badge-today-mark {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #0284c7;
  color: #ffffff;
  font-size: 9px;
  font-weight: 500;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

/* 4. 选中状态 (清新通透天青蓝高亮) */
.day-grid-cell.is-active-selected {
  background: #e0f2fe !important;
  box-shadow: 0 0 0 2px #0284c7 !important;
}

/* 5. 非当月日期 (淡化灰色，但不影响跨月的法定休/班高亮) */
.day-grid-cell.is-out-month:not(.is-statutory-rest):not(.is-statutory-work) {
  opacity: 0.45;
}

.day-grid-cell.is-out-month:not(.is-statutory-rest):not(.is-statutory-work) .cell-solar-num {
  color: #94a3b8 !important;
}

.day-grid-cell.is-out-month:not(.is-statutory-rest):not(.is-statutory-work) .cell-lunar-text {
  color: #94a3b8 !important;
}

.day-grid-cell.is-out-month.is-weekend-day:not(.is-statutory-rest):not(.is-statutory-work) .cell-solar-num {
  color: #fca5a5 !important;
}

/* 底部状态提示条 */
.cal-footer-sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dce8f6;
  font-size: 12px;
  color: var(--text-secondary);
}

.sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.btn-sync-action {
  background: #ffffff;
  border: 1px solid #d4e2f2;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sync-action:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

/* 右侧当日祥查 */
.detail-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.d-big-num {
  font-size: 52px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: #1e293b;
  line-height: 1;
}

.d-date-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-full-solar {
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
}

.d-diff-tag {
  font-size: 13px;
  font-weight: 500;
  color: #0284c7;
}

.d-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.d-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.d-row .label {
  color: #475569;
  font-weight: 400;
}

.d-row .val {
  font-weight: 500;
  color: #1e293b;
}

.d-row .val.highlight {
  color: #0284c7;
  font-weight: 500;
}

.d-row .val.status-rest {
  color: var(--accent-red);
  font-weight: 500;
}

.d-row .val.status-work {
  color: #64748b;
  font-weight: 500;
}

.d-culture-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
  color: #166534;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.d-culture-box .title {
  font-weight: 500;
  color: #15803d;
}

/* ================= TAB 2: 实用日期计算器 ================= */
.date-calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.calc-block {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-title-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-weight: 500;
}

.calc-inputs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.c-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

.c-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.c-input.year { width: 78px; }
.c-input.month { width: 54px; }
.c-input.day { width: 54px; }
.c-input.days-count { width: 84px; }

.c-unit {
  font-size: 14px;
  color: var(--text-secondary);
}

.c-btn-today {
  font-size: 12px;
  color: #0284c7;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
  font-weight: 500;
}

.c-btn-today:hover {
  text-decoration: underline;
}

.c-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--text-primary);
  padding: 6px 26px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 10px;
}

.c-select:focus {
  border-color: var(--accent-primary);
}

.btn-calc-submit {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  align-self: flex-start;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.btn-calc-submit:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-1px);
}

.calc-result-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.calc-result-box .headline {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.calc-result-box .headline strong {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: #0284c7;
}

.calc-result-box .subtext {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 错误提示与输入高亮 */
.calc-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #991b1b;
  margin-top: 4px;
  animation: fadeInDown 0.2s ease;
}

.calc-error-box .error-title {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b91c1c;
}

.calc-error-box .error-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #991b1b;
}

.c-input.input-error {
  border-color: #ef4444 !important;
  background-color: #fff1f2 !important;
  color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  animation: inputShake 0.35s ease;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ================= TAB 3: 🐔 VPS 剩余价值计算器 (完全内嵌，零跳转) ================= */
.vps-embedded-container {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.vps-left-form {
  width: 58%;
  padding: 28px;
  background: #f8fafc;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vps-row {
  display: flex;
  gap: 16px;
}

.vps-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vps-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vps-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vps-preview-tag {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-mono);
}

.vps-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.vps-sym {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
}

.vps-input {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 0 12px 0 32px;
  outline: none;
  transition: all 0.15s;
}

.vps-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.vps-select {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 0 32px 0 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px 11px;
}

.vps-select:focus {
  border-color: #0284c7;
}

.cycle-options-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.cycle-radio-item {
  position: relative;
  cursor: pointer;
}

.cycle-radio-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cycle-btn-card {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 8px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.cycle-radio-item input:checked + .cycle-btn-card {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.vps-date-input {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0 12px;
  outline: none;
}

.vps-date-input:focus {
  border-color: #0284c7;
}

.rate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

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

.rate-input {
  width: 80px;
  border: none;
  border-bottom: 2px solid #0284c7;
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: #0284c7;
  text-align: center;
  outline: none;
  background: transparent;
}

.rate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-rate-refresh {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-rate-refresh:hover {
  color: #0284c7;
}

.vps-right-result {
  width: 42%;
  padding: 28px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.vps-res-top {
  text-align: right;
}

.vps-res-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
}

.vps-amount-display {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  margin: 4px 0;
}

.vps-yen {
  font-size: 28px;
  font-weight: 500;
  color: #94a3b8;
}

.vps-val-num {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 500;
  color: #0284c7;
  line-height: 1;
  cursor: pointer;
}

.vps-val-num:hover {
  opacity: 0.9;
}

.vps-orig-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.vps-divider {
  height: 1px;
  background: var(--border-color-light);
  width: 100%;
}

.vps-progress-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vps-progress-lbl {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
}

.vps-days-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.vps-bar-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.vps-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
}

.vps-pct-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: #0284c7;
  white-space: nowrap;
}

.vps-quote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quote-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-lbl {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
}

.quote-input {
  width: 100%;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  outline: none;
}

.quote-input:focus {
  border-color: #0284c7;
  background: #ffffff;
}

.vps-actions-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-vps-action {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-vps-action:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.ui-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
}

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

.site-footer {
  text-align: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .header-container-grid {
    flex-direction: column;
    gap: 16px;
  }
  .header-clock-panel {
    width: 100%;
    justify-content: space-between;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .date-calc-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .vps-embedded-container {
    flex-direction: column;
  }
  .vps-left-form, .vps-right-result {
    width: 100%;
  }
  .vps-left-form {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 12px 8px 40px;
  }
  .site-header {
    padding: 14px 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
  }
  .header-container-grid {
    flex-direction: column;
    gap: 12px;
  }
  .brand-desc {
    font-size: 12px;
  }
  .header-clock-panel {
    width: 100%;
    padding: 10px 14px;
    gap: 12px;
    justify-content: space-between;
  }
  .clock-time-large {
    font-size: 30px;
  }
  .clock-solar-large {
    font-size: 13px;
  }
  .clock-lunar-large {
    font-size: 11.5px;
  }

  /* 移动端顶部 Tab 横向平滑手势滑动 */
  .tab-navigation {
    padding-top: 10px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-navigation::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    padding: 7px 14px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* 日历核心卡片 */
  .cal-card-box {
    padding: 14px 10px;
    border-radius: var(--radius-lg);
  }

  /* 移动端日历顶部操作栏：2x2 对称网格，拇指易触控 */
  .cal-top-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
  .toolbar-left {
    display: contents;
  }
  #select-holiday-jump {
    grid-column: 1;
    width: 100%;
    height: 36px;
    font-size: 13px;
    padding: 0 8px;
  }
  #select-cal-year {
    grid-column: 2;
    width: 100%;
    height: 36px;
    font-size: 13px;
    padding: 0 8px;
  }
  .month-stepper-group {
    grid-column: 1;
    width: 100%;
    height: 36px;
    display: flex;
    justify-content: space-between;
  }
  .month-stepper-group .select-pill {
    font-size: 13px;
    padding: 0 4px;
  }
  .btn-arrow {
    padding: 2px 6px;
    font-size: 15px;
  }
  #btn-cal-today {
    grid-column: 2;
    width: 100%;
    height: 36px;
    font-size: 13px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 星期表头 */
  .cal-weekday-row {
    font-size: 13px;
    margin-bottom: 8px;
  }

  /* 42 单元格日历矩阵 (手机端紧凑高质感) */
  .cal-matrix-grid {
    gap: 4px;
  }
  .day-grid-cell {
    min-height: 52px;
    padding: 2px 1px;
    border-radius: 8px;
  }
  .cell-solar-num {
    font-size: 17px;
    font-weight: 500;
  }
  .cell-lunar-text {
    font-size: 10px;
    font-weight: 400;
    margin-top: 1px;
  }
  .badge-corner,
  .badge-rest,
  .badge-work {
    width: 14px;
    height: 14px;
    font-size: 9px;
    top: 2px;
    right: 2px;
    border-radius: 2px;
  }
  .badge-today-mark {
    font-size: 8px;
    top: -2px;
    right: -2px;
    padding: 0 2px;
  }

  /* 核心节日卡片 (手机端) */
  .hero-fest-card {
    padding: 16px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: var(--radius-lg);
  }
  .h-fest-left {
    gap: 12px;
  }
  .h-fest-icon {
    font-size: 40px;
  }
  .h-fest-name {
    font-size: 24px;
  }
  .h-fest-desc {
    font-size: 13px;
  }
  .h-fest-dates {
    font-size: 12px;
  }
  .h-fest-timer-days {
    width: 100%;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 10px;
  }
  .timer-days-num {
    font-size: 34px;
  }

  /* 节日滑动速览：手机端双列卡片 */
  .fest-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fest-mini-card {
    padding: 10px;
  }
  .f-name {
    font-size: 13px;
  }
  .f-badge-days {
    font-size: 10px;
    padding: 1px 4px;
  }
  .f-dates {
    font-size: 11px;
  }

  /* 当日祥查 (手机端) */
  .detail-card {
    padding: 16px 14px;
    border-radius: var(--radius-lg);
  }
  .d-big-num {
    font-size: 42px;
  }

  /* 日期计算器 (手机端) */
  .calc-block {
    padding: 16px 14px;
    border-radius: var(--radius-lg);
    gap: 12px;
  }
  .calc-inputs-row {
    gap: 4px;
  }
  .c-input.year { width: 68px; }
  .c-input.month { width: 44px; }
  .c-input.day { width: 44px; }
  .c-input.days-count { width: 70px; }
  .c-select {
    font-size: 12px;
    padding: 6px 6px;
  }

  /* VPS 计算器 (手机端) */
  .vps-left-form, .vps-right-result {
    padding: 18px 14px;
  }
  .vps-row {
    flex-direction: column;
    gap: 12px;
  }
  .cycle-options-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .rate-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .rate-actions {
    width: 100%;
    justify-content: space-between;
  }
  .vps-amount-display {
    font-size: 36px;
  }
  .vps-val-num {
    font-size: 36px;
  }
  .vps-quote-row {
    gap: 8px;
  }
}
