/**
 * wb-styles.css — Weltboss-Challenge
 */

/* ==================== Variablen ==================== */
:root {
  --wb-bg:          #150906;
  --wb-card:        #26130d;
  --wb-card-2:      #321a11;
  --wb-border:      #5a3020;
  --wb-gold:        #FECE58;
  --wb-gold-soft:   #F1D9A3;
  --wb-gold-dark:   #a07830;
  --wb-red:         #5D0505;
  --wb-text:        #ead9bb;
  --wb-muted:       #a58a68;
  /* Spielerfarben: Spieler 1 = Feuer (Drache), Spieler 2 = Jade (Heilung) */
  --wb-p1:          #ef7a3a;
  --wb-p1-bg:       rgba(239,122,58,.14);
  --wb-p2:          #3cc2a0;
  --wb-p2-bg:       rgba(60,194,160,.14);
}

/* ==================== Basis ==================== */
.wb-page {
  background: var(--wb-bg);
  color: var(--wb-text);
  font-family: 'Montserrat', Arial, sans-serif;
  min-height: 100vh;
}
.wb-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(239,122,58,.13) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(60,194,160,.11) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(93,5,5,.35) 0%, transparent 55%),
    linear-gradient(180deg, #1c0c07 0%, #150906 100%);
}
.wb-content { position: relative; z-index: 1; }
.wb-content [hidden] { display: none !important; }

/* Heroicons inline */
.wb-icon { display: inline-flex; width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.12em; }
.wb-icon svg { width: 100%; height: 100%; }
.wb-detail-winner { display: inline-flex; align-items: center; gap: .35rem; }
.wb-detail-winner .wb-icon { color: var(--wb-gold); filter: drop-shadow(0 0 3px rgba(254,206,88,.5)); }

.wb-logo {
  display: block;
  width: 11rem;
  height: auto;
  margin: 0 auto .5rem;
  filter: drop-shadow(0 4px 18px rgba(239,122,58,.35));
  transition: transform .2s;
}
.wb-logo:hover { transform: scale(1.05); }
@media (min-width: 768px) { .wb-logo { width: 13rem; } }
.wb-logo--large { width: 13rem; }
@media (min-width: 768px) { .wb-logo--large { width: 16rem; } }
.wb-title    { color: var(--wb-gold); font-weight: 800; letter-spacing: .5px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.wb-subtitle { color: var(--wb-muted); }

.wb-text-p1 { color: var(--wb-p1); font-weight: 700; }
.wb-text-p2 { color: var(--wb-p2); font-weight: 700; }

/* ==================== Navigation ==================== */
.wb-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--wb-card);
  border: 1px solid var(--wb-border);
  border-radius: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.wb-nav-link {
  padding: 10px 18px;
  color: var(--wb-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.wb-nav-link:hover  { color: var(--wb-text); background: rgba(254,206,88,.08); }
.wb-nav-link.active { background: var(--wb-red); color: var(--wb-gold-soft); }

/* ==================== Abschnitte ==================== */
.wb-section { margin-bottom: 2.5rem; }
.wb-section-heading {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--wb-gold);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.wb-section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--wb-gold-dark), transparent);
}
.wb-section-sub { color: var(--wb-muted); font-size: .85rem; margin: -.5rem 0 1rem; }
.wb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.wb-card {
  background: var(--wb-card);
  border: 1px solid var(--wb-border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.wb-empty { text-align: center; padding: 2rem; color: var(--wb-muted); }
.wb-error { color: #f87171; }

/* ==================== Status / Countdown ==================== */
.wb-status {
  text-align: center;
  background: var(--wb-card);
  border: 1px solid var(--wb-gold-dark);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.wb-status-label { color: var(--wb-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: 2px; }
.wb-status-timer { color: var(--wb-gold); font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.wb-status-timer:empty { display: none; }
.wb-status[data-phase="finished"] .wb-status-label { color: var(--wb-gold); font-size: 1.1rem; font-weight: 800; }

/* ==================== Scoreboard ==================== */
.wb-board {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.wb-player-card {
  container-type: inline-size;
  position: relative;
  background: var(--wb-card);
  /* Rahmen komplett in Spielerfarbe */
  border: 2px solid var(--wb-pc);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.wb-player-card.wb-p1 { --wb-pc: var(--wb-p1); box-shadow: 0 0 24px var(--wb-p1-bg); }
.wb-player-card.wb-p2 { --wb-pc: var(--wb-p2); box-shadow: 0 0 24px var(--wb-p2-bg); }
/* Durchgehende Ornament-Innenlinie rundum in Spielerfarbe */
.wb-player-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--wb-pc);
  border-radius: 8px;
  opacity: .75;
  pointer-events: none;
}
/* Verzierungen (Raute + Schnörkel) in allen vier Ecken, schließen an die Innenlinie an */
.wb-player-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--wb-pc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 3.4rem 3.4rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 3.4rem 3.4rem no-repeat,
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(1 0 0 -1 0 56)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left top / 3.4rem 3.4rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 -1 56 56)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top / 3.4rem 3.4rem no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 3.4rem 3.4rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 3.4rem 3.4rem no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(1 0 0 -1 0 56)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left top / 3.4rem 3.4rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 -1 56 56)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top / 3.4rem 3.4rem no-repeat;
  filter: drop-shadow(0 0 3px var(--wb-pc));
  pointer-events: none;
}

.wb-board { margin-top: 4.2rem; row-gap: 5rem; column-gap: 2.75rem; }

/* Banner oben an der Spielerkarte (wie bei Erweckung) */
.wb-banner {
  position: relative;
  container-type: inline-size;
  z-index: 2;
  /* ragt seitlich und oben deutlich über den Kartenrahmen hinaus; seitlich
     höchstens bis kurz vor den Bildschirmrand (Kartenrand + 1rem Seitenabstand
     + freier Platz neben dem max. 72rem breiten Inhalt) */
  --wb-banner-side: calc(-1 * min(22%, 2rem + max(0px, (100vw - 74rem) / 2)));
  margin: -25% var(--wb-banner-side) -2%;
}
/* Gesamtschaden-Box etwas tiefer, damit die Banner-Spitzen darüber ragen können */
@media (min-width: 901px) {
  .wb-vs-wrap { margin-top: 1.5rem; }
}
.wb-banner-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)); }
/* Helle Innenfläche des Banners: ca. 14–86 % Breite, 34–67 % Höhe (gemessen) */
.wb-banner-plate {
  position: absolute;
  left: 16%;
  right: 17%;
  top: 36.5%;
  bottom: 33.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqi;
}
.wb-banner-left { display: flex; align-items: center; gap: 1.3cqi; min-width: 0; }
.wb-banner-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.1; }

