body { background: var(--bg); }
.bestiary-header { background: var(--bg); box-shadow: none; }
.panel { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.panel-head { padding: 10px 0; }
.panel-body { padding: 12px 0; }
.notice, .summary-cell, .table-wrap, .search, .thumb, .creature-row { border-radius: 6px; }
.btn { border-radius: 6px; }
.btn.primary { background: var(--panel-2); }
.page-title-row::before { box-shadow: none; }
.toolbar { grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr)); }
.creature-head, .creature-row { grid-template-columns: minmax(220px, 1.3fr) 48px minmax(90px, .6fr) minmax(115px, .7fr) minmax(185px, 1fr) 258px; gap: 8px; }
.creature-head { letter-spacing: 0; }
.creature-main > div, .creature-row > div { min-width: 0; }
.creature-name { white-space: normal; overflow-wrap: anywhere; }
.row-actions { gap: 5px; align-items: center; }
.row-actions .workflow-tool { position: relative; width: 32px; height: 32px; min-height: 32px; flex: 0 0 32px; padding: 6px; }
.workflow-tool svg { width: 16px; height: 16px; }
.workflow-delete { display: inline-flex; border-left: 1px solid var(--border); padding-left: 6px; margin-left: 1px; }
.workflow-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.workflow-state { display: inline-block; margin-top: 4px; }
.workflow-state.published { color: var(--ok); }
.workflow-state.changed { color: var(--warn); }
.workflow-state.draft { color: var(--info); }
.workflow-state.archived { color: var(--muted); }
.workflow-note { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
#workflowNotice { border-left: 2px solid var(--warn); padding: 8px 10px; }
#creatureRecordDialog { width: min(900px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); }
#creatureRecordDialog::backdrop { background: rgba(0, 0, 0, .65); }
.workflow-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.workflow-dialog-head h2 { font-size: 20px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
#closeCreatureRecord { flex: 0 0 32px; width: 32px; height: 32px; padding: 6px; }
#creatureRecordBody { overflow-wrap: anywhere; }
#creatureRecordBody iframe { width: 100%; height: 65dvh; border: 0; background: white; }
.workflow-preview-art { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.workflow-fields { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.workflow-fields dt { color: var(--muted); }
.workflow-fields dd { margin: 0; min-width: 0; white-space: pre-wrap; }
.workflow-fields .workflow-fields { padding-left: 8px; border-left: 1px solid var(--border); }
@media (max-width: 1120px) { .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar > :first-child { grid-column: 1 / -1; }
  .creature-row { grid-template-columns: minmax(0, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-actions { flex-wrap: wrap; }
  .row-actions .btn { width: auto; }
  .row-actions .workflow-tool { width: 32px; }
  .workflow-fields { grid-template-columns: minmax(0, 1fr); }
  .workflow-fields dd { margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .header-row { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 24px; overflow-wrap: anywhere; }
  .panel-head { flex-wrap: wrap; }
  .status { text-align: left; }
  .header-links .btn { width: auto; }
}
