* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent: #002fa7; /* 克莱因蓝：微时钟品牌色 */
  --text: #1a1a1a;       /* 正文 */
  --text-2: #444;        /* 核心说明 */
  --text-3: #666;        /* 次级文字 */
  --text-muted: #8a8a8a; /* 辅助文字（不浅于此色） */
  --red: #a03228;        /* 罗斯科红：节日点缀色 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* 顶部导航：双行文字式，大类 + 子类，细红线标记当前项 */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.nav-row { display: flex; }

.nav-row a {
  position: relative;
  text-decoration: none;
  transition: all 0.15s;
}

/* 一级：胶囊标签组 */
.nav-cats {
  background: #ececec;
  border-radius: 10px;
  padding: 3px;
}

.nav-cats a {
  padding: 7px 20px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border-radius: 8px;
}

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

.nav-cats a.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-subs {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #ececec; /* 一二级之间的细分隔线 */
}

.nav-subs a {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.nav-subs a:hover { color: var(--text-2); }

.nav-subs a.active { color: var(--text-2); }

.nav-subs a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--red);
}

/* 品牌字标（全站左上角） */
.brand {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 39px;
  color: var(--text);
  text-decoration: none;
}

.brand-slogan {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .brand-slogan { display: none; } /* 小屏空间留给导航 */
}

@media (max-width: 480px) {
  .brand { display: none; } /* 极小屏优先保证导航不重叠 */
}

/* 页面标题（视觉 H1）+ 一行可信说明 */
.page-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

.page-sub {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 40px;
}

/* 首页模拟时钟（iOS 时钟 App 风格：白盘、分钟刻度、黑针、橙秒针） */
.home-main {
  justify-content: flex-start; /* 内容靠上排布，减少导航下方留白 */
  padding-top: clamp(100px, 12vh, 160px);
}

.analog {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #eef0f2;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 48px;
}

.analog-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 6px;
  margin: -3px 0 0 -0.5px;
  background: #d1d1d6;
  border-radius: 0.5px;
}

.analog-tick.hour {
  width: 2.5px;
  height: 12px;
  margin: -6px 0 0 -1.25px;
  background: #48484a;
  border-radius: 1.25px;
}

.ah {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 999px;
}

.ah-hour {
  width: 5px;
  height: 26%;
  margin-left: -2.5px;
  background: #1a1a1a;
}

.ah-min {
  width: 3.5px;
  height: 36%;
  margin-left: -1.75px;
  background: #1a1a1a;
}

.ah-sec {
  width: 1.5px;
  height: 40%;
  margin-left: -0.75px;
  bottom: calc(50% - 16px); /* 尾部越过中心 16px */
  background: #ff9500; /* iOS 时钟橙 */
}

.ah-cap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #1a1a1a;
  box-shadow: 0 0 0 2.5px #ff9500;
}

@media (max-width: 640px) {
  .analog { margin-bottom: 40px; }
}

/* 时钟 */
.clock {
  font-size: clamp(56px, 14vw, 120px);
  font-weight: 200;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.seconds {
  color: var(--accent);
  font-weight: 200;
}

.date-line {
  margin-top: 16px;
  font-size: 16px;
  color: #888;
  letter-spacing: 0.1em;
}

.conv-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 14px;
}

/* 日期差页：输入卡片 + 大结果 */
.diff-main {
  width: 100%;
  max-width: 720px;
  justify-content: flex-start; /* 顶部锚定，避免卡片与固定导航贴合 */
  padding-top: clamp(100px, 14vh, 160px);
}

.diff-card {
  width: 100%;
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  padding: 32px;
}

.diff-inputs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.diff-field { flex: 1; min-width: 0; }