/* Twitch-Profilbild im Banner mit Live-Ring und LIVE-Pille */
.wb-banner-avatar { position: relative; flex-shrink: 0; display: block; text-decoration: none; }
.wb-banner-avatar .wb-avatar {
  width: 8.6cqi;
  height: 8.6cqi;
  font-size: 4cqi;
  border-width: max(2px, .4cqi);
}
.wb-banner-avatar.is-offline .wb-avatar img { filter: grayscale(.55); opacity: .9; }
.wb-banner-avatar.is-live .wb-avatar { border-color: #00ff88; box-shadow: 0 0 0 max(1px, .25cqi) rgba(0,255,136,.35), 0 0 2.2cqi rgba(0,255,136,.65); }
.wb-banner-live {
  position: absolute;
  left: 50%;
  bottom: min(-1.1cqi, -6px);
  transform: translateX(-50%);
  padding: .15cqi .9cqi;
  border-radius: 1cqi;
  background: #00c46a;
  color: #04170d;
  font-size: max(9px, 1.6cqi);
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.wb-banner-name {
  font-size: 2.9cqi;
  font-weight: 800;
  color: #341002;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.wb-banner-name:hover { color: #5D0505; text-decoration: underline; }
.wb-banner-class { font-size: 2.3cqi; font-weight: 600; color: #6b4526; white-space: nowrap; }
.wb-banner-right { display: flex; align-items: center; gap: 1.2cqi; flex-shrink: 0; }
.wb-banner-right .wb-class-icon { width: 5cqi; height: 5cqi; }
.wb-banner-level { font-size: 4.8cqi; font-weight: 900; color: #5D0505; white-space: nowrap; font-variant-numeric: tabular-nums; }


.wb-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wb-card-2);
  border: 2px solid var(--wb-border);
  color: var(--wb-gold);
  font-weight: 800;
}
.wb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wb-p1 .wb-avatar { border-color: var(--wb-p1); }
.wb-p2 .wb-avatar { border-color: var(--wb-p2); }

.wb-class-icons { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.wb-class-icon  { width: 1.6rem; height: 1.6rem; object-fit: contain; }

.wb-live-badge, .wb-offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  text-decoration: none;
}
.wb-live-badge { background: rgba(0,255,136,.13); border: 1px solid #00ff88; color: #00ff88; }
.wb-live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #00ff88; animation: wb-blink 1.6s infinite; }
.wb-offline-badge { border: 1px solid var(--wb-border); color: var(--wb-muted); }
@keyframes wb-blink { 50% { opacity: .25; } }


.wb-bar { height: 8px; border-radius: 6px; background: rgba(0,0,0,.4); overflow: hidden; }
.wb-bar-fill { height: 100%; border-radius: 6px; transition: width .5s ease; }
.wb-bar-fill.wb-p1 { background: linear-gradient(90deg, #a8461b, var(--wb-p1)); }
.wb-bar-fill.wb-p2 { background: linear-gradient(90deg, #1d7a63, var(--wb-p2)); }

.wb-player-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: auto; }
.wb-fact {
  background: rgba(0,0,0,.25);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .5rem .3rem;
  text-align: center;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.wb-fact:hover, .wb-fact:focus-visible { border-color: var(--wb-pc, var(--wb-gold-dark)); background: rgba(0,0,0,.4); transform: translateY(-2px); outline: none; }
.wb-fact-value { color: var(--wb-gold); font-weight: 800; font-size: 1.05rem; }
.wb-fact-label { color: var(--wb-muted); font-size: .68rem; line-height: 1.2; }

/* Tagebuchseiten als Seiten-Icons */
.wb-diary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; font-size: .85rem; }
.wb-diary-label { display: inline-flex; align-items: center; gap: .4rem; color: var(--wb-muted); }
.wb-diary-book { width: 1.25rem; height: 1.25rem; }
.wb-diary-count { color: var(--wb-gold-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.wb-diary-pages { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; }
.wb-diary-page {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-diary-page img { width: 100%; max-width: 34px; height: auto; transition: filter .3s, opacity .3s; }
.wb-diary-page.is-open img { filter: grayscale(1) brightness(.6); opacity: .4; }
.wb-diary-page.is-done img { filter: drop-shadow(0 0 3px var(--wb-pc)) drop-shadow(0 0 1px var(--wb-pc)); }
.wb-diary-page.has-reward::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wb-gold);
  box-shadow: 0 0 5px var(--wb-gold);
}

/* Animationen: Erscheinen beim Laden, Aufblitzen bei Änderungen */
@keyframes wb-pop {
  0%   { transform: scale(.4); opacity: 0; }
  70%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes wb-flash {
  0%   { transform: scale(1); filter: none; }
  30%  { transform: scale(1.22); filter: drop-shadow(0 0 8px #FECE58) brightness(1.4); }
  100% { transform: scale(1); filter: none; }
}
.wb-pop   { animation: wb-pop .45s ease-out both; animation-delay: var(--wb-delay, 0ms); }
.wb-flash { animation: wb-flash .9s ease-out; }
.wb-banner-level, .wb-fact-value, .wb-vs-score, .wb-diary-count { display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  .wb-pop, .wb-flash { animation: none; }
}

/* VS-Spalte: zugeklappt nur die Schwerter, aufgeklappt die Gesamtschaden-Box */
.wb-vs-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; }
.wb-vs-wrap.is-open { align-items: stretch; }
.wb-vs-wrap:not(.is-open) .wb-vs,
.wb-vs-wrap.is-open .wb-vs-toggle { display: none; }

.wb-vs-toggle {
  background: none;
  border: none;
  padding: .5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .25s, filter .25s;
  filter: drop-shadow(0 0 10px rgba(254,206,88,.25));
}
.wb-vs-toggle .wb-vs-badge { width: 6rem; height: 6rem; }
.wb-vs-toggle:hover, .wb-vs-toggle:focus-visible { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(254,206,88,.55)); outline: none; }

/* Auf-/Zuklappen */
.wb-vs.is-entering { animation: wb-vs-open .35s cubic-bezier(.22, .9, .3, 1) both; }
.wb-vs-toggle.is-entering { animation: wb-vs-swords-in .35s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes wb-vs-open { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes wb-vs-swords-in { from { opacity: 0; transform: scale(.6) rotate(-20deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .wb-vs.is-entering, .wb-vs-toggle.is-entering { animation: none; }
}

.wb-vs {
  --wb-pc: var(--wb-gold);
  position: relative;
  width: 100%;
  flex: 1;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  background: linear-gradient(180deg, #2c120b, #1c0b06);
  border: 2px solid var(--wb-pc);
  border-radius: 14px;
  padding: 1.4rem .8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .85rem;
  box-shadow: 0 0 24px rgba(254,206,88,.12);
}
.wb-vs:hover, .wb-vs:focus-visible { box-shadow: 0 0 28px rgba(254,206,88,.3); transform: translateY(-2px); outline: none; }
.wb-vs-title { color: var(--wb-gold-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: 2px; }
.wb-vs-scores { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .35rem; }
.wb-vs-score { font-weight: 800; font-size: clamp(.8rem, 1.15vw, .95rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wb-vs-score.wb-p1 { color: var(--wb-p1); text-align: right; }
.wb-vs-score.wb-p2 { color: var(--wb-p2); text-align: left; }

/* Eigene Ornamente der Gesamtschaden-Box (bewusst anders als bei den Spielerkarten) */
/* Wappen mittig auf oberer und unterer Kante: Mittelstück aus ornament-line.png */
.wb-vs::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: -11px;
  bottom: -11px;
  background: var(--wb-gold);
  -webkit-mask: url('resources/ui/ornament-line.png') center top / auto 20px no-repeat,
                url('resources/ui/ornament-line.png') center bottom / auto 20px no-repeat;
  mask: url('resources/ui/ornament-line.png') center top / auto 20px no-repeat,
        url('resources/ui/ornament-line.png') center bottom / auto 20px no-repeat;
  filter: drop-shadow(0 0 3px rgba(254,206,88,.5));
  pointer-events: none;
}
/* Art-déco-Eckwinkel mit Raute und Endpunkten in allen vier Ecken */
.wb-vs::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--wb-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 3.2rem 3.2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 3.2rem 3.2rem no-repeat,
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(1 0 0 -1 0 56)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left top / 3.2rem 3.2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(-1 0 0 -1 56 56)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top / 3.2rem 3.2rem no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 3.2rem 3.2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 3.2rem 3.2rem no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(1 0 0 -1 0 56)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left top / 3.2rem 3.2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='matrix(-1 0 0 -1 56 56)'%3E%3Cpath d='M8 28V48H28' stroke-width='2.4'/%3E%3Cpath d='M14 36V42H20' stroke-width='1.4'/%3E%3Cpath d='M8 43l5 5-5 5-5-5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='8' cy='24' r='1.8' fill='%23000' stroke='none'/%3E%3Ccircle cx='32' cy='48' r='1.8' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top / 3.2rem 3.2rem no-repeat;
  filter: drop-shadow(0 0 3px rgba(254,206,88,.45));
  pointer-events: none;
}

/* Gekreuzte Schwerter in den Spielerfarben */
.wb-vs-badge {
  width: 3.375rem;
  height: 3.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-vs-badge svg { width: 100%; height: 100%; }
.wb-vs-sword.wb-p1 { color: var(--wb-p1); }
.wb-vs-sword.wb-p2 { color: var(--wb-p2); }

/* Tauziehen-Balken: dicker, mit Goldfassung */
.wb-tug {
  display: flex;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.45);
  border: 2px solid var(--wb-gold-dark);
  box-shadow: 0 0 0 1px rgba(254,206,88,.25), inset 0 2px 4px rgba(0,0,0,.6);
}
.wb-tug-fill { height: 100%; transition: width .6s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.wb-tug-fill.wb-p1 { background: linear-gradient(180deg, #f59a63, var(--wb-p1) 55%, #b9531f); }
.wb-tug-fill.wb-p2 { background: linear-gradient(180deg, #6fe0c2, var(--wb-p2) 55%, #1f8a70); }

/* Vorsprung groß in der Farbe des Führenden */
.wb-vs-lead { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.wb-vs-lead-label { color: var(--wb-gold-soft); font-size: .8rem; font-weight: 600; }
.wb-vs-lead-amount { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; text-shadow: 0 0 14px currentColor; }

/* Details-Button */
.wb-vs-more {
  align-self: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: .45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, var(--wb-gold) 45%, var(--wb-gold-dark));
  color: #3a1405;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.5);
  transition: filter .2s, transform .2s;
}
.wb-vs-more:hover, .wb-vs-more:focus-visible { filter: brightness(1.1); transform: scale(1.04); outline: none; }
/* ==================== Weltbosse ==================== */
.wb-boss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.wb-boss-card {
  background: var(--wb-card);
  border: 1px solid var(--wb-border);
  border-radius: 10px;
  padding: .9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.wb-boss-head { display: flex; align-items: center; gap: .75rem; }
.wb-boss-img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
  transition: transform .35s ease, filter .35s ease;
}
/* Hover: Bild wird leicht größer und leuchtet in der Farbe des Spielers mit dem meisten Schaden */
.wb-boss-card:hover .wb-boss-img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px var(--wb-lead, var(--wb-gold))) drop-shadow(0 0 14px var(--wb-lead, var(--wb-gold)));
}
@media (prefers-reduced-motion: reduce) {
  .wb-boss-img { transition: filter .35s ease; }
  .wb-boss-card:hover .wb-boss-img { transform: none; }
}
.wb-boss-name { color: var(--wb-gold-soft); font-weight: 800; font-size: 1rem; }
.wb-boss-row-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; margin-bottom: .25rem; }
.wb-boss-dmg { font-variant-numeric: tabular-nums; color: var(--wb-text); }
.wb-boss-row.is-leader .wb-boss-dmg { color: var(--wb-gold); font-weight: 800; }
.wb-boss-row.is-leader .wb-boss-dmg { display: inline-flex; align-items: center; gap: .3rem; }
.wb-boss-row.is-leader .wb-boss-dmg .wb-icon { color: var(--wb-gold); filter: drop-shadow(0 0 3px rgba(254,206,88,.5)); }

/* ==================== Meilensteine (in der Spielerkarte) ==================== */
.wb-player-ms { border-top: 1px solid var(--wb-border); padding-top: .7rem; }
.wb-ornament {
  display: block;
  width: 80%;
  max-width: 180px;
  aspect-ratio: 593 / 70;
  margin: 0 auto;
  background: var(--wb-pc, var(--wb-gold));
  -webkit-mask: url('resources/ui/ornament.png') center / contain no-repeat;
  mask: url('resources/ui/ornament.png') center / contain no-repeat;
  filter: drop-shadow(0 0 3px var(--wb-pc, transparent));
}
.wb-player-ms-heading { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wb-muted); margin-bottom: .4rem; }
.wb-player-ms-icons { display: flex; flex-wrap: wrap; gap: .35rem; }
.wb-player-ms-icon {
  position: relative;
  width: 3.3rem;
  height: 3.3rem;
  padding: 3px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, opacity .15s, filter .15s;
}
.wb-player-ms-icon img { width: 100%; height: 100%; object-fit: contain; }
.wb-player-ms-icon:hover, .wb-player-ms-icon:focus-visible { transform: scale(1.2); outline: none; }
.wb-player-ms-icon.is-open { opacity: .3; filter: grayscale(.85); }
.wb-player-ms-icon.is-done.wb-p1 img { filter: brightness(1.25) drop-shadow(0 0 5px var(--wb-p1)); }
.wb-player-ms-icon.is-done.wb-p2 img { filter: brightness(1.25) drop-shadow(0 0 5px var(--wb-p2)); }
.wb-player-ms-icon.is-open:hover, .wb-player-ms-icon.is-open:focus-visible { opacity: .6; }
.wb-player-ms-ph { font-size: 1.5rem; color: var(--wb-gold-dark); }
.wb-player-ms-star {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: .8rem;
  line-height: 1;
  color: var(--wb-gold);
  text-shadow: 0 0 4px #000, 0 0 2px #000;
}

/* ==================== Modal ==================== */
.wb-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .2s;
}
.wb-modal-overlay.active { opacity: 1; }
.wb-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--wb-card);
  border: 2px solid var(--wb-gold-dark);
  border-radius: 12px;
  padding: 1.5rem;
  transform: scale(.95);
  transition: transform .2s;
}
.wb-modal-overlay.active .wb-modal { transform: scale(1); }
.wb-modal-wide { max-width: 960px; }
.wb-modal-mid { max-width: 620px; }

/* Detail-Modals: Meilensteine, Duelle, Reitrennen */
.wb-detail-tally { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1rem; font-weight: 700; }
.wb-detail-score { color: var(--wb-gold); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.wb-detail-list { display: flex; flex-direction: column; gap: .45rem; }
.wb-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .8rem;
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--wb-border);
}
.wb-detail-row.is-done.wb-p1 { border-color: var(--wb-p1); background: var(--wb-p1-bg); }
.wb-detail-row.is-done.wb-p2 { border-color: var(--wb-p2); background: var(--wb-p2-bg); }
.wb-detail-label { color: var(--wb-gold-soft); font-weight: 700; }
.wb-detail-result { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.wb-detail-winner { font-weight: 800; }
.wb-detail-date { color: var(--wb-muted); font-size: .72rem; }
.wb-detail-open { color: var(--wb-muted); font-size: .85rem; }

.wb-detail-ms {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--wb-border);
}
.wb-detail-ms-icon { width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--wb-gold-dark); }
.wb-detail-ms-icon img { width: 100%; height: 100%; object-fit: contain; }
.wb-detail-ms-name { color: var(--wb-gold-soft); font-weight: 800; }
.wb-detail-ms-reward { color: var(--wb-muted); font-size: .78rem; }
.wb-detail-ms-extra { color: var(--wb-text); font-size: .72rem; margin-top: .15rem; }
.wb-detail-ms-status { display: flex; flex-direction: column; gap: .3rem; }
.wb-detail-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: .2rem .55rem;
  border-radius: 6px;
  border: 1px solid var(--wb-border);
  opacity: .55;
  min-width: 8.5rem;
}
.wb-detail-chip.is-done { opacity: 1; }
.wb-detail-chip.is-done.wb-p1 { border-color: var(--wb-p1); background: var(--wb-p1-bg); }
.wb-detail-chip.is-done.wb-p2 { border-color: var(--wb-p2); background: var(--wb-p2-bg); }
.wb-detail-chip-name { font-size: .78rem; font-weight: 800; }
.wb-detail-chip-state { color: var(--wb-muted); font-size: .68rem; }
@media (max-width: 600px) {
  .wb-detail-ms { grid-template-columns: 2.4rem 1fr; }
  .wb-detail-ms-icon { width: 2.4rem; height: 2.4rem; }
  .wb-detail-ms-status { grid-column: 1 / -1; flex-direction: row; }
  .wb-detail-chip { flex: 1; min-width: 0; }
}
.wb-modal-sub { color: var(--wb-muted); font-size: .85rem; text-align: center; margin: -.5rem 0 1rem; }
.wb-modal-close { position: absolute; top: .6rem; right: .8rem; background: none; border: none; color: var(--wb-muted); font-size: 1.2rem; cursor: pointer; }
.wb-modal-close:hover { color: var(--wb-gold); }
.wb-modal-img { display: block; width: 6rem; height: 6rem; object-fit: contain; margin: 0 auto .5rem; }
.wb-modal-img-ph { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--wb-gold-dark); }
.wb-modal-title { color: var(--wb-gold-soft); font-size: 1.2rem; font-weight: 800; text-align: center; margin-bottom: 1rem; }
.wb-modal-row { display: flex; gap: .5rem; font-size: .9rem; line-height: 1.5; margin-bottom: .4rem; }
.wb-modal-label { color: var(--wb-gold); font-weight: 700; white-space: nowrap; }
.wb-modal-divider { border-top: 1px solid var(--wb-border); margin: .9rem 0; }
.wb-modal-status { padding: .5rem .75rem; border-radius: 6px; font-size: .85rem; margin-bottom: .4rem; border: 1px solid var(--wb-border); }
.wb-modal-status.is-open { color: var(--wb-muted); background: rgba(0,0,0,.25); }
.wb-modal-status.wb-p1 { border-color: var(--wb-p1); background: var(--wb-p1-bg); color: var(--wb-p1); }
.wb-modal-status.wb-p2 { border-color: var(--wb-p2); background: var(--wb-p2-bg); color: var(--wb-p2); }

/* ==================== Formulare + Buttons ==================== */
.wb-label { display: block; font-size: .72rem; color: var(--wb-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .3rem; }
.wb-field { display: block; min-width: 0; }
.wb-input, .wb-select {
  width: 100%;
  padding: .55rem .7rem;
  background: var(--wb-bg);
  border: 1px solid var(--wb-border);
  border-radius: 6px;
  color: var(--wb-text);
  font: inherit;
  font-size: .9rem;
  outline: none;
}
.wb-input:focus, .wb-select:focus { border-color: var(--wb-gold-dark); }
.wb-input[data-dirty] { border-color: var(--wb-gold); }
.wb-select option { background: var(--wb-card); }

.wb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: .6rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--wb-border);
  background: var(--wb-card-2);
  color: var(--wb-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .2s, border-color .2s;
}
.wb-btn:hover:not(:disabled) { border-color: var(--wb-gold-dark); color: var(--wb-gold); }
.wb-btn:disabled { opacity: .5; cursor: not-allowed; }
.wb-btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.wb-btn-primary { background: var(--wb-red); border-color: #8b1010; color: var(--wb-gold-soft); }
.wb-btn-primary:hover:not(:disabled) { filter: brightness(1.25); }
.wb-btn-secondary { background: transparent; }
.wb-btn-danger { background: rgba(160,20,20,.35); border-color: #a02020; color: #fca5a5; }
.wb-btn-p1 { background: var(--wb-p1-bg); border-color: var(--wb-p1); color: var(--wb-p1); }
.wb-btn-p2 { background: var(--wb-p2-bg); border-color: var(--wb-p2); color: var(--wb-p2); }

.wb-hold-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--wb-gold-dark);
  background: var(--wb-red);
  color: var(--wb-gold-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}
.wb-hold-btn:disabled { opacity: .5; cursor: not-allowed; }
.wb-hold-btn::before {
  content: '';
  position: absolute;
  inset: 0 100% 0 0;
  background: rgba(254,206,88,.35);
}
.wb-hold-btn.holding::before { inset: 0 0 0 0; transition: inset var(--hold-dur, 1500ms) linear; }
.wb-hold-btn span { position: relative; }

/* ==================== Toasts ==================== */
#wb-toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 2rem); }
.wb-toast { background: #3a1010; border: 1px solid #a02020; color: #fca5a5; padding: .6rem 1rem; border-radius: 8px; font-size: .85rem; box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: opacity .4s; }
.wb-toast-ok { background: #0f2a20; border-color: #2f8f6f; color: #8ff0c8; }
.wb-toast-out { opacity: 0; }

/* ==================== OBS-Overlay (Spieler-Seite) ==================== */
.wb-obs-area { display: flex; justify-content: center; padding: 1.4rem 1rem 0; }
.wb-obs-divider { border: none; border-top: 1px solid var(--wb-gold-dark); margin: 1rem 1rem .5rem; opacity: .4; }
.wb-obs-hint { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 0 0 .5rem; font-size: .72rem; color: var(--wb-muted); letter-spacing: .5px; }
.wb-obs-info-btn {
  width: 16px; height: 16px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--wb-border); border-radius: 50%;
  background: none; color: var(--wb-muted); cursor: pointer;
  font: 700 .65rem/1 serif;
}
.wb-obs-info-btn:hover { color: var(--wb-gold); border-color: var(--wb-gold-dark); }

.wb-obs-widget { width: 440px; max-width: 100%; }
.wb-obs-widget.wb-p1 { --wb-pc: var(--wb-p1); }
.wb-obs-widget.wb-p2 { --wb-pc: var(--wb-p2); }
.wb-obs-widget .wb-banner { margin: 0; }
.wb-obs-plate {
  /* Innenfläche des Banners (34–67 % Höhe); der Inhalt bleibt vertikal mittig im
     freien Bereich zwischen den mittleren Edelsteinspitzen (43–61 %) */
  position: absolute;
  left: 17%;
  right: 17%;
  top: 36%;
  bottom: 34%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3cqi;
  min-width: 0;
}
.wb-obs-plate.is-single { justify-content: center; }
.wb-obs-plate.is-single .wb-obs-line { justify-content: center; }
.wb-obs-top { display: flex; align-items: center; gap: 1.2cqi; flex-shrink: 0; }
.wb-obs-top .wb-class-icon { width: 4.6cqi; height: 4.6cqi; }
.wb-obs-level { font-size: 4.6cqi; font-weight: 900; color: #5D0505; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1; }
.wb-obs-stats { font-size: 2.6cqi; color: #6b4526; font-variant-numeric: tabular-nums; line-height: 1.2; min-width: 0; }
.wb-obs-line { display: flex; justify-content: flex-end; align-items: baseline; gap: .9cqi; white-space: nowrap; }
.wb-obs-stats[data-count="3"] { font-size: 2.35cqi; }
.wb-obs-stats[data-count="4"] { font-size: 2.35cqi; line-height: 1.15; }
.wb-obs-item strong { color: #5D0505; font-weight: 900; }
.wb-obs-item-label { font-weight: 600; }
.wb-obs-sep { color: #a07830; font-weight: 900; }

/* „Nächstes Ziel“ als Anhänger unter dem Banner */
.wb-obs-goal {
  display: flex;
  align-items: center;
  gap: .7rem;
  position: relative;
  padding: calc(2.025rem + 9px) 1.4rem calc(.75rem + 4px);   /* Inhalt mit Abstand zur Edelsteinspitze des Banners */
  background: rgba(22, 9, 5, .92);
  border: 2px solid var(--wb-pc);
  border-top-width: 1px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,.45), 0 0 12px color-mix(in srgb, var(--wb-pc) 25%, transparent);
}
.wb-obs-goal::after {
  /* kleine Eckverzierungen unten in Spielerfarbe (wie bei den Spielerkarten) */
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--wb-pc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 2rem 2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 2rem 2rem no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/svg%3E") left bottom / 2rem 2rem no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cg transform='matrix(-1 0 0 1 56 0)'%3E%3Cpath d='M6.5 22C13 22 16.5 26 16.5 32.5' stroke-width='1.6'/%3E%3Cpath d='M34 49.5C34 43 30 39.5 23.5 39.5' stroke-width='1.6'/%3E%3Cpath d='M20 30.5l5.5 5.5-5.5 5.5-5.5-5.5z' fill='%23000' stroke='none'/%3E%3Ccircle cx='12.5' cy='43.5' r='1.6' fill='%23000' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 2rem 2rem no-repeat;
  filter: drop-shadow(0 0 3px var(--wb-pc));
  pointer-events: none;
}
.wb-obs-goal-icon { width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--wb-gold-dark); font-size: 1.4rem; }
.wb-obs-goal-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 4px var(--wb-pc)); }
.wb-obs-goal-text { min-width: 0; line-height: 1.2; }
.wb-obs-goal-label { color: var(--wb-pc); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; }
.wb-obs-goal-title { color: var(--wb-gold-soft); font-size: .95rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-obs-goal-sub { color: var(--wb-gold); font-size: .75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* „M2-HELPER“ als kleiner Kasten mittig auf dem unteren Rand */
.wb-obs-brand {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 50%);
  z-index: 1;
  padding: .1rem .45rem;
  background: #160905;
  border: 1px solid var(--wb-pc);
  border-radius: 4px;
  color: var(--wb-gold);
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 0 6px color-mix(in srgb, var(--wb-pc) 35%, transparent);
}
.wb-widget-goal { margin-top: .9rem; max-width: 520px; }
.wb-widget-sub { margin: 1.1rem 0 .4rem; }
.wb-opp-preview { display: flex; justify-content: center; margin: .4rem 0 1rem; }

/* Fach unter dem Banner: oben bündig hinter der Rahmenunterkante abgeschnitten, damit Ziel
   und Hinweis hinter dem Banner hervor- und wieder hineinfahren (Schatten bleiben sichtbar) */
.wb-obs-goal-slot {
  display: grid;
  width: 74%;
  margin: calc(-2.1rem - 5px) auto 0;   /* unter die Rahmenunterkante des Banners schieben */
  clip-path: inset(0 -40px -40px -40px);
}
/* Spalte fest auf Fachbreite, damit lange Titel nicht den Kasten verbreitern (Schrift wird kleiner) */
.wb-obs-goal-slot { grid-template-columns: minmax(0, 1fr); }
.wb-obs-goal-slot > * { grid-area: 1 / 1; min-width: 0; }

/* Hinweis bei Gegner-Fortschritt: Kasten in Gegnerfarbe */
.wb-obs-notice.wb-p1 { --wb-pc: var(--wb-p1); }
.wb-obs-notice.wb-p2 { --wb-pc: var(--wb-p2); }
/* 9 s (= NOTICE_MS in wb-core.js): fährt in 0,9 s herein, steht, fährt in 0,9 s wieder hinauf */
.wb-obs-notice { animation: wb-obs-notice 9s linear both; }
@keyframes wb-obs-notice {
  0%   { transform: translateY(calc(-100% - 30px)); animation-timing-function: cubic-bezier(.22, .9, .3, 1); }
  10%  { transform: none; }
  90%  { transform: none; animation-timing-function: cubic-bezier(.6, 0, .8, .3); }
  100% { transform: translateY(calc(-100% - 30px)); }
}
/* Ziel fährt vor dem Hinweis hinauf (LEAD_MS) und danach wieder herein */
.wb-obs-slideout { animation: wb-obs-slideout .8s cubic-bezier(.6, 0, .8, .3) both; }
.wb-obs-slidein  { animation: wb-obs-slidein .9s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes wb-obs-slideout { to   { transform: translateY(calc(-100% - 30px)); } }
@keyframes wb-obs-slidein  { from { transform: translateY(calc(-100% - 30px)); } }

.wb-widget-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .4rem 1rem; }
.wb-widget-option { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; padding: .3rem 0; }
.wb-widget-option input { width: 1.05rem; height: 1.05rem; accent-color: var(--wb-gold); cursor: pointer; }

.wb-obs-steps { color: var(--wb-text); font-size: .88rem; line-height: 1.7; padding-left: 1.2em; margin: 0 0 1rem; list-style: decimal; }
.wb-obs-code { background: var(--wb-bg); border: 1px solid var(--wb-border); border-radius: 6px; padding: .45rem .6rem; margin: .35rem 0; font: .76rem/1.5 monospace; color: var(--wb-gold-soft); word-break: break-all; }
.wb-obs-code-pre { white-space: pre; word-break: normal; overflow-x: auto; }

/* ==================== Spieler-Seite ==================== */
.wb-dmg-row { display: grid; grid-template-columns: 2.4rem 1fr 11rem auto; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid rgba(90,48,32,.5); }
.wb-dmg-row:last-child { border-bottom: none; }
.wb-dmg-img { width: 2.4rem; height: 2.4rem; object-fit: contain; }
.wb-dmg-name { font-weight: 700; color: var(--wb-gold-soft); }

/* ==================== Operator ==================== */
.wb-op-section { margin-bottom: 1.5rem; }
.wb-op-section > summary {
  cursor: pointer;
  list-style: none;
  color: var(--wb-gold);
  font-size: 1.15rem;
  font-weight: 800;
  padding: .3rem 0 .8rem;
}
.wb-op-section > summary::-webkit-details-marker { display: none; }
.wb-op-section > summary::before { content: '▸ '; display: inline-block; transition: transform .2s; }
.wb-op-section[open] > summary::before { transform: rotate(90deg); }
.wb-op-hint { color: var(--wb-muted); font-size: .8rem; margin-bottom: .6rem; }
.wb-op-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.wb-op-grid-5 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.wb-op-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.wb-op-player { background: rgba(0,0,0,.2); border: 1px solid var(--wb-border); border-left-width: 4px; border-radius: 8px; padding: .9rem 1rem; margin-bottom: 1rem; }
.wb-op-player.wb-p1 { border-left-color: var(--wb-p1); }
.wb-op-player.wb-p2 { border-left-color: var(--wb-p2); }
.wb-op-player.wb-op-add { border-style: dashed; border-left-width: 1px; }
.wb-op-player.wb-op-add > strong { display: block; margin-bottom: .6rem; color: var(--wb-gold-soft); }
.wb-op-player-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; color: var(--wb-gold-soft); }

.wb-op-dmg-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 1fr 1fr auto; gap: .6rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid rgba(90,48,32,.5); }
.wb-op-dmg-head { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--wb-muted); }
.wb-op-dmg-boss { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--wb-gold-soft); }

.wb-op-ms { background: rgba(0,0,0,.2); border: 1px solid var(--wb-border); border-radius: 8px; padding: .9rem 1rem; margin-bottom: .8rem; }
.wb-op-ms-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; color: var(--wb-gold-soft); }
.wb-op-ms-head .wb-op-hint { margin: 0; }
.wb-op-ms .wb-op-actions { margin-bottom: .75rem; }

.wb-op-winner-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid rgba(90,48,32,.5); }
.wb-op-winner-label { font-weight: 700; color: var(--wb-gold-soft); min-width: 7rem; }

.wb-op-paused {
  position: sticky;
  top: .5rem;
  z-index: 50;
  background: #3a2a08;
  border: 1px solid var(--wb-gold-dark);
  color: var(--wb-gold);
  border-radius: 8px;
  padding: .5rem .8rem;
  font-size: .82rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ==================== Regeln ==================== */
.wb-rules-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.wb-rules-list li { position: relative; padding: .45rem 0 .45rem 1.4rem; border-bottom: 1px solid rgba(90,48,32,.45); font-size: .92rem; line-height: 1.55; }
.wb-rules-list li:last-child { border-bottom: none; }
.wb-rules-list li::before { content: '⚔'; position: absolute; left: 0; color: var(--wb-gold); font-size: .8rem; top: .55rem; }
.wb-rules-lead { line-height: 1.65; margin-bottom: 1rem; }
.wb-rules-box-title { color: var(--wb-gold); font-weight: 800; margin-bottom: .3rem; }

.wb-table-wrap { overflow-x: auto; border: 1px solid var(--wb-border); border-radius: 8px; }
.wb-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.wb-table th { background: var(--wb-red); color: var(--wb-gold-soft); text-align: left; padding: .6rem .75rem; white-space: nowrap; }
.wb-table td { padding: .5rem .75rem; border-top: 1px solid var(--wb-border); vertical-align: middle; }
.wb-table tbody tr:nth-child(even) td { background: rgba(254,206,88,.03); }
.wb-table-icon { width: 2.5rem; height: 2.5rem; object-fit: contain; display: block; margin: 0 auto; }
.wb-table td.wb-table-icon-col { width: 4rem; text-align: center; }
.wb-table .is-reward { color: var(--wb-gold); font-weight: 700; }

/* ==================== Footer ==================== */
.wb-footer { color: var(--wb-muted); border-top: 1px solid var(--wb-border); font-size: .8rem; }

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
  .wb-board { grid-template-columns: 1fr 1fr; }
  .wb-vs-wrap { grid-column: 1 / -1; order: -1; }
  .wb-banner { margin: -16% -8% -2%; }
  .wb-boss-grid { grid-template-columns: repeat(2, 1fr); }
  .wb-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wb-board { grid-template-columns: 1fr; }
  /* bis kurz vor den Bildschirmrand: Kartenpadding + Rahmen + Seitenabstand ≈ 2.2rem */
  .wb-banner { margin: -20% -2rem -2%; }
  .wb-boss-grid { grid-template-columns: 1fr; }
  .wb-status-timer { font-size: 1.7rem; }
  .wb-nav-link { padding: 8px 12px; font-size: .9rem; }
  /* Bild + Name oben, Eingabe + Button darunter */
  .wb-dmg-row { grid-template-columns: 2.4rem 1fr auto; }
  .wb-dmg-row .wb-dmg-name { grid-column: 2 / -1; }
  .wb-dmg-row .wb-input { grid-column: 1 / 3; }
  .wb-op-dmg-row { grid-template-columns: 1fr 1fr; }
  .wb-op-dmg-boss { grid-column: 1 / -1; }
  .wb-op-dmg-head { display: none; }
}
