/* 기력 (energy) and 반복 전투 (repeat battle): lineup chips, the stage detail's sortie side, the result's
   기력 line, the repeat bar over the battle and the repeat summary. Loaded after main.css. */

/* ---------- lineup: 기력 chip under the ▲ shortcut, 지침 at 0 ---------- */
.en-chip { display: inline-flex; align-items: center; gap: 1px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; font-size: 16px; line-height: 1.15; font-weight: 900; padding: 0 5px 0 2px; white-space: nowrap; }
.en-chip .ico { width: 17px; height: 17px; }
.en-chip.low { background: #ffe0a3; color: #b2470c; }
.en-chip.tired { background: var(--red); color: #fff; padding: 0 6px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.slot > .en-chip, .unit-card > .en-chip { position: absolute; right: 3px; top: 42px; pointer-events: none; }
.slot.tired .portrait-box, .unit-card.tired .portrait-box { filter: grayscale(.85) brightness(.92); }
.slot.tired, .unit-card.tired:not(.in-lineup) { background: #eceef3; }

/* ---------- stage detail: 반복 toggle, 지침 count and 기력 cost beside 출격 ---------- */
.sortie-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sortie-side-top { display: flex; align-items: center; gap: 8px; }
.repeat-toggle { margin: 0; font-size: 21px; gap: 6px; }
.repeat-toggle .check-box { width: 34px; height: 34px; }
.sortie-tired { padding: 1px 10px; border: 3px solid var(--ink); border-radius: 999px; background: var(--red); color: #fff; font: 900 17px/1.2 var(--font); cursor: pointer; touch-action: manipulation; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.sortie-tired:focus-visible { outline: 4px dashed var(--orange); outline-offset: 2px; }
.sortie-cost { display: flex; flex-direction: column; align-items: flex-end; font-size: 16px; font-weight: 800; line-height: 1.25; color: #7a5a3f; white-space: nowrap; }
.sortie-cost span { display: inline-flex; align-items: center; gap: 2px; }
.sortie-cost .ico { width: 18px; height: 18px; }
.radar-toggle.off { opacity: .55; cursor: default; }

/* the 지침 dialog (stage detail, also after the server's 409) */
.tired-box { width: 720px; }
.tired-box .confirm-msg { margin-bottom: 16px; word-break: keep-all; }
.tired-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; }
/* 5 per row (a full lineup of 10: two rows); 124 px and 3 lines fit every form name of units.json at 17 px */
.tired-unit { width: 124px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.portrait-box.tired-face { width: 64px; height: 64px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; filter: grayscale(.85); }
.tired-name { font-size: 17px; font-weight: 900; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
/* the 지침 chips of one row on one line, whatever the names' line counts */
.tired-unit .en-chip { margin-top: auto; }

/* ---------- battle result: the 기력 line ---------- */
/* one run of text, so a long 지침 list wraps as a sentence instead of squeezing the cost into a column */
.result-energy { margin: 0; display: inline-block; max-width: 100%; padding: 1px 16px 1px 8px; background: #fff; border: 3px solid var(--ink); border-radius: 20px; font-size: 20px; font-weight: 900; line-height: 1.35; text-align: center; word-break: keep-all; text-wrap: balance; }
.result-energy .ico { width: 26px; height: 26px; margin-right: 4px; vertical-align: -6px; }
.re-tired { color: #d2421b; }
.rp-stop-note { margin: 0; font-size: 21px; font-weight: 900; color: #d2421b; }
.rp-next { margin: 0; font-size: 22px; font-weight: 900; color: #7a5a3f; animation: blink 1s ease-in-out infinite; }

/* ---------- 반복 전투: the bar over the battle and between battles (under the HUD's pause / speed / AUTO;
   on the right it would cover the ally base's HP bar, which sits just below the money panel) ---------- */
.repeat-bar { position: absolute; left: 12px; top: 102px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px; background: rgba(30, 30, 40, .82); border: 3px solid var(--ink); border-radius: 999px; color: #fff; font-size: 19px; font-weight: 900; white-space: nowrap; }
.rp-tag { color: #9dffb4; }
.repeat-bar .btn { min-height: 46px; padding: 2px 16px; font-size: 20px; }

/* the summary at the end of a run */
.rp-stats { display: flex; gap: 14px; }
.rp-stat { display: flex; flex-direction: column; align-items: center; padding: 2px 22px 4px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; font-size: 28px; font-weight: 900; line-height: 1.15; }
.rp-stat small { font-size: 17px; color: #7a5a3f; }
.rp-treasures { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; max-width: 860px; }
.rp-tr { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; font-size: 18px; font-weight: 900; }
.rp-reason { margin: 4px 0 0; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 22px; font-weight: 900; word-break: keep-all; }
.rp-reason.rp-loss, .rp-reason.rp-energy, .rp-reason.rp-error { color: #d2421b; }
.rp-detail { font-size: 18px; font-weight: 800; color: #7a5a3f; }
.rp-tired { margin: 0; font-size: 19px; font-weight: 800; color: #d2421b; }