.diff-sep {
  flex: none;
  padding-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.diff-field input {
  width: 100%;
  height: 46px;
  padding: 12px 10px;
  font-size: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.diff-field input:focus { border-color: #1a1a1a; }

.diff-main .output {
  margin-top: 56px;
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 200;
  letter-spacing: 0.02em;
  line-height: 1.2;
  min-height: 1.2em;
}

.diff-main .output-tip { margin-top: 12px; }

@media (max-width: 640px) {
  .diff-card { padding: 24px 20px; }
  .diff-inputs { flex-direction: column; align-items: stretch; gap: 20px; }
  .diff-sep { display: none; }
}

.output {
  margin-top: 12px;
  min-height: 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: all;
}

.output.empty { color: #ddd; cursor: default; user-select: none; }
.output.error { color: #c0392b; font-size: 13px; }

.output-tip {
  margin-top: 4px;
  min-height: 14px;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

.output-tip.copied { color: #888; }

/* 时间戳转换页：顶部实时时间戳主视觉 + 卡片式双转换器 */
.ts-main {
  width: 100%;
  max-width: 720px;
  justify-content: flex-start; /* 顶部锚定，避免标题被固定导航遮挡 */
  padding-top: clamp(100px, 12vh, 150px);
}

.ts-now-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-align: center;
  margin-bottom: 16px;
}

.ts-now {
  font-size: clamp(44px, 9vw, 72px);
  font-weight: 200;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  user-select: all;
  transition: color 0.15s;
}

.ts-now:hover { color: var(--accent); }

.ts-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 72px;
  width: 100%;
}

.ts-panel {
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  padding: 32px 24px;
  text-align: center;
}

.ts-panel input {
  width: 100%;
  height: 46px;
  padding: 12px 10px;
  font-size: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.ts-panel input:focus { border-color: #1a1a1a; }

.ts-panel .output {
  margin-top: 24px;
  font-size: 20px;
}

@media (max-width: 720px) {
  .ts-panels {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 56px;
  }
}

/* 秒表页：显示区锚定在上方，打点列表向下增长时不位移 */
.sw-main {
  justify-content: flex-start;
  padding-top: clamp(120px, 20vh, 220px);
}

/* 秒表 */
.sw-display {
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 200;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sw-cs {
  color: #b3b3b3;
  font-weight: 100;
}

.sw-btns {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.sw-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.sw-btn:hover { border-color: var(--text-muted); }

.sw-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sw-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.laps {
  margin-top: 40px;
  width: 100%;
  max-width: 360px;
  font-variant-numeric: tabular-nums;
}

.laps-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-size: 14px;
  color: #1a1a1a;
  border-bottom: 1px solid #eee;
}

.laps-row .lap-no { color: var(--text-muted); white-space: nowrap; }
.laps-row .lap-split { color: var(--accent); white-space: nowrap; }

.lap-note {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #1a1a1a;
  border-bottom: 1px dashed transparent;
  padding: 2px 0;
  transition: border-color 0.15s;
}

.lap-note::placeholder { color: #ddd; }
.lap-note:hover, .lap-note:focus { border-bottom-color: #ccc; }

/* 页脚：静态文字内容（SEO） */
.seo-footer {
  margin-top: 40px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 560px;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-3);
}

.seo-footer h1,
.seo-footer h2 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.seo-footer h2 { margin-top: 20px; }

.seo-footer p { margin: 0; }

.seo-footer dt {
  color: var(--text-2);
  margin-top: 10px;
}

.seo-footer dd { margin: 0; }


/* 文章页：语雀风格文档卡片 */
.article {
  width: 100%;
  max-width: 780px;
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  padding: 56px 64px;
  margin: 80px 0 48px;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  text-align: left;
}

.article h1 {
  font-size: 26px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.article .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f1f3;
}

.article h2 {
  font-size: 19px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 40px 0 12px;
}

.article p { margin: 14px 0; }
.article strong { color: #1a1a1a; }

.article a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 47, 167, 0.2);
  transition: border-color 0.15s;
}

.article a:hover { border-bottom-color: var(--accent); }

.article ul, .article ol { padding-left: 1.5em; }
.article li { margin: 6px 0; }

.article code {
  font-family: "SF Mono", Menlo, Monaco, monospace;
}

.article p code, .article li code {
  background: #f2f3f5;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
}

.article pre {
  background: #f6f8fa;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.8;
  margin: 16px 0;
}

.article pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 3px solid var(--accent);
  background: #f5f8fd;
  border-radius: 0 8px 8px 0;
  color: #555;
}

.article blockquote p { margin: 4px 0; }

/* 文章列表 */
.article-list-item {
  padding: 20px 0;
  border-bottom: 1px solid #f0f1f3;
}

.article-list-item:last-child { border-bottom: none; }

.article-list-item a {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  border: none;
  transition: color 0.15s;
}

.article-list-item a:hover { color: var(--accent); }

.article-list-item p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .article {
    padding: 32px 24px;
    margin: 64px 0 32px;
    border-radius: 10px;
  }

  .article h1 { font-size: 22px; }
}

.seo-footer a {
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid #e0e0e0;
}

.seo-footer a:hover { color: #1a1a1a; }

/* ICP 备案号 */
.seo-footer .beian { margin-top: 14px; }

/* 万年历 */
.cal-main {
  width: 100%;
  max-width: 960px;
  justify-content: flex-start; /* 内容较高时从顶部排布，避免被固定导航遮挡 */
  padding-top: clamp(100px, 10vh, 120px);
}

/* main 是 flex 纵向布局且 align-items:center，子元素默认收缩到内容宽度，需显式拉满 */
.cal-card,
.cal-head,
.cal-week,
.cal-grid {
  width: 100%;
}

.cal-card {
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  padding: 24px 32px;
}

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

.cal-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}

.cal-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}

.cal-nav:hover { border-color: var(--text-muted); }

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-week span {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  padding: 6px 0;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: clamp(64px, 9vh, 96px);
  padding: 8px 4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.cal-day:hover { background: #f2f2f2; }

.cal-day .d {
  font-size: 18px;
  font-weight: 400;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 50%;
}

.cal-day .l {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cal-day .l.festival { color: var(--red); }

.cal-day.dim .d { color: #ccc; }
.cal-day.dim .l { color: #ddd; }

.cal-day.today .d {
  background: var(--accent);
  color: #fff;
}

.cal-day.selected { background: #eef3fc; }
.cal-day.selected:hover { background: #e6eefb; }

.cal-detail {
  margin-top: 32px;
  min-height: 20px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.cal-detail.empty { color: #ddd; }

.cal-main .page-sub { margin-bottom: 24px; }

.cal-today {
  display: block;
  margin: 20px auto 0;
  padding: 7px 22px;
  font-size: 13px;
  color: var(--text-3);
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.cal-today:hover { color: #1a1a1a; border-color: var(--text-muted); }

@media (max-width: 640px) {
  body { justify-content: flex-start; }
  main { justify-content: flex-start; padding-top: 100px; }
  .home-main, .diff-main, .cal-main, .sw-main { padding-top: 100px; }
  .page-sub { margin-bottom: 28px; }
  .seo-footer { margin-top: 48px; }
}

@media (max-width: 560px) {
  .nav-cats a { padding: 7px 13px; }
  .cal-card { padding: 16px 10px; border-radius: 12px; }
  .cal-day { min-height: 52px; border-radius: 8px; }
  .cal-day .d { font-size: 14px; width: 26px; height: 26px; line-height: 26px; }
}

/* 品牌蓝细线：核心仪表的签名基线 */
.redline {
  width: 44px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin-top: 28px;
}

/* 倒计时 */
.cd-main {
  width: 100%;
  max-width: 720px;
  justify-content: flex-start;
  padding-top: clamp(100px, 12vh, 150px);
}

.cd-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-align: center;
  margin-bottom: 20px;
}

.cd-hero {
  font-size: clamp(40px, 8vw, 68px);
  font-weight: 200;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  color: var(--text);
}

.cd-hero .cd-days {
  color: var(--accent);
}

.cd-hero .cd-days-unit {
  font-size: 0.32em;
  color: var(--text-muted);
  margin: 0 0.35em 0 0.15em;
  letter-spacing: 0.1em;
}

.cd-hero .cd-colon {
  color: var(--text-muted);
  font-weight: 100;
}

.cd-target {
  margin-top: 18px;
  min-height: 18px;
  font-size: 14px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cd-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.cd-chip {
  padding: 7px 18px;
  font-size: 13px;
  color: var(--text-3);
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.cd-chip:hover { color: var(--text); border-color: #bbb; }

.cd-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: #f0f4fd;
}

.cd-custom {
  margin-top: 32px;
  max-width: 420px;
}

.cd-custom input {
  width: 100%;
  height: 46px;
  padding: 12px 10px;
  font-size: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.cd-custom input:focus { border-color: var(--text); }

/* 翻页时钟 */
.flip-main {
  width: 100%;
  justify-content: flex-start;
  padding-top: clamp(100px, 14vh, 170px);
}

.flip-clock {
  --h: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--h) * 0.06);
}

.flip-unit {
  position: relative;
  width: calc(var(--h) * 0.72);
  height: var(--h);
  perspective: calc(var(--h) * 10);
  filter: drop-shadow(0 calc(var(--h) * 0.05) calc(var(--h) * 0.1) rgba(0, 0, 0, 0.18));
}

.flip-half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #2b2b30, #232327);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-half .num {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--h) * 0.62);
  line-height: 1;
  font-weight: 300;
  color: #f5f5f7;
  font-variant-numeric: tabular-nums;
}

.flip-top {
  top: 0;
  border-radius: calc(var(--h) * 0.08) calc(var(--h) * 0.08) 0 0;
}

.flip-top .num { top: 0; }

.flip-bottom {
  bottom: 0;
  border-radius: 0 0 calc(var(--h) * 0.08) calc(var(--h) * 0.08);
  background: linear-gradient(180deg, #232327, #1c1c20);
}

.flip-bottom .num { top: -100%; }

/* 上翻板：旧数字，向下翻开；基础态折起隐藏，仅动画过程中可见 */
.flip-flap-top {
  top: 0;
  z-index: 2;
  border-radius: calc(var(--h) * 0.08) calc(var(--h) * 0.08) 0 0;
  transform: rotateX(-90deg);
  transform-origin: 50% 100%;
}

.flip-flap-top .num { top: 0; }

/* 下翻板：新数字，初始竖起不可见，随后翻落 */
.flip-flap-bottom {
  bottom: 0;
  z-index: 2;
  border-radius: 0 0 calc(var(--h) * 0.08) calc(var(--h) * 0.08);
  background: linear-gradient(180deg, #232327, #1c1c20);
  transform: rotateX(90deg);
  transform-origin: 50% 0;
}

.flip-flap-bottom .num { top: -100%; }

.flipping .flip-flap-top {
  animation: flipTop 0.18s cubic-bezier(0.37, 0.01, 0.94, 0.35) forwards;
}

.flipping .flip-flap-bottom {
  animation: flipBottom 0.18s cubic-bezier(0.15, 0.45, 0.28, 1) 0.18s forwards;
}

@keyframes flipTop {
  from { transform: rotateX(0); }
  to { transform: rotateX(-90deg); }
}

@keyframes flipBottom {
  from { transform: rotateX(90deg); }
  to { transform: rotateX(0); }
}

.flip-colon {
  font-size: calc(var(--h) * 0.45);
  font-weight: 200;
  line-height: var(--h);
  color: var(--accent);
  animation: colonPulse 2s ease-in-out infinite;
}

@keyframes colonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.flip-main .cal-today { margin-top: 48px; }

@media (max-width: 640px) {
  .flip-clock { --h: 56px; }
}

/* 全屏沉浸模式：只有时钟元素进入全屏，深色背景 */
.flip-clock:fullscreen {
  --h: min(28vh, 16vw);
  background: #141416;
}

.flip-clock:fullscreen .flip-colon {
  color: #f5f5f7;
}

/* 页脚「微时钟」hover 访问统计弹层 */
.stats-brand {
  position: relative;
  cursor: default;
  border-bottom: 1px dashed #ddd;
}

.brand-stats {
  position: absolute;
  bottom: calc(100% + 10px);
  top: auto;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
}

.stats-brand:hover .brand-stats {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.bs-today {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.bs-today strong {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bs-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.bs-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.bs-track {
  width: 12px;
  height: 40px;
  display: flex;
  align-items: flex-end;
  background: #f2f3f5;
  border-radius: 3px;
  overflow: hidden;
}

.bs-track i {
  display: block;
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.bs-bar em {
  font-size: 9px;
  font-style: normal;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bs-bar span {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bs-loading {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 2px;
}
