/* Schützlings-Seite. Nutzt die Tokens aus app.css und ergänzt nur Eigenes. */

:root {
  --gold: #ffd45a;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --serif: Georgia, "Times New Roman", serif;
}

/* app.css legt einen Verlauf über den Header – der ist für den Kartenblick
   gedacht und würde hier nur den Titel überdecken. */
.header::after { display: none; }
.header { height: auto; }

.wardWrap { max-width: 1320px; margin: 0 auto; padding: 18px; }

.split {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.panel + .panel { margin-top: 14px; }
.panel h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}
.panel h3 .hint {
  float: right;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* Schmal: der Hinweis passt nicht mehr neben die Überschrift. Als Float würde
   er umbrechen, ohne dass die Überschrift mitwächst – und den Inhalt darunter
   überlappen. Deshalb hier eine eigene Zeile. */
@media (max-width: 700px) {
  .panel h3 .hint {
    float: none;
    display: block;
    margin-top: 4px;
  }
}

/* --- Heldendokument --- */
.doc { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 10px; }
.doc img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0,0,0,.65);
}
.docFoot {
  display: flex; justify-content: space-between;
  margin-top: 10px; padding: 0 4px;
  font-size: 12px; color: var(--muted);
}

/* --- Werte --- */
.levelBox {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; margin-bottom: 14px;
  border: 1px solid rgba(255,212,90,.28);
  background: rgba(255,212,90,.06);
  border-radius: 12px;
}
.levelNum {
  font-family: var(--serif); font-size: 30px; line-height: 1;
  color: var(--gold); min-width: 52px; text-align: center;
}
.levelNum small {
  display: block; font-size: 10px; letter-spacing: .14em;
  color: var(--muted); font-family: system-ui, sans-serif;
}
.levelBar { flex: 1; }
.barLabel {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 5px;
}
.barLabel .v { color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #b98a2a, var(--gold)); }
.bar > span.hp    { background: linear-gradient(90deg, #7a1a1a, #d94a4a); }
.bar > span.conf  { background: linear-gradient(90deg, #2a6ab9, #5aa9ff); }
.bar > span.trust { background: linear-gradient(90deg, #2a8a4a, #5ad98a); }
.bar > span.tired { background: linear-gradient(90deg, #8a6a2a, #d9a94a); }

.attrGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 14px; }
.attr { display: flex; align-items: center; gap: 8px; }
.attr .ico { width: 20px; text-align: center; opacity: .85; }
.attr .name { flex: 1; color: var(--muted); font-size: 13px; }
.attr .val {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600;
}
.meters { display: flex; flex-direction: column; gap: 11px; }

/* --- Auftragswahl --- */
.missionGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mission {
  border: 1px solid var(--border);
  background: #0f0f13;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.mission:hover { border-color: rgba(255,255,255,.22); background: #15151a; }
.mission.selected {
  border-color: rgba(255,212,90,.55);
  background: rgba(255,212,90,.07);
  box-shadow: inset 0 0 0 1px rgba(255,212,90,.18);
}
.mission.locked { opacity: .45; cursor: not-allowed; }
.mission .mTop { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mission .mName { font-family: var(--serif); font-size: 15px; }
.mission .mKind { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.mission .mDesc {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.4;
  color: #c9c9d1;
}
.mission .mMeta { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mission .mMeta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.mission .mRew { margin-top: 7px; font-size: 12px; color: var(--muted); }
.mission .mRew b { color: var(--text); }
.prefNote { margin-top: 7px; font-size: 12px; color: var(--gold); opacity: .85; }

.fit { font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.fit.good { color: var(--green); background: rgba(34,197,94,.10);  border-color: rgba(34,197,94,.32); }
.fit.hard { color: var(--amber); background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.32); }
.fit.easy { color: var(--muted); background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.fit.over { color: var(--red);  background: rgba(239,68,68,.10);   border-color: rgba(239,68,68,.32); }
.fit.lock { color: var(--muted); background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }

/* --- Ausrüstung --- */
.itemRow { display: flex; flex-wrap: wrap; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  background: #0f0f13;
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
}
.item:hover { border-color: rgba(255,255,255,.22); }
.item.on { border-color: rgba(255,212,90,.55); background: rgba(255,212,90,.08); }
.item.out { opacity: .35; cursor: not-allowed; }
.item .ico { font-size: 17px; }
.item .nm { font-size: 13px; }
.item .cnt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item .eff { display: block; font-size: 11px; color: var(--green); opacity: .9; }

.startRow {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  gap: 14px; flex-wrap: wrap;
}
.startSummary { font-size: 12px; color: var(--muted); }
.startSummary b { color: var(--text); }

/* app.css formatiert .btn nur innerhalb von .topControls – freistehende
   Knöpfe auf dieser Seite blieben sonst im Standardaussehen des Browsers
   (weiß auf dunklem Grund). */
.btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .16); }

.btn.primary {
  background: rgba(255,212,90,.14);
  border-color: rgba(255,212,90,.42);
  color: var(--gold);
  font-weight: 600;
}
.btn.primary:hover { background: rgba(255,212,90,.22); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* --- Laufender Auftrag --- */
.runHead { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.runName { font-family: var(--serif); font-size: 19px; }
.runName .sub { display: block; font-family: system-ui, sans-serif; font-size: 12px; color: var(--muted); }
.clock {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 24px; color: var(--gold); text-align: right; white-space: nowrap;
}
.clock small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--muted); font-family: system-ui, sans-serif; }
.runBar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 18px; }
.runBar > span { display: block; height: 100%; background: linear-gradient(90deg, #b98a2a, var(--gold)); transition: width 1s linear; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, rgba(255,212,90,.5), rgba(255,255,255,.08));
}
.tlItem { position: relative; padding: 0 0 16px; }
.tlItem::before {
  content: ""; position: absolute; left: -22px; top: 5px;
  width: 10px; height: 10px; border-radius: 99px;
  background: var(--gold); border: 2px solid var(--bg);
}
.tlItem.future::before { background: #3a3a42; }
.tlItem .t { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); }
.tlItem .txt { font-family: var(--serif); font-size: 14px; margin-top: 2px; }
.tlItem.future .txt { color: #4b4b53; font-style: italic; }
.tlItem.gegenstand .txt { color: var(--green); }
.tlItem.gefahr .txt { color: var(--amber); }

.carrying {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.carrying b { color: var(--text); }

/* --- Bericht --- */
.report {
  border-color: rgba(255,212,90,.35);
  background: linear-gradient(180deg, rgba(255,212,90,.07), rgba(255,212,90,.02));
}
.outcome { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.outcomeBadge {
  font-family: var(--serif); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 99px;
  color: var(--green); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.38);
}
.outcomeBadge.partial { color: var(--amber); background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.38); }
.outcomeBadge.failure,
.outcomeBadge.aborted { color: var(--red); background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.38); }

.reportText {
  font-family: var(--serif); font-size: 15px; line-height: 1.6;
  padding: 12px 14px; margin-bottom: 14px;
  border-left: 3px solid rgba(255,212,90,.4);
  background: rgba(0,0,0,.25);
  border-radius: 0 10px 10px 0;
}
.reportText .quelle { font-size: 12px; color: var(--muted); font-family: system-ui, sans-serif; margin-top: 8px; }

.deltaGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .deltaGrid { grid-template-columns: 1fr; } }
.deltaBox h4 {
  margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.deltaRow {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px;
}
.deltaRow .v { font-family: ui-monospace, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.up { color: var(--green); }
.down { color: var(--red); }

.note { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }

/* --- Übersicht aller Schützlinge --- */
.rosterRow { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.rosterCard {
  flex: 0 0 auto; width: 132px;
  border: 1px solid var(--border); border-radius: 12px;
  background: #0f0f13; padding: 9px; text-align: center;
}
.rosterCard.mine { border-color: rgba(255,212,90,.5); background: rgba(255,212,90,.07); }
.rosterCard .av {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; background: #23232a;
  margin-bottom: 7px;
  background-size: 286% auto;      /* Kopfbereich der Heldenkarte ausschneiden */
  background-position: 90% 5%;
}
.rosterCard .nm { font-family: var(--serif); font-size: 13px; line-height: 1.2; }
.rosterCard .mt { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 99px; margin-right: 4px; vertical-align: middle; }
.dot.idle  { background: var(--muted); }
.dot.away  { background: var(--gold); }
.dot.ready { background: var(--green); }
.dot.hurt  { background: var(--red); }

.leer { color: var(--muted); padding: 24px; text-align: center; }
.fehler { color: var(--red); margin-top: 10px; font-size: 13px; }

/* --- Beobachter-Fenster: fremde Schützlinge ansehen --- */
.wardModal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}
.wardModalCard {
  width: min(1000px, 96vw);
  max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.65);
  overflow: hidden;
}
.wardModalHead {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(255,255,255,.10);
  font-family: var(--serif);
}
.wardModalBody { overflow-y: auto; padding: 16px; }
.wardModalBody .doc img { box-shadow: 0 6px 20px rgba(0,0,0,.5); }

@media (max-width: 700px) {
  .wardModal { padding: 8px; }
  .wardModalCard { width: 100%; max-height: 96vh; }
  .wardModalBody .split { grid-template-columns: 1fr !important; }
}

.rosterCard[data-ward] { cursor: pointer; transition: border-color .12s, transform .12s; }
.rosterCard[data-ward]:hover { border-color: rgba(255,255,255,.28); transform: translateY(-2px); }
