.head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}
.head h1 { font-size: clamp(40px, 8vw, 72px); }
.head .subtitle { font-size: clamp(15px, 2.4vw, 18px); }

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.progress-bar {
  width: 180px;
  height: 12px;
  border-radius: 999px;
  background: #f3ece4;
  overflow: hidden;
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb3c1, var(--yellow), #8fdcae);
  transition: width .6s cubic-bezier(.3, .9, .3, 1.3);
}

/* ---------- 三个板块 ---------- */
.boards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: min(940px, 100%);
}

.board {
  --tint: var(--pink);
  --deep: #d4555f;
  position: relative;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  min-height: 270px;
  padding: 26px 24px 22px;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.5), box-shadow .3s;
  animation: rise .7s cubic-bezier(.2, .9, .3, 1.3) both;
}
.board:nth-child(2) { animation-delay: .1s; }
.board:nth-child(3) { animation-delay: .2s; }
.board:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 20px 40px rgba(180, 120, 90, .2); }

.board.sx { --tint: var(--sky); --deep: #3d6fc4; }
.board.yy { --tint: var(--mint); --deep: #26864f; }

.board::before {
  content: "";
  position: absolute;
  width: 170px; height: 170px;
  right: -50px; top: -50px;
  border-radius: 50%;
  background: var(--tint);
}

.board .icon {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: var(--tint);
  margin-bottom: 6px;
  animation: hop 3s ease-in-out infinite;
}
.board:nth-child(2) .icon { animation-delay: -1s; }
.board:nth-child(3) .icon { animation-delay: -2s; }

.board .name { font-size: 34px; font-weight: 800; letter-spacing: 6px; }
.board .slogan { font-size: 14px; color: var(--ink-soft); letter-spacing: 1px; }
.board .meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.board .count { font-size: 13px; color: var(--ink-soft); }
.board .enter {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--deep);
}

.board .stamp {
  position: absolute;
  top: 20px; right: 18px;
  z-index: 1;
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 3px solid var(--deep);
  color: var(--deep);
  background: rgba(255, 255, 255, .7);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  transform: rotate(-16deg) scale(0);
  transition: transform .45s cubic-bezier(.5, -0.3, .5, 1.6);
}
.board.done .stamp { transform: rotate(-16deg) scale(1); }
.board.done .enter::before { content: "✓ "; }

/* ---------- 详情面板 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(90, 60, 45, .28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.panel {
  --tint: var(--pink);
  --deep: #d4555f;
  position: relative;
  width: min(480px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 30px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(90, 60, 45, .25);
  transform: translateY(30px) scale(.94);
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.4);
}
.overlay.open .panel { transform: none; }
.panel.sx { --tint: var(--sky); --deep: #3d6fc4; }
.panel.yy { --tint: var(--mint); --deep: #26864f; }

.close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--deep);
  background: #fff;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 26px 22px;
  background: var(--tint);
}
.panel-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 36px;
}
.panel-head h2 { font-size: 30px; font-weight: 800; letter-spacing: 4px; color: var(--deep); }
.panel-head p { font-size: 14px; color: var(--ink-soft); }

.panel-body { padding: 22px 26px 6px; }
.panel-body h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 12px;
}

.tasks { list-style: none; display: grid; gap: 10px; }
.tasks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #faf6f1;
  font-size: 16px;
  line-height: 1.6;
  cursor: pointer;
  user-select: none;
  transition: transform .15s;
}
.tasks li:active { transform: scale(.98); }
.tasks li .box {
  flex: 0 0 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 8px;
  border: 2px solid var(--deep);
  background: #fff;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: background .2s;
}
.tasks li.checked .box { background: var(--deep); }
.tasks li.checked .box::after { content: "✓"; }
.tasks li.checked .text { text-decoration: line-through; opacity: .5; }
.tasks li.empty { cursor: default; justify-content: center; color: var(--ink-soft); }

.timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--tint);
}
.timer-face {
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 34px;
  font-weight: 700;
  color: var(--deep);
}
.timer.running .timer-face { animation: tick 1s steps(1) infinite; }
@keyframes tick { 50% { opacity: .55; } }

.btn-soft, .btn-main {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  border-radius: 999px;
  transition: transform .15s, box-shadow .15s;
}
.btn-soft {
  padding: 10px 18px;
  font-size: 14px;
  color: var(--deep);
  background: #fff;
}
.btn-soft:hover { transform: translateY(-2px); }

.panel-foot { padding: 18px 26px 26px; }
.btn-main {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  letter-spacing: 4px;
  color: #fff;
  background: var(--deep);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .15);
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, .15); }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.btn-main.undo { background: #f3ece4; color: var(--ink-soft); box-shadow: none; letter-spacing: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 40;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 30px rgba(90, 60, 45, .2);
  transform: translate(-50%, 120px);
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.4);
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .boards { grid-template-columns: 1fr; max-width: 420px; }
  .board { min-height: 210px; }
}
