.character-profiles { box-sizing:border-box; max-width:100%; margin:20px 0; padding:24px; background:var(--panel,#fffdf7); border:1px solid #ded3bd; border-radius:10px; color:var(--ink,#352a22); }
.character-profiles h2 { margin-top:0; }
.character-profiles[data-tool="combat"] { width:calc(100% - 40px); max-width:1060px; margin:20px auto; text-align:left; }
.character-profiles .profile-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.character-profiles label { display:flex; flex-direction:column; gap:5px; font-size:16px; min-width:0; }
.character-profiles input,.character-profiles select { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:8px; font:inherit; color:#352a22; background:#fffdf7; border:1px solid #b9aa91; border-radius:5px; }
.character-profiles .profile-actions { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.character-profiles .profile-actions button { width:auto; min-height:44px; white-space:normal; flex:0 1 auto; }
.character-profiles .secondary { background:#fffdf7; color:#762f3c; border:1px solid #762f3c; }
.character-profiles :focus-visible { outline:3px solid #b48c40; outline-offset:3px; }
.character-profiles #profile-status { overflow-wrap:anywhere; }
.character-profiles .profile-help { font-size:14px; }
.character-profiles .profile-allocation { min-width:0; }
.character-profiles .profile-score-adjust { display:flex; gap:8px; margin-top:6px; }
.character-profiles .profile-score-adjust button { width:44px; min-height:44px; margin:0; padding:6px; font-size:18px; }
.character-profiles .profile-score-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.character-profiles .profile-score-results > div { display:flex; flex-direction:column; padding:12px; background:#f1e9d9; border:1px solid #ded3bd; border-radius:6px; font-variant-numeric:tabular-nums; }
.character-profiles #profile-editor > label,.character-profiles #profile-point-buy,.character-profiles .profile-details { margin-bottom:16px; }
@media(max-width:650px) { .character-profiles .profile-score-results { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.character-profiles [hidden] { display:none !important; }
@media(max-width:650px) { .character-profiles { padding:18px; } .character-profiles .profile-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:390px) { .character-profiles .profile-fields { grid-template-columns:minmax(0,1fr); } }
@media(max-width:768px) { .character-profiles[data-tool="combat"] { width:calc(100% - 24px); } }
@media print { .character-profiles { display:none; } }

@media(max-width:650px) {
  .character-profiles .profile-management-actions { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; }
  .character-profiles .profile-management-actions button { width:100%; min-width:0; margin:0; padding:8px 6px; }
  .character-profiles :is(#profile-new,#profile-edit,#profile-delete) { grid-column:span 2; }
  .character-profiles :is(#profile-export,#profile-import) { grid-column:span 3; }
  .character-profiles #profile-copy-sheet { grid-column:1 / -1; }
}
