/* Daily carry-over UI. This stylesheet is linked only by the editor page. */
.carry-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  margin-block: 16px 22px;
  border: 1px solid #e5c581;
  border-inline-start: 4px solid var(--gold, #f5b427);
  border-radius: 10px;
  background: linear-gradient(115deg, #fffaf0, #fff);
  color: var(--ink, #333538);
}
.carry-context h2, .carry-context h3, .carry-context strong { font-size: 15px; font-weight: 600; }
.carry-context p { margin-block-start: 5px; font-size: 12px; color: var(--gray, #58595b); }
.carry-context small { display: block; margin-block-start: 4px; color: #90722f; font-size: 11px; }
.carry-context .carry-action, .carry-action {
  flex: none;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d5a33d;
  border-radius: 7px;
  background: var(--gold, #f5b427);
  color: #3b321c;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.carry-action:not(:disabled):hover { background: #edac1e; }
.carry-action:disabled { cursor: not-allowed; }
.carry-progress { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.carry-progress > *, .previous-progress, .daily-delta { min-width: 0; }
.previous-progress, .daily-delta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #e3e5e8;
  border-radius: 6px;
  background: #f5f6f7;
  color: var(--gray, #58595b);
  font-size: 11px;
  line-height: 1.6;
}
.previous-progress strong, .daily-delta strong { font-size: 13px; font-weight: 600; }
.daily-delta { border-color: #f0d396; background: #fff7e5; color: #86611a; }
.previous-complete { border-color: #b7d9c9; background-color: #edf7f1; color: #23765f; }
.previous-progress.previous-complete, .carry-context.previous-complete { border-color: #b7d9c9; background: #edf7f1; }
.updated-today { --journal-accent: #d39a25; }
.journal-block { min-width: 0; width: 100%; margin-block: 2px 8px; }
.journal-heading { margin-block-end: 11px; }
.journal-heading h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--gray, #58595b); }
.journal-heading small { display: block; margin-block-start: 3px; color: #7a7c7e; font-size: 10px; line-height: 1.7; }
.journal-list { display: grid; gap: 10px; }
.journal-entry {
  --journal-accent: #b9bdc3;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e4e6e8;
  border-inline-start: 3px solid var(--journal-accent);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink, #333538);
}
.journal-entry.journal-carried { background: #f8f9fa; }
.journal-entry.journal-today { background: #fffdfa; }
.journal-entry.previous-complete { --journal-accent: #318567; border-color: #c6dfd2; background: #f0f8f4; }
.journal-entry.updated-today { --journal-accent: #d39a25; border-inline-start-color: #d39a25; }
.journal-entry-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.journal-origin { font-size: 11px; font-weight: 600; color: #60646a; }
.journal-resolved .journal-origin { color: #23765f; }
.journal-today .journal-origin { color: #93681b; }
.journal-update-badge { padding: 2px 7px; border: 1px solid #edd39e; border-radius: 4px; background: #fff3d7; color: #8c6318; font-size: 9px; white-space: nowrap; }
.journal-date { margin-block: 5px 9px; font-size: 10px; color: #7a7c7e; overflow-wrap: anywhere; }
.journal-entry textarea, .journal-new textarea { width: 100%; min-width: 0; min-height: 75px; background: #fff; font-size: 13px; line-height: 1.7; }
.journal-status-field { display: flex; align-items: center; gap: 11px; margin-block-start: 9px; }
.journal-status-field > span { font-size: 10px; color: #6b6e73; }
.journal-status-field select { width: auto; min-width: 145px; max-width: 100%; min-height: 38px; padding: 7px 10px; font-size: 12px; }
.journal-empty { margin: 0; padding: 10px 12px; border: 1px dashed #e0e2e5; border-radius: 7px; background: #fafbfc; font-size: 11px; color: #7a7c7e; }
.journal-new { margin-block-start: 13px; padding-block-start: 12px; border-top: 1px dashed #e1e3e6; }
.journal-new > label { display: block; margin-block-end: 6px; color: var(--gray, #58595b); font-size: 11px; font-weight: 500; }
.journal-new .button { margin-block-start: 7px; min-height: 39px; border-color: #e1c58c; background: #fff9ec; color: #8b671d; }
.journal-block :disabled { cursor: not-allowed; opacity: .7; }
.journal-block textarea:disabled, .journal-block select:disabled { color: #62676d; background: #f2f4f5; -webkit-text-fill-color: #62676d; }
[data-photo-archive] { border-color: #d6bf91; color: #8f6a23; }
#photoArchiveDialog { width: min(740px, calc(100% - 34px)); max-width: 740px; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; }
#photoArchiveList { min-width: 0; margin-block-start: 14px; }
.archive-instructions { margin-block: 0 10px; padding: 11px 13px; border: 1px solid #efd9ac; border-radius: 7px; background: #fff8e9; color: #89641d; font-size: 12px; line-height: 1.7; }
.archive-context { margin-block: 0 14px; font-size: 11px; color: #6f7378; overflow-wrap: anywhere; }
.archive-notice { margin-block: 8px 14px; padding: 10px 12px; border: 1px solid #e0e4e8; border-radius: 6px; background: #f5f7f9; color: #6a7077; font-size: 11px; line-height: 1.8; }
.archive-loading, .archive-empty, .archive-error { margin-block: 12px; padding: 26px 15px; border: 1px dashed #dce0e4; border-radius: 8px; text-align: center; color: #7a7c7e; font-size: 12px; }
.archive-error { color: #a34642; border-color: #e7bfbb; background: #fff7f6; }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.archive-card { min-width: 0; overflow: hidden; border: 1px solid #e2e5e8; border-radius: 9px; background: #fff; }
.archive-image { position: relative; display: grid; place-items: center; min-height: 175px; background: #f2f4f5; }
.archive-image img { display: block; width: 100%; height: 190px; object-fit: contain; }
.archive-image-fallback { margin: 0; padding: 20px; color: #9b5753; text-align: center; font-size: 11px; }
.archive-card-body { padding: 12px; }
.archive-card time { display: block; margin-block-end: 4px; color: #9a762a; font-size: 10px; }
.archive-card h3 { margin: 0; font-size: 12px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.archive-caption { margin-block: 6px 10px; min-height: 20px; color: #70747a; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.archive-card .button { width: 100%; min-height: 42px; border-color: #dfc590; color: #8c651d; }
.archive-card .button:not(:disabled):hover { background: #fff7e5; }
.archive-card .button:disabled { cursor: not-allowed; }
@media (max-width: 600px) {
  .carry-context { flex-direction: column; align-items: stretch; padding: 14px; gap: 12px; }
  .carry-context h2, .carry-context h3, .carry-context strong { font-size: 14px; }
  .carry-context p { font-size: 11px; }
  .carry-context .carry-action { width: 100%; }
  .carry-progress { display: grid; grid-template-columns: 1fr; gap: 7px; }
  .previous-progress, .daily-delta { width: 100%; font-size: 11px; }
  .journal-entry { padding: 11px; }
  .journal-heading h4 { font-size: 12px; }
  .journal-entry textarea, .journal-new textarea, .journal-status-field select { font-size: 16px; }
  .journal-status-field { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .journal-status-field select { width: 100%; }
  .journal-new .button { width: 100%; min-height: 44px; }
  #photoArchiveDialog { width: calc(100% - 20px); padding: 20px 14px; }
  .archive-grid { grid-template-columns: 1fr; gap: 12px; }
  .archive-image img { height: 220px; }
  .archive-card-body { padding: 13px; }
}
@media print {
  .journal-new, [data-photo-archive], #photoArchiveDialog { display: none !important; }
}

/* Parent section summaries may share these semantic state classes. */
.work-item.previous-complete { border-color: #b7d9c9; }
.work-item.previous-complete > .work-summary { background: #edf7f1; }
.work-item.updated-today { border-inline-start: 4px solid #d39a25; }
.carry-progress.updated-today .daily-delta { border-color: #d39a25; background: #fff3d7; }
