/* Dashboard als WoW-Interface: Gilden-Rahmen, Minimap, Gruppen-Rahmen, Hauptfenster mit Reitern,
   Quest-Tracker, Chatfenster, Aktionsleiste und EP-Leiste. Ergänzt style.css (dort Tabelle, Erfolge, Banner …). */
body.wow { margin: 0; min-height: 100vh; background: #0b0c10 url("wallpaper-horde.webp") 70% center / cover fixed; }
body.wow::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, .2), rgba(0, 0, 0, .72)); }
body.wow .ui { position: relative; }

/* ---------- Raster (Bildschirm ab 1100 px) ---------- */
@media (min-width: 1100px) {
  body.wow { height: 100vh; overflow: hidden; display: block; }
  body.wow .ui {
    display: grid; height: calc(100vh - 14px); padding: 12px 20px 10px;
    grid-template-columns: 250px 320px minmax(0, 1fr) 430px;
    grid-template-rows: 150px minmax(0, 1fr) 232px;
    grid-template-areas: "unit unit logo mini" "party main main quests" "chat chat bar quests";
    gap: 12px 18px;
  }
  .unit { grid-area: unit; } .logo { grid-area: logo; } .minimap { grid-area: mini; }
  .party { grid-area: party; } .main-win { grid-area: main; } .quests { grid-area: quests; }
  .chat { grid-area: chat; } .actionbar { grid-area: bar; align-self: end; justify-self: center; }
  .bar-toggles { grid-area: bar; align-self: end; justify-self: end; margin-bottom: 8px; }
}

/* ---------- gemeinsame Bausteine ---------- */
.wow .frame, .wow .win, .party-item {
  background: rgba(8, 8, 12, .88); border: 2px solid #6b5a33; border-radius: 6px;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 215, 120, .12), 0 8px 26px rgba(0, 0, 0, .55);
}
.wow .num { font-variant-numeric: tabular-nums; }

