/* ============================================================
   时光计 — 样式
   浅色为主，深色跟随系统 / 手动切换
   ============================================================ */

:root {
  --bg: #f7f7f5;
  --bg-soft: #efeeea;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --line: #e6e4de;
  --line-soft: #efedE7;
  --text: #1b1b19;
  --text-2: #5c5b55;
  --text-3: #93918a;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --accent-text: #ffffff;
  --danger: #dc2626;
  --danger-soft: #fdf0f0;
  --ok: #059669;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(24, 24, 20, .05), 0 1px 3px rgba(24, 24, 20, .04);
  --shadow: 0 2px 6px rgba(24, 24, 20, .05), 0 8px 24px rgba(24, 24, 20, .06);
  --shadow-lg: 0 12px 48px rgba(24, 24, 20, .16);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --maxw: 720px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  --bg: #141416;
  --bg-soft: #1c1c1f;
  --surface: #1e1e21;
  --surface-2: #232327;
  --line: #2e2e33;
  --line-soft: #28282c;
  --text: #f2f2ef;
  --text-2: #a9a8a2;
  --text-3: #74736e;
  --accent: #8b85f8;
  --accent-soft: #26253a;
  --accent-text: #17171a;
  --danger: #f87171;
  --danger-soft: #2c1d1d;
  --ok: #34d399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 8px rgba(0, 0, 0, .34), 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-lg: 0 16px 56px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #141416;
    --bg-soft: #1c1c1f;
    --surface: #1e1e21;
    --surface-2: #232327;
    --line: #2e2e33;
    --line-soft: #28282c;
    --text: #f2f2ef;
    --text-2: #a9a8a2;
    --text-3: #74736e;
    --accent: #8b85f8;
    --accent-soft: #26253a;
    --accent-text: #17171a;
    --danger: #f87171;
    --danger-soft: #2c1d1d;
    --ok: #34d399;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 8px rgba(0, 0, 0, .34), 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-lg: 0 16px 56px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }

/* hidden 属性必须真正隐藏：下面多处元素设了 display，会覆盖 hidden 的默认样式 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- 启动态 ---------------- */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--bg);
  z-index: 90;
}
/* hidden 时必须彻底移出布局与命中测试，否则会拦截整页点击 */
.boot[hidden] { display: none; }
.boot-mark { font-size: 40px; animation: pulse 1.4s ease-in-out infinite; }
.boot-text { margin: 0; color: var(--text-3); font-size: 14px; }
@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1); }
}

