/* Kill Teams overview and builder. Builds on ../killteam.css; ../killteam-theme.css is loaded after this file. */
.small-hero { padding: 40px 0 22px; }
.sec { padding-top: 24px; padding-bottom: 40px; }

/* Fraktionsfarben: --fc für Flächen und Linien, --fc-ink für Text (AA auf dunklem Grund) */
.f-imperium { --fc: #e0a23c; --fc-ink: #e0a23c; }
.f-chaos { --fc: #c2412d; --fc-ink: #e08a7c; }
.f-aeldari { --fc: #4fb3a9; --fc-ink: #5cc2b8; }
.f-necrons { --fc: #6fcf5a; --fc-ink: #6fcf5a; }
.f-orks { --fc: #8bb04a; --fc-ink: #9cc05a; }
.f-t-au { --fc: #5b9bd5; --fc-ink: #6fa9de; }
.f-tyraniden { --fc: #b06ad0; --fc-ink: #c08ad9; }
.f-symbiontenkulte { --fc: #9a7fd1; --fc-ink: #ad97da; }
.f-liga-von-votann { --fc: #d68a4c; --fc-ink: #d68a4c; }

/* ---------- Teamliste ---------- */
.list-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin: 4px 0 12px; }
.search { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; max-width: 460px; }
.search label { font: 800 0.8rem var(--head-font, inherit); text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.search input {
  font: inherit; width: 100%; min-height: 44px; padding: 9px 12px 9px 40px; color: var(--ink);
  background: var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23c9a557' stroke-width='2'/%3E%3Cpath d='M13 13l4.5 4.5' stroke='%23c9a557' stroke-width='2.4'/%3E%3C/svg%3E") 12px center / 18px no-repeat;
  border: 1px solid #5a5140; border-radius: 0;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.search input::placeholder { color: #9d9586; }
.search input:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; border-color: var(--accent); }
.list-count { margin: 0; font-family: var(--mono, monospace); font-size: 0.9rem; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.chip {
  font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; padding: 8px 14px 8px 12px; min-height: 40px;
  border-radius: 0; border: 1px solid var(--line); border-left: 3px solid var(--fc, var(--accent)); background: var(--panel); color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
  text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--head-font, inherit);
}
.chip:hover { color: var(--ink); border-color: var(--accent); border-left-color: var(--fc, var(--accent)); }
.chip.on { background: linear-gradient(180deg, #e0c27a, #b38e42); border-color: #b38e42; border-left-color: var(--fc, #b38e42); color: #1b1408; }
.chip:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 22px; }
.team-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #221f1b, #1a1916); border: 1px solid var(--line); border-top: 4px solid var(--fc, var(--accent)); border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut, 10px)), calc(100% - var(--cut, 10px)) 100%, 0 100%);
  padding: 16px; transition: transform 0.15s, border-color 0.15s;
}
.team-card:hover, .team-card:focus-visible { transform: translateY(-2px); border-color: var(--fc, var(--accent)); color: var(--ink); }
.team-card:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -4px; }
.team-card h2 { font-size: 1.2rem; margin: 0; }
.team-card p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.tc-fac { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--fc-ink, var(--accent)); }
.tc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-meta span { font-size: 0.76rem; padding: 3px 8px; border-radius: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }
.tc-meta span:first-child { color: var(--ink); font-weight: 700; font-family: var(--mono, inherit); }
.tc-meta .tc-beg, .tc-beg {
  color: #0f1f1b; background: var(--verd, #6cc3ad); border-color: var(--verd, #6cc3ad); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem;
}
.th-tags .tc-beg { display: inline-block; padding: 3px 9px; }
.grid-empty { grid-column: 1 / -1; padding: 18px; background: var(--panel); border: 1px dashed #5a5140; color: var(--muted); margin: 0; }
.grid-empty .btn { margin-top: 10px; padding: 8px 14px; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) { .team-card { transition: none; } .team-card:hover { transform: none; } }

/* ---------- Teamseite: Fraktionsfarbe färbt Kopf und Builder ---------- */
#app.is-team .hero {
  padding: 26px 0 18px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 2px, transparent 2px 4px),
    radial-gradient(700px 260px at 15% 0%, color-mix(in srgb, var(--fc) 26%, transparent), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0,0,0,0.35));
}
#app.is-team .hero h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
#app.is-team .hero h1 span { color: var(--fc-ink, var(--accent)); }
#app.is-team .hero .lead { display: none; }
#app.is-team .hero::after { background: repeating-linear-gradient(-45deg, var(--fc) 0 10px, #15130f 10px 20px); }

.team-head { margin-bottom: 8px; padding: 4px 0 4px 16px; border-left: 4px solid var(--fc, var(--accent)); }
.team-head .back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 700; padding: 6px 0; }
.team-head .kicker { color: var(--muted); }
.team-head .th-fac { color: var(--fc-ink, var(--accent)); }
.team-head .kicker small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.team-title { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.th-tags { margin: 0; }
#app.is-team .panel > h3:first-child { background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 30%, #2a2117), #2a2117); }

/* ---------- Builder ---------- */
.builder {
  background: linear-gradient(170deg, color-mix(in srgb, var(--fc, #c9a557) 9%, #24221d), #1b1a17 55%);
  border: 2px solid #4a4434; border-top: 3px solid var(--fc, var(--accent)); border-radius: 0; padding: 18px; margin: 22px 0 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.b-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.b-head h3 { margin: 0; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.3rem; }
.b-intro { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.b-intro b { color: var(--ink); font-family: var(--mono, inherit); }
.b-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.b-tools .btn { padding: 8px 14px; font-size: 0.92rem; }
.b-status { border-radius: 0; padding: 12px 14px; margin-bottom: 14px; font-size: 0.95rem; border-left-width: 4px !important; }
.b-status ul { margin: 6px 0 0; padding-left: 20px; }
.b-status.ok { background: rgba(108,195,173,0.12); border: 1px solid rgba(108,195,173,0.5); border-left-color: var(--verd, #6cc3ad); }
.b-status.ok > b { color: var(--verd, #6cc3ad); }
.b-status.warn { background: rgba(201,165,87,0.10); border: 1px solid rgba(201,165,87,0.45); border-left-color: var(--accent); }
.b-status:focus { outline: none; }

/* mitlaufende Statuszeile unter der Kopfzeile */
.b-bar { position: fixed; z-index: 15; top: 57px; left: 0; right: 0; pointer-events: none; }
.b-bar[hidden] { display: none; }
.b-bar-in {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 0; padding: 6px 6px 6px 12px; min-height: 44px;
  background: rgba(22,21,18,0.97); border: 1px solid #5a5140; border-left: 4px solid var(--accent);
  box-shadow: 0 10px 22px -10px #000; font-size: 0.9rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.b-bar.ok .b-bar-in { border-left-color: var(--verd, #6cc3ad); }
.b-bar-t { font-family: var(--mono, inherit); font-weight: 700; min-width: 0; line-height: 1.3; }
.b-bar.ok .b-bar-t { color: var(--verd, #6cc3ad); }
.b-bar-go {
  flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px; white-space: nowrap; text-decoration: none; font-weight: 800;
  color: var(--accent-2); border: 1px solid #5a5140; background: var(--bg2);
}
.b-bar-go:hover { border-color: var(--accent); }
.b-bar-go:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; }

.b-group { margin-top: 18px; }
.bg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid #4a4434; padding-bottom: 6px; }
.bg-head h4 { margin: 0; font-size: 1.05rem; font-family: var(--head-font, inherit); text-transform: uppercase; letter-spacing: 0.05em; }
.bg-count { font-family: var(--mono, inherit); font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.bg-count.ok { color: var(--verd, #9be38a); border-color: rgba(108,195,173,0.5); }
.bg-count.bad { color: var(--blood-ink, #ff8a73); border-color: rgba(178,58,46,0.7); }
.bg-note { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }

.b-rows { display: flex; flex-direction: column; }
.b-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.b-row.has .b-name b { color: var(--accent-2); }
.b-row.dim .b-name { opacity: 0.6; }
.b-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.b-name small { color: var(--muted); font-size: 0.84rem; }
.b-name .b-cost { color: var(--accent); font-weight: 700; }
.b-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.b-stats i { font-style: normal; font-family: var(--mono, inherit); font-size: 0.74rem; font-weight: 700; padding: 1px 7px; border-radius: 0; background: var(--bg2); border: 1px solid var(--line); }
.b-ctrl { display: flex; align-items: center; gap: 6px; }
.b-btn {
  width: 40px; height: 40px; border-radius: 0; border: 1px solid #5a5140; background: var(--bg2); color: var(--ink);
  font: inherit; font-size: 1.25rem; font-weight: 800; cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.b-btn:hover:not([aria-disabled="true"]) { border-color: var(--accent); color: var(--accent-2); }
.b-btn[aria-disabled="true"] { color: #6f685b; background: transparent; border-style: dashed; cursor: not-allowed; }
.b-btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; border-radius: 0; }
.b-n { min-width: 1.6em; text-align: center; font-weight: 900; font-size: 1.1rem; font-family: var(--mono, inherit); font-variant-numeric: tabular-nums; }
.b-lim { font-size: 0.78rem; color: var(--muted); min-width: 6.5em; }
.b-lim.stop { color: var(--accent-2); font-weight: 700; }
.b-opts { grid-column: 1 / -1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.b-opts select { font: inherit; font-size: 0.88rem; max-width: 100%; min-width: 0; text-overflow: ellipsis; min-height: 40px; background: var(--bg); color: var(--ink); border: 1px solid #5a5140; border-radius: 0; padding: 6px 8px; }

.b-weap { grid-column: 1 / -1; min-width: 0; }
.b-weap summary { cursor: pointer; font-size: 0.84rem; font-weight: 700; color: var(--accent-2); padding: 4px 0; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.b-weap summary:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.b-weap .dc-weap { margin-top: 4px; font-size: 0.84rem; }
.b-weap .dc-weap td:first-child { white-space: normal; }
.dc-weap .wt { color: var(--accent); }

@media (max-width: 560px) {
  .b-row { grid-template-columns: minmax(0, 1fr); }
  .b-opts select { width: 100%; }
  .b-lim { min-width: 0; }
  .builder { padding: 14px; }
  .b-btn { width: 44px; height: 44px; }
  .b-bar-in { font-size: 0.82rem; padding-left: 10px; }
  .b-bar-go { padding: 4px 8px; }
}

/* equipment picker */
.b-eq { margin-top: 22px; }
.b-eq:empty { display: none; }
.eq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; margin-top: 10px; }
.eq-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0; background: var(--bg2); cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.eq-item.on { border-color: var(--accent); background: rgba(201,165,87,0.08); }
.eq-item input { accent-color: var(--accent); width: 20px; height: 20px; margin-top: 2px; flex: none; }
.eq-item input:focus-visible { outline-offset: 1px; }
.eq-item input:disabled + span { opacity: 0.55; }
.eq-item:has(input:disabled) { cursor: not-allowed; }
.eq-item span { display: flex; flex-direction: column; gap: 2px; }
.eq-item small { color: var(--muted); font-size: 0.84rem; }
.eq-h { margin: 14px 0 0; font-size: 0.92rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--head-font, inherit); }

/* ---------- Übersicht zum Spielen ---------- */
.summary {
  background: linear-gradient(170deg, #24221d, #1a1916); border: 2px solid #4a4434; border-radius: 0; padding: 18px; margin: 0 0 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.summary:focus { outline: none; }
.sum-wait h3 { margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.sum-wait p { margin: 0; color: var(--muted); }
.sum-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sum-head h3 { font-size: 1.5rem; margin: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.sum-head .kicker { margin: 0 0 4px; }
.sum-block { margin-top: 18px; }
.sum-block h4 { margin: 0 0 8px; font-size: 1.05rem; border-bottom: 1px solid #4a4434; padding-bottom: 6px; font-family: var(--head-font, inherit); text-transform: uppercase; letter-spacing: 0.05em; }
.sum-block h4 small { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.sum-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; }
.sum-cards li { background: var(--bg2); border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.sum-cards b { color: var(--accent-2); }
.sum-cards span { color: var(--muted); font-size: 0.9rem; }
.cp { display: inline-block; font-family: var(--mono, inherit); font-size: 0.74rem; font-weight: 800; padding: 1px 7px; border-radius: 0; background: var(--accent); color: #1b1408; margin-left: 4px; vertical-align: 1px; }

/* Mini-Datenkarten (Stil wie die Beispielkarte auf der Hauptseite) */
.mdc-legend { margin: 0 0 10px; font-size: 0.88rem; color: var(--muted); }
.mdc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; align-items: start; }
.mdc { margin: 0; box-shadow: 0 10px 24px -16px #000; }
.mdc .dc-head { padding: 9px 12px; gap: 10px; }
.mdc .dc-name { font-size: 1.05rem; line-height: 1.2; }
.mdc .dc-sub { font-size: 0.78rem; }
.mdc-n { flex: none; font: 900 1.15rem var(--mono, monospace); color: #1b1408; background: linear-gradient(180deg, #e0c27a, #a9853c); padding: 2px 8px;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.mdc .dc-stats { gap: 6px; padding: 10px; }
.mdc .stat { cursor: default; padding: 6px 2px; }
.mdc .stat:hover { border-color: #4a4434; color: inherit; }
.mdc .stat span { font-size: 0.66rem; letter-spacing: 0.04em; }
.mdc .stat b { font-size: 1.25rem; }
.mdc .dc-weap td:first-child { white-space: normal; }
.mdc-na { color: var(--muted); font-size: 0.8rem; }
.mdc-w { border-top: 1px solid #3a3528; padding: 8px 12px 10px; }
.mdc-wh { margin: 0 0 4px; font: 800 0.72rem var(--head-font, inherit); text-transform: uppercase; letter-spacing: 0.14em; color: #c9b88f; }
.mdc-w ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.mdc-w li { padding-left: 14px; position: relative; font-size: 0.92rem; }
.mdc-w li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.mdc-txt { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 0.9rem; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  .top, .foot, .hero, .team-head .back, .builder, .cols-2, #team > .fine, .rc-btn, .rc-panel, .sum-head .b-tools, .b-bar, .totop, .chap-panel { display: none !important; }
  body { background: #fff !important; color: #000; }
  .team-head { border-left-color: #888; }
  #team, #team * { color: #000 !important; }
  #team a { text-decoration: underline; }
  .summary { border: 0; padding: 0; background: #fff; color: #000; clip-path: none !important; }
  .sum-cards li, .mdc { background: #fff !important; border-color: #999 !important; color: #000; clip-path: none !important; box-shadow: none; }
  .sum-cards span, .mdc-legend { color: #333 !important; }
  .sum-cards { grid-template-columns: 1fr 1fr; }
  .mdc-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sum-cards li, .mdc { break-inside: avoid; page-break-inside: avoid; }
  .mdc .dc-head { background: #eee !important; border-bottom-color: #999; }
  .mdc .stat { background: #fff; border-color: #999; }
  .mdc-n, .cp { border: 1px solid #000; background: #fff !important; color: #000; clip-path: none; }
  .mdc-w li::before { background: #000; }
}
