.plan-panel {
  margin: 0 0 22px;
  padding: clamp(18px, 3.2vw, 34px);
  background: #fffdf9;
  border: 1px solid #dedbd4;
  border-radius: 12px;
  color: #302e2a;
}
.plan-panel h2, .plan-panel h3, .plan-empty h3 {
  margin: 0;
  font-family: Baskerville, "Iowan Old Style", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
}
.plan-panel h2 { font-size: clamp(25px, 3vw, 34px); }
.plan-panel p, .plan-form p { line-height: 1.5; }
.plan-section-head, .plan-toolbar, .plan-nav, .plan-form-actions, .plan-member-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.plan-section-head, .plan-toolbar { justify-content: space-between; gap: 14px; }
.plan-section-head { margin-bottom: 20px; }
.plan-toolbar { padding: 0 0 17px; }
.plan-nav { gap: 5px; }
.plan-primary, .plan-button, .plan-link, .plan-icon-btn, .plan-tabs button, .plan-row-title, .cal-number, .cal-event, .cal-more {
  appearance: none; cursor: pointer; font-family: inherit; line-height: 1.3;
}
.plan-primary, .plan-button, .plan-icon-btn {
  min-height: 39px; border-radius: 8px; padding: 8px 15px;
  border: 1px solid #d9d3c9; font-size: 14px; font-weight: 600; color: #38332d; background: #fffdf9;
}
.plan-primary { background: #733743; border-color: #733743; color: white; }
.plan-primary:hover { background: #5d2935; }
.plan-button:hover, .plan-icon-btn:hover, .plan-tabs button:hover, .cal-number:hover { background: #f1ebe4; }
.plan-icon-btn { display: inline-grid; place-items: center; min-width: 39px; padding: 6px; font-size: 20px; }
.plan-link, .plan-row-title { border: 0; background: none; padding: 3px 0; color: #733743; font-size: 14px; font-weight: 600; text-align: left; }
.plan-link:hover, .plan-row-title:hover, .cal-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.plan-danger { color: #95372d; }
.plan-tabs { display: inline-flex; border: 1px solid #dedbd4; background: #f4f0ea; border-radius: 9px; padding: 3px; }
.plan-tabs button { background: transparent; border: 1px solid transparent; padding: 7px 13px; border-radius: 6px; color: #655d55; font-size: 13px; }
.plan-tabs button[aria-pressed="true"] { color: #67303b; background: #fffdf9; border-color: #e0d8ce; box-shadow: 0 1px 2px #392b1911; }
.plan-form { display: grid; align-content: start; gap: 16px; }
.plan-panel > .plan-form { max-width: 850px; }
.plan-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.plan-field { display: grid; align-content: start; min-width: 0; gap: 7px; color: #302e2a; font-size: 14px; font-weight: 600; }
.plan-field :is(input,select,textarea), .plan-toolbar select {
  font: inherit; font-weight: 400; color: #302e2a; background-color: #fffefa;
  border: 1px solid #cfc9bf; border-radius: 7px; min-height: 43px; min-width: 0; padding: 8px 10px;
}
.plan-field :is(input,select,textarea) { width: 100%; box-sizing: border-box; }
.plan-field textarea { min-height: 78px; resize: vertical; }
.plan-toolbar select { padding-right: 28px; font-size: 14px; max-width: 100%; }
.plan-field :is(input,select,textarea):focus, .plan-toolbar select:focus { outline: 2px solid #975e68; outline-offset: 2px; }
.plan-note { margin: 0; background: #f5eee8; color: #52463b; border-radius: 8px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.plan-note p { margin: 5px 0 0; }
.plan-checks { display: grid; gap: 9px; margin: 0; border: 1px solid #dedbd4; border-radius: 8px; padding: 12px 15px; min-width: 0; }
.plan-checks legend { padding: 0 5px; font-weight: 600; font-size: 14px; }
.plan-checks .plan-grid-2 { gap: 5px 16px; }
.plan-choice { display: flex; gap: 9px; align-items: center; font: inherit; font-size: 14px; cursor: pointer; min-height: 28px; }
.plan-choice input { width: 17px; height: 17px; margin: 0; flex: 0 0 17px; accent-color: #733743; }
.plan-subtle, .plan-panel .plan-subtle { color: #6c645e; font-size: 14px; line-height: 1.45; margin: 0; }
.plan-form-actions { justify-content: flex-end; border-top: 1px solid #e5ded5; margin-top: 3px; padding-top: 16px; }
.plan-form-actions .plan-danger { margin-right: auto; }
.plan-confirm { padding: 14px; background: #faece6; border-radius: 8px; }
.plan-confirm p { margin: 0 0 10px; }
.plan-confirm button + button { margin-left: 8px; }
.plan-confirm[hidden] { display: none; }
.plan-list-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid #e4ded5; }
.plan-list-row:first-child { border-top: 0; }
.plan-list-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.plan-list-copy p, .plan-list-copy small { margin: 3px 0 0; color: #6c645e; font-size: 13px; }
.plan-list-copy > strong, .plan-row-title { font-weight: 600; font-size: 15px; color: #302e2a; }
.plan-date-tile, .plan-member-avatar { display: grid; place-items: center; flex: 0 0 45px; height: 45px; background: #f3e8e6; color: #733743; border-radius: 8px; }
.plan-date-tile { align-content: center; line-height: 1; gap: 2px; }
.plan-date-tile span { font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.plan-date-tile strong { font-size: 19px; font-family: Georgia,serif; }
.plan-member-avatar { border-radius: 50%; font-size: 14px; font-weight: 700; background: #eee9db; color: #645236; }
.plan-list-row.plan-done .plan-row-title, .cal-event.plan-done { text-decoration: line-through; color: #706d68; }
.plan-empty { text-align: center; padding: clamp(24px,5vw,48px) 12px; }
.plan-empty h3 { font-size: 24px; }
.plan-empty p { margin: 7px 0 16px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays { border: 1px solid #dedbd4; border-bottom: 0; background: #f4f0ea; border-radius: 8px 8px 0 0; }
.cal-weekdays span { padding: 9px; color: #60574d; font-size: 12px; font-weight: 600; }
.cal-grid { border: 1px solid #dedbd4; border-right: 0; border-bottom: 0; overflow: hidden; border-radius: 0 0 8px 8px; }
.cal-day { min-height: clamp(74px, 8vw, 105px); min-width: 0; padding: 6px; border-right: 1px solid #dedbd4; border-bottom: 1px solid #dedbd4; }
.cal-outside { background: #f6f3ee; }
.cal-number { display: block; min-width: 26px; min-height: 26px; padding: 3px; border: 0; background: none; border-radius: 50%; color: #39352f; font-weight: 600; font-size: 13px; }
.cal-outside .cal-number { color: #827b71; }
.cal-today .cal-number { background: #733743; color: white; }
.cal-event, .cal-more { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; width: 100%; border: 0; border-radius: 4px; padding: 3px 5px; margin-top: 3px; color: #63343d; background: #f3e6e6; font-size: 11px; }
.cal-event:hover { background: #e9d8d8; }
.cal-payment { color: #495835; background: #eaf0df; }
.cal-more { background: none; color: #6c645e; }
.plan-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.plan-metric { min-width: 0; overflow-wrap: anywhere; border: 1px solid #e3ddd2; border-radius: 8px; padding: 14px; background: #fbf8f2; }
.plan-metric span { display: block; color: #655c52; font-size: 12px; }
.plan-metric strong { display: block; margin-top: 6px; font: 500 clamp(21px, 2.5vw, 32px)/1.1 Baskerville,Georgia,serif; font-variant-numeric: tabular-nums; }
.plan-panel > .budget-track { margin: 8px 0; }
.plan-table-wrap { overflow-x: auto; }
.plan-table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.plan-table :is(td,th) { text-align: right; padding: 12px 8px; border-bottom: 1px solid #e3ddd2; white-space: nowrap; }
.plan-table thead th { color: #6c645e; font-size: 12px; font-weight: 600; }
.plan-table th:first-child { text-align: left; padding-left: 0; white-space: normal; min-width: 110px; }
.plan-table small { display: block; font-size: 12px; font-weight: 400; color: #6c645e; }
.plan-table tr:last-child td, .plan-table tbody tr:last-child th { border-bottom: 0; }
@media (max-width: 740px) {
  .plan-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .plan-member-actions { gap: 4px 8px; }
}
@media (max-width: 540px) {
  .plan-panel { padding: 16px; }
  .plan-panel h2 { font-size: 24px; }
  .plan-grid-2 { grid-template-columns: 1fr; gap: 13px; }
  .plan-field :is(input,select,textarea) { font-size: 16px; }
  .plan-section-head { margin-bottom: 14px; }
  .cal-day { min-height: 62px; padding: 2px; }
  .cal-number { min-width: 24px; min-height: 24px; }
  .cal-event { padding: 2px 3px; font-size: 10px; }
  .cal-weekdays span { padding: 7px 2px; text-align: center; font-size: 10px; }
  .plan-list-row { flex-wrap: wrap; gap: 9px; }
  .plan-member-actions { width: 100%; padding-left: 54px; }
  .plan-table :is(td,th) { font-size: 12px; padding: 10px 5px; }
  .plan-table th:first-child { min-width: 86px; }
  .plan-table .plan-row-title { font-size: 13px; }
}
@media print {
  .plan-panel { box-shadow: none; }
  .plan-form-actions, .plan-confirm { display: none; }
}
