/* ============================================================
   专升本打卡 · 视觉系统 v2
   柔和云朵风：冷蓝白底 + 多层细腻阴影 + 克制的圆角。
   移动优先 —— 所有尺寸按 390px 宽的手机为基准设计，
   再向平板 / 桌面放大，不做「桌面缩小版」。
   ============================================================ */

:root {
  /* 底色 */
  --bg: #EDF3FE;
  --bg-2: #E5EEFC;
  --surface: #FFFFFF;
  --surface-2: #F4F8FF;
  --surface-3: #E9F0FD;

  /* 线条 */
  --line: #E4ECF9;
  --line-2: #CFDDF4;

  /* 文字 */
  --ink: #1C2740;
  --ink-2: #55658A;
  --ink-3: #8D9EBC;

  /* 主色 */
  --brand: #3F7EF7;
  --brand-2: #6FA6FF;
  --brand-ink: #2C64D6;
  --brand-soft: #E9F1FF;

  /* 功能色 */
  --pink: #FF8FAC;
  --pink-soft: #FFE9F0;
  --mint: #3FCBA8;
  --mint-soft: #E1F7F1;
  --lemon: #F5B33F;
  --lemon-soft: #FFF3DC;
  --danger: #E9586F;
  --danger-soft: #FFEBEF;
  --ok: #35BE86;

  /* 阴影：近紧远散的三层叠加，比单层大阴影干净得多 */
  --sh-1: 0 1px 2px rgba(28, 39, 64, .05), 0 3px 10px -6px rgba(28, 39, 64, .12);
  --sh-2: 0 2px 6px rgba(28, 39, 64, .05), 0 14px 30px -18px rgba(28, 39, 64, .24);
  --sh-3: 0 6px 16px rgba(28, 39, 64, .07), 0 34px 64px -30px rgba(28, 39, 64, .34);

  /* 圆角 */
  --r-xs: 10px;
  --r-sm: 14px;
  --r: 18px;
  --r-lg: 22px;
  --r-xl: 28px;
  --pill: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --pop: cubic-bezier(.34, 1.42, .64, 1);

  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
          "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
          system-ui, -apple-system, "Segoe UI", sans-serif;

  --top-h: 58px;
  --w: 560px;          /* 内容最大宽度 */
  --pad: 16px;         /* 页面左右留白 */
  --gap: 12px;
  --nav-safe: calc(70px + env(safe-area-inset-bottom, 0px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1524;
    --bg-2: #131B2E;
    --surface: #19223A;
    --surface-2: #1F2942;
    --surface-3: #24304C;
    --line: #2A3653;
    --line-2: #3A4970;
    --ink: #E9F0FF;
    --ink-2: #AEC0DC;
    --ink-3: #7787A6;
    --brand: #69A2FF;
    --brand-2: #8CBBFF;
    --brand-ink: #A7CBFF;
    --brand-soft: #1D2A48;
    --pink: #FFA3B8;
    --pink-soft: #3A2531;
    --mint: #5FDCBE;
    --mint-soft: #193330;
    --lemon: #FFD27A;
    --lemon-soft: #382E1D;
    --danger: #FF8296;
    --danger-soft: #3A2028;
    --ok: #5FDCBE;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .34), 0 3px 10px -6px rgba(0, 0, 0, .5);
    --sh-2: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 32px -20px rgba(0, 0, 0, .8);
    --sh-3: 0 8px 20px rgba(0, 0, 0, .4), 0 34px 64px -30px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; }

/* 作者样式里的 display 会盖掉浏览器默认的 [hidden]{display:none}，
   统一强制一次，登录页 / 主界面 / 抽屉 / 对话框都靠它切换。 */
[hidden] { display: none !important; }

html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
  -webkit-touch-callout: none;
}
body.is-locked { overflow: hidden; }

/* 背景上几团很淡的云，避免大片纯色发闷 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(58% 38% at 12% -6%, rgba(63, 126, 247, .16), transparent 70%),
    radial-gradient(48% 32% at 92% -2%, rgba(255, 143, 172, .14), transparent 70%),
    radial-gradient(70% 40% at 50% 104%, rgba(63, 203, 168, .10), transparent 72%);
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--brand-soft);
  color: var(--brand-ink);
  padding: 1px 6px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: 10px;
}

/* 图标：统一线宽与端点，比 emoji 稳 */
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-sm { width: 17px; height: 17px; stroke-width: 2; }
.ico-lg { width: 23px; height: 23px; }

.mascot { width: 34px; height: 34px; display: block; }
.mascot-lg { width: 88px; height: 88px; }

@media (prefers-reduced-motion: no-preference) {
  .mascot-bob { animation: bob 3.4s var(--ease) infinite; }
  @keyframes bob {
    0%, 100% { transform: translateY(0) }
    50% { transform: translateY(-5px) }
  }
}

/* 科目配色：按科目在列表里的顺序轮换，sc-0 … sc-5 */
.sc-0 { --tint: #3F7EF7; --tint-soft: #E9F1FF; }
.sc-1 { --tint: #F2789B; --tint-soft: #FFE9F0; }
.sc-2 { --tint: #2FBFA0; --tint-soft: #E1F7F1; }
.sc-3 { --tint: #E8A33D; --tint-soft: #FFF3DC; }
.sc-4 { --tint: #7E6BE0; --tint-soft: #EFEBFF; }
.sc-5 { --tint: #2BA5C9; --tint-soft: #E3F5FC; }
@media (prefers-color-scheme: dark) {
  .sc-0 { --tint: #6EA6FF; --tint-soft: #1D2A48; }
  .sc-1 { --tint: #FFA7BC; --tint-soft: #3A2531; }
  .sc-2 { --tint: #63DCC0; --tint-soft: #193330; }
  .sc-3 { --tint: #FFD47C; --tint-soft: #382E1D; }
  .sc-4 { --tint: #A695FF; --tint-soft: #2A2547; }
  .sc-5 { --tint: #6FD0EA; --tint-soft: #16323C; }
}

/* ============================================================
   通用零件
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--pad);
}

.card-title { font-size: 15px; margin-bottom: 14px; }

.note {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-top: 10px;
}
.note-tight { margin-top: 9px; font-size: 12.5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--pill);
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .14s var(--pop), background .18s var(--ease),
              box-shadow .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: translateY(2px) scale(.985); }
.btn[disabled] { opacity: .55; pointer-events: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(63, 126, 247, .7);
}
.btn-primary:hover { background: linear-gradient(180deg, #7FB0FF, var(--brand-2)); }
.btn-primary:active { box-shadow: 0 3px 10px -5px rgba(63, 126, 247, .6); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(233, 88, 111, .7);
}
.btn-danger:hover { background: #F06C81; }

.btn-sm { min-height: 38px; padding: 0 15px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--pill);
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
  transition: background .16s var(--ease), color .16s var(--ease), transform .14s var(--pop);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-ink); }
.icon-btn:active { transform: scale(.9); }

/* 小胶囊：回到今天 / 状态标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--pill);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip-accent {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-ink);
}
.chip-accent:hover { background: var(--brand); color: #fff; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

/* 没写 type 的 input 会被浏览器按默认样式渲染（白底、直角、内嵌灰边框），
   和这套卡片风完全不搭。这里一并收进来 —— 用 :where() 让本条保持零特异性，
   免得盖掉 .se-emoji / .sr-only 这些自己带样式的地方。 */
input:where(:not([type])),
input[type="text"], input[type="password"], input[type="date"], textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  font-size: 16px;
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
input[type="date"] { min-height: 48px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
::placeholder { color: var(--ink-3); }

.dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}

/* ============================================================
   登录
   ============================================================ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  overflow: auto;
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(60% 40% at 50% 0%, rgba(63, 126, 247, .18), transparent 72%),
    radial-gradient(50% 34% at 50% 100%, rgba(255, 143, 172, .14), transparent 72%);
}
.gate-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 32px 24px 26px;
  text-align: center;
}
.gate-mascot {
  width: 100px; height: 100px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--brand-soft), var(--surface-2));
  border-radius: 50%;
  position: relative;
}
.gate-mascot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1.5px dashed var(--line-2);
}
.gate-mascot .mascot { width: 78px; height: 78px; }
.gate-card h1 { font-size: 22px; margin-bottom: 6px; }
.gate-sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: 22px; }
.gate-card input[type="password"] { text-align: center; letter-spacing: .06em; }
.gate-card .btn { margin-top: 14px; }
.gate-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--danger);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .gate-card { animation: gateIn .5s var(--pop) both; }
  @keyframes gateIn {
    from { opacity: 0; transform: translateY(18px) scale(.96) }
    to { opacity: 1; transform: none }
  }
  .gate-card.shake { animation: shake .42s var(--ease); }
  @keyframes shake {
    0%, 100% { transform: translateX(0) }
    22% { transform: translateX(-9px) }
    44% { transform: translateX(8px) }
    68% { transform: translateX(-5px) }
  }
}

/* ============================================================
   布局骨架
   ============================================================ */

.app { min-height: 100%; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.7) blur(16px);
  -webkit-backdrop-filter: saturate(1.7) blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-avatar {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  font-size: 19px;
  line-height: 1;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--brand-soft), var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.22; min-width: 0; }
.brand-text b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); }

.tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--pill);
}
.tab {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  min-height: 34px;
  padding: 0 16px;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), transform .14s var(--pop);
}
.tab:hover { color: var(--ink); }
.tab:active { transform: scale(.95); }
.tab.is-active {
  background: var(--surface);
  color: var(--brand-ink);
  box-shadow: var(--sh-1);
}

.stage {
  position: relative;
  z-index: 1;
  max-width: var(--w);
  margin: 0 auto;
  padding: var(--pad);
  padding-bottom: 40px;
}

.view { display: none; }
.view.is-active { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .view.is-active { animation: viewIn .34s var(--ease) both; }
  @keyframes viewIn {
    from { opacity: 0; transform: translateY(10px) }
    to { opacity: 1; transform: none }
  }
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 2px 11px;
}
.section-head h2 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2::before {
  content: "";
  width: 4px; height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  flex: none;
}
.hint { font-size: 12.5px; color: var(--ink-3); }

.tabbar { display: none; }

/* ============================================================
   今日 · 日期卡
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 16px 14px 14px;
  background: linear-gradient(168deg, var(--surface) 40%, var(--brand-soft) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -34px; top: -46px;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 126, 247, .16), transparent 68%);
  pointer-events: none;
}
.hero-row { display: flex; align-items: center; gap: 6px; }
.hero-main { flex: 1; text-align: center; min-width: 0; }
.hero-date {
  font-size: clamp(21px, 6.2vw, 25px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.hero-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

.hero-bar {
  position: relative;
  height: 6px;
  border-radius: var(--pill);
  background: var(--surface-3);
  margin: 13px 2px 0;
  overflow: hidden;
}
.hero-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width .6s var(--ease);
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 2px 0;
  min-height: 30px;
}
.hero-progress { font-size: 12.5px; color: var(--ink-2); }
.hero-foot .chip { margin-left: auto; }

/* ============================================================
   今日 · 科目
   ============================================================ */

.subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
}

.subject {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: var(--sh-1);
  transition: transform .18s var(--pop), box-shadow .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  min-height: 118px;
}
.subject:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--tint, var(--line-2)); }
.subject:active { transform: translateY(0) scale(.98); }
.subject.is-open { border-color: var(--tint, var(--brand)); background: var(--tint-soft, var(--brand-soft)); }

.subject-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.subject-emoji {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  font-size: 18px;
  line-height: 1;
  border-radius: 13px;
  background: var(--tint-soft, var(--brand-soft));
}
.subject-name {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-placeholder {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

/* 圆点 + 徽标同一行，给科目名腾出整行宽度 */
.subject-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; min-height: 20px; }
.subject-dots { display: flex; gap: 5px; flex: 1; min-width: 0; }
.subject-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tint, var(--brand));
  display: block;
  flex: none;
}
.subject-badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--ink-3);
  white-space: nowrap;
}
.subject-badge.on { background: var(--tint-soft, var(--brand-soft)); color: var(--tint, var(--brand-ink)); }

/* ============================================================
   抽屉 / 对话框
   ============================================================ */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 37, .52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  background: var(--surface);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.sheet-grip {
  width: 38px; height: 4px;
  border-radius: var(--pill);
  background: var(--line-2);
  margin: 8px auto 0;
  flex: none;
}
.sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad);
  flex: 1;
  min-height: 0;
}
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--pad);
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}
.sheet-foot .btn-primary, .sheet-foot .btn-danger { margin-left: auto; }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px var(--pad) 12px;
  flex: none;
}
.sheet-head-main {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  min-width: 0; flex: 1; line-height: 1.3;
}
.sheet-title { display: block; min-width: 0; max-width: 100%; }
.sheet-head .rec-chip { font-size: 14px; padding: 4px 11px; }
.sheet-head .rec-chip-emoji { font-size: 13px; }
.sheet-head-main small { font-size: 12.5px; color: var(--ink-3); }
.sheet-head .icon-btn { margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .sheet-scrim { animation: fadeIn .22s var(--ease) both; }
  @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
  .sheet-panel { animation: sheetUp .34s var(--ease) both; }
  @keyframes sheetUp {
    from { transform: translateY(24px); opacity: .4 }
    to { transform: none; opacity: 1 }
  }
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
}
.dialog-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 37, .54);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dialog-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 22px 20px 18px;
  text-align: center;
}
.dialog-card h3 { font-size: 17px; margin-bottom: 8px; }
.dialog-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.dialog-actions { display: flex; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { flex: 1; }

@media (prefers-reduced-motion: no-preference) {
  .dialog-scrim { animation: fadeIn .2s var(--ease) both; }
  .dialog-card { animation: dlgIn .3s var(--pop) both; }
  @keyframes dlgIn {
    from { opacity: 0; transform: translateY(14px) scale(.95) }
    to { opacity: 1; transform: none }
  }
}

/* ============================================================
   打卡面板内容
   ============================================================ */

.composer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--pad) 12px;
  flex: none;
}
.composer-title {
  font-size: 16.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.composer-head .icon-btn { margin-left: auto; }

.checkin-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.ci {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 12px;
}
.ci-num {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: var(--pill);
  margin-top: 1px;
}
.ci-body { flex: 1; min-width: 0; }
.ci-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.ci-text.empty { color: var(--ink-3); font-style: italic; }
.ci-meta { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.ci-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ci-thumbs img {
  width: 46px; height: 46px; object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.ci.is-editing { border-color: var(--brand); background: var(--brand-soft); }
.ci-actions { display: flex; gap: 2px; flex: none; }
.ci-actions .icon-btn { width: 34px; height: 34px; }

.edit-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--lemon-soft);
  border: 1px solid color-mix(in srgb, var(--lemon) 45%, transparent);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}
.edit-bar .btn { margin-left: auto; }

.thumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.thumbs:empty { display: none; }

.thumb {
  position: relative;
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x {
  position: absolute;
  top: 3px; right: 3px;
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 28, 45, .74);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
}
.thumb.is-up::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .6);
}
.thumb.is-up .spin {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.spin {
  width: 18px; height: 18px;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.composer-note {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 0 var(--pad) 12px;
  flex: none;
}
.composer-note:empty { display: none; }
.composer-note.err { color: var(--danger); font-weight: 600; }

/* ============================================================
   时间轴 / 记录卡
   ============================================================ */

.timeline { display: flex; flex-direction: column; gap: 10px; }

.rec {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: 14px 15px 14px 17px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s var(--pop), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.rec:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.rec:active { transform: scale(.99); }
.rec::before {
  content: "";
  position: absolute;
  left: 0; top: 13px; bottom: 13px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--tint, var(--brand));
}
.rec-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.rec-avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  font-size: 17px;
  line-height: 1;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.6px solid var(--tint, var(--line-2));
}
/* 科目胶囊：跟参考站一样，把「图标 + 科目名 + 打卡序号」装进一枚药丸 */
.rec-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: var(--pill);
  background: var(--tint-soft, var(--brand-soft));
  color: var(--tint, var(--brand-ink));
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.rec-chip-emoji { font-size: 12px; line-height: 1; flex: none; }
.rec-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-chip-seq {
  flex: none;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--tint, var(--brand-ink));
}
.rec-time { margin-left: auto; font-size: 12px; color: var(--ink-3); flex: none; }
.rec-more { color: var(--ink-3); flex: none; margin-left: -2px; }
.rec-text {
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.rec-text:empty { display: none; }
.rec-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rec-imgs img {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform .18s var(--pop);
}
.rec-imgs img:hover { transform: scale(1.04); }

/* 记录详情抽屉里的图文 */
.detail-text {
  font-size: 15px;
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}
.detail-text.is-empty {
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
/* 详情里的图片走缩略图网格，点开才看大图 —— 不再是一张图占满一屏 */
.detail-imgs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.detail-imgs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  cursor: zoom-in;
  display: block;
  transition: transform .16s var(--pop);
}
.detail-imgs img:hover { transform: scale(1.02); }
.detail-imgs img:only-child { grid-column: span 2; aspect-ratio: 16 / 10; }

.empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
  background: var(--surface-2);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-lg);
  line-height: 1.8;
}
.empty-mascot {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1.5px solid var(--line);
  box-shadow: var(--sh-1);
}
.empty-mascot-face { font-size: 30px; line-height: 1; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .empty-mascot { animation: bob 3.4s var(--ease) infinite; }
}

