.item-form-section-title{margin:12px 0 0;padding-bottom:10px;border-bottom:1px solid #e4eaf0;font-size:15px;color:#1d5282}.edit-progress-summary{padding:14px 16px;border:1px solid #dbe8f3;border-radius:12px;background:#f5f9fc}.edit-progress-summary p{margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}.edit-progress-summary small{color:#617387}.progress-timeline{display:grid;gap:10px}.progress-entry{border:1px solid #dbe4ee;border-radius:12px;background:#fff;overflow:hidden}.progress-entry>summary{display:grid;grid-template-columns:auto 1fr auto;gap:8px 12px;align-items:center;list-style:none;cursor:pointer;padding:14px}.progress-entry>summary::-webkit-details-marker{display:none}.progress-entry>summary::after{content:'展開';grid-column:3;grid-row:2;font-size:12px;color:#35658c}.progress-entry[open]>summary::after{content:'收起'}.progress-number{font-weight:700;color:#1d5f97}.progress-entry time,.progress-person{font-size:12px;color:#64748b}.progress-person{text-align:right;overflow-wrap:anywhere}.progress-preview{grid-column:1/3;font-size:14px;line-height:1.6;color:#334155;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.progress-entry[open] .progress-preview{display:none}.progress-entry[open]>summary::after{grid-column:3;grid-row:2}.progress-entry-body{padding:0 14px 14px}.progress-entry-body p,.legacy-progress p{margin:0 0 12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75}.progress-entry-body small{display:block;margin-top:8px;color:#718096;line-height:1.6}.progress-next{padding:10px 12px;background:#f4f8fc;border-radius:8px}.progress-next strong{display:block;margin-bottom:5px;color:#45627e;font-size:12px}.progress-next p{margin:0}.legacy-progress{padding:14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}.legacy-progress strong{display:block;margin-bottom:8px}.legacy-progress small{color:#64748b}.system-history>summary{cursor:pointer;font-size:14px;font-weight:600;color:#64748b}.system-history>summary span{margin-left:8px;font-size:12px;font-weight:400}.system-history .item-timeline{margin-top:16px}.detail-grid .detail-field strong{overflow-wrap:anywhere}@media(max-width:600px){.progress-entry>summary{grid-template-columns:auto 1fr}.progress-person{grid-column:1/3;text-align:left}.progress-preview{grid-column:1/3;grid-row:3}.progress-entry>summary::after,.progress-entry[open]>summary::after{grid-column:2;grid-row:2;text-align:right}.item-form-section-title{margin-top:8px}}

/* Compact item drawer; all rules stay inside this surface. */
#detail-drawer .drawer-header {
  gap: 14px;
  padding: 18px 24px 14px;
}
#detail-drawer .drawer-header > div { min-width: 0; }
#detail-drawer .drawer-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
#detail-drawer .item-number {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
#detail-drawer .detail-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
}
#detail-drawer .detail-toolbar .detail-alerts {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  padding: 0;
}
#detail-drawer .detail-toolbar .detail-alerts:empty { display: none; }
#detail-drawer .detail-toolbar .drawer-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 7px;
  padding: 0;
  border: 0;
}
#detail-drawer .drawer-actions button,
#detail-drawer .detail-action-more > summary {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 14px;
}
#detail-drawer .drawer-scroll { padding: 0 24px 28px; }
#detail-drawer .detail-section { padding-block: 19px; }
#detail-drawer .detail-section-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 13px;
}
#detail-drawer .detail-section-title h3 {
  margin: 0 auto 0 0;
  font-size: 16px;
  line-height: 1.5;
}
#detail-drawer .detail-section-title .text-button {
  min-height: 36px;
  font-size: 14px;
}
#detail-drawer #progress-count,
#detail-drawer #attachment-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
#detail-drawer #detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 22px;
}
#detail-drawer .detail-field-wide { grid-column: 1 / -1; }
#detail-drawer .detail-field span {
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.5;
}
#detail-drawer .detail-field strong {
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#detail-drawer .long-fields { gap: 12px; margin-top: 16px; }
#detail-drawer .operational-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#detail-drawer .operational-fields > .long-field-wide,
#detail-drawer .operational-fields > :only-child { grid-column: 1 / -1; }
#detail-drawer .long-field > span { font-size: 13px; line-height: 1.5; }
#detail-drawer .long-field p {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
#detail-drawer .current-progress-field {
  padding: 12px 14px;
  border: 1px solid #dfe8ef;
  border-radius: 10px;
  background: #f7fafc;
}
#detail-drawer .current-progress-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 14px;
  line-height: 1.5;
}
#detail-drawer .current-progress-heading small,
#detail-drawer .current-progress-heading time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
#detail-drawer .current-progress-copy {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#detail-drawer .current-progress-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
#detail-drawer #view-latest-progress { margin-top: 7px; }
#detail-drawer .progress-timeline { gap: 9px; }
#detail-drawer .progress-entry > summary { gap: 6px 10px; padding: 12px 14px; }
#detail-drawer .progress-number { font-size: 14px; }
#detail-drawer .progress-entry time,
#detail-drawer .progress-person { font-size: 13px; line-height: 1.5; }
#detail-drawer .progress-entry-body { padding: 0 14px 13px; }
#detail-drawer .progress-entry-body p { font-size: 14px; line-height: 1.75; }
#detail-drawer .progress-entry-body small { font-size: 12px; }
#detail-drawer .detail-more { margin-top: 16px; }
#detail-drawer .detail-more summary { padding-top: 12px; }
#detail-drawer .detail-secondary-section .detail-more { margin: 0; border: 0; }
#detail-drawer .detail-secondary-section .detail-more > summary { padding: 0; min-height: 36px; }
#detail-drawer .detail-secondary-section .system-history { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
#detail-drawer .detail-more summary span,
#detail-drawer .system-history > summary { font-size: 14px; }
#detail-drawer .attachment-list { gap: 8px; }
#detail-drawer .attachment-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
}
#detail-drawer .attachment-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#detail-drawer .file-type { width: 34px; height: 34px; font-size: 11px; }
#detail-drawer .attachment-card .attachment-info > span { font-size: 12px; }
#detail-drawer .attachment-card .row-actions { flex-wrap: wrap; gap: 5px; }
#detail-drawer .attachment-card .row-actions button,
#detail-drawer .attachment-card .row-actions a { font-size: 13px; }
#detail-drawer #drop-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  align-items: center;
  min-height: 62px;
  gap: 2px 12px;
  padding: 10px 14px;
  text-align: left;
}
#detail-drawer #drop-zone > strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
}
#detail-drawer #drop-zone > span {
  grid-column: 1;
  grid-row: 2;
  font-size: 12px;
}
#detail-drawer #drop-zone > button {
  grid-column: 2;
  grid-row: 1 / 3;
  min-height: 36px;
  font-size: 14px;
}
#detail-drawer .attachment-copy-note { margin-top: 7px; font-size: 12px; }
#detail-drawer .attachment-options { margin-top: 5px; }

