@media screen {
  .document-bar { flex-wrap: wrap; gap: 12px; }
  .document-bar > .secondary-button { min-height: 36px; padding: 7px 12px; }
  .item-picker-button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; color: #343e4b; }
  .item-picker-button > span { font-size: 1.3rem; }
  .item-picker-button:disabled { color: #747b84; cursor: default; }
  .undo-notice { padding: 12px 20px; background: #edf4ef; border-bottom: 1px solid #c5d9cc; color: #315442; font-size: .875rem; }
  .undo-notice:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .undo-notice button, .text-button { border: 0; padding: 3px 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .document-notes summary { cursor: pointer; font-weight: 500; }
  .document-notes summary > span { margin-left: 10px; color: #6c7580; font-size: .875rem; font-weight: 400; }
  .document-notes .field-grid { margin-top: 16px; }
  .field small { color: #646e7a; font-weight: 400; font-size: .8125rem; }
  .notes-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .875rem; }
  .notes-toggle input { width: 17px; height: 17px; accent-color: #111; }
  .workspace-footer > button, .workspace-footer > a { font-size: .875rem; color: #555f6d; }
  .wide-dialog { width: min(1000px,calc(100vw - 32px)); }
  .board-dialog { width: min(1400px,calc(100vw - 32px)); }
  .document-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
  .document-filters .search-wide { grid-column: 1/-1; }
  #documentResultsCount,#itemSearchCount,#itemGroupMessage { font-size: .875rem; color: #5f6875; margin: 15px 0; }
  .document-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #dfe2e6; }
  .document-result > div { min-width: 0; }
  .document-result span,.document-result small { display: block; color: #64707d; font-size: .875rem; margin-top: 3px; overflow-wrap: anywhere; }
  .document-result strong { font-weight: 500; }
  .document-result-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
  .item-results { display: grid; gap: 8px; margin-top: 16px; max-height: 46vh; overflow: auto; }
  .item-search-result,.item-group { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px; border: 1px solid #d4d9e0; border-radius: 6px; text-align: left; background: #fff; color: #252f3c; }
  .item-search-result:hover { background: #f0f3f5; border-color: #9ba7b5; }
  .item-search-result > span:last-child { white-space: nowrap; }
  .item-search-result strong,.item-group strong { display: block; font-weight: 500; }
  .item-search-result small,.item-group small { display: block; color: #687381; font-size: .875rem; margin-top: 3px; }
  .item-group > div { flex: 1; }
  .save-group-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #dde1e6; }
  .save-group-form .field { flex: 1; }
  .line-actions-dialog { width: min(440px,calc(100vw - 32px)); }
  .line-action-choices { display: grid; gap: 10px; }
  .board-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
  .project-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; align-items: start; }
  .board-column { min-width: 0; padding: 12px; background: #f1f3f5; border-radius: 7px; border: 1px solid #e0e4e9; }
  .board-column h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 14px; font-size: .9375rem; font-weight: 500; }
  .board-column h3 span { color: #707a87; }
  .project-card { display: grid; width: 100%; text-align: left; gap: 8px; margin-bottom: 10px; padding: 16px; color: #27313e; background: #fff; border: 1px solid #d9dee5; border-top: 3px solid #303842; border-radius: 5px; box-shadow: 0 3px 8px #00000005; }
  .project-card:hover { border-color: #8793a3; }
  .project-card strong { font-weight: 500; font-size: 1rem; overflow-wrap: anywhere; }
  .project-card > span,.project-card > small { color: #64707f; font-size: .875rem; overflow-wrap: anywhere; }
  .project-card-counts { padding-top: 10px; border-top: 1px solid #e7eaee; }
  .project-card .project-card-link { color: #353f4c; }
  .board-empty { margin: 18px 0; color: #707987; font-size: .875rem; }
  .project-amounts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 22px 0 10px; }
  .project-amounts > div { padding: 14px; background: #f3f5f7; border: 1px solid #e0e5eb; border-radius: 5px; }
  .project-amounts span { display: block; color: #677281; font-size: .8125rem; }
  .project-amounts strong { display: block; margin-top: 7px; font-size: 1.25rem; font-weight: 500; overflow-wrap: anywhere; }
  .project-section-title { margin: 24px 0 8px; font-size: 1rem; font-weight: 500; }
  #reportIssueForm .field { margin-bottom: 18px; }
  #issueResult { white-space: pre-line; overflow-wrap: anywhere; font-size: .9375rem; }
}
.paper-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
@media screen and (max-width: 900px) { .project-board,.project-amounts,.document-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media screen and (max-width: 540px) {
  .project-board,.board-filters,.document-filters { grid-template-columns: minmax(0,1fr); }
  .document-result { align-items: flex-start; flex-direction: column; }
  .document-result-actions { width: 100%; justify-content: space-between; }
  .save-group-form { align-items: stretch; flex-direction: column; }
  .item-group { flex-wrap: wrap; }
  .board-dialog .email-content { padding: 16px; }
}