/* ---------- 1: Gilden-Rahmen ---------- */
.unit { position: relative; min-width: 0; }
.unit-portrait { position: absolute; left: 0; top: 4px; width: 118px; height: 118px; border-radius: 50%; overflow: hidden; z-index: 2;
  border: 3px solid #c9a44a; box-shadow: 0 0 0 2px #000, 0 6px 20px rgba(0, 0, 0, .7); background: #15161b; }
.unit-portrait img { width: 100%; height: 100%; object-fit: cover; }
.unit-level { position: absolute; left: 84px; top: 88px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #1a1206; border: 2px solid #c9a44a; box-shadow: 0 0 0 1px #000; font: 800 17px system-ui, sans-serif; color: #ffd100; }
.unit-body { position: absolute; left: 56px; right: 0; top: 18px; padding: 10px 16px 10px 76px; z-index: 1;
  background: rgba(8, 8, 12, .88); border: 2px solid #6b5a33; border-radius: 6px; box-shadow: 0 0 0 1px #000, 0 8px 26px rgba(0, 0, 0, .55); }
.unit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.unit-name { font: 400 21px "Finest Display", Georgia, serif; color: #ffd100; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.unit-time { color: #b9ab86; font-size: 13px; white-space: nowrap; }
.unit-time b { color: #fff; font-size: 15px; }
.unit-bar .guild-bar { display: block; width: 100%; height: 14px; margin: 6px 0 0; border-radius: 2px; }
.unit-bar .guild-bar i { background: linear-gradient(180deg, #45d845, #1f9a1f 55%, #0f6a0f); }
.unit-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; color: #9a9384; font-size: 12px; min-height: 15px; }
.unit-next { color: #e6c276; }
.unit-stats { display: flex; gap: 14px; margin-top: 4px; color: #9a9384; font-size: 13px; }
.unit-stats b { color: #fff; }

/* ---------- Logo ---------- */
.logo { display: flex; justify-content: center; align-items: flex-start; min-width: 0; }
.logo img { width: auto; height: 138px; max-width: 100%; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .7)); }

/* ---------- 4: Minimap ---------- */
.minimap { position: relative; justify-self: end; width: 230px; height: 150px; }
.mm-map { position: absolute; right: 15px; top: -6px; width: 150px; height: 150px; border-radius: 50%; overflow: hidden;
  border: 4px solid #6b5a33; box-shadow: 0 0 0 2px #000, 0 8px 24px rgba(0, 0, 0, .7); background: #1c2230 center / cover; }
.mm-dots { position: absolute; inset: 0; }
.mm-dot { position: absolute; width: 11px; height: 11px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 4px #000; }
.mm-dot.off { opacity: .45; border-color: #aaa; }
.mm-zone { position: absolute; right: 30px; top: -10px; z-index: 2; width: 120px; text-align: center; padding: 1px 4px; font-size: 12px; color: #ffd100;
  background: rgba(8, 8, 12, .92); border: 1px solid #6b5a33; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-btn { position: absolute; z-index: 2; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid #6b5a33; box-shadow: 0 0 0 1px #000; }
.mm-btn img { width: 100%; height: 100%; }
.mm-left { right: 150px; top: 100px; } .mm-right { right: 0; top: 100px; }
.mm-clock { position: absolute; right: 52px; top: 132px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 2px 10px;
  background: rgba(8, 8, 12, .92); border: 1px solid #6b5a33; border-radius: 4px; font: 700 15px system-ui, sans-serif; color: #fff; }
.mm-live { position: absolute; right: 0; bottom: -18px; width: 230px; text-align: right; font-size: 11px; color: #9a9384; }
.mm-clock .dot { width: 8px; height: 8px; border-radius: 50%; background: #1eff00; }

/* ---------- 2: Gruppen-Rahmen ---------- */
.party { min-height: 0; display: flex; flex-direction: column; }
.party-head { color: #9a9384; font-size: 13px; margin: 0 0 6px 4px; }
.party-list { display: grid; gap: 6px; align-content: start; overflow: hidden; }
.party-item { display: block; padding: 5px 8px 6px; text-decoration: none; color: #e8e2d4; }
.party-item .p-top { display: flex; justify-content: space-between; gap: 6px; font-size: 15px; }
.party-item .p-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-item .p-bar { height: 9px; margin-top: 4px; border: 1px solid #000; background: rgba(0, 0, 0, .6); border-radius: 2px; overflow: hidden; }
.party-item .p-bar i { display: block; height: 100%; }
.party-item .p-sub { margin-top: 2px; color: #9a9384; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-item.off { opacity: .45; }
.party-item.ghost { opacity: .3; border-style: dashed; }
.party-item .p-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #1eff00; box-shadow: 0 0 5px #1eff00; vertical-align: 2px; }

/* ---------- 3: Hauptfenster ---------- */
.win { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.main-win { position: relative; margin-bottom: 36px; }
.win-head { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #3a3020; background: linear-gradient(#2a2110, #15110a); border-radius: 4px 4px 0 0; }
.win-icon { width: 32px; height: 32px; border: 1px solid #000; border-radius: 50%; box-shadow: 0 0 0 1px #c9a44a; }
.win-title { margin: 0; font: 400 22px "Finest Display", Georgia, serif; color: #ffd100; text-shadow: 0 1px 2px #000; }
.win-note { margin-left: auto; color: #9a9384; font-size: 13px; text-align: right; }
.win-close, .pop-open { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #6b5a33; border-radius: 4px; background: #1b160d; color: #d9c9a0; font: 16px system-ui; cursor: pointer; text-decoration: none; }
.win-body { position: relative; flex: 1; min-height: 0; }
.main-win .tab-body { display: none; position: absolute; inset: 0; overflow: hidden; padding: 6px 10px 8px; }
.main-win .tab-body.active { display: block; }
.main-win #tab-ranking { padding: 0; }
.main-win .table-wrap { height: 100%; overflow: auto; }
body.kiosk.wow .main-win .table-wrap { overflow: hidden; }
.main-win #tab-ach { display: none; flex-direction: column; }
.main-win #tab-ach.active { display: flex; }
.main-win .ach-history { flex: 1; min-height: 0; }
.main-win .records { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.main-win .goals, .main-win .bounties { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 8px; align-content: start; }
.main-win .today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.main-win .today .day-recs { margin-top: 0; }
.main-win .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.main-win .challenge { max-width: 760px; margin: 0 auto; }
.win-tabs { position: absolute; left: 18px; bottom: -36px; display: flex; gap: 4px; }
.win-tabs button { padding: 7px 16px 8px; background: #1b160d; border: 2px solid #6b5a33; border-top: 0; border-radius: 0 0 8px 8px; color: #b9ab86;
  font: 15px "Friz", Georgia, serif; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
.win-tabs button[aria-selected="true"] { background: #3a2d12; color: #ffd100; padding-top: 9px; }
.win-tabs button:hover { color: #fff; }
.win-tabs button[hidden] { display: none; }

/* ---------- 5: Quest-Tracker ---------- */
.quests { min-height: 0; overflow: hidden; padding: 10px 14px 12px; margin-top: 20px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 18%, rgba(0, 0, 0, .7)); }
.quests-head { font: 400 20px "Finest Display", Georgia, serif; color: #ffd100; text-shadow: 0 1px 2px #000; margin-bottom: 8px; }
.quest-list { display: grid; gap: 12px; }
.quest { text-shadow: 0 1px 2px #000, 0 0 6px #000; font-size: 15px; }
.quest .q-title { color: #ffd100; }
.quest .q-line { color: #d6cdb8; padding-left: 14px; font-size: 14px; }
.quest .q-line::before { content: "– "; color: #9a9384; }
.quest.done .q-title { color: #1eff00; }
.quest .q-bar { height: 6px; margin: 4px 0 0 14px; background: rgba(0, 0, 0, .6); border: 1px solid #000; border-radius: 3px; overflow: hidden; }
.quest .q-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a1f, #e6c276); }
.quest a { color: inherit; text-decoration: none; }

/* ---------- 6: Chatfenster ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-tabs { display: flex; gap: 3px; margin-left: 6px; }
.chat-tabs button { padding: 4px 12px; border: 0; border-radius: 6px 6px 0 0; background: rgba(20, 16, 10, .82); color: #9a9384; font: 13px "Friz", Georgia, serif; cursor: pointer; }
.chat-tabs button.on { background: rgba(58, 45, 18, .92); color: #ffd100; }
.chat-log { flex: 1; min-height: 0; margin: 0; padding: 8px 12px; list-style: none; overflow: hidden; background: rgba(0, 0, 0, .58); border-radius: 0 6px 6px 6px;
  font-size: 15px; line-height: 1.5; display: flex; flex-direction: column; justify-content: flex-end; }
body.wow:not(.kiosk) .chat-log { overflow-y: auto; justify-content: flex-start; }
.chat-log li { list-style: none; text-shadow: 0 1px 1px #000; }
.chat-log .t { color: #9a9384; }
.chat-log .ch-g { color: #40ff40; }
.chat-log .ch-d { color: #ffd100; }
.chat-log .ch-a { color: #ff7fff; }
.chat-log .ch-l { color: #a335ee; }
.chat-log .ch-p { color: #3fc7eb; }
.chat-log .quip-text { font-style: italic; color: #e6d8b0; }
.chat-log .ach-link { color: #ffd100; }
.chat-log .motd { color: #ffd100; }
.chat-log a { text-decoration: none; }

/* ---------- 7: Aktionsleiste ---------- */
.actionbar { display: flex; gap: 4px; padding: 6px; background: rgba(0, 0, 0, .62); border: 2px solid #6b5a33; border-radius: 6px; box-shadow: 0 0 0 1px #000, 0 8px 22px rgba(0, 0, 0, .6); }
.ab-btn { position: relative; display: block; width: 46px; height: 46px; border: 2px solid #000; border-radius: 4px; box-shadow: 0 0 0 1px #6b5a33; overflow: hidden; cursor: pointer; background: #000; padding: 0; }
.ab-btn img { width: 100%; height: 100%; display: block; }
.ab-btn:hover { box-shadow: 0 0 0 1px #ffd100, 0 0 10px rgba(255, 209, 0, .5); }
.ab-btn:hover img { filter: brightness(1.2); }
.ab-btn:active img { transform: scale(.94); }
.ab-btn .key { position: absolute; top: 1px; right: 3px; font: 700 12px system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 3px #000; pointer-events: none; }
.ab-btn[aria-current="page"] { box-shadow: 0 0 0 1px #ffd100; }
.bar-toggles { display: flex; gap: 4px; }
.bar-toggles .micro { display: flex; gap: 4px; }
.bar-toggles .micro-btn:not(#sound-toggle):not(#notify-toggle), .bar-toggles .micro-gap { display: none; }
body.kiosk .actionbar, body.kiosk .bar-toggles { display: none; }

/* ---------- 8: EP-Leiste = LAN-Fortschritt ---------- */
.xpbar.lan-bar { position: fixed; left: 0; right: 0; bottom: 0; height: 14px; margin: 0; gap: 0; z-index: 5; background: #000; border-top: 1px solid #6b5a33; }
.xpbar .lan-end { display: none; }
.xpbar .lan-track { flex: 1; height: 100%; border: 0; border-radius: 0; margin: 0; }
.xpbar .lan-fill { background: linear-gradient(180deg, #a855f7, #7c2bd6 55%, #4c1590); }
.xpbar .xp-text { position: absolute; inset: 0; display: grid; place-items: center; font: 700 10px system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000; z-index: 2; }

/* ---------- Seiten als Fenster ---------- */
.popwin { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, .55); padding: 3vh 3vw; }
.popwin[hidden] { display: none; }
.pop-inner { width: min(1400px, 100%); height: 100%; }
.pop-inner .win-head .win-title { flex: 1; }
.pop-inner iframe { flex: 1; width: 100%; border: 0; border-radius: 0 0 4px 4px; background: #0c0d11; }

/* ---------- Handy / schmale Fenster: untereinander ---------- */
@media (max-width: 1099px) {
  body.wow .ui { display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 90px; }
  .logo { order: -2; } .logo img { height: 90px; }
  .unit { order: -1; height: 140px; }
  .minimap, .party { display: none; }
  .main-win { height: 620px; }
  .win-tabs { flex-wrap: wrap; right: 8px; bottom: auto; top: 100%; }
  .main-win { margin-bottom: 80px; }
  .quests { margin-top: 0; }
  .chat { height: 320px; }
  .actionbar { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 20; overflow-x: auto; border-radius: 0; justify-content: flex-start; }
  .bar-toggles { display: none; }
  .main-win .today { grid-template-columns: minmax(0, 1fr); }
  .main-win .items { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ab-btn:active img { transform: none; } }
/* alte News-Styles aus style.css neutralisieren: im Chat ist jede Zeile ein Fließtext */
.chat-log.feed { padding: 8px 12px; }
.chat-log.feed li { display: block; padding: 1px 0; border: 0; grid-template-columns: none; gap: 0; font-size: 15px; line-height: 1.45; }
.chat-log.feed li em { color: #ffd100; font-style: normal; }
@media (max-width: 1099px) {
  .unit-top { flex-wrap: wrap; }
  .unit-time { white-space: normal; }
  .unit-body { padding-left: 70px; }
  .unit { height: 160px; }
}

/* ---------- Gruppen-Rahmen im Spiel-Stil ---------- */
.party-list { gap: 4px; }
.pf { display: flex; align-items: center; gap: 0; text-decoration: none; color: #e8e2d4; min-height: 56px; }
.pf-portrait { position: relative; flex: none; width: 50px; height: 50px; border-radius: 50%; background: #15161b; border: 2px solid #c9a44a; box-shadow: 0 0 0 1px #000, 0 3px 10px rgba(0, 0, 0, .6); z-index: 2; }
.pf-portrait > img:first-child { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pf-cls { position: absolute; left: -6px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px #000, 0 0 0 2px #6b5a33; }
.pf-lvl { position: absolute; right: -5px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 3px; border-radius: 10px; display: grid; place-items: center; background: #1a1206; border: 1px solid #c9a44a; font: 700 11px system-ui, sans-serif; color: #ffd100; }
.pf-zzz { position: absolute; left: -8px; top: -6px; padding: 1px 4px; border-radius: 8px; background: #3a3020; border: 1px solid #c9a44a; color: #ffd100; font: 700 10px system-ui, sans-serif; font-style: italic; }
.pf-st { position: absolute; left: -6px; top: -6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #ffd100; color: #1a1206; font: 800 12px system-ui, sans-serif; box-shadow: 0 0 0 1px #000; }
.pf-body { flex: 1; min-width: 0; margin-left: -8px; padding: 3px 6px 3px 14px; background: rgba(0, 0, 0, .55); border: 1px solid #3a3020; border-left: 0; border-radius: 0 4px 4px 0; }
.pf-name { display: block; font-size: 14px; line-height: 1.1; margin-bottom: 2px; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-bar { position: relative; display: flex; justify-content: space-between; height: 13px; margin-top: 1px; padding: 0 4px; background: rgba(0, 0, 0, .7); border: 1px solid #000; overflow: hidden; font: 700 10px/12px system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.pf-bar i { position: absolute; inset: 0 auto 0 0; }
.pf-bar.hp i { background: linear-gradient(180deg, #3fe03f, #16a016 60%, #0c740c); }
.pf-bar.mp i { background: linear-gradient(180deg, #4a8cff, #1f5fd6 60%, #123d99); }
.pf-bar b, .pf-bar em { position: relative; font-style: normal; font-weight: 700; }
.pf-sub { display: block; margin-top: 1px; font-size: 10px; color: #9a9384; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf.off .pf-portrait > img:first-child { filter: grayscale(1) brightness(.6); }
.pf.off .pf-bar i { filter: grayscale(.85) brightness(.7); }
.pf.off .pf-name { opacity: .7; }
.pf.ghost { opacity: .35; }
.pf.ghost .pf-portrait { border-style: dashed; border-color: #6b5a33; }
.pf:hover .pf-body { border-color: #c9a44a; }

/* ---------- Buffs links neben der Minimap ---------- */
.buffs { position: absolute; right: 240px; top: 0; width: 180px; display: flex; flex-wrap: wrap; flex-direction: row-reverse; gap: 8px 6px; }
.buff { position: relative; width: 38px; text-align: center; cursor: default; }
.buff img { width: 38px; height: 38px; border: 1px solid #000; border-radius: 3px; box-shadow: 0 0 0 1px #6b5a33; display: block; }
.buff small { display: block; margin-top: 1px; font: 700 11px system-ui, sans-serif; color: #ffd100; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.buff.good img { box-shadow: 0 0 0 1px #1eff00, 0 0 8px rgba(30, 255, 0, .45); }
.buff.soon img { filter: grayscale(.8) brightness(.8); }
.buff.soon small { color: #b9ab86; }
@media (max-width: 1099px) { .buffs { display: none; } }

/* ---------- Ton/Benachrichtigung hinten in der Aktionsleiste ---------- */
.ab-sep { width: 1px; margin: 4px 4px; background: #6b5a33; }
.ab-toggle { width: 34px; height: 34px; align-self: center; }
.ab-toggle.off img { filter: grayscale(1) brightness(.55); }
/* Gruppen-Rahmen: abgerundete Platte mit Goldrand statt eckiger Kästen */
.party-list { gap: 7px; }
.pf-body { margin-left: -12px; padding: 4px 10px 4px 18px; border: 1px solid #6b5a33; border-left: 0; border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(26, 20, 10, .95), rgba(10, 10, 14, .88)); box-shadow: 0 0 0 1px #000, 0 4px 12px rgba(0, 0, 0, .5); }
.pf-bar { border-radius: 4px; }
.pf-bar i { border-radius: 3px 0 0 3px; }
.pf.ghost .pf-body { border-style: dashed; background: rgba(10, 10, 14, .55); box-shadow: none; }
.pf.ghost .pf-bar { background: rgba(0, 0, 0, .35); }
.party-list { padding: 6px 0 0 8px; }
.pf { min-height: 0; }
.pf-name { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pf-name b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-name small { flex: none; max-width: 58%; overflow: hidden; text-overflow: ellipsis; color: #9a9384; font-size: 10px; }
.pf-bar { height: 12px; line-height: 11px; }
