/* ===== 倒计时 · 杂志极简（单卡片 · 居中）=====
   仅 D:H:M:S（无毫秒），避免平板挤成一团。
   沿用 style.css 的 html[data-theme] 双主题机制。 */

.cd-wrap {
  display: flex;
  justify-content: center;
  margin: 22px 0 12px;
  max-width: 100%;
}

.cd {
  position: relative;
  width: min(100%, 320px);
  min-height: 138px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border-radius: 1.5rem;
  overflow: hidden;
  box-sizing: border-box;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

html[data-theme="light"] .cd {
  background: linear-gradient(160deg, rgba(255,255,255,.78) 0%, rgba(232,238,248,.62) 55%, rgba(214,226,242,.58) 100%);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: 0 4px 14px rgba(15,23,42,.06), 0 14px 28px -12px rgba(15,23,42,.14);
}
html[data-theme="dark"] .cd {
  background: linear-gradient(160deg, rgba(30,41,59,.86) 0%, rgba(22,31,45,.82) 55%, rgba(15,23,42,.86) 100%);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 14px 28px -12px rgba(0,0,0,.45);
}
.cd:hover { transform: translateY(-3px); }
html[data-theme="light"] .cd:hover {
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 6px 18px rgba(37,99,235,.1), 0 18px 34px -14px rgba(37,99,235,.2);
}
html[data-theme="dark"] .cd:hover {
  border-color: rgba(96,165,250,.3);
  box-shadow: 0 6px 18px rgba(0,0,0,.34), 0 18px 34px -14px rgba(37,99,235,.3);
}

.cd-eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .28em;
  text-transform: uppercase; text-indent: .28em;
}
html[data-theme="light"] .cd-eyebrow { color: #8a95a1; }
html[data-theme="dark"]  .cd-eyebrow { color: #8a98a6; }

/* 四段均分，左右不挤 */
.cd-row {
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto;
  align-items: start;
  justify-content: space-between;
  width: 100%;
  max-width: 280px;
  column-gap: 4px;
  row-gap: 0;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 2px;
}

.cd-num {
  font-size: 1.85rem;
  font-weight: 800; line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  background: linear-gradient(160deg, #2b8aa0 0%, #1f6e7c 55%, #17505c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .cd-num {
  background: linear-gradient(160deg, #7fd4e0 0%, #4fb3c6 55%, #2b8aa0 100%);
  -webkit-background-clip: text; background-clip: text;
}

.cd-label {
  margin-top: 5px;
  font-size: .55rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  text-indent: .16em;
}
html[data-theme="light"] .cd-label { color: #9aa5b1; }
html[data-theme="dark"]  .cd-label { color: #7f8d9b; }

.cd-colon {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  align-self: flex-start;
  padding-top: .35rem;
  user-select: none;
  opacity: .85;
}
html[data-theme="light"] .cd-colon { color: rgba(31,110,124,.45); }
html[data-theme="dark"]  .cd-colon { color: rgba(127,212,224,.45); }

.cd-foot {
  font-size: .55rem; letter-spacing: .14em; text-transform: uppercase;
  text-indent: .14em;
}
html[data-theme="light"] .cd-foot { color: #a8b2bd; }
html[data-theme="dark"]  .cd-foot { color: #78868f; }

.cd.is-fired .cd-num {
  background: linear-gradient(160deg, #16a34a 0%, #15803d 60%, #14532d 100%);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="dark"] .cd.is-fired .cd-num {
  background: linear-gradient(160deg, #86efac 0%, #4ade80 60%, #22c55e 100%);
  -webkit-background-clip: text; background-clip: text;
}
.cd-fired-msg {
  display: none;
  font-size: .55rem; font-weight: 700;
  letter-spacing: .22em; text-indent: .22em; text-transform: uppercase;
}
html[data-theme="light"] .cd.is-fired .cd-fired-msg { color: #15803d; }
html[data-theme="dark"]  .cd.is-fired .cd-fired-msg { color: #86efac; }
.cd.is-fired .cd-fired-msg { display: block; }
.cd.is-fired .cd-foot { display: none; }

@keyframes cd-tick { 0% { opacity: .32; } 100% { opacity: 1; } }
.cd-num.is-tick { animation: cd-tick .22s ease-out; }

/* 平板 / 中等宽度：两行 D:H / M:S，彻底不挤 */
@media (max-width: 860px) {
  .cd {
    width: min(100%, 280px);
    min-height: 150px;
    padding: 16px 14px 14px;
  }
  .cd-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    max-width: 240px;
    column-gap: 10px;
    row-gap: 12px;
    justify-items: center;
  }
  /* D : H */
  /* M : S */
  .cd-row .cd-unit:nth-child(1) { grid-column: 1; grid-row: 1; }
  .cd-row .cd-colon:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; padding-top: 0; }
  .cd-row .cd-unit:nth-child(3) { grid-column: 3; grid-row: 1; }
  .cd-row .cd-colon:nth-child(4) { display: none; }
  .cd-row .cd-unit:nth-child(5) { grid-column: 1; grid-row: 2; }
  .cd-row .cd-colon:nth-child(6) { grid-column: 2; grid-row: 2; align-self: center; padding-top: 0; }
  .cd-row .cd-unit:nth-child(7) { grid-column: 3; grid-row: 2; }
  .cd-num { font-size: 1.7rem; }
}

/* 手机窄屏 */
@media (max-width: 400px) {
  .cd { width: min(100%, 260px); }
  .cd-num { font-size: 1.55rem; }
  .cd-colon { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-num.is-tick { animation: none; }
  .cd { transition: none; }
  .cd:hover { transform: none; }
}
