/* ---------- Helden-Akademie ---------- */
.r1 { --r: var(--rarity-1); } .r2 { --r: var(--rarity-2); } .r3 { --r: var(--rarity-3); } .r4 { --r: var(--rarity-4); }
.hero-result { border-left: 4px solid var(--green); } .hero-result.bad { border-left-color: var(--accent-2); }
.hero-result p { margin: 0; }
.hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hit { border: 1px solid color-mix(in srgb, var(--r) 45%, var(--border)); background: color-mix(in srgb, var(--r) 10%, var(--surface));
  border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; animation: hit-in .35s ease-out both; }
.hit:nth-child(2) { animation-delay: .05s } .hit:nth-child(3) { animation-delay: .1s } .hit:nth-child(4) { animation-delay: .15s }
.hit:nth-child(5) { animation-delay: .2s } .hit:nth-child(6) { animation-delay: .25s } .hit:nth-child(7) { animation-delay: .3s }
.hit:nth-child(8) { animation-delay: .35s } .hit:nth-child(9) { animation-delay: .4s } .hit:nth-child(10) { animation-delay: .45s }
.hit.r4 { box-shadow: 0 0 0 2px color-mix(in srgb, var(--r) 40%, transparent), 0 6px 22px color-mix(in srgb, var(--r) 35%, transparent); }
.hit-rar { font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; color: var(--r); }
.hit small { color: var(--muted); }
@keyframes hit-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.pull-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pull-btn { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; transition: transform .1s, border-color .15s; }
.pull-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.pull-btn span { color: var(--muted); font-size: var(--fs-sm); }
.pull-btn.big { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.pull-btn.crate strong::before { content: "📦 "; } .pull-btn:not(.crate) strong::before { content: "🎰 "; }
.patrol { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 6px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.patrol p { margin: 2px 0 0; }
.stars { color: var(--rarity-4); letter-spacing: 1px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.hero-stats .power { margin-left: auto; font-weight: var(--fw-bold); }
.abilities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.abilities li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-sm); }
.abilities li.locked { opacity: .55; }
.hero-item { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
.hero-item select { flex: 1; min-width: 0; }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--r); }
td.actions form + form { margin-left: 6px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cat-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--r); }
.cat-card.owned { opacity: .7; }
.fights li { display: flex; align-items: center; gap: 12px; padding: 9px 20px; border-top: 1px solid var(--border); }
.fights li > span:nth-child(2) { flex: 1; min-width: 0; }
.fight-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 18px; }
.fight-head .vs { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fight-head .vs strong { font-size: var(--fs-xl); letter-spacing: .06em; }
.fighter h3 { margin: 4px 0 2px; } .fighter.won { border-color: color-mix(in srgb, var(--green) 50%, var(--border)); }
.mini-bar.hp span { background: var(--green); }
.fight-log { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.fight-log li:last-child { font-weight: var(--fw-bold); }
.tag.pos { color: var(--green); } .tag.neg { color: var(--accent-2); }

/* ---------- Helden: Seitenaufbau ---------- */
.academy { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.academy > .hero-welcome, .academy > .hero-result { margin-bottom: 0; }
.hero-welcome { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; border-left: 4px solid var(--accent); }
.hero-welcome h3 { margin: 0 0 4px; } .hero-welcome p { margin: 0; }
.hw-icon { font-size: var(--fs-2xl); line-height: 1; }
.progress-news { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.pull-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; border-color: var(--border); }
.pull-btn .why { font-style: normal; font-size: var(--fs-xs); color: var(--accent-2); }
.quests { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quests li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.quests li > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.q-open { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 50%; }
.quests li.done span:first-child { text-decoration: line-through; color: var(--muted); }
.quests li.done .mini-bar span { background: var(--green); }
.tag.ult { color: var(--rarity-4); background: color-mix(in srgb, var(--rarity-4) 14%, transparent); }
.table.rates { margin: 6px 0 12px; font-size: var(--fs-sm); }
.table.rates td, .table.rates th { padding: 5px 8px; }
.pull-log summary { cursor: pointer; margin-top: 4px; }
.pull-log ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm); }
/* Katalog: aufklappbar */
details.cat-card { display: block; padding: 0; }
details.cat-card > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
details.cat-card > summary::-webkit-details-marker { display: none; }
details.cat-card[open] { grid-row: span 2; }
details.cat-card .price { font-weight: var(--fw-bold); white-space: nowrap; font-size: var(--fs-sm); }
.cat-abilities { list-style: none; margin: 0; padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
details.cat-card form { padding: 0 12px 12px; }
details.cat-card form .btn { width: 100%; }
/* Guide */
.academy-guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.guide-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.guide-head h3 { margin: 0; font-size: var(--fs-md); }
.academy-guide details { border-top: 1px solid var(--border); padding: 9px 0; }
.academy-guide summary { cursor: pointer; font-weight: var(--fw-semibold); font-size: var(--fs-base); list-style: none; display: flex; justify-content: space-between; }
.academy-guide summary::-webkit-details-marker { display: none; }
.academy-guide summary::after { content: "+"; color: var(--muted); font-weight: var(--fw-regular); }
.academy-guide details[open] summary::after { content: "–"; }
.academy-guide p, .academy-guide li, .academy-guide dd { font-size: var(--fs-sm); line-height: 1.55; }
.academy-guide p { margin: 8px 0 0; }
.guide-steps, .guide-tips { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.guide-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 0; }
.guide-dl dt { font-weight: var(--fw-semibold); font-size: var(--fs-sm); } .guide-dl dd { margin: 0; color: var(--muted); }
.type-cycle { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.type-cycle span { padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-soft); font-weight: var(--fw-semibold); }
/* ausführlicher Guide */
.guide-page { max-width: 900px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.guide-toc a { padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); text-decoration: none; }
.guide-page section.card { margin-bottom: 16px; scroll-margin-top: 80px; }
.guide-page h2 { margin: 0 0 8px; font-size: var(--fs-lg); }
.guide-page h3 { margin: 18px 0 6px; font-size: var(--fs-md); }
.guide-page p, .guide-page li { line-height: 1.6; }
.guide-page .example { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; font-size: var(--fs-sm); }
.guide-page table { margin-top: 8px; }

/* ---------- Bühne: aktiver Held (füllt den ersten Bildschirm) ---------- */
.spotlight { position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "id abilities" "level abilities" "stats item" "actions fights";
  gap: var(--sp-5) var(--sp-8); align-content: start;
  min-height: calc(100vh - 150px); padding: var(--sp-8); border-radius: var(--r-xl); border: 1px solid color-mix(in srgb, var(--r) 35%, var(--border));
  background: var(--surface); box-shadow: var(--shadow-lg); }
.spotlight::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(900px 420px at 0% 0%, color-mix(in srgb, var(--r) 22%, transparent), transparent 70%),
              radial-gradient(700px 380px at 100% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.spot-id { grid-area: id; display: flex; gap: var(--sp-5); align-items: center; }
.spot-emblem { flex: none; width: 112px; height: 112px; border-radius: 30px; display: grid; place-items: center; transform: rotate(-4deg);
  background: linear-gradient(145deg, color-mix(in srgb, var(--r) 85%, #fff), color-mix(in srgb, var(--r) 70%, #000));
  box-shadow: 0 14px 40px color-mix(in srgb, var(--r) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.spot-emblem span { transform: rotate(4deg); color: #fff; font-size: var(--fs-3xl); font-weight: var(--fw-bold); letter-spacing: -.03em; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.spot-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-2); }
.badge.rarity { color: var(--r); background: color-mix(in srgb, var(--r) 14%, var(--surface)); border-color: color-mix(in srgb, var(--r) 35%, transparent); }
.spot-name { font-size: var(--fs-display); line-height: 1.05; letter-spacing: -.03em; }
.spot-meta { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-md); }

.spot-level { grid-area: level; display: flex; gap: var(--sp-5); align-items: center; }
.spot-ring { --p: 0; flex: none; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--r) calc(var(--p) * 1%), color-mix(in srgb, var(--r) 14%, var(--surface-2)) 0); }
.spot-ring > span { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.spot-ring small { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--fw-semibold); }
.spot-ring strong { font-size: var(--fs-2xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; margin-top: 4px; }
.spot-level-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.spot-level-text > strong { font-size: var(--fs-lg); }
.spot-level-text .stars { font-size: var(--fs-md); }
.spot-level-text .mini-bar { height: 8px; max-width: 360px; } .spot-level-text .mini-bar span { background: var(--r); }

.spot-stats { grid-area: stats; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.spot-stats > div { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--border); }
.spot-stats dt { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-medium); }
.spot-stats dd { margin: 2px 0 0; font-size: var(--fs-xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.spot-stats dd small { font-size: var(--fs-md); color: var(--muted); font-weight: var(--fw-semibold); }
.spot-stats .power { background: color-mix(in srgb, var(--r) 12%, var(--surface)); border-color: color-mix(in srgb, var(--r) 35%, var(--border)); }

.spot-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; align-self: end; }
.spot-actions p { flex-basis: 100%; margin: 0; }
.spot-abilities { grid-area: abilities; }
.spot-item { grid-area: item; }
.spot-fights { grid-area: fights; align-self: end; }
.spot-sub { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.spot-sub h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.spotlight .abilities { gap: var(--sp-2); }
.spotlight .abilities li { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--border); font-size: var(--fs-base); }
.spotlight .abilities li.ult:not(.locked) { border-color: color-mix(in srgb, var(--rarity-4) 45%, var(--border)); }
.spotlight .abilities small { font-size: var(--fs-sm); margin-top: 2px; }
.spotlight .hero-item { border-top: 0; padding-top: 0; }
.spot-fights ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.spot-fights li { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }

@media (max-width: 1100px) {
  .spotlight { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "level" "stats" "actions" "abilities" "item" "fights"; min-height: 0; padding: var(--sp-6); }
}
@media (max-width: 560px) {
  .spotlight { padding: var(--sp-5); border-radius: var(--r-lg); gap: var(--sp-4); }
  .spot-emblem { width: 76px; height: 76px; border-radius: 22px; } .spot-emblem span { font-size: var(--fs-xl); }
  .spot-ring { width: 104px; height: 104px; } .spot-ring > span { width: 84px; height: 84px; } .spot-ring strong { font-size: var(--fs-xl); }
  .spot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spot-stats dd { font-size: var(--fs-lg); }
}

/* ---------- Vorräte ---------- */
.resource-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-3); }
.res { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 0; }
.res-label { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-medium); }
.res strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.res strong small { font-size: var(--fs-xs); font-weight: var(--fw-medium); }

/* ---------- Team als kompakte, aufklappbare Liste ---------- */
.team-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.team-row { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--r); border-radius: var(--r-md); box-shadow: var(--shadow); }
.team-row > summary { display: grid; grid-template-columns: 40px minmax(0, 1.6fr) minmax(120px, 1fr) auto auto auto; gap: var(--sp-4); align-items: center; padding: var(--sp-3) var(--sp-4); cursor: pointer; list-style: none; }
.team-row > summary::-webkit-details-marker { display: none; }
.team-row > summary::after { content: "⌄"; color: var(--muted); font-size: var(--fs-md); transition: transform .2s var(--ease); grid-column: -1; grid-row: 1; justify-self: end; margin-left: -8px; }
.team-row[open] > summary::after { transform: rotate(180deg); }
.team-row[open] > summary { border-bottom: 1px solid var(--border); }
.tr-emblem { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-sm);
  background: linear-gradient(145deg, color-mix(in srgb, var(--r) 85%, #fff), color-mix(in srgb, var(--r) 70%, #000)); }
.tr-name { display: flex; flex-direction: column; min-width: 0; } .tr-name strong, .tr-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-level { display: flex; flex-direction: column; gap: 2px; } .tr-level .mini-bar { margin-top: 0; } .tr-level .mini-bar span { background: var(--r); }
.tr-power { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-stars { font-size: var(--fs-sm); white-space: nowrap; }
.tr-body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); }
.tr-body footer { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: var(--sp-3); }
@media (max-width: 760px) {
  .team-row > summary { grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-3); }
  .tr-level { grid-column: 2 / -1; } .tr-power, .tr-stars, .tr-points { display: none; }
}
.tab-panel .section-head { margin-top: 0; }
