/* Match the original formation bar: a quiet, thin strip integrated into the card edge. */
:is(.game-page .seat,.game-page .self-general,.formation-unit) > .health-bar{position:absolute;z-index:7;left:0;right:0;bottom:0;height:100%;overflow:hidden;border-radius:inherit;clip-path:inset(calc(100% - 3px) 0 0);background:#301f1d;box-shadow:none;pointer-events:none;--health-color:#6a9b7b;--health-end:#a9c695}
:is(.game-page .seat,.game-page .self-general,.formation-unit) > .health-bar[data-health="medium"]{--health-color:#b88b35;--health-end:#ecd16f}
:is(.game-page .seat,.game-page .self-general,.formation-unit) > .health-bar[data-health="low"]{--health-color:#b7463e;--health-end:#f18b70}
:is(.game-page .seat,.game-page .self-general,.formation-unit) > .health-bar[data-health="dead"]{--health-color:#777d79;--health-end:#92968e;opacity:.6}
.health-bar > span{position:absolute;inset:0;transform-origin:left center;background:var(--health-color)}
.health-bar > .health-bar-trail{background:#c6bc9b}
.health-bar > .health-bar-fill{background:linear-gradient(90deg,var(--health-color),var(--health-end))}
.health-bar.is-dying{animation:health-bar-dying 1.5s ease-in-out infinite;box-shadow:none}
.health-bar.is-still{animation:none}
@keyframes health-bar-dying{50%{background:#7a302c}}
.game-page .health-number{font-size:clamp(10px,1.3vw,14px)}
.game-page .health-maximum{font-size:.75em;color:#e2d7bf}
@media(prefers-reduced-motion:reduce){.health-bar.is-dying{animation:none}}

/* Compact, separate public statuses; never wrap a sentence across the portrait. */
.game-page .element-status,.formation-unit > .element-status{display:flex;flex-direction:column;align-items:flex-end;gap:3px;padding:0;border:0;background:transparent;max-width:100%;overflow:visible;pointer-events:auto}
.formation-unit > .element-status{left:auto;right:6px;top:29px;z-index:7;max-width:calc(100% - 30px)}
:is(.game-page,.formation-unit) .status-chip{display:block;min-width:0;min-height:18px;max-width:100%;margin:0;padding:1px 4px;border:1px solid #c7b78c40;border-radius:3px;background:#14201bb8;color:#eee2c6;font:10px/15px "Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none;text-align:right;cursor:pointer}
:is(.game-page,.formation-unit) .status-chip[hidden]{display:none}
.status-chip:focus-visible{outline:2px solid #e6ca83;outline-offset:1px}
.status-detail-dialog{overflow:auto}
.status-detail-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.status-detail-dialog h2{font-size:18px}.status-detail-dialog h3{font-size:14px;margin:12px 0 4px}.status-detail-dialog p{font-size:13px;line-height:1.6;margin:4px 0;white-space:pre-line}.status-detail-dialog details{margin-top:12px}

.status-detail-dialog { box-sizing: border-box; }
.status-detail-dialog > header { margin-bottom: 16px; }
.status-detail-dialog h2 { margin: 0; font-size: 20px; }
.status-detail-dialog .status-entry { padding: 14px 0; border-top: 1px solid #b69a6633; }
.status-detail-dialog .status-entry-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.status-detail-dialog .status-entry-heading h3 { margin: 0; color: #f0dca8; font-size: 16px; }
.status-detail-dialog .status-duration { color: #d6c89d; font-size: 12px; line-height: 1.5; }
.status-detail-dialog .status-effect { margin: 7px 0 0; font-size: 14px; color: #eee8d9; }
.status-detail-dialog .status-source { margin: 6px 0 0; font-size: 12px; color: #b7b8a8; }
.status-detail-dialog details { margin-top: 8px; font-size: 12px; color: #bbb9a7; }
.status-detail-dialog summary { cursor: pointer; }
.status-detail-dialog h4 { margin: 10px 0 4px; font-size: 13px; }
.status-detail-dialog .status-global-rules { padding-top: 12px; border-top: 1px solid #b69a6633; }


:is(.game-page,.formation-unit) .status-chip[data-status-tone="harm"]{background:#542622e8;border-color:#d6856880;color:#ffe2cd}

.status-chip .status-chip-count{color:#ffd478;font-weight:700;font-variant-numeric:tabular-nums}

/* Current state leads; authored skill prose stays secondary. */
.status-detail-dialog .status-entry { padding: 12px 0; }
.status-detail-dialog .status-duration { margin: 5px 0 0; }
.status-detail-dialog .status-active { color: #b8d6bc; font-size: 12px; }
.status-detail-dialog .status-progress { display: block; width: 120px; height: 5px; margin-top: 8px; accent-color: #8ed8f0; }
.status-detail-dialog .status-authored-text { font-size: 13px; line-height: 1.7; color: #c7c9bd; margin: 6px 0 0; }
.status-detail-dialog details h4 { font-size: 13px; }
