.co-entry { min-height: 29px !important; padding: 5px 9px !important; font-size: 11px !important; line-height: 1.35 !important; }
.co-entry-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0; }
.modal-card:has(.co-root) { width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 20px 22px; }
.co-root { min-width: 0; font-size: 13px; }
.co-root h2 { margin: 4px 0 12px; font-size: 20px; }
.co-root .modal-label { margin-bottom: 5px; }
.co-template-select { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 7px; }
.co-template-select label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.co-template-select select { max-width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12px; background: var(--paper); color: inherit; }
.co-template-select small { font-size: 10px; color: var(--muted); }
.co-root .co-intro { margin: 6px 0 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.co-root .co-source-template { padding: 5px 8px; min-height: 28px; font-size: 11px; }
.co-steps { display: flex; gap: 5px; flex-wrap: wrap; padding: 9px 0; margin-bottom: 8px; border-block: 1px solid var(--line); }
.co-steps button { border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; background: var(--surface); color: inherit; font-size: 11px; cursor: pointer; }
.co-steps [aria-current="step"] { border-color: var(--blue); color: #bf4f23; background: #fff3e9; }
.co-group-title { margin: 9px 0; font-size: 14px; }
.co-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.co-field { display: grid; align-content: start; gap: 4px; min-width: 0; font-size: 12px; }
.co-field > span { font-weight: 600; }
.co-field em { color: #b84b26; font-style: normal; }
.co-field input, .co-field select, .co-field textarea { width: 100%; min-width: 0; min-height: 32px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: inherit; font: inherit; line-height: 1.35; }
.co-field textarea { resize: vertical; }
.co-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 3px; }
.co-choice { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; line-height: 1.4; font-weight: 400; }
.co-choice input[type="checkbox"], .co-choice input[type="radio"] { width: 16px; height: 16px; min-height: 16px; margin: 1px 0 0; padding: 0; flex: 0 0 16px; accent-color: var(--blue); }
.co-choice > span { min-width: 0; overflow-wrap: anywhere; }
.co-field input[readonly], .co-field select:disabled { background: var(--surface); color: var(--muted); }
.co-field small { color: var(--muted); line-height: 1.35; font-size: 10px; }
.co-field .co-field-error { color: #a83e20; }
.co-field [hidden] { display: none !important; }
.co-field-wide { grid-column: 1 / -1; }
.co-save-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.co-save-state { flex: 1 1 260px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.co-save-state.has-error, .co-error { color: #a83e20; }
.co-save-row button { font-size: 11px; }
.co-save-row [hidden] { display: none !important; }
.co-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 11px; }
.co-footer > div { display: flex; gap: 7px; flex-wrap: wrap; }
.co-footer button { min-height: 31px; padding: 6px 10px; font-size: 11px; line-height: 1.35; white-space: normal; }
.co-review-notice, .co-success { border: 1px solid #b9d6c7; border-radius: 8px; padding: 9px 11px; background: #f0faf4; font-size: 12px; line-height: 1.45; margin: 8px 0 10px; }
.co-review-group { padding: 8px 0; border-bottom: 1px solid var(--line); }
.co-review-group h3 { margin: 0 0 7px; font-size: 13px; }
.co-review-group dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin: 0; }
.co-review-group dt { color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.co-review-group dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.co-confirm { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12px; line-height: 1.45; }
.co-confirm input { margin-top: 2px; width: 16px; height: 16px; flex: 0 0 16px; }
html[data-theme="dark"] .modal-card:has(.co-root) { background: #211d19; color: #f3e6dd; }
html[data-theme="dark"] .co-root .secondary-button, html[data-theme="dark"] .co-entry { background: #29231f; border-color: #57463b; color: #f3e6dd; }
html[data-theme="dark"] .co-field input, html[data-theme="dark"] .co-field select, html[data-theme="dark"] .co-field textarea, html[data-theme="dark"] .co-template-select select { background: #29231f; border-color: #57463b; color: #f3e6dd; }
html[data-theme="dark"] .co-steps button { background: #29231f; border-color: #57463b; }
html[data-theme="dark"] .co-steps [aria-current="step"] { background: #473023; color: #ffd2b5; border-color: #f47a27; }
html[data-theme="dark"] .co-review-notice, html[data-theme="dark"] .co-success { background: #20372a; border-color: #4c745c; }
html[data-theme="dark"] .co-save-state, html[data-theme="dark"] .co-field small, html[data-theme="dark"] .co-review-group dt, html[data-theme="dark"] .co-template-select small, html[data-theme="dark"] .co-root .co-intro { color: #bfb0a5; }
html[data-theme="dark"] .co-save-state.has-error, html[data-theme="dark"] .co-error { color: #ffad8f; }
@media (max-width: 620px) {
  .modal-card:has(.co-root) { width: 100%; max-height: calc(100dvh - 16px); padding: 16px; }
  .co-root h2 { font-size: 18px; }
  .co-fields, .co-review-group dl { grid-template-columns: minmax(0, 1fr); }
  .co-template-select label { align-items: flex-start; flex-direction: column; width: 100%; }
  .co-template-select select { width: 100%; }
  .co-footer { align-items: stretch; }
  .co-footer > div { width: 100%; }
  .co-footer > div > button { flex: 1 1 100px; }
  .co-footer > [data-co-download] { width: 100%; }
  .co-save-state { flex-basis: 100%; }
}