/* ============================================================
   日历
   ============================================================ */

.cal-card { padding: 16px 14px 14px; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.cal-head strong { font-size: 16px; }

.cal-week, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-week {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  margin-bottom: 6px;
}
.cal-week span { padding: 2px 0; }

.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px solid transparent;
  background: transparent;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background .16s var(--ease), transform .14s var(--pop), border-color .16s var(--ease), color .16s var(--ease);
}
.cal-cell.is-blank { visibility: hidden; pointer-events: none; }
.cal-cell.is-future { color: var(--ink-3); font-weight: 400; }
.cal-cell.has { background: var(--brand-soft); color: var(--brand-ink); }
.cal-cell.has:hover { background: var(--surface-3); }
.cal-cell:hover { transform: scale(1.06); }
.cal-cell:active { transform: scale(.94); }
.cal-cell.is-today { border-color: var(--pink); }
.cal-cell.is-selected {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px -6px rgba(63, 126, 247, .7);
}
.cal-cell.is-selected .cal-dot { background: rgba(255, 255, 255, .92); }

.cal-dots { display: flex; gap: 3px; height: 5px; align-items: center; }
.cal-dot {
  width: 4.5px; height: 4.5px;
  border-radius: 50%;
  background: var(--brand);
  display: block;
}

.cal-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 14px;
}
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 9px; height: 9px; border-radius: 50%; display: block; }
.lg-a { background: var(--brand); }
.lg-ring { background: transparent; border: 2px solid var(--pink); }

