/* My Plan — daily journal layout
   Scoped to the plan dashboard only. Loaded after wellness-refresh.css. */
#plan-home{
  background:
    radial-gradient(60% 34% at 100% 0,rgba(214,199,255,.38),transparent 62%),
    radial-gradient(52% 38% at 0 12%,rgba(230,246,240,.5),transparent 64%),
    linear-gradient(180deg,#f8f4ff 0%,#f2effb 45%,#faf8ff 100%);
}
#plan-home>.plan-dashboard{
  padding:max(24px,env(safe-area-inset-top)) 14px calc(122px + env(safe-area-inset-bottom));
  background:
    radial-gradient(62% 28% at 100% 0,rgba(225,214,255,.42),transparent 58%),
    linear-gradient(180deg,#fbf9ff 0%,#f4f0fc 52%,#fbfaff 100%);
}

/* Editorial hero */
#plan-home>.plan-dashboard>.plan-title-row{
  position:relative;
  min-height:138px;
  overflow:hidden;
  padding:16px 22px 14px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:30px;
  color:#fff;
  background:
    radial-gradient(72% 82% at 8% 0,rgba(255,255,255,.12),transparent 58%),
    linear-gradient(96deg,#1d0f3f 0%,#312064 36%,rgba(58,35,121,.82) 58%,rgba(64,39,134,.4) 82%,rgba(64,39,134,.28) 100%),
    url('../assets/plan/spring-plan-banner.webp') center center/cover no-repeat;
  box-shadow:0 22px 44px rgba(43,26,94,.2);
  isolation:isolate;
}
#plan-home>.plan-dashboard>.plan-title-row::before{display:none}
#plan-home>.plan-dashboard>.plan-title-row::after{
  content:"";
  position:absolute;
  z-index:0;
  right:-52px;
  bottom:-98px;
  width:230px;
  height:230px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 0 0 32px rgba(255,255,255,.035),0 0 0 66px rgba(255,255,255,.018);
  pointer-events:none;
}
#plan-home>.plan-dashboard>.plan-title-row h1{
  position:relative;
  z-index:1;
  margin:8px 0 0;
  color:#fff;
  font-size:35px;
  font-weight:800;
  line-height:1.02;
  letter-spacing:-.06em;
  text-shadow:0 2px 18px rgba(15,8,42,.22);
}
#plan-home>.plan-dashboard>.plan-title-row p{
  position:relative;
  z-index:1;
  max-width:78%;
  margin:8px 0 0;
  color:rgba(255,255,255,.78);
  font-size:12.5px;
  line-height:1.62;
}
/* Agenda heading */
#plan-home>.plan-dashboard>.plan-section-head{
  align-items:flex-end;
  margin:0;
  padding:18px 5px 10px;
}
#plan-home>.plan-dashboard>.plan-section-head h2{
  display:flex;
  align-items:center;
  gap:9px;
  color:#241c3c;
  font-size:20px;
  line-height:1.35;
  letter-spacing:-.035em;
}
#plan-home>.plan-dashboard>.plan-section-head h2 i{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  margin:0;
  border-radius:10px;
  color:#fff;
  background:linear-gradient(135deg,#7656e8,#5837c9);
  box-shadow:0 8px 17px rgba(97,64,218,.22);
  font-size:17px;
}
#plan-home>.plan-dashboard>.plan-section-head::after{
  content:"DAILY AGENDA";
  padding-bottom:7px;
  color:#8a7e9f;
  font:700 9px/1 var(--w-font,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif);
  letter-spacing:.14em;
}

/* One joined daily agenda card instead of four floating boxes */
#plan-home>.plan-dashboard>.plan-today-modules{
  display:block;
  margin:0;
  padding:7px 18px;
  border:1px solid #ece4f8;
  border-radius:28px;
  background:rgba(255,255,255,.93);
  box-shadow:0 18px 42px rgba(62,45,119,.085);
}
#plan-home>.plan-dashboard .plan-today-module{
  min-width:0;
  margin:0;
  padding:17px 0;
  border:0!important;
  border-bottom:1px solid #eee8f7!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#plan-home>.plan-dashboard .plan-today-module:last-child{
  padding-bottom:19px;
  border-bottom:0!important;
}
#plan-home>.plan-dashboard .plan-today-module.sport{
  padding-top:20px;
}
#plan-home>.plan-dashboard .plan-today-module-head{
  align-items:center;
  gap:9px;
  margin-bottom:13px;
}
#plan-home>.plan-dashboard .plan-today-module-head h3{
  gap:9px;
  color:#241c3c;
  font-size:16px;
  line-height:1.5;
  letter-spacing:-.02em;
}
#plan-home>.plan-dashboard .plan-today-module-head h3>i{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:9px;
  color:#6b4be3;
  background:#f0ebff;
  font-size:17px;
}
#plan-home>.plan-dashboard .plan-today-module.sport h3>i{color:#087f65;background:#e3f7f0}
#plan-home>.plan-dashboard .plan-today-module.food h3>i{color:#d9743f;background:#fff0e5}
#plan-home>.plan-dashboard .plan-today-module.skin h3>i{color:#d95c96;background:#ffeaf3}
#plan-home>.plan-dashboard .plan-today-module.sleep h3>i{color:#7b64cc;background:#eeeafb}
#plan-home>.plan-dashboard .plan-today-module-head small{
  padding:3px 7px;
  border-radius:999px;
  color:#746a8a;
  background:#f6f2fc;
  font-size:10px;
  font-weight:600;
}

