/* Layout extension only. Palette, type, controls and badge styling remain owned by published CSS. */
.ares-command-badges input { max-width: 100%; }
.ares-command-badges textarea { width: 100%; resize: none; }
.ares-command-badges .cmd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.ares-command-badges .cmd-filters label { display: grid; gap: .35rem; min-width: 0; }
.ares-command-badges .cmd-card { overflow-wrap: anywhere; }
.ares-command-badges .cmd-form { display: grid; gap: .75rem; }
.ares-command-badges .cmd-form label { display: grid; gap: .35rem; }
.ares-command-badges .cmd-form textarea { resize: none; }
.ares-command-badges .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ares-command-badges { display: grid; gap: 1.25rem; max-width: 960px; }
.ares-command-badges h2, .ares-command-badges h3, .ares-command-badges p { margin: 0; }
.ares-command-badges .cmd-filters { margin: 0; }
.ares-command-badges .cmd-filters label { flex: 1; }
.ares-command-badges .ares-badge-player { gap: 1rem; }
.ares-badge-player-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--cmd-line); padding-bottom: 1rem; }
.ares-badge-player-head h2 { margin-top: .25rem; }
.ares-badge-identity { border-block: 1px solid var(--cmd-line); padding-block: 1rem; }
.ares-badge-step { display: flex; align-items: flex-start; gap: .75rem; }
.ares-badge-step > span { display: grid; place-items: center; flex: 0 0 1.75rem; height: 1.75rem; border: 1px solid var(--cmd-cardline); border-radius: 50%; color: var(--accent); }
.ares-badge-step h3 { font-size: 1rem; }
.ares-badge-step p { color: var(--muted); margin-top: .25rem; }
.ares-badge-identity-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: .75rem 1rem; align-items: start; }
.ares-command-badges .ares-badge-identity-fields textarea { min-height: 72px; }
.ares-badge-identity-fields small { grid-column: 1 / -1; color: var(--muted); }
.ares-badge-history { border-top: 1px solid var(--cmd-line); padding-top: 1rem; }
.ares-badge-history summary { cursor: pointer; color: var(--muted); }
.ares-badge-history[open] > p, .ares-badge-history ol { margin-top: .75rem; }
@media (max-width: 600px) { .ares-badge-identity-fields { grid-template-columns: 1fr; } .ares-badge-player-head { align-items: flex-start; flex-wrap: wrap; } }
.ares-badge-results { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.ares-badge-results li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.ares-badge-results p { margin: .25rem 0; }
.ares-command-badges dd { margin-inline-start: 0; }
.op-name .ares-official-badges,.operator-name .ares-official-badges { display: inline-flex; vertical-align: middle; margin-inline-start: .4rem; font-size: .875rem; }
@media(max-width: 480px) { .ares-command-badges .cmd-filters label { width: 100%; } }
/* A badge belongs to the author's name row, not an extra header grid column. */
.explore-post > header:has(.ares-explore-author) { position: relative; }
.ares-explore-author-info { min-width: 0; }
.ares-explore-author-name { display: flex; align-items: center; min-width: 0; gap: 2px; min-height: 24px; }
.ares-explore-author-name > a { min-width: 0; flex: 0 1 auto; }
.ares-explore-author-name > strong { min-width: 0; }
.ares-explore-author a { color: inherit; text-decoration: none; }
.ares-explore-author a:hover strong, .ares-explore-author a:focus-visible strong { color: #cde293; }
.ares-explore-author a:focus-visible { outline: 2px solid #d2edb9; outline-offset: 2px; border-radius: 3px; }
.ares-explore-author-name > .ares-official-badges { flex: 0 0 auto; flex-wrap: nowrap; margin-block: -10px; }
.ares-explore-author .ares-official-badge { position: static; }
.ares-explore-author .ares-official-badge[open] > [role="note"] { inset-inline-start: 14px; inset-inline-end: auto; width: min(240px, calc(100% - 28px)); max-width: calc(100% - 28px); box-sizing: border-box; }

/* Published author/action controls: preserve palette and type from the existing app. */
.ares-explore-author .ares-official-badge > summary { justify-content: flex-start; padding-inline-start: 2px; box-sizing: border-box; }
.ares-post-actions { position: relative; }
.explore-post > header .ares-post-actions > button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; cursor: pointer; }
.explore-post > header .ares-post-actions-popup { position: absolute; z-index: 5; inset-block-start: 100%; inset-inline-end: 0; display: grid; width: 210px; min-width: 190px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 6px; border: 1px solid #ffffff26; border-radius: 12px; background: #10150f; box-shadow: 0 10px 32px #0008; }
.explore-post > header .ares-post-actions-popup button { display: block; width: 100%; height: auto; min-height: 44px; text-align: start; white-space: nowrap; padding: 10px 12px; border: 0; border-radius: 7px; color: inherit; background: transparent; cursor: pointer; }
.ares-post-actions-popup button:hover, .ares-post-actions-popup button:focus-visible { background: #ffffff12; }
.ares-post-actions-popup .ares-post-delete { color: #ffb4a5; }
.ares-post-actions button:focus-visible, .ares-post-action-dialog :focus-visible { outline: 2px solid #d2edb9; outline-offset: 2px; }
.ares-post-action-dialog { position: fixed; inset: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 24px; margin: auto; overflow: auto; color: #f2f4ed; background: #10150f; border: 1px solid #ffffff26; border-radius: 18px; font: inherit; }
.ares-post-action-dialog::backdrop { background: #000a; }
.ares-post-action-dialog form, .ares-post-action-dialog label { display: grid; gap: 12px; }
.ares-post-action-dialog h2, .ares-post-action-dialog p { margin: 0; }
.ares-post-action-dialog h2 { font-size: 1.2rem; }
.ares-post-action-dialog small { color: #aeb7aa; }
.ares-post-action-dialog textarea { width: 100%; box-sizing: border-box; resize: none; min-height: 140px; padding: 12px; border: 1px solid #ffffff26; border-radius: 10px; background: #ffffff08; color: inherit; font: inherit; }
.explore-post > header .ares-post-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.explore-post > header .ares-post-action-buttons button { display: inline-flex; justify-content: center; align-items: center; width: auto; height: auto; min-height: 44px; padding: 10px 16px; border: 1px solid #ffffff26; border-radius: 10px; color: inherit; background: transparent; cursor: pointer; }
.ares-post-action-buttons button[type=submit] { background: #bacd83; color: #10150f; }
.ares-post-action-dialog button:disabled { opacity: .5; cursor: default; }
.ares-post-action-dialog [role=alert] { color: #ffb4a5; }
