.plan-section { margin-top: 26px; }
.plan-panel {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 20px 12px;
}
.plan-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.plan-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.plan-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}
.plan-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.01em;
}
.plan-count {
  padding: 3px 9px;
  border: 1px solid #e7efff;
  border-radius: 999px;
  background: #f6f9ff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}
.plan-hint {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #8a99ad;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}
.plan-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.plan-action:hover { color: var(--primary); border-color: #c9dcff; background: #f8fbff; }
.plan-action-link { color: var(--primary); border-color: #d8e5ff; background: #f6f9ff; }

.plan-viewport {
  position: relative;
  overflow: hidden;
  overflow: clip;
  height: 134px;
  margin-top: 10px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.plan-viewport::after {
  content: "";
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  bottom: 0;
  width: 26px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 50%);
  pointer-events: none;
}
.plan-viewport.is-dragging { cursor: grabbing; }
.plan-track {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 134px;
  will-change: transform;
  transition: transform .38s cubic-bezier(.22,.8,.2,1);
}
.plan-viewport.is-dragging .plan-track { transition: none; }
.plan-axis {
  position: absolute;
  z-index: 1;
  top: 52px;
  left: 8px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #dbe7fb, #edf2fa 88%, rgba(237,242,250,0));
  pointer-events: none;
}
.plan-month {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  height: 134px;
}
.plan-month-head {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: 0 0;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.plan-month-head:focus-visible {
  outline: 2px solid rgba(37,99,235,.35);
  outline-offset: 4px;
  border-radius: 4px;
}
.plan-month-label {
  color: #475569;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
.plan-month.current .plan-month-label { color: var(--primary); }
.plan-now {
  display: none;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}
.plan-month.current .plan-now { display: inline-flex; }
.plan-month-count {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
}
.plan-month.is-expanded .plan-month-count { color: #64748b; }
.plan-month-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: none;
  color: #94a3b8;
  line-height: 0;
}
.plan-month.is-expanded .plan-month-toggle { color: var(--primary); }
.plan-month-toggle .ic { width: 12px; height: 12px; }
.plan-month-dot {
  position: absolute;
  z-index: 3;
  top: 52px;
  left: 8px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dce6f4;
  box-shadow: 0 0 0 1px #dce6f4;
  transform: translate(-50%, -50%);
}
.plan-month.current .plan-month-dot {
  width: 13px;
  height: 13px;
  background: var(--primary-2);
  box-shadow: 0 0 0 2px rgba(59,130,246,.16);
}
.plan-month.current .plan-month-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(59,130,246,.38);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.55);
  animation: plan-current-glow 2.8s ease-in-out infinite;
}
@keyframes plan-current-glow {
  0%, 100% { opacity: 0; transform: scale(.55); }
  50% { opacity: .55; transform: scale(1.2); }
}

.plan-node {
  position: absolute;
  z-index: 3;
  top: 0;
  width: 168px;
  height: 134px;
}
.plan-node-date {
  position: absolute;
  top: 26px;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 550;
  letter-spacing: -.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-node-dot {
  position: absolute;
  z-index: 4;
  top: 52px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #bfd4f1;
  box-shadow: 0 0 0 1px #bfd4f1;
  transform: translate(-50%, -50%);
}
.plan-node.is-soon .plan-node-dot {
  width: 11px;
  height: 11px;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.18), 0 0 0 8px rgba(37,99,235,.06);
}
.plan-node.is-soon .plan-node-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(37,99,235,.48);
  border-radius: 50%;
  animation: plan-soon-glow 2.4s ease-out infinite;
}
@keyframes plan-soon-glow {
  0% { opacity: .7; transform: scale(.7); }
  75%, 100% { opacity: 0; transform: scale(1.45); }
}
.plan-node-card {
  position: absolute;
  top: 61px;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 168px;
  height: 68px;
  padding: 7px 9px 6px;
  overflow: hidden;
  border: 1px solid #e7edf6;
  border-left: 3px solid var(--cat, var(--primary-2));
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.055);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-user-drag: none;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}
.plan-node-card:hover {
  border-color: #c9dcff;
  background: #fbfdff;
  box-shadow: 0 7px 18px rgba(30,64,175,.11);
  transform: translateY(-1px);
}
.plan-month.current .plan-node-card {
  background: #fbfdff;
  border-color: #dbeafe;
  box-shadow: 0 5px 16px rgba(37,99,235,.08);
}
.plan-node-card.is-more { border-left-color: #cbd5e1; background: #f8fbff; }
.plan-node-card.is-more:hover { background: #f2f7ff; }
.plan-node-title {
  display: -webkit-box;
  height: 36px;
  overflow: hidden;
  color: #172033;
  font-size: 13.4px;
  line-height: 1.32;
  font-weight: 650;
  letter-spacing: -.015em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.plan-node-meta {
  display: block;
  margin-top: auto;
  overflow: hidden;
  color: #8496ad;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-node-state {
  color: #b7791f;
  font-weight: 650;
  white-space: nowrap;
}
.plan-node-state.is-running { color: #16835b; }
.plan-node-more-title {
  color: #172033;
  font-size: 13.4px;
  line-height: 1.32;
  font-weight: 650;
  letter-spacing: -.015em;
}
.plan-node-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
}
.plan-node-more .ic { flex: none; }

@media (max-width: 1100px) {
  .plan-hint { display: none; }
}
@media (max-width: 760px) {
  .plan-section { display: none; }
}