/* Empty modules collapse to calm, single-line rows */
#plan-home>.plan-dashboard .plan-today-module:not(.sport):has(.plan-today-empty){
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:12px;
  padding:14px 0;
}
#plan-home>.plan-dashboard .plan-today-module:not(.sport):has(.plan-today-empty) .plan-today-module-head{
  margin-bottom:0;
}
#plan-home>.plan-dashboard .plan-today-empty{
  justify-self:end;
  margin:0;
  padding:5px 9px;
  border-radius:999px;
  color:#958aa7;
  background:#f7f4fc;
  font-size:11px;
  line-height:1.4;
  white-space:nowrap;
}

/* Breakfast call-to-action inside the agenda */
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-task{
  gap:11px;
  margin-top:3px;
  padding:10px 11px;
  border:1px solid #f3e5d7;
  border-radius:15px;
  background:#fffbf6;
  transition:background .2s ease,border-color .2s ease;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-task:hover{
  background:#fff7ef;
  border-color:#ecd7c1;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-task img{
  width:54px;
  height:54px;
  border-radius:11px;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-copy{gap:3px}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-copy small{
  color:#b58d68;
  font-size:10px;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-copy strong{
  color:#3d2b22;
  font-size:13.5px;
  line-height:1.4;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-copy>span{
  color:#9e8a94;
  font-size:10.5px;
  line-height:1.5;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-task>i{
  color:#c39a6e;
  font-size:18px;
}
#plan-home>.plan-dashboard .plan-today-module.food .breakfast-dashboard-task:focus-visible{
  outline:3px solid rgba(211,155,101,.26);
  outline-offset:2px;
}

/* Saved workout card: one clear action hierarchy */
#plan-home>.plan-dashboard .plan-today-sport-list{
  display:grid;
  gap:11px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task{
  padding:15px;
  border:1px solid #e6dcf8;
  border-radius:22px;
  background:linear-gradient(145deg,#fff 0%,#faf7ff 100%);
  box-shadow:0 12px 28px rgba(62,45,119,.065);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task.is-completed{
  border-color:#d9d0ec;
  background:linear-gradient(145deg,#fefdff 0%,#f5f2ff 100%);
  box-shadow:0 8px 20px rgba(62,45,119,.05);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-complete-summary{
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  place-items:center start;
  gap:12px;
  min-height:0;
  padding:14px 16px;
  border:1px solid #d9d0ec;
  border-radius:22px;
  text-align:left;
  background:linear-gradient(120deg,#f4fffb,#faf8ff);
  box-shadow:0 8px 20px rgba(62,45,119,.05);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-complete-summary>i{
  width:52px;
  height:52px;
  margin:0;
  border-radius:17px;
  color:#16866c;
  background:#def8f0;
  font-size:27px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task.is-completed .sport-saved-task-icon{
  background:linear-gradient(145deg,#8fd8c1,#4aab91);
  box-shadow:0 8px 17px rgba(58,153,126,.2);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task.is-completed .sport-task-start{
  color:#1f8069;
  background:#e2f7f0;
  box-shadow:none;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-state{
  color:#1c866d;
  background:#e2f7f0;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-head{
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:11px;
  min-height:52px;
  margin:0;
  padding:0;
  background:transparent;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-icon{
  width:48px;
  height:48px;
  border-radius:15px;
  background:linear-gradient(145deg,#8d74ff 0%,#5938d8 100%);
  box-shadow:0 8px 18px rgba(89,56,216,.24);
  font-size:25px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-head strong{
  color:#211a3c;
  font-size:19px;
  font-weight:800;
  line-height:1.24;
  letter-spacing:-.035em;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-head small{
  margin-top:3px;
  color:#77708b;
  font-size:11.5px;
  line-height:1.4;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-start{
  min-height:44px;
  padding:0 14px;
  border-radius:14px;
  background:linear-gradient(135deg,#7c5bf0,#5b39d9);
  box-shadow:0 8px 17px rgba(91,57,217,.22);
  font-size:12.5px;
  letter-spacing:.01em;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-start:active{transform:scale(.96)}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-tags{
  margin:13px 2px 11px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-conditions{
  color:#746b88;
  font-size:11.5px;
  line-height:1.7;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-day{display:none}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-sequence-open,
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-checkin-open{
  margin-top:9px;
  padding:12px 13px;
  border-radius:14px;
  font-size:12px;
  line-height:1.5;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-sequence-open{
  border-color:#e7ddfa;
  background:#f8f5ff;
  color:#5c47b2;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-sequence-open i:first-child{
  color:#7454e3;
  font-size:16px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-checkin-open{
  border-color:#e3d8fa;
  background:#fff;
  color:#5a46b0;
  box-shadow:inset 3px 0 0 #6b4be3;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-checkin-open>i:first-child{
  color:#6b4be3;
  font-size:16px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-checkin-open-label{
  color:#84759e;
  font-size:10.5px;
  font-weight:600;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-checkin-open-value{
  margin-top:2px;
  color:#3e2b92;
  font-size:14px;
  font-weight:800;
  letter-spacing:-.01em;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-manage{
  margin-top:12px;
  padding-top:11px;
  border-top:1px solid #efe9f8;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-manage small{
  color:#8c829d;
  font-size:10.5px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-delete{
  min-height:34px;
  padding:0 12px;
  border:1px solid #f1ccda;
  border-radius:11px;
  color:#c94b73;
  background:linear-gradient(180deg,#fff9fb,#fff1f6);
  font-size:11px;
  font-weight:800;
  box-shadow:0 4px 10px rgba(201,75,115,.06);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-delete:hover{
  border-color:#e9aec4;
  background:#ffe9f1;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-saved-task-delete i{font-size:14px}

/* Keep the floating nav legible over dense agenda content */
#plan-home>.plan-dashboard>.posture-bottom-nav{
  border-color:rgba(236,228,249,.96)!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(45,30,92,.16),0 2px 8px rgba(45,30,92,.06);
  backdrop-filter:blur(18px) saturate(1.15);
  -webkit-backdrop-filter:blur(18px) saturate(1.15);
}


@media (max-width:360px){
  #plan-home>.plan-dashboard>.plan-title-row{padding:14px 18px 12px;min-height:132px}
  #plan-home>.plan-dashboard>.plan-title-row h1{margin-top:6px;font-size:32px}
  #plan-home>.plan-dashboard>.plan-title-row p{max-width:82%;font-size:12px}
  #plan-home>.plan-dashboard>.plan-today-modules{padding-left:15px;padding-right:15px}
  #plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-start{padding:0 11px;font-size:11.5px}
}

@media (min-width:720px){
  #plan-home>.plan-dashboard{border-radius:34px}
}
/* ===== 明日任务清单 ===== */
#plan-home>.plan-dashboard>.plan-tomorrow-head{padding:24px 6px 10px}
#plan-home>.plan-dashboard>.plan-tomorrow-head::after{content:none}
#plan-home>.plan-dashboard>.plan-tomorrow-head h2{min-width:0}
#plan-home>.plan-dashboard>.plan-tomorrow-head .plan-section-sub{flex:none;font-size:11.5px;font-weight:500;color:#8d84a8;letter-spacing:.01em}
#plan-home>.plan-dashboard .plan-tomorrow-sport-list{display:grid;gap:10px}
/* 列表元素自带 display:grid，会盖掉 [hidden] 的 display:none：
   空态时它仍占一行，把右侧胶囊顶下去、把行高撑高。这里强制隐藏。 */
#plan-home>.plan-dashboard .plan-tomorrow-sport-list[hidden],
#plan-home>.plan-dashboard .plan-today-sport-list[hidden]{display:none!important}
#plan-home>.plan-dashboard .plan-today-module-head small:empty{display:none}

/* 模块没任务：一律收成「标题 + 右侧胶囊」一行，四个模块共用同一套排版 */
#plan-home>.plan-dashboard .plan-today-module.is-idle{
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px 0;
}
#plan-home>.plan-dashboard .plan-today-module.is-idle .plan-today-module-head{
  flex:1 1 auto;
  min-width:0;
  margin-bottom:0;
}
#plan-home>.plan-dashboard .plan-today-module.is-idle .plan-today-empty{
  flex:0 0 auto;
  margin-left:auto;
  justify-self:auto;
}
/* 兼容旧结构：靠 :has 兜底，行为同上 */
#plan-home>.plan-dashboard .plan-today-module:has(.plan-today-empty){
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px 0;
}
#plan-home>.plan-dashboard .plan-today-module:has(.plan-today-empty) .plan-today-module-head{flex:1 1 auto;min-width:0;margin-bottom:0}
#plan-home>.plan-dashboard .plan-today-module:has(.plan-today-empty) .plan-today-empty{flex:0 0 auto;margin-left:auto}

/* 明日卡片沿用今日卡片：右上角用「明日」标签代替开始按钮 */
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-task-state.is-tomorrow{
  display:inline-flex;
  align-items:center;
  height:auto;
  padding:6px 11px;
  border-radius:999px;
  color:#6d51c9;
  background:#f1ebff;
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.02em;
  white-space:nowrap;
}

/* 恢复日卡片：明日/今日在计划里是恢复日时，仍要露出来，不用「暂无安排」 */
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-rest-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  border:1px solid #e6e4f2;
  border-radius:18px;
  background:linear-gradient(150deg,#fbfaff,#f5f4fc);
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-rest-card>i{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:13px;
  color:#5f7fc9;
  background:#edf1fd;
  font-size:19px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-rest-card>div{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-rest-card strong{
  color:#2b2950;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:.01em;
}
#plan-home>.plan-dashboard :is(.plan-today-sport-list,.plan-tomorrow-sport-list) .sport-rest-card span{
  color:#8380a0;
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
}

