.personal-dashboard {
  --pd-ink: #2c3730;
  --pd-green: #365847;
  --pd-muted: #687461;
  --pd-line: #e1e3d9;
  --pd-paper: #fffefa;
  --pd-orange: #a95834;
  color: var(--pd-ink);
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.55;
}

.personal-dashboard * { box-sizing: border-box; }
.personal-dashboard h1,
.personal-dashboard h2,
.personal-dashboard h3,
.personal-dashboard h4,
.personal-dashboard p { margin-top: 0; }
.personal-dashboard button,
.personal-dashboard input { font: inherit; }
.personal-dashboard button { cursor: pointer; }
.personal-dashboard button:disabled { cursor: wait; }
.personal-dashboard :is(button, summary, input, [tabindex]):focus-visible {
  outline: 3px solid #c08554;
  outline-offset: 3px;
}

.pd-button-secondary:hover { background: #ecefe6; }
.pd-inline-notice {
  color: #8a5b38;
  background: #f6efe3;
  border-left: 2px solid #c2996c;
  border-radius: 0 5px 5px 0;
  padding: 7px 10px;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
}

.pd-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; }
.pd-section-heading h2 { font-size: 17px; font-weight: 600; line-height: 1.5; letter-spacing: -.2px; margin: 0; }
.pd-section-meta { font-size: 11px; color: var(--pd-muted); flex: none; }
.pd-role { display: inline-flex; font-size: 11px; line-height: 1.5; color: #586c4e; background: #e9eee2; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.pd-duration { font-size: 11px; color: var(--pd-muted); white-space: nowrap; }
.pd-footnote { font-size: 11px; color: var(--pd-muted); line-height: 1.6; margin: 8px 0 0; }
.pd-main-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.pd-secondary { display: grid; gap: 12px; min-width: 0; }
.pd-card,
.pd-reminders { min-width: 0; padding: 14px; border: 1px solid var(--pd-line); border-radius: 9px; background: var(--pd-paper); }

/* Reminders retain all records and searchable notes in a keyboard-scrollable region. */
.pd-reminder-tools { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 8px 12px; margin-bottom: 9px; }
.pd-role-filters { display: flex; flex-wrap: wrap; gap: 2px; }
.pd-role-filters button { min-height: 34px; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--pd-muted); font-size: 12px; }
.pd-role-filters button:hover { background: #e4e9dc; color: var(--pd-green); }
.pd-role-filters button[aria-pressed=true] { background: var(--pd-green); color: #fffdf4; }
.pd-filter-note { color: var(--pd-muted); font-size: 11px; margin: 3px 0 0; }
.pd-search { position: relative; flex: 1 1 190px; min-width: 0; }
.pd-search svg { position: absolute; left: 10px; top: 11px; width: 14px; height: 14px; color: #7b8a70; }
.personal-dashboard .pd-search input { width: 100%; min-height: 36px; padding: 7px 10px 7px 31px; border: 1px solid #dfe3d7; border-radius: 7px; background: var(--pd-paper); color: #53624b; font-size: 12px; }
.pd-search input::placeholder { color: #78846e; }
.pd-reminder-list { max-height: 380px; overflow-y: auto; scrollbar-gutter: stable; border-top: 1px solid var(--pd-line); }
.pd-reminder { display: flex; align-items: start; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--pd-line); }
.pd-reminder:last-child { border-bottom: 0; }
.pd-reminder-marker { flex: none; width: 14px; color: #7f8c73; font-size: 14px; text-align: center; }
.pd-reminder-body { flex: 1; min-width: 0; }
.pd-reminder-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pd-reminder-title h3 { font-size: 13px; font-weight: 550; line-height: 1.6; margin: 0 0 3px; overflow-wrap: anywhere; }
.pd-important { color: var(--pd-orange); font-size: 11px; }
.pd-reminder-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; color: var(--pd-muted); font-size: 11px; }
.pd-reminder-meta > span { overflow-wrap: anywhere; }
.pd-due { flex: none; max-width: 135px; color: var(--pd-muted); font-size: 11px; line-height: 1.6; text-align: right; font-variant-numeric: tabular-nums; }
.pd-due-soon { color: var(--pd-orange); }
.pd-reminder-notes { color: var(--pd-muted); font-size: 11px; margin-top: 4px; }
.pd-reminder-notes summary { cursor: pointer; display: list-item; list-style-position: inside; width: fit-content; padding: 3px 0; }
.pd-reminder-notes p { font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 0; color: #5f7055; }

/* Calendar and decisions share the compact right column. */
.pd-event-group + .pd-event-group { margin-top: 13px; }
.pd-event-day { display: flex; align-items: baseline; gap: 8px; color: #65715b; font-size: 12px; font-weight: 550; margin: 0 0 7px; }
.pd-event-day span { font-size: 11px; font-weight: 400; color: var(--pd-muted); }
.pd-event-group ol { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pd-event { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 9px; }
.pd-event-time { display: flex; flex-direction: column; gap: 2px; color: #56684c; font-size: 13px; font-weight: 500; line-height: 1.45; font-variant-numeric: tabular-nums; }
.pd-event-time span { font-size: 11px; font-weight: 400; color: var(--pd-muted); }
.pd-event-body { min-width: 0; padding-left: 9px; border-left: 2px solid #dbe3d2; }
.pd-event-body h4 { font-size: 13px; font-weight: 550; line-height: 1.5; margin: 0 0 2px; overflow-wrap: anywhere; }
.pd-event-body p { font-size: 11px; color: var(--pd-muted); line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.pd-event-body p span { margin: 0 3px; }
.pd-ongoing { font-size: 11px; color: #58754f; }
.pd-decisions { background: #f0f1e9; border-color: #e0e3d5; }
.pd-decision-list { list-style: none; margin: 0; padding: 0; }
.pd-decision-list > li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid #dfe3d5; }
.pd-decision-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 5px; }
.pd-decision-top h3 { font-size: 13px; font-weight: 550; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.pd-decision-action { flex: none; font-size: 11px; padding: 1px 6px; border-radius: 4px; color: #786c50; background: #e9e4d6; }
.pd-decision-list p { font-size: 12px; line-height: 1.6; color: var(--pd-muted); margin: 0 0 5px; overflow-wrap: anywhere; }
.pd-decision-condition { font-size: 12px; line-height: 1.6; color: #5b6f50; overflow-wrap: anywhere; }
.pd-decision-condition > span { font-size: 11px; color: var(--pd-muted); margin-right: 7px; }

/* Empty/error states and infrequent settings stay factual and compact. */
.pd-empty { padding: 10px 0; color: var(--pd-muted); }
.pd-empty > p { font-size: 12px; line-height: 1.6; margin: 0; }
.pd-empty > span { display: block; font-size: 11px; line-height: 1.6; margin-top: 4px; }
.pd-settings { border-top: 1px solid var(--pd-line); border-bottom: 1px solid var(--pd-line); color: var(--pd-muted); margin-top: 16px; }
.pd-settings > summary { cursor: pointer; display: list-item; list-style-position: inside; font-size: 12px; padding: 10px 0; }
.pd-settings-caption { font-size: 11px; margin-left: 10px; }
.pd-settings-body { max-width: 760px; padding-bottom: 14px; }
.pd-settings-body > p { font-size: 12px; line-height: 1.65; margin: 0 0 7px; }
.pd-settings-body strong { color: #5e7153; font-weight: 550; }
.pd-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pd-button { min-height: 36px; border: 1px solid var(--pd-green); border-radius: 7px; background: var(--pd-green); color: #fffdf4; padding: 7px 12px; font-size: 12px !important; }
.pd-button-secondary { color: #5e7453; border-color: #d4dccb; background: transparent; }
.pd-settings #personal-sync-settings { margin-top: 12px; font-size: 12px; }
.pd-state { padding: 20px; border: 1px solid var(--pd-line); border-radius: 10px; background: var(--pd-paper); }
.pd-state h2 { font-size: 18px; font-weight: 550; line-height: 1.5; margin: 0 0 8px; }
.pd-state p { font-size: 13px; color: var(--pd-muted); line-height: 1.65; margin: 0 0 6px; }
.pd-state p:last-child { margin-bottom: 0; }
.pd-first-sync { background: #eef2e6; }
.pd-state-error { background: #faf5ed; }
.pd-loading { background: transparent; border-style: dashed; }
.pd-skeleton { height: 18px; width: 55%; margin-top: 12px; border-radius: 5px; background: #e8eddf; }
.pd-skeleton:last-child { width: 36%; height: 12px; margin-top: 8px; }

@media (max-width: 1100px) {
  .pd-main-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); }
  .pd-reminder-tools { display: block; }
  .pd-search { margin-top: 8px; }
}

@media (max-width: 820px) {
  .pd-main-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-reminder-tools { display: flex; }
  .pd-search { margin-top: 0; }
}

@media (max-width: 560px) {
  .personal-dashboard { margin-bottom: 18px; }
  .pd-card,
  .pd-reminders { padding: 12px; }
  .pd-section-heading { gap: 8px; }
  .pd-section-heading h2 { font-size: 17px; }
  .pd-reminder-tools { display: block; }
  .pd-role-filters button { min-height: 42px; padding: 8px 10px; }
  .pd-search { margin-top: 8px; }
  .personal-dashboard .pd-search input { min-height: 42px; font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
  .pd-search svg { top: 14px; }
  .pd-reminder-list { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .pd-reminder { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 3px 8px; padding: 11px 0; }
  .pd-reminder-notes summary { min-height: 40px; padding: 10px 0; }
  .pd-settings > summary { min-height: 44px; padding: 12px 0; }
  .pd-settings-caption { margin-left: 7px; }
  .pd-button { min-height: 42px; }
  .pd-state { padding: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .pd-button,
  .pd-role-filters button { transition: background .15s ease, color .15s ease; }
}

/* Native Mac data and refresh controls stay compact. */
.pd-reminder-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.pd-connect { min-height: 32px; padding: 4px 8px; font-size: 11px !important; }
.pd-refresh-control { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 9px; }
.pd-refresh-status { color: var(--pd-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pd-refresh-attention { color: #a44436; }
.pd-refresh-button { min-height: 32px; padding: 4px 10px; }
.pd-refresh-button:disabled { opacity: .55; }
.pd-first-sync .pd-refresh-control { justify-content: flex-start; margin-top: 10px; }
.pd-list-filter { min-width: 140px; max-width: 50%; }
.pd-list-filter select { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.pd-reminder-end { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 3px; }
.reminder-device-note { margin: 12px 0 0; }
@media (max-width: 560px) {
  .pd-reminder-heading-actions { gap: 5px; }
  .pd-connect { min-height: 40px; }
  .pd-refresh-control { margin-top: 8px; }
  .pd-refresh-button { min-height: 40px; }
  .pd-list-filter { max-width: none; }
  .pd-list-filter select { min-height: 42px; }
  .pd-reminder-end { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .pd-reminder-end .pd-due { text-align: left; }
}