/* ---------------- 登录 ---------------- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 20px calc(24px + var(--safe-b));
}
.auth-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-mark { font-size: 44px; line-height: 1; }
.auth-title {
  margin: 14px 0 0;
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -.02em;
}
.auth-sub {
  margin: 10px 0 26px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}
.auth-form { text-align: left; }
.auth-msg {
  margin: 0 0 12px;
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
}
.auth-foot {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
}
.field-label em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-3);
}
.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; min-width: 0; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-danger-ghost {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}
.btn-danger-ghost:hover { filter: brightness(.97); }
.btn-code { padding-inline: 12px; font-size: 13px; flex: 0 0 auto; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 17px;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }

.link-btn {
  display: block;
  margin: 10px auto 0;
  padding: 4px;
  background: none;
  border: 0;
  font-size: 12.5px;
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text-2); }

/* ---------------- 顶栏 ---------------- */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px calc(112px + var(--safe-b));
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top, 0px)) 0 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo { font-size: 25px; line-height: 1; }
.topbar-titles { min-width: 0; }
.topbar-title {
  margin: 0;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.topbar-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right { display: flex; gap: 2px; flex: 0 0 auto; }

/* ---------------- 标签页 ---------------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: background .16s, color .16s, box-shadow .16s;
}
.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.panel { animation: fade .22s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- 清单 ---------------- */
.list-meta {
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--text-3);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
/* 最后一排卡片右侧留出 FAB 的位置，避免遮挡「明细」按钮 */
.card-grid > .card:last-child:nth-child(odd) { margin-right: 0; }
@media (max-width: 560px) {
  .card-grid > .card:last-child { margin-bottom: 66px; }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-accent, var(--accent));
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-soft);
}
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-icon { font-size: 20px; line-height: 1; }
.card-name {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-count {
  flex: 0 0 auto;
  padding: 2px 7px;
  background: var(--bg-soft);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.card-elapsed {
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 620;
  letter-spacing: -.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.card-elapsed .u-d { color: var(--text); }
.card-elapsed .u-h { color: var(--text-2); }
.card-elapsed .u-u {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  margin: 0 1px 0 3px;
}
.card-since {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.card-mark {
  flex: 1;
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 640;
  transition: filter .15s, transform .12s;
}
.card-mark:hover { filter: brightness(.97); }
.card-mark:active { transform: scale(.97); }
.card-open {
  flex: 0 0 auto;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.card-open:hover { background: var(--bg-soft); color: var(--text); }

/* ---------------- 空态 ---------------- */
.empty {
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.empty-sm { padding: 28px 20px; }
.empty-mark { font-size: 34px; }
.empty-title {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 640;
}
.empty-sub {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}
.empty-sub-pad { margin: 14px 0 4px; }

/* ---------------- 年度页 ---------------- */
.year-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}
.year-label { text-align: center; min-width: 150px; }
.year-label > span:first-child {
  display: block;
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.year-range {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--text-3);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  padding: 14px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 640;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-3);
}

.top-card {
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.top-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.top-card-tag {
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 640;
}
.top-card-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-card-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.bar-track {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 20px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 20px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
}
.list-head-hint { font-weight: 400; color: var(--text-3); }
.list-head-tight { margin-top: 18px; }

.year-rows { display: flex; flex-direction: column; gap: 8px; }
.yrow {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.yrow:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.yrow-icon { font-size: 17px; text-align: center; }
.yrow-body { min-width: 0; }
.yrow-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yrow-bar {
  height: 4px;
  margin-top: 6px;
  background: var(--bg-soft);
  border-radius: 20px;
  overflow: hidden;
}
.yrow-bar > i {
  display: block;
  height: 100%;
  border-radius: 20px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}
.yrow-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.yrow-num small {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 2px;
}

/* ---------------- 弹层 ---------------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 16, .42);
  backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 8px 20px calc(22px + var(--safe-b));
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  animation: rise .26s cubic-bezier(.32, .72, 0, 1);
}
.sheet-panel-tall { max-height: 92vh; max-height: 92dvh; }
@keyframes rise {
  from { transform: translateY(100%); }
  to   { transform: none; }
}
.sheet-grab {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  background: var(--line);
  border-radius: 20px;
}
.sheet-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.01em;
}
.sheet-body { margin: 0; }
.sheet-msg {
  margin: 0 0 10px;
  min-height: 17px;
  font-size: 13px;
  color: var(--danger);
}
.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.sheet-actions .btn-primary { flex: 1; }
.sheet-actions-stack { flex-direction: column; }
.sheet-actions-stack .btn { width: 100%; }

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}
.emoji-grid button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 19px;
  transition: background .14s, border-color .14s, transform .12s;
}
.emoji-grid button:hover { background: var(--bg-soft); }
.emoji-grid button:active { transform: scale(.92); }
.emoji-grid button.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.color-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.color-grid button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  transition: transform .12s, border-color .14s;
}
.color-grid button:active { transform: scale(.9); }
.color-grid button.is-on {
  border-color: var(--text);
  transform: scale(1.08);
}

/* ---------------- 详情 ---------------- */
.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.detail-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--bg-soft);
  border-radius: 12px;
  font-size: 21px;
  flex: 0 0 auto;
}
.detail-head-text { flex: 1; min-width: 0; }
.detail-head .sheet-title { margin: 0; }
.detail-note {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-now {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.detail-now-main { flex: 1; min-width: 0; }
.detail-elapsed {
  display: block;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 640;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.detail-since {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-3);
}
.btn-mark { flex: 0 0 auto; padding: 10px 16px; font-size: 13.5px; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl {
  position: relative;
  padding: 11px 0 11px 22px;
  border-left: 2px solid var(--line-soft);
}
.tl:last-child { border-left-color: transparent; }
.tl::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.tl:first-child::before { background: var(--accent); }
.tl-time {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tl-gap {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------------- 账户 ---------------- */
.acct {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.acct-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 19px;
  flex: 0 0 auto;
}
.acct-text { min-width: 0; }
.acct-name {
  display: block;
  font-size: 14px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-mail {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- FAB / Toast ---------------- */
.fab {
  position: fixed;
  right: max(18px, calc(50% - var(--maxw) / 2 + 18px));
  bottom: calc(20px + var(--safe-b));
  z-index: 40;
  width: 54px;
  height: 54px;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: transform .16s, filter .16s;
}
.fab:hover { filter: brightness(1.06); }
.fab:active { transform: scale(.93); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-b));
  z-index: 80;
  max-width: min(88vw, 380px);
  padding: 11px 17px;
  background: var(--text);
  color: var(--bg);
  border-radius: 22px;
  font-size: 13.5px;
  font-weight: 550;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-elapsed { font-size: 23px; }
  .stat-num { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
