:root {
  --bg: #f7f8fc;
  --ink: #1f2430;
  --muted: #687386;
  --panel: #ffffff;
  --line: #e3e7ef;
  --soft: #f0f4ff;
  --blue: #3276ff;
  --red: #ff6b6b;
  --yellow: #ffd43b;
  --green: #20c997;
  --purple: #845ef7;
  --shadow: 0 18px 45px rgba(31, 36, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7f8fc 0%, #eef6ff 46%, #fff7eb 100%);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.97);
}

button.quiet {
  background: #eaf0ff;
  color: #2457bd;
}

button.danger {
  background: #ffe8e8;
  color: #c73535;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 16px;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: 34px;
  line-height: 1.18;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
  display: grid;
  gap: 18px;
}

.topbar {
  min-height: 190px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(50, 118, 255, 0.14), rgba(255, 212, 59, 0.22)),
    #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-daxi {
  width: clamp(104px, 16vw, 160px);
  height: auto;
  align-self: flex-end;
  filter: drop-shadow(0 14px 18px rgba(31, 36, 48, 0.16));
}

.eyebrow {
  margin-bottom: 6px;
  color: #f76707;
  font-size: 13px;
  font-weight: 900;
}

.date-box {
  min-width: 160px;
  border-radius: 8px;
  background: #1f2430;
  color: #fff;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.date-box span {
  color: #c8d1df;
  font-size: 13px;
}

.date-box strong {
  font-size: 19px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-card,
.planner-band,
.review-band,
.goal-card,
.wechat-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.wechat-tools {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wechat-tools strong,
.wechat-tools span,
.wechat-tools em {
  display: block;
}

.wechat-tools strong {
  margin-bottom: 4px;
}

.wechat-tools span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wechat-tools em {
  width: fit-content;
  margin-top: 7px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3154b8;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.wechat-tools em[data-mode="cloud"] {
  background: #dff8ee;
  color: #087f5b;
}

.wechat-tools em[data-mode="syncing"] {
  background: #fff3bf;
  color: #a16800;
}

.wechat-tools em[data-mode="error"] {
  background: #ffe3e3;
  color: #c92a2a;
}

.wechat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.file-action {
  min-height: 40px;
  border-radius: 8px;
  background: #eaf0ff;
  color: #2457bd;
  padding: 9px 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  cursor: pointer;
}

.file-action input {
  display: none;
}

.summary-card {
  min-height: 108px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  border: 0;
}

.summary-card span {
  color: rgba(31, 36, 48, 0.72);
  font-weight: 800;
}

.summary-card strong {
  font-size: 30px;
  line-height: 1;
}

.summary-card.coral {
  background: #ffe3e3;
}

.summary-card.sky {
  background: #dff3ff;
}

.summary-card.mint {
  background: #dff8ee;
}

.summary-card.lemon {
  background: #fff3bf;
}

.planner-band,
.review-band {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.section-title,
.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.title-mascot {
  width: 78px;
  height: 82px;
  object-fit: contain;
  margin-left: auto;
  filter: drop-shadow(0 8px 10px rgba(31, 36, 48, 0.12));
}

.task-form {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr) 130px 90px;
  gap: 10px;
}

.task-pool {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pool-item {
  border: 1px solid color-mix(in srgb, var(--accent), white 66%);
  border-left: 8px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pool-item strong,
.pool-item span {
  display: block;
  overflow-wrap: anywhere;
}

.pool-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.pool-item button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--accent), #1f2430 8%);
}

.board-head {
  margin-top: 4px;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.goal-card {
  overflow: hidden;
}

.goal-card header {
  min-height: 116px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 78%), #fff);
  border-bottom: 1px solid var(--line);
}

.goal-card header h3 {
  margin-top: 2px;
}

.goal-card header img {
  width: 82px;
  height: 98px;
  object-fit: contain;
  flex: 0 0 auto;
  transform: translateY(8px);
  filter: drop-shadow(0 10px 12px rgba(31, 36, 48, 0.12));
}

.task-editor {
  padding: 16px;
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #4b5567;
  font-size: 13px;
  font-weight: 900;
}

.compact-row,
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.empty-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.empty {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

@media (max-width: 960px) {
  .summary-grid,
  .goal-board,
  .task-pool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background: #f5f7fb;
  }

  .app-shell {
    width: 100%;
    padding: 0 10px calc(28px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .topbar,
  .section-title,
  .board-head,
  .wechat-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .section-title {
    position: relative;
  }

  .title-mascot {
    position: absolute;
    right: 96px;
    top: -8px;
    width: 58px;
    height: 62px;
  }

  .topbar {
    min-height: 0;
    margin: 0 -10px;
    border-radius: 0 0 8px 8px;
    border-left: 0;
    border-right: 0;
    padding: calc(18px + env(safe-area-inset-top)) 16px 16px;
    gap: 14px;
    display: grid;
    grid-template-columns: 1fr 96px;
    align-items: end;
  }

  .hero-daxi {
    width: 92px;
    justify-self: end;
    grid-column: 2;
    grid-row: 1;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 19px;
  }

  h3 {
    font-size: 19px;
  }

  button,
  .file-action {
    min-height: 46px;
  }

  .date-box {
    min-width: 0;
    grid-template-columns: 1fr auto;
    align-items: center;
    grid-column: 1 / -1;
  }

  .wechat-tools,
  .planner-band,
  .review-band,
  .goal-card {
    box-shadow: 0 10px 24px rgba(31, 36, 48, 0.06);
  }

  .wechat-actions,
  .board-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .board-actions {
    grid-template-columns: 1fr 1fr;
  }

  .summary-grid,
  .goal-board,
  .task-pool,
  .task-form,
  .compact-row,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .pool-item {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-card {
    min-height: 82px;
    padding: 13px;
  }

  .summary-card strong {
    font-size: 25px;
  }

  .task-form {
    gap: 8px;
  }

  .goal-card header {
    min-height: 98px;
    padding: 14px;
  }

  .goal-card header img {
    width: 72px;
    height: 86px;
    transform: translateY(6px);
  }

  .task-editor {
    padding: 14px;
  }

  textarea[data-field="title"] {
    min-height: 68px;
  }
}