@media (max-width: 600px) {
  #detail-drawer .drawer-header { padding: 14px 16px 12px; }
  #detail-drawer .drawer-header h2 { font-size: 20px; }
  #detail-drawer .detail-toolbar { gap: 9px; padding: 10px 16px; }
  #detail-drawer .detail-toolbar .drawer-actions { flex: 1 1 100%; justify-content: flex-start; }
  #detail-drawer .drawer-actions button,
  #detail-drawer .detail-action-more > summary,
  #detail-drawer .detail-section-title .text-button,
  #detail-drawer .attachment-card .row-actions button,
  #detail-drawer .attachment-card .row-actions a,
  #detail-drawer #drop-zone > button,
  #detail-drawer #close-detail { min-height: 44px; }
  #detail-drawer #close-detail { min-width: 44px; }
  #detail-drawer .drawer-scroll { padding: 0 16px 24px; }
  #detail-drawer .detail-section { padding-block: 16px; }
  #detail-drawer #detail-grid { gap: 12px 16px; }
  #detail-drawer .operational-fields { grid-template-columns: minmax(0, 1fr); }
  #detail-drawer .attachment-card { grid-template-columns: 34px minmax(0, 1fr); }
  #detail-drawer .attachment-card .row-actions { grid-column: 2; justify-content: flex-start; }
  #detail-drawer #drop-zone { min-height: 66px; padding: 10px 12px; }
}
