/* Söldner-Fenster (27.09.2026, E-70 „nirgends scrollen“): eine Leiste (Reiter · Pfandmarken · Plätze · Hilfe), darunter sechs Karten 3 × 2
   oder Truppe mit Befehlen. Keine Absätze im Fenster – Beschreibung, Vertrag und Bedienhilfe stehen im Tooltip (Handy: Tipp, companionInfoTap).
   Desktop 640 breit; Handy hochkant volle Höhe ab oben (popup-windows.js), quer Truppe zweispaltig. Prüfung: scripts/companion-check.mjs. */
.popup-companions{width:640px;max-width:calc(100vw - 16px)}
/* passt auf allen geprüften Größen ohne Scrollen (companion-check, ui:check); auf noch kleineren Schirmen scrollt es lieber, als abzuschneiden */
.game-popup.popup-companions .popup-body{padding:10px 12px 12px!important;overflow-x:hidden!important;overflow-y:auto!important;min-height:0}
.companion-panel{color:#eee4ce;min-width:0;display:flex;flex-direction:column;gap:10px}
.companion-panel button,.companion-panel select{min-height:44px;min-width:44px;border:1px solid #756044;border-radius:5px;background:#282820;color:#eee4ce;padding:6px 10px;font:inherit;font-size:13px;line-height:1.15;cursor:pointer}
.companion-panel button[aria-pressed=true]{border-color:#d8b770;background:#514330;color:#ffe3a5;box-shadow:inset 0 -2px #d8b770}
.companion-panel button:disabled{cursor:default;opacity:.5}.companion-panel button:focus-visible,.companion-panel select:focus-visible,.companion-frames button:focus-visible{outline:2px solid #ffdb8c;outline-offset:3px}
.companion-panel canvas[data-ui-icon]{flex:none;image-rendering:pixelated}
/* Leiste */
.companion-bar{display:flex;align-items:center;gap:8px;min-width:0}
.companion-tabs{display:flex;gap:6px;flex:1 1 auto;min-width:0;margin:0}
.game-popup .companion-panel .companion-tabs button{flex:1 1 0;min-width:0;padding:6px 8px;font:400 16px/1.1 var(--display);letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.companion-chip{display:flex;align-items:center;gap:4px;flex:none;min-height:32px;padding:0 6px;border:1px solid #4d5a44;border-radius:4px;background:#1b261f;font-size:13px;color:#f4d28a;cursor:help}
.companion-chip canvas{width:24px!important;height:24px!important}.companion-chip b{font-weight:700}.companion-help{padding:0 4px}
/* Angebote: 3 × 2 Karten, Kopf (Symbol, Name, Rolle) und Fuß (Preis, Anheuern) */
.companion-offers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.companion-offer{--role:#d3a96c;display:flex;flex-direction:column;gap:8px;min-width:0;padding:8px;border:1px solid #61563f;border-top:3px solid var(--role);border-radius:5px;background:linear-gradient(140deg,#343529,#232821)}
.companion-offer header{display:flex;gap:8px;align-items:center;min-width:0;cursor:help}.companion-offer header>div{min-width:0}
.companion-panel h3{font-size:15px;line-height:1.15;margin:0 0 2px;color:#f1e8d2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.companion-offer header span i,.companion-offer header span em{font-style:normal}.companion-offer header span{display:block;font-size:12px;color:var(--role);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Anheuern-Knopf trägt den Preis (Münze + Zahl) und das Wort; gesperrt nennt er kurz den Grund, lang im Tooltip */
.companion-offer footer{display:flex;margin-top:auto}
.game-popup .companion-offer footer button{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;white-space:normal;text-align:center}
.hire-short{display:none}.hire-cost{display:inline-flex;align-items:center;gap:2px;font-weight:700}.hire-cost canvas{width:24px!important;height:24px!important}
.companion-offer button[data-state=hired] .hire-cost{display:none}.companion-offer button[data-state=money] .hire-cost{color:#8a2a1a}
.companion-offer.is-hired{border-color:#769b76}
/* Truppe: Befehlsblock (Geltung, Befehle, Haltung) und Zeilen */
.companion-command{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.companion-scope{grid-column:1/-1;display:flex;gap:10px;align-items:center;margin:0;font-size:13px;color:#bcb49f}.companion-scope select{flex:1;min-width:0}
/* Legende mit float: keine gerenderte Legende im Rahmen, sondern eine Rasterzeile über den drei Knöpfen */
.companion-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 6px;border:0;padding:0;margin:0;min-width:0}.companion-controls legend{float:left;grid-column:1/-1;padding:0;font-size:12px;line-height:16px;color:#bcb49f;margin:0}
.companion-controls button{min-width:0;padding:6px 4px;text-transform:none;letter-spacing:0;hyphens:manual;overflow-wrap:normal}
.companion-roster{display:grid;gap:6px}
.companion-roster-row{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,auto) auto;gap:10px;align-items:center;border-top:1px solid #665a41;padding-top:6px}
.companion-roster-row h3 small{font-size:12px;font-weight:normal;color:var(--role)}
.cr-main{min-width:0}.cr-meta{min-width:0;text-align:right}.cr-meta p{margin:0 0 2px;font-size:12px}.cr-meta small{color:#c2b9a4;font-size:12px}
.companion-team{display:flex;flex-direction:column;gap:10px}.companion-empty{margin:0;font-size:13px;color:#c5bca8}
/* Handy: kleinere Schrift, Reiter „Truppe · n“, Legenden nur als Knopf-Tooltip (aria-label/title) */
.touch-mode .companion-panel{gap:8px}.touch-mode .game-popup.popup-companions .popup-body{padding:8px 10px 10px!important}
/* M-02: 8 px zwischen Tipp-Zielen */
.touch-mode .companion-bar{gap:6px}.touch-mode .companion-tabs{gap:8px}.touch-mode .ct-long{display:none}
.touch-mode .game-popup .companion-panel .companion-tabs button{font-size:13px;padding:4px}
.touch-mode .companion-chip{gap:3px;padding:0 3px;font-size:12px}
.touch-mode .companion-offers{gap:6px}.touch-mode .companion-offer{padding:6px;gap:6px}
.touch-mode .companion-offer header{gap:6px}.touch-mode .companion-panel h3{font-size:13px}.touch-mode .companion-offer header span{font-size:11px}
.touch-mode .companion-offer footer button{padding:4px 6px;font-size:12px}
.touch-mode .companion-team{gap:8px}.touch-mode .companion-command{grid-template-columns:1fr;gap:8px}.touch-mode .companion-controls legend,.touch-mode .companion-scope>span{display:none}
.touch-mode .companion-scope select{padding:4px 2px 4px 6px;font-size:12px}.touch-mode .companion-controls{gap:9px}/* 9: gebrochene Knopfbreiten runden sonst auf 7 px */.touch-mode .companion-controls button{font-size:12px;padding:4px}
.touch-mode .companion-roster{gap:8px}.touch-mode .companion-roster-row{grid-template-columns:minmax(0,1fr) minmax(0,auto) auto;gap:8px;border-top:0;padding-top:0}
.touch-mode .game-popup.popup-companions .companion-roster-row h3{font-size:13px;line-height:16px;margin:0 0 3px}.touch-mode .game-popup.popup-companions .companion-roster-row .companion-life{margin:0}.touch-mode .companion-roster-row>canvas,.touch-mode .companion-roster-row .cr-meta small{display:none}.game-popup.popup-companions .companion-roster-row button{text-transform:none;letter-spacing:0;font:inherit}.touch-mode .companion-roster-row button{padding:4px 6px;font-size:12px}
/* hochkant: Karten 2 × 3 (Kopf mit 32er-Symbol, Knopf mit Preis); Geltung und Befehle in einer Reihe, Haltung darunter */
@media(orientation:portrait){.touch-mode .companion-offers{grid-template-columns:repeat(2,minmax(0,1fr))}.touch-mode .companion-command{grid-template-columns:minmax(120px,36%) minmax(0,1fr)}.touch-mode .companion-scope{grid-column:1}.touch-mode .companion-controls[data-kind=stance]{grid-column:1/-1}}
/* quer (flach): Karten 3 × 2 ohne Symbol – Name, darunter Rolle und Preis, darunter der Knopf; Truppe zweispaltig */
@media(orientation:landscape) and (max-height:500px){
 .touch-mode .companion-offer{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'name name' 'role hire';gap:2px 4px;align-items:center;padding:6px 5px}.touch-mode .companion-offer .hire-cost{gap:1px}
 .touch-mode .companion-offer header,.touch-mode .companion-offer header>div,.touch-mode .companion-offer footer{display:contents}
 .touch-mode .companion-offer header canvas,.touch-mode .companion-offer header em{display:none}
 .touch-mode .companion-offer h3{grid-area:name;margin:0}.touch-mode .companion-offer header span{grid-area:role;align-self:center}
 /* Knopf rechts neben der Rolle: frei = nur der Preis, gesperrt = nur der kurze Grund */
 .touch-mode .game-popup.popup-companions .companion-offer footer button{grid-area:hire;max-width:56px;padding:2px;gap:0;font-size:11px;line-height:1.1}
 .touch-mode .companion-offer button .hire-word,.touch-mode .companion-offer button:disabled .hire-cost{display:none}.touch-mode .companion-offer button:disabled .hire-short{display:inline}
 .touch-mode .game-popup.popup-companions .popup-body{padding:6px 10px!important}
 .touch-mode .companion-team{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:start}
 .touch-mode .companion-team .companion-roster{order:-1}
 .touch-mode .companion-roster-row{grid-template-columns:minmax(0,1fr) auto;gap:6px;border-top:0;padding-top:0}.touch-mode .companion-roster-row .cr-meta,.touch-mode .companion-roster-row h3 small{display:none}
 .touch-mode .game-popup.popup-companions .companion-roster-row h3{font-size:12px}.touch-mode .companion-roster-row button{height:44px;min-height:44px;box-sizing:border-box}
}
/* Rollenfarben und Lebensbalken: Fenster und Truppenrahmen */
[data-role=heal]{--role:#92bc8b}[data-role=damage]{--role:#ce957b}[data-role=tank]{--role:#96b4c7}
.companion-life{position:relative;display:block;height:17px;background:#101a18;border:1px solid #77725a;overflow:hidden;border-radius:2px}.companion-life i{display:block;height:100%;background:linear-gradient(#719b61,#41603d)}.companion-life>span{position:absolute;inset:0;text-align:center;font-size:11px;line-height:15px;color:white;text-shadow:0 1px 2px black}.is-down .companion-life i{background:#8c5147}.is-down [data-companion-state]{color:#f0b6a1}
.companion-frames{position:absolute;z-index:8;top:var(--companion-top,180px);left:16px;width:220px;display:grid;gap:6px;pointer-events:auto}.companion-frames[hidden]{display:none}.companion-frames header button{background:#24291fee;border:1px solid #756749;color:#e5d5ab;border-radius:4px;min-height:30px;width:100%;text-align:left;padding:5px 9px;font:inherit;font-size:12px;cursor:pointer}
.companion-frame{display:block;width:100%;padding:7px 9px;background:#1f2925ed;color:#f2e9d5;border:1px solid #665f49;border-left:3px solid var(--role);border-radius:4px;text-align:left;cursor:pointer;min-height:60px}.companion-frame strong{display:flex;justify-content:space-between;gap:4px;font-size:12px;margin-bottom:5px}.companion-frame strong small{font-size:10px;color:var(--role);font-weight:normal}.companion-frame-meta{display:flex;justify-content:space-between;gap:5px;font-size:10px;margin-top:4px}.companion-frame-meta small{font-size:10px;color:#c8bea7}
.start-open .companion-frames{display:none!important}
.companion-frames header{display:flex;gap:5px}.companion-frames header [data-companion-manage]{flex:1}
.companion-frame.is-selected{border-color:#bce994;box-shadow:0 0 0 1px #bce994,inset 0 0 12px #9bd07925}.companion-frame.is-selected [data-companion-state]{color:#c9f0a6}
.companion-frame.target-unavailable{border-color:#d59b69}.companion-frame.target-unavailable [data-companion-state]{color:#edba91}
.companion-frames{overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain;padding:2px}.companion-frame.is-selected{box-shadow:inset 0 0 0 1px #bce994,inset 0 0 12px #9bd07925}
.touch-mode .companion-frames{left:max(8px,env(safe-area-inset-left));width:165px;gap:4px}.touch-mode .companion-frames header button{min-height:44px}.touch-mode .companion-frame{min-height:52px;padding:5px 6px}.touch-mode .companion-frame strong{font-size:11px}.touch-mode .companion-frame-meta{font-size:10px}.touch-mode .companion-frame-meta small{display:none}
@media(max-width:600px){.companion-frame strong small{display:none}}
@media(max-height:500px){.touch-mode .companion-frames{left:175px;right:175px;width:auto;grid-template-columns:repeat(4,minmax(0,1fr));top:100px}.touch-mode .companion-frames header{display:none}.touch-mode .companion-frame{min-height:44px;min-width:0}.touch-mode .companion-frame strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.touch-mode .companion-frame-meta,.touch-mode .companion-frame strong small{display:none}}
