/* 我们的计划：精简版布局（标签收纳、勾选式计划、首页今天要做） */

/* — 顶部标签：常用的一行放下，其余收进「更多」 — */
#plansScreen .daydayup-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: visible;
  position: relative;
}
#plansScreen .daydayup-tabs > button,
#plansScreen .plan-tab-more > summary {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 7px 11px;
  font-size: .88rem;
  white-space: nowrap;
}
.plan-tab-more { position: relative; flex: 0 0 auto; }
.plan-tab-more > summary {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.plan-tab-more > summary::-webkit-details-marker { display: none; }
.plan-tab-more > summary::after { content: "▾"; font-size: .8em; }
.plan-tab-more[open] > summary::after { content: "▴"; }
.plan-tab-more.is-active > summary { border-color: transparent; background: var(--grad-accent); color: #fff; }
.plan-tab-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(20, 31, 40, .16);
}
#plansScreen .plan-tab-more-menu button { width: 100%; justify-content: flex-start; text-align: left; border: 0; }

/* — 新增面板的关闭按钮：圆形 ✕，和标题垂直居中 — */
#planEntryDrawer .plan-entry-close:not([hidden]) {
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
}
#planEntryDrawer .daydayup-brand { margin: 0; line-height: 1.2; }

/* — 新增表单：不常用的选项折叠 — */
.plan-form-more { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.plan-form-more > summary { color: var(--accent-strong, var(--accent)); font-size: .9rem; font-weight: 700; cursor: pointer; }
.plan-form-more[open] { display: grid; gap: 12px; }

/* — 计划行：左边圆形勾选，右边 ⋯ — */
#plansScreen .plan-card.plan-card-compact {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 12px;
  padding: 12px 10px 12px 14px;
}
#plansScreen .plan-card-compact:has(.plan-card-more[open]) { z-index: 5; }
.plan-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin-top: 1px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
}
.plan-check.is-checked { background: var(--accent); }
.plan-card-compact .plan-card-body { display: grid; gap: 6px; min-width: 0; }
#plansScreen .plan-card-compact h4 { margin: 0; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
#plansScreen .plan-card-compact.is-done h4 { color: var(--muted); text-decoration: line-through; }
#plansScreen .plan-card-compact .plan-card-meta { gap: 6px; font-size: .76rem; }
#plansScreen .plan-card-compact .plan-card-date { margin-right: 0; color: var(--muted); }
.plan-card-compact .plan-card-note { margin: 0; color: var(--muted); font-size: .84rem; }
.plan-card-compact .subtask-list { display: grid; gap: 4px; }
.plan-card-compact > .plan-card-more { position: static; margin: 0; padding: 0; border: 0; }
.plan-card-compact > .plan-card-more > summary::after { content: none; }
#plansScreen .plan-stat-card[hidden] { display: none !important; }
.plan-card-compact > .plan-card-more > summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.plan-card-compact > .plan-card-more > summary::-webkit-details-marker { display: none; }
.plan-card-compact > .plan-card-more[open] > summary { background: var(--line); color: var(--text); }
.plan-card-more-menu {
  position: absolute;
  top: 46px;
  right: 8px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 56px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(20, 31, 40, .18);
}
.plan-card-more-menu .plan-card-actions { flex-wrap: wrap; gap: 6px; }
.plan-card-more-menu .plan-card-audit { margin: 0; color: var(--muted); font-size: .76rem; }
.plan-card-compact .plan-surprise-overdue { margin: 0; color: #b14d5b; font-size: .84rem; }

/* — 计划首页：今天要做 — */
.plan-today {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.plan-today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-today-head h2 { margin: 0; font-size: 1.15rem; }
.plan-today-head span { color: var(--muted); font-size: .85rem; }
.plan-today-list { display: grid; }
.plan-today-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.plan-today-row:first-child { border-top: 0; }
#plansScreen .plan-today-text {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text);
  text-align: left;
}
.plan-today-text strong { font-size: .98rem; overflow-wrap: anywhere; }
.plan-today-text small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.plan-today-row.is-overdue small { color: #b14d5b; }
.plan-today-empty { margin: 0; color: var(--muted); }
#plansScreen .plan-today-more { justify-self: start; }
#plansScreen .plan-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#plansScreen .plan-home-item { gap: 6px; padding: 14px; }
#plansScreen .plan-home-item > span { font-size: .82rem; overflow-wrap: anywhere; }

/* — 月历：只保留一套翻月控件 — */
#plansScreen .daydayup-main-picker { display: none !important; }
#plansScreen .calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}
#plansScreen .calendar-toolbar strong { text-align: center; }
#plansScreen .calendar-toolbar button { min-width: 44px; padding-inline: 12px; }

/* — 旅行卡片：删除收进「更多」 — */
.travel-more > summary { padding: 8px 12px; color: var(--muted); font-size: .9rem; cursor: pointer; list-style: none; }
.travel-more > summary::-webkit-details-marker { display: none; }
.travel-more[open] { display: grid; gap: 6px; }
