/* Minimal styles just for readability */
#mf-ext-chars-root { padding: 10px; font-family: 'Crimson Text', Georgia, serif; }
.mf-ext-chars-loading { opacity: 0.8; }
.mf-char-grid { display: flex; flex-direction: column; gap:22px; }
.mf-char-card { background:#f5efe4; border:2px solid #8b7355; padding:0 0 16px; position:relative; box-shadow:0 4px 8px rgba(0,0,0,.08); display:flex; flex-direction:column; }
.mf-char-card header { border-bottom:1px solid #c4b59d; padding:14px 18px 10px; background:#e8ddc4; }
.mf-char-card .mf-char-inner { display:flex; flex-direction:row; align-items:flex-start; padding:12px 18px 0; gap:28px; }
.mf-char-card .mf-char-nation { flex:0 0 300px; padding:0 0 0 0; display:flex; align-items:flex-start; justify-content:center; position:relative; }
.mf-char-card .mf-char-nation::after { content:""; position:absolute; top:0; right:-14px; width:1px; height:100%; background:#c4b59d; }
.mf-char-card .mf-char-nation img { width:100%; height:auto; object-fit:contain; display:block; }
.mf-char-card .mf-char-body { flex:1 1 auto; padding:0 0 0; display:flex; flex-direction:column; }
.mf-char-card h3 { margin:0; font-size:20px; color:#5c4c3a; }
.mf-char-card .mf-char-ids { margin-top:6px; font-size:15px; font-weight:700; color:#000; letter-spacing:.5px; }
.mf-char-card .mf-char-ids span { display:inline-block; background:#a48c72; /* override variable used by global color rule */ --parchment-text:#fff; color:#fff !important; padding:4px 11px 5px; margin:0 6px 6px 0; border-radius:3px; font-size:13px; font-weight:600; letter-spacing:.5px; box-shadow:0 1px 2px rgba(0,0,0,.25); }
/* Accessibility override: ensure character ID badge text remains white despite global MyAccount content color rule */
#mf-ext-chars-root .mf-char-card .mf-char-ids span { color:#fff !important; }
/* Character action buttons */
.mf-char-actions { margin:10px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
/* Base button style (will be reinforced by high-specificity overrides below) */
.mf-char-btn { cursor:pointer; background:#000; color:#fff; border:1px solid #000; padding:5px 14px 6px; font-size:12px; font-weight:600; letter-spacing:.5px; border-radius:4px; line-height:1.2; box-shadow:0 1px 2px rgba(0,0,0,.35); transition:background .18s, transform .12s, box-shadow .18s; font-family:inherit; }
.mf-char-btn:hover { background:#111; }
.mf-char-btn:active { transform:translateY(1px); box-shadow:0 0 0 rgba(0,0,0,0.2); }
.mf-char-btn:focus { outline:2px solid #c4b59d; outline-offset:2px; }
/* Ensure variants do not change color scheme anymore */
.mf-char-btn-edit, .mf-char-btn-dead, .mf-char-btn-retired { background:#000; border-color:#000; }

/* High-specificity enforcement to beat global MyAccount * color + !important rules */
html body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn,
body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn { background:#000 !important; color:#fff !important; border-color:#000 !important; }
html body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn:hover,
body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn:hover { background:#111 !important; }
html body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn:active,
body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-actions .mf-char-btn:active { background:#000 !important; }
/* Stronger specificity override (mirrors global MyAccount selectors) */
html body.woocommerce-account .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span,
body.woocommerce-account .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span,
html body .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span,
body .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span { color:#fff !important; }
/* Max specificity override adding root ID to decisively beat all broad * + span rules using !important */
html body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span,
body.woocommerce-account #mf-ext-chars-root .woocommerce-MyAccount-content .mf-char-card .mf-char-ids span { color:#fff !important; }
.mf-char-nation { text-align:center; margin-bottom:12px; }
.mf-char-nation img { max-width:100%; height:auto; box-shadow:0 2px 4px rgba(0,0,0,.08); }
.mf-char-meta { font-size:12px; color:#5c4c3a; margin-top:4px; display:none; }
.mf-char-section { margin-top:12px; }
.mf-char-section h4 { margin:0 0 6px; font-size:15px; color:#8b7355; letter-spacing:1px; text-transform:uppercase; }
.mf-char-section-skills, .mf-char-section-sub-skills { padding:0 18px; }
.mf-skill-groups { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px 24px; }
.mf-skill-cat { padding:2px 2px 6px; }
.mf-skill-cat-name { font-weight:600; font-size:13px; margin:0 0 6px; color:#5c4c3a; letter-spacing:.5px; border-bottom:1px solid #c4b59d; padding-bottom:2px; }
.mf-skill-cat ul { list-style:disc; margin:0 0 0 18px; padding:0; font-size:13px; line-height:1.3; }
.mf-char-section-skills, .mf-char-section-sub-skills { margin-top:18px; }
.mf-char-kv { display:grid; grid-template-columns:140px 1fr; gap:4px 10px; font-size:13px; }
.mf-char-kv > div:first-child { font-weight:600; color:#5c4c3a; }
.mf-char-skills ul, .mf-char-sub-skills ul { margin:0; padding-left:18px; font-size:13px; }
.mf-char-backstory { line-height:1.4; font-size:13px; background:#fff; padding:10px 12px; border:1px solid #c4b59d; max-height:140px; overflow:auto; }
.mf-char-resources { display:none; }
.mf-char-tag { display:inline-block; background:#a48c72; color:#fffefa; font-size:11px; padding:2px 6px 3px; border-radius:3px; margin-left:6px; letter-spacing:.5px; font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.25); }
.mf-char-flags { position:absolute; top:8px; right:8px; display:flex; gap:4px; }
.mf-char-flag { background:#5c4c3a; color:#f5efe4; font-size:10px; padding:2px 6px; border-radius:2px; }
@media (max-width:900px){
	.mf-char-card .mf-char-inner { flex-direction:column; }
	.mf-char-card .mf-char-nation { flex:0 0 auto; padding:0 0 12px; }
	.mf-char-card .mf-char-nation::after { display:none; }
	.mf-char-card .mf-char-nation img { max-width:360px; }
	.mf-skill-groups { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); }
}
@media (max-width:640px){ .mf-char-kv { grid-template-columns:110px 1fr; } }
