#plan-list { margin-bottom: 20px; flex-shrink: 0; max-height: 28%; }
#plan-list .history-item-title { flex-shrink: 0; width: 100%; }
.plan-card {
  display: block;
  width: min(100%, 460px);
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #383838;
  border-radius: 22px;
  background: linear-gradient(140deg, #202020, #111);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.plan-card:hover { border-color: #666; }
.plan-eyebrow { margin: 0 0 8px !important; color: #aaa; font-size: 10px; font-weight: 600; letter-spacing: 0.13em; }
.plan-card strong { display: block; margin-bottom: 6px; font-size: 18px; }
.plan-card span { display: block; margin-top: 10px; font-size: 12px; color: #aaa; }
.plan-context {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(800px, calc(100% - 32px));
  margin: 0 auto 8px;
  font-size: 12px;
}
.plan-context button:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-button {
  padding: 9px 14px;
  border: 1px solid #383838;
  border-radius: 999px;
  background: #1b1b1b;
  color: #eee;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.plan-button:hover { border-color: #777; }
.plan-button:disabled { opacity: 0.45; cursor: wait; }
.plan-primary { background: #fff; color: #111; border-color: #fff; }
.plan-muted { color: #aaa; font-size: 13px; line-height: 1.6; }
.plan-editor {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(660px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid #333;
  background: #101010;
  color: #eee;
  padding: 24px;
  overflow-y: auto;
}
.plan-editor::backdrop { background: rgba(0, 0, 0, 0.55); }
.plan-editor-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.plan-editor h2 { font-size: 20px; }
.plan-editor label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #aaa; min-width: 0; }
.plan-editor input, .plan-editor textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #383838;
  border-radius: 10px;
  padding: 10px;
  background: #171717;
  color: #eee;
  font: inherit;
  font-size: 14px;
}
.plan-editor textarea { resize: vertical; min-height: 70px; }
.plan-editor input:focus, .plan-editor textarea:focus { outline: 1px solid #aaa; }
.plan-field { margin-bottom: 14px; }
.plan-workout { border: 1px solid #333; border-radius: 18px; padding: 16px; margin: 20px 0; }
.plan-exercise { border-top: 1px solid #303030; padding: 16px 0; }
.plan-exercise-grid { display: grid; grid-template-columns: 65px 1fr 1fr; gap: 8px; margin: 10px 0; }
.plan-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.plan-row-actions .plan-button { font-size: 11px; padding: 6px 10px; }
.plan-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-bottom: env(safe-area-inset-bottom); }
.plan-button:focus-visible, .plan-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 768px) {
  .plan-editor { padding: 20px 16px; }
}