/* ============================================================
   统计
   ============================================================ */

.countdown {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--brand) 0%, #6FA6FF 100%);
  border-radius: var(--r-lg);
  box-shadow: 0 14px 30px -16px rgba(63, 126, 247, .8);
  color: #fff;
  padding: 20px;
}
.countdown::after {
  content: "";
  position: absolute;
  right: -30px; bottom: -50px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .countdown { background: linear-gradient(135deg, #3E6FCC 0%, #4E86E8 100%); }
}
.cd-left { display: flex; align-items: baseline; gap: 5px; flex: none; position: relative; }
.cd-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.cd-unit { font-size: 15px; font-weight: 600; opacity: .9; }
.cd-right { display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cd-right b { font-size: 15px; }
.cd-right span { font-size: 12.5px; opacity: .9; line-height: 1.5; }

.quote {
  margin-top: 12px;
  position: relative;
  padding: 18px 20px 18px 42px;
}
.quote-mark {
  position: absolute;
  left: 14px; top: 8px;
  font-size: 38px;
  line-height: 1;
  color: var(--brand);
  opacity: .26;
  font-family: Georgia, serif;
}
.quote p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }

.streak-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.streak-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: 14px 15px;
}
.sc-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.sc-ico {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1;
  background: var(--tint-soft, var(--brand-soft));
}
.sc-num {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.sc-num small { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-left: 3px; }
.sc-label { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.rate-list { display: flex; flex-direction: column; gap: 9px; }
.rate-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: 13px 15px;
}
.rate-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.rate-name { font-size: 14.5px; font-weight: 700; }
.rate-total { font-size: 12px; color: var(--ink-3); }
.rate-pct {
  margin-left: auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--tint, var(--brand-ink));
  font-variant-numeric: tabular-nums;
}
.rate-bar {
  height: 9px;
  border-radius: var(--pill);
  background: var(--surface-3);
  overflow: hidden;
}
.rate-fill {
  height: 100%;
  border-radius: var(--pill);
  background: var(--tint, var(--brand));
  transition: width .6s var(--ease);
  min-width: 0;
}

.heat-card { padding: 15px 14px 13px; }
.heat-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-bottom: 7px;
  padding-left: 20px;
}
.heat-months span { white-space: nowrap; }
.heat-wrap { display: flex; gap: 6px; }
.heat-days {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  gap: 4px;
  font-size: 10px;
  color: var(--ink-3);
  width: 14px;
  flex: none;
}
.heat-days span { display: flex; align-items: center; height: 100%; }
.heat-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--surface-3);
  border: none;
  padding: 0;
  cursor: default;
}
.heat-cell[data-l="1"] { background: #C9DEFB; }
.heat-cell[data-l="2"] { background: #93BDF8; }
.heat-cell[data-l="3"] { background: #62A0F5; }
.heat-cell[data-l="4"] { background: var(--brand); }
.heat-cell.is-future { opacity: .32; }
.heat-cell.is-today { outline: 2px solid var(--pink); outline-offset: 1px; }
@media (prefers-color-scheme: dark) {
  .heat-cell[data-l="1"] { background: #2E4778; }
  .heat-cell[data-l="2"] { background: #3C62A6; }
  .heat-cell[data-l="3"] { background: #5285D2; }
  .heat-cell[data-l="4"] { background: var(--brand); }
}

.week-compare { padding: 16px 14px 12px; }
.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  align-items: end;
  height: 128px;
}
.wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.wd-bar {
  width: 100%;
  max-width: 32px;
  border-radius: var(--pill) var(--pill) 6px 6px;
  background: var(--surface-3);
  transition: height .5s var(--ease);
  min-height: 5px;
}
.wd-bar.has { background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.wd-bar.is-today { background: linear-gradient(180deg, #FFB3C6, var(--pink)); }
.wd-num { font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wd-label { font-size: 12px; color: var(--ink-3); }

/* ============================================================
   设置
   ============================================================ */

.view#view-settings .card { margin-bottom: 12px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 22px;
  line-height: 1;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  transition: transform .16s var(--pop), border-color .16s var(--ease), background .16s var(--ease);
}
.avatar-opt:hover { transform: translateY(-2px); }
.avatar-opt.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -8px rgba(63, 126, 247, .8);
}

.subject-editor { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.se-row {
  display: grid;
  grid-template-columns: 52px 1fr 30px;
  gap: 9px;
  align-items: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px;
}
.se-emoji {
  height: 46px;
  text-align: center;
  font-size: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xs);
  width: 100%;
  padding: 0;
}
.se-fields { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.se-fields input { padding: 9px 12px; font-size: 14.5px; }
.se-del {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  border-radius: 9px;
  cursor: pointer;
  display: grid; place-items: center;
  margin-top: 8px;
}
.se-del:hover { background: var(--danger-soft); color: var(--danger); }
.se-del[disabled] { opacity: .35; pointer-events: none; }

/* ============================================================
   大图 / 提示 / 庆祝
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(12, 18, 32, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  border-radius: var(--r);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .85);
}
.lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }
.lightbox-hint {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .58);
}

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--pill);
  box-shadow: var(--sh-3);
  max-width: 100%;
}
.toast.ok { background: var(--ok); color: #fff; }
.toast.err { background: #E2586F; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toastIn .3s var(--pop) both; }
  @keyframes toastIn {
    from { opacity: 0; transform: translateY(14px) scale(.9) }
    to { opacity: 1; transform: none }
  }
}

.burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 135;
  overflow: hidden;
}
.burst i {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 2px;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: no-preference) {
  .burst i { animation: fly var(--dur, 1s) var(--ease) forwards; }
  @keyframes fly {
    0% { transform: translate(0, 0) rotate(0); opacity: 1 }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0 }
  }
}

/* ============================================================
   移动端（主场景）
   ============================================================ */

@media (max-width: 640px) {
  :root { --pad: 14px; }

  .topbar { padding: 0 var(--pad); }
  .tabs { display: none; }
  .stage { padding-bottom: var(--nav-safe); }

  /* 底部固定导航条：贴着屏幕底边，不悬浮在内容之上 */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: color-mix(in srgb, var(--surface) 93%, transparent);
    backdrop-filter: saturate(1.8) blur(20px);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -1px 16px color-mix(in srgb, var(--ink) 7%, transparent);
    padding: 6px calc(var(--pad) - 4px) calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar-btn {
    border: none;
    background: transparent;
    border-radius: var(--r);
    min-height: 50px;
    padding: 5px 2px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    transition: color .18s var(--ease), background .18s var(--ease), transform .14s var(--pop);
  }
  .tabbar-btn:active { transform: scale(.93); }
  .tabbar-btn.is-active { color: var(--brand-ink); background: var(--brand-soft); }

  .toast-wrap { bottom: calc(var(--nav-safe) + 8px); }

  .card { border-radius: var(--r-lg); }
  .hero { padding: 14px 12px 12px; }
  .cd-num { font-size: 38px; }
  .sheet-head { padding-top: 10px; }
}

/* 极窄屏：科目改单列，避免文字挤成竖条 */
@media (max-width: 359px) {
  .subjects { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .streak-grid { grid-template-columns: 1fr; }
}

/* 桌面 / 平板：抽屉变成居中卡片，页面更宽 */
@media (min-width: 641px) {
  :root { --pad: 18px; --w: 720px; }

  .sheet { justify-content: center; align-items: center; padding: 32px; }
  .sheet-panel {
    width: min(560px, 100%);
    max-height: min(700px, 84vh);
    border-radius: var(--r-xl);
  }
  .sheet-grip { display: none; }
  .sheet-center .sheet-head { padding-top: 20px; }

  .subjects { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .streak-grid { grid-template-columns: repeat(4, 1fr); }
  .stage { padding-bottom: 64px; }
}

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