/* Admin: Spawn-Bereiche */
.spawn-areas { border: 1px solid var(--border-lt); border-radius: 8px; padding: 10px 12px; margin: 6px 0; }
.spawn-areas__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.spawn-areas__head .dim { font-size: 12px; }
.spawn-area-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.spawn-area-row__lbl { font-weight: 700; align-self: center; min-width: 56px; }
.spawn-area-row label { display: flex; flex-direction: column; font-size: 12px; gap: 2px; }
.spawn-area-row input { width: 70px; }

/* =========================================================================
   Die Dritte Macht – Stylesheet
   Dunkles Fantasy-Theme mit Pergament-Tafeln (angelehnt an das Original).
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=EB+Garamond:ital@0;1&display=swap');

:root {
    --bg:        #1a140d;
    --bg-2:      #241a10;
    --panel:     #2d2114;
    --panel-2:   #3a2c1a;
    --parchment: #e9dcc3;
    --parchment-2: #f3ead2;
    --ink:       #2c2417;
    --gold:      #d8af55;
    --gold-soft: #b8923f;
    --border:    #5a4628;
    --border-lt: #6f572f;
    --text:      #e7dcc6;
    --text-dim:  #b3a585;
    --hp:        #b1372f;
    --hp-2:      #d6564a;
    --mana:      #2f5caa;
    --mana-2:    #3f78d6;
    --energy:    #c8a72e;
    --rage:      #b1372f;
    --xp:        #7a4ca0;
    --xp-2:      #9c66c6;
    --ok:        #4f7a3a;
    --err:       #9c3b2e;
    --shadow:    0 6px 22px rgba(0,0,0,.45);
    /* Fluid: skaliert mit der Viewport-Breite; bei 2560px ≈ Originalwerte (340/170),
       schrumpft auf 1080p proportional, wächst auf 4K mit. */
    --sidebar-w: clamp(258px, 14.5vw, 520px);
    --adslot-w:  clamp(140px, 6.6vw, 260px);
    /* Höhenbudget außerhalb der Karte = Topbar/Ränder (120px) + Chat-Streifen.
       So füllt das Spielfeld exakt --play-h und endet bündig am Chat – ohne Scrollen. */
    --map-budget: calc(120px + var(--chat-h));
    --chat-h: clamp(116px, 17vh, 188px); /* Höhe des Chat-Streifens unten */
    /* Gemeinsame Höhe für Charakter-, Spiel- und Auftragsfenster:
       die verfügbare Höhe vom Topbar bis zum Chat-Streifen. Karte & Aufträge füllen sie ganz aus. */
    --play-h: max(300px, calc(100vh - 100px - var(--chat-h)));
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 50% -10%, #3a2a18 0%, transparent 60%),
        linear-gradient(180deg, #1d160d 0%, #120d08 100%);
    background-attachment: fixed;
    min-height: 100vh;
    /* Fluid: ~17px bei 2560px, Lesbarkeits-Untergrenze 15px, wächst auf 4K bis 25px. */
    font-size: clamp(15px, 0.66vw, 25px);
    line-height: 1.55;
}

h1, h2, h3, .brand__title { font-family: 'Cinzel', Georgia, serif; letter-spacing: .5px; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f0cd7a; text-decoration: underline; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block; cursor: pointer; border: 1px solid var(--border-lt);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    color: var(--text); font-family: 'Cinzel', serif; font-size: 15px;
    padding: 10px 18px; border-radius: 6px; transition: all .15s ease;
    text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.btn:hover { border-color: var(--gold); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn--primary {
    background: linear-gradient(180deg, #caa24c, #9b7a31);
    color: #2a1f0c; border-color: #e6c878; font-weight: 700;
}
.btn--primary:hover { background: linear-gradient(180deg, #e0b659, #b08c3a); color: #1a1206; }
.btn--ghost { background: transparent; }
.btn--lg { font-size: 18px; padding: 13px 26px; }
.btn--block { display: block; width: 100%; }

/* ---------------- Flash ---------------- */
.flash {
    border-radius: 6px; padding: 11px 16px; margin: 0 0 16px;
    border: 1px solid var(--border-lt); background: var(--panel);
}
.flash--success { border-color: #6f9a54; background: #2c3a22; color: #d9eccb; }
.flash--error   { border-color: #b85543; background: #3a221d; color: #f0cabf; }
.flash--info    { border-color: var(--gold-soft); background: #332710; color: #f1e2bc; }

/* ============================ GAST-LAYOUT ============================ */
.guest-wrap { max-width: 560px; margin: 0 auto; padding: 40px 20px 60px; }
.guest-wrap--wide { max-width: 1000px; }
.brand { text-align: center; margin-bottom: 26px; }
.brand__link { display: inline-flex; align-items: center; gap: 12px; font-size: 34px; color: var(--gold); }
.brand__link:hover { text-decoration: none; }
.brand__sigil { font-size: 30px; filter: drop-shadow(0 0 6px rgba(216,175,85,.5)); }
.brand__title { color: var(--gold); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.brand__subtitle { text-align: center; color: var(--text-dim); margin: 6px 0 0; font-style: italic; }
.guest-footer { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 36px; }

/* Hero */
.hero { text-align: center; }
.hero__lore {
    background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--gold-soft);
    padding: 18px 22px; border-radius: 6px; text-align: left; font-size: 18px; box-shadow: var(--shadow);
}
.hero__lead { color: var(--text-dim); font-size: 18px; margin: 22px 8px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; margin: 26px 0 34px; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 18px 14px; }
.feature__icon { font-size: 30px; display: block; margin-bottom: 6px; }
.feature h3 { margin: 4px 0 6px; color: var(--gold); font-size: 18px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* Card (Formulare) */
.card {
    background: linear-gradient(180deg, var(--parchment-2), var(--parchment));
    color: var(--ink); border: 1px solid var(--border-lt); border-radius: 8px;
    padding: 26px 26px 22px; box-shadow: var(--shadow);
}
.card__title { margin: 0 0 18px; color: #4a3a1d; text-align: center; }
.card__foot { text-align: center; margin: 16px 0 0; color: #5b4a2c; }
.card__foot a { color: #7a5a1d; }

/* Felder */
.form .field { display: block; margin-bottom: 15px; }
.field__label { display: block; font-weight: 700; color: #4a3a1d; margin-bottom: 5px; font-size: 15px; }
.field__input {
    width: 100%; padding: 10px 12px; border: 1px solid #b59b6a; border-radius: 5px;
    background: #fffdf6; color: #2c2417; font-family: inherit; font-size: 16px;
}
.field__input:focus { outline: none; border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(184,146,63,.25); }
.field__hint { color: #7a6a48; font-size: 13px; }
.field--inline { margin-bottom: 4px; }

/* ============================ SPIEL-LAYOUT ============================ */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; background: linear-gradient(180deg, #2c2013, #1e160c);
    border-bottom: 2px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.topbar__brand { font-family: 'Cinzel', serif; color: var(--gold); font-size: 20px; }
.topbar__char { display: flex; align-items: center; gap: 12px; font-size: 14px; min-width: 0; }
.topbar__name { font-family: 'Cinzel', serif; color: #fff; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__brand { min-width: 0; white-space: nowrap; }

/* Hauptnavigation in der Topbar (mittig) */
.topnav { display: flex; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.topnav__item {
    display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 5px;
    color: var(--text); font-family: 'Cinzel', serif; font-size: 14px;
    border: 1px solid transparent;
}
a.topnav__item:hover { background: rgba(216,175,85,.12); color: #fff; text-decoration: none; border-color: var(--border); }
.topnav__item.is-active { background: linear-gradient(180deg, rgba(216,175,85,.22), rgba(216,175,85,.06)); border-color: var(--gold-soft); color: #fff; }
.topnav__item--disabled { color: #7d6f54; opacity: .55; cursor: not-allowed; }
.topnav__icon { font-size: 16px; }
@media (max-width: 1000px) { .topnav__label { display: none; } }
.topbar__meta { color: var(--text-dim); }
.topbar__gold { color: var(--gold); }
.topbar__logout { color: var(--text-dim); }

.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--adslot-w);
    gap: 14px;
    max-width: none; margin: 14px 0 0; padding: 0 10px 90px;
    align-items: start;
}

/* Spielansicht: füllt exakt den Bildschirm, KEIN Seiten-Scrollen */
body.game-view { height: 100vh; overflow: hidden; }
.game-view .layout {
    height: calc(100vh - 58px);
    margin: 8px 0 0; padding: 0 8px;
    align-items: stretch;
}
/* Charakterfenster zieht sich über die GANZE linke Seite – bis ganz unten zum Ende des Chats. */
.game-view .sidebar { height: calc(100vh - 86px); max-height: none; overflow-y: auto; padding-bottom: 0; align-self: start; }
/* Das Charakter-Panel füllt die volle Höhe der linken Spalte (leerer Pergament-Raum unten). */
.game-view .sidebar .panel--char { flex: 1 1 auto; min-height: 0; }
/* Werte einspaltig im Charakterfenster: Bezeichnung wird NIE abgeschnitten ("Beweglichkeit" voll). */
.game-view .panel--char .statlist { grid-template-columns: 1fr; gap: 1px 0; }
.game-view .panel--char .statlist__row span { overflow: visible; text-overflow: clip; }
/* Unten Platz für den Chat-Streifen freihalten. */
/* Auftrags-/Inhaltsfenster endet – wie Karte & Charakterfenster – genau am Chat-Streifen.
   Kein äußeres Scrollen: die Box ist exakt --play-h hoch; lange Inhalte scrollen INTERN. */
.game-view .content { height: var(--play-h); max-height: var(--play-h); overflow-y: auto; padding-bottom: 0; position: relative; }
/* Auf der Weltkarten-Seite nie scrollen – Karte & Quest-Log passen exakt hinein. */
.game-view .content > .zone-view { height: var(--play-h); overflow: hidden; }
/* Auftragsfenster füllt – wie das Spielfenster – die volle Höhe bis zum Chat:
   letztes Panel wächst, lange Listen scrollen INTERN. */
.game-view .content--quests { display: flex; flex-direction: column; gap: 14px; }
.game-view .content--quests > .panel:last-child { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.game-view .content--quests > .panel:last-child > .panel__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.game-view .adslot { height: 100%; position: static; }
.game-view .adslot__inner { height: 100%; min-height: 0; }
/* Rechtes Banner etwas kürzer: endet kurz über den drei Footer-Links (Impressum/AGB/Datenschutz). */
/* Banner endet knapp über dem unteren Rand – darunter sitzen die Rechts-Links. */
.game-view .adslot--right { padding-bottom: 0; }
.game-view .adslot--right .adslot__inner { height: calc(100vh - 116px); min-height: 0; }

/* Werbe-Slots */
.adslot { position: sticky; top: 14px; align-self: start; padding-bottom: 24px; }
.adslot__inner {
    background: var(--panel); border: 1px dashed var(--border-lt); border-radius: 8px;
    min-height: 600px; display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); text-align: center; font-family: 'Cinzel', serif; font-size: 14px;
    background-image: repeating-linear-gradient(45deg, rgba(216,175,85,.04) 0 10px, transparent 10px 20px);
}
.adslot__placeholder small { display: block; opacity: .7; font-family: 'EB Garamond', serif; margin-top: 4px; font-size: 12px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: clamp(8px, 1.1vh, 16px); }
/* Charakter-Panel im Sidebar kompakter & höhenabhängig skalierend */
.sidebar .panel--char .panel__head { font-size: clamp(11px, 1.5vh, 14px); padding: clamp(5px, 0.8vh, 9px) 12px; }
.panel {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden;
}
.panel__head {
    font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
    color: var(--gold); padding: 9px 14px; background: rgba(0,0,0,.22);
    border-bottom: 1px solid var(--border);
}
.panel__body { padding: 14px; }

/* Minimap */
.minimap {
    height: 150px; margin: 10px; border: 2px solid var(--border); border-radius: 4px; position: relative;
    background-color: #2f3f24;
    background-image:
        linear-gradient(rgba(0,0,0,.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.18) 1px, transparent 1px),
        radial-gradient(circle at 30% 40%, #3c5230 0 8px, transparent 9px),
        radial-gradient(circle at 70% 65%, #45612f 0 10px, transparent 11px);
    background-size: 20px 20px, 20px 20px, 100% 100%, 100% 100%;
    box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.minimap__marker {
    position: absolute; left: 48%; top: 46%; width: 12px; height: 12px; border-radius: 50%;
    background: var(--hp-2); box-shadow: 0 0 0 3px rgba(214,86,74,.35), 0 0 8px var(--hp-2);
    animation: pulse 1.8s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(214,86,74,0), 0 0 8px var(--hp-2); } }
.minimap__label { text-align: center; color: var(--text-dim); font-size: 13px; padding: 0 0 10px; }

/* Paperdoll */
.paperdoll { padding: 16px 14px; text-align: center; }
.portrait {
    width: 110px; height: 130px; margin: 0 auto 10px; border: 2px solid var(--border-lt);
    border-radius: 6px; background: radial-gradient(circle at 50% 30%, #4a3a22, #20180e);
    display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 20px rgba(0,0,0,.6);
}
.portrait__glyph { font-size: 56px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.paperdoll__name { font-family: 'Cinzel', serif; color: #fff; margin-bottom: 12px; }

/* Balken (HP/Mana/XP) */
.bars { display: flex; flex-direction: column; gap: clamp(4px, 0.6vh, 8px); }
.bar {
    position: relative; height: clamp(15px, 1.8vh, 18px); border-radius: 4px; overflow: hidden;
    background: #14100a; border: 1px solid #000; box-shadow: inset 0 1px 3px rgba(0,0,0,.7);
}
.bar__fill { position: absolute; inset: 0 auto 0 0; height: 100%; transition: width .3s ease; }
.bar__fill--hp     { background: linear-gradient(180deg, var(--hp-2), var(--hp)); }
.bar__fill--mana   { background: linear-gradient(180deg, var(--mana-2), var(--mana)); }
.bar__fill--energy { background: linear-gradient(180deg, #e0c44e, var(--energy)); }
.bar__fill--rage   { background: linear-gradient(180deg, #d6564a, var(--rage)); }
.bar__fill--xp     { background: linear-gradient(180deg, var(--xp-2), var(--xp)); }
.bar__text {
    position: relative; z-index: 1; display: block; text-align: center; line-height: clamp(15px, 1.8vh, 18px);
    font-size: clamp(10px, 1.25vh, 12px); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9); font-family: 'EB Garamond', serif;
}
.bar--xp { height: clamp(15px, 1.8vh, 19px); }
.bar--xp .bar__text { line-height: clamp(15px, 1.8vh, 19px); }

/* Navigation */
.nav { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.nav__item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 5px;
    color: var(--text); font-family: 'Cinzel', serif; font-size: 15px;
}
a.nav__item:hover { background: rgba(216,175,85,.12); text-decoration: none; color: #fff; }
.nav__item.is-active { background: linear-gradient(90deg, rgba(216,175,85,.22), transparent); border-left: 3px solid var(--gold); }
.nav__icon { width: 22px; text-align: center; }
.nav__item--disabled { color: #7d6f54; cursor: not-allowed; }
.nav__soon { margin-left: auto; font-family: 'EB Garamond', serif; font-size: 11px; color: #8a7a55; border: 1px solid #5a4a2c; border-radius: 10px; padding: 0 7px; }

/* Content / Schriftrolle */
.content { min-width: 0; }
.scroll {
    background:
        linear-gradient(180deg, var(--parchment-2), var(--parchment));
    color: var(--ink); border: 1px solid var(--border-lt); border-radius: 8px;
    padding: 24px 28px; box-shadow: var(--shadow); margin-bottom: 18px;
    background-image: radial-gradient(circle at 0 0, rgba(120,90,40,.08), transparent 60%),
                      linear-gradient(180deg, var(--parchment-2), var(--parchment));
}
.scroll--center { text-align: center; }
.scroll__title { margin: 0 0 4px; color: #4a3a1d; }
.scroll__subtitle { margin: 0 0 14px; color: #6b5733; font-style: italic; }
.scroll__text { margin: 0; color: #3a2f1d; }

/* Grids & Panels im Content */
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.content .panel__body { color: var(--text); }

.stats { list-style: none; margin: 0; padding: 0; }
.stats li { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed var(--border); }
.stats li:last-child { border-bottom: 0; }
.stats b { color: var(--gold); }
.stat-row { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed var(--border); }
.stat-row b { color: #fff; }
.xp { margin-top: 14px; }
.xp__label { font-size: 14px; color: var(--text-dim); margin-bottom: 6px; }
.hint { font-size: 14px; color: var(--text-dim); }
.hint--gold { color: var(--gold); }

/* Ausrüstung */
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.equip-slot {
    border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; background: rgba(0,0,0,.18);
    display: flex; flex-direction: column; gap: 2px;
}
.equip-slot.is-filled { border-color: var(--gold-soft); background: rgba(216,175,85,.08); }
.equip-slot__label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.equip-slot__item { color: var(--text); }
.equip-slot__item i { color: #7d6f54; }

.panel--soon .panel__body { color: var(--text-dim); }
.todo-list { list-style: none; margin: 10px 0 0; padding: 0; }
.todo-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list b { color: var(--text); }

/* ============================ HELD ERSCHAFFEN ============================ */
.create { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 26px; box-shadow: var(--shadow); }
.create__title { color: var(--gold); margin: 0 0 4px; text-align: center; }
.create__intro { text-align: center; color: var(--text-dim); margin: 0 0 24px; }
.create__step { margin-bottom: 26px; }
.create__steptitle { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 19px; margin: 0 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
    border-radius: 50%; background: var(--gold); color: #2a1f0c; font-size: 15px; font-weight: 700;
}
.choices { display: grid; gap: 12px; }
.choices--faction { grid-template-columns: 1fr 1fr; }
.choices--race, .choices--class { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__body {
    display: block; height: 100%; border: 1px solid var(--border-lt); border-radius: 8px;
    background: linear-gradient(180deg, #34281a, #281d12); padding: 14px 16px; transition: all .15s ease;
}
.choice:hover .choice__body { border-color: var(--gold-soft); transform: translateY(-1px); }
.choice input:checked + .choice__body { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(216,175,85,.4); background: linear-gradient(180deg, #43331f, #2f2316); }
.choice--big .choice__body { padding: 18px 20px; }
.choice__name { display: block; font-family: 'Cinzel', serif; font-size: 17px; color: #fff; margin-bottom: 6px; }
.choice__desc { display: block; color: var(--text-dim); font-size: 15px; }
.choice__stats { display: block; margin-top: 8px; font-size: 13px; color: var(--gold-soft); }
.tag { font-family: 'EB Garamond', serif; font-size: 11px; color: #2a1f0c; background: var(--gold); border-radius: 8px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.create__hint { color: var(--text-dim); font-style: italic; font-size: 14px; }
.create__submit { text-align: center; margin-top: 10px; }

/* Vom JS gesteuerte Sichtbarkeit */
.is-hidden { display: none !important; }
.choice.is-locked { opacity: .35; pointer-events: none; }
.choice.is-locked .choice__body { filter: grayscale(.6); }

/* ============================ ZONE / WELT ============================ */
.scroll__cta { margin: 16px 0 0; }
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mob-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 8px; background: rgba(0,0,0,.18);
}
.mob-card:hover { border-color: var(--gold-soft); }
.mob-card__icon {
    font-size: 34px; width: 54px; height: 54px; flex: 0 0 54px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 35%, #4a3a22, #20180e); border: 1px solid var(--border-lt); border-radius: 8px;
}
.mob-card__info { flex: 1 1 auto; min-width: 0; }
.mob-card__name { font-family: 'Cinzel', serif; color: #fff; }
.mob-card__meta { color: var(--gold-soft); font-size: 13px; }
.mob-card__stats { color: var(--text-dim); font-size: 14px; }
.mob-card__action { margin: 0; }

/* ============================ KAMPF ============================ */
.combat { display: flex; flex-direction: column; gap: 16px; }
.combat__arena {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: var(--shadow);
}
.fighter { text-align: center; }
.fighter__icon {
    font-size: 60px; width: 96px; height: 96px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 30%, #4a3a22, #20180e); border: 2px solid var(--border-lt); border-radius: 10px;
    box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.fighter--enemy .fighter__icon { border-color: #8a3a2e; }
.fighter--player .fighter__icon { border-color: var(--gold-soft); }
.fighter__name { font-family: 'Cinzel', serif; color: #fff; font-size: 18px; }
.fighter__meta { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.fighter .bar { margin-top: 6px; }
.combat__vs { font-size: 30px; color: var(--gold); filter: drop-shadow(0 0 6px rgba(216,175,85,.4)); }

.combat__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.combat__actions .btn { min-width: 150px; }
.combat__actions .btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; border-color: var(--border); }
.combat__actions .cost { opacity: .8; font-size: 13px; }
.combat__hint { text-align: center; color: var(--text-dim); font-style: italic; font-size: 14px; margin: -4px 0 0; }

/* Magie-Dropdown im Kampf */
.magic-dd { position: relative; display: inline-block; }
.magic-dd > .btn--magic { min-width: 150px; }
.btn--magic { border-color: #6a5acd; }
.btn--magic:hover { border-color: #9183e6; }
.magic-dd__caret { display: inline-block; transition: transform .15s ease; opacity: .8; font-size: 12px; }
.magic-dd.is-open .magic-dd__caret { transform: rotate(180deg); }
.magic-dd__menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
    min-width: 240px; max-height: 320px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 6px;
    padding: 8px; border: 1px solid var(--border-lt); border-radius: 10px;
    background: var(--surface, #1c1c24); box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.magic-dd__menu[hidden] { display: none; }
.magic-dd__item { margin: 0; }
.magic-dd__item .btn { min-width: 0; width: 100%; justify-content: flex-start; text-align: left; }
.btn--block { display: flex; width: 100%; }
.btn--attack { border-color: #b0533f; }
.btn--attack:hover { border-color: #e0735f; }

/* Zweispaltiges Magie-Menü: Angriff | Stärkung */
.magic-dd__menu--split { flex-direction: row; align-items: flex-start; gap: 10px; min-width: 460px; }
.magic-col { display: flex; flex-direction: column; gap: 6px; flex: 1 1 0; min-width: 0; }
.magic-col__head {
    font-size: 13px; font-weight: 700; text-align: center; padding: 4px 6px;
    border-radius: 6px; letter-spacing: .02em; white-space: nowrap;
}
.magic-col__head--attack  { color: #ffb3a3; background: rgba(176,83,63,.18); border: 1px solid rgba(176,83,63,.45); }
.magic-col__head--support { color: #a9e6a0; background: rgba(95,154,84,.18); border: 1px solid rgba(95,154,84,.45); }
.magic-col__empty { color: var(--text-dim); font-style: italic; font-size: 13px; text-align: center; padding: 6px 0; }
@media (max-width: 560px) {
    .magic-dd__menu--split { flex-direction: column; min-width: 240px; }
}

.combat__outcome {
    text-align: center; border: 1px solid var(--border-lt); border-radius: 10px; padding: 20px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow);
}
.combat__outcome h2 { font-size: 26px; margin: 0 0 12px; }
.combat__outcome--won h2 { color: var(--gold); }
.combat__outcome--lost h2 { color: var(--hp-2); }
.combat__outcome--fled h2 { color: var(--text-dim); }
.rewards { list-style: none; margin: 0 auto 16px; padding: 0; display: inline-block; text-align: left; }
.rewards li { padding: 4px 0; }
.rewards b { color: var(--gold); }
.rewards__level { color: var(--xp-2); font-weight: 700; }

.combat__log .log { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

/* === Kampf als feste One-Page-Ansicht: füllt bis zum Chat, NUR der Log scrollt === */
.game-view .content:has(.combat) { overflow: hidden; }
.game-view .combat { height: 100%; gap: 12px; }
.game-view .combat__arena { padding: 12px 16px; }
.game-view .combat .fighter__icon { width: 72px; height: 72px; font-size: 44px; margin-bottom: 6px; }
/* Sieg-/Niederlage-Fenster kompakter, damit nichts außer dem Log scrollt */
.game-view .combat__outcome { padding: 12px 18px; }
.game-view .combat__outcome h2 { font-size: 20px; margin: 0 0 6px; }
.game-view .combat .rewards { margin: 0 auto 8px; }
.game-view .combat .rewards li { padding: 2px 0; }
/* Kampf-Log wächst bis zum Chat und ist das EINZIGE scrollbare Element */
.game-view .combat__log { flex: 1 1 auto; min-height: 70px; display: flex; flex-direction: column; }
.game-view .combat__log .log { flex: 1 1 auto; min-height: 0; max-height: none; }
.log__line { padding: 4px 8px; border-radius: 4px; font-size: 15px; }
.log__line--player  { color: #e9dcc6; background: rgba(216,175,85,.07); }
.log__line--monster { color: #f0c0b6; background: rgba(177,55,47,.12); }
.log__line--heal    { color: #cdebbb; background: rgba(79,122,58,.14); }
.log__line--reward  { color: var(--gold); background: rgba(216,175,85,.12); }
.log__line--level   { color: #d8b6f0; background: rgba(122,76,160,.16); font-weight: 700; }
.log__line--info    { color: var(--text-dim); font-style: italic; }

/* ============================ WELTKARTE ============================ */
.worldmap { position: relative; padding: 8px; }
.worldmap__grid { display: grid; gap: 0; }
.worldmap-big {
    position: relative;
    background: linear-gradient(180deg, #2a2013, #1b1308);
    border: 2px solid var(--border-lt); border-radius: 10px;
    padding: 8px; box-shadow: var(--shadow);
    margin: 0 auto 8px;
    display: flex; justify-content: center;
}
.worldmap-big .worldmap__grid {
    gap: 0;
    /* Größe wird inline gesetzt: width = min(100%, Höhenbudget * cols/rows), aspect-ratio hält Kacheln quadratisch.
       So passt die ganze Karte ohne Scrollen auf eine Seite. */
    margin: 0 auto;
    font-size: clamp(10px, 1.4vw, 18px); /* Emoji-Skalierung der Kacheln */
    /* Spielfeld füllt die verfügbare Höhe (wie das Charakterfenster links), Breite weich gedeckelt.
       aspect-ratio (inline) leitet die Höhe aus der finalen Breite ab → Kacheln bleiben quadratisch. */
    max-width: min(100%, clamp(440px, 70vw, 1400px));
}
/* Zonen-Label als Overlay in der Karte (oben links) */
.worldmap__label {
    position: absolute; top: 10px; left: 12px; z-index: 5;
    background: rgba(16,12,6,.72); border: 1px solid var(--border);
    border-radius: 7px; padding: 5px 11px; backdrop-filter: blur(2px);
    pointer-events: none; line-height: 1.25;
}
.worldmap__label-name { display: block; font-family: 'Cinzel', serif; color: var(--gold); font-size: 16px; }
.worldmap__label-meta { display: block; color: var(--text-dim); font-size: 12px; }
.wm-cell {
    position: relative; border-radius: 0; min-width: 0; min-height: 0;
}
/* Trennlinien nur im Editor, nicht im Spiel */
.wm-grass { background: #46742f; }
.wm-grass:nth-child(2n) { background: #426d2c; }
.wm-tree  { background: #244a1c; }
.wm-tree::after  { content: '🌲'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8em; opacity: .9; }
.wm-rock  { background: #6a6258; }
.wm-rock::after  { content: '⛰'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75em; opacity: .85; }
.wm-water { background: #2f5c8a; }
.wm-water::after { content: '〜'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bfe0ff; font-size: 0.75em; opacity: .7; }
.wm-void  { background: #0d0b07; }
.wm-field { background: linear-gradient(180deg, #7a9a3a, #5f7d28); }
.wm-field::after { content: '🌾'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8em; opacity: .85; }
/* --- Mauer: graue Quader mit Tiefe --- */
.wm-wall  {
    background:
        linear-gradient(180deg, #9b9387 0%, #7c7468 55%, #5d564b 100%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 3px 4px rgba(255,255,255,.18), inset 0 -3px 5px rgba(0,0,0,.45);
}
.wm-wall::after { content: ''; position: absolute; inset: 18% 12%; border: 1px solid rgba(0,0,0,.3); border-radius: 1px; background: rgba(255,255,255,.05); }
/* --- Stadttor: Holz mit Bogen, begehbar --- */
.wm-gate { background: linear-gradient(180deg, #8a6a3a, #5e4423); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.wm-gate::after { content: '🚪'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.85em; }
/* --- Häuser: Fachwerk mit Dach --- */
.wm-house {
    background: linear-gradient(180deg, #b06a3a 0%, #b06a3a 38%, #d9c39a 38%, #c2a877 100%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), inset 0 -3px 5px rgba(0,0,0,.3);
}
.wm-house::after { content: '🏠'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.82em; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
/* --- Dachhäuser (rote Ziegel) --- */
.wm-roof {
    background: linear-gradient(180deg, #c0432f 0%, #c0432f 42%, #cdb791 42%, #b89e6f 100%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), inset 0 -3px 5px rgba(0,0,0,.3);
}
.wm-roof::after { content: '🏘'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.82em; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
/* --- Marktstand --- */
.wm-market { background: linear-gradient(180deg, #6a8a4a, #4f6d34); }
.wm-market::after { content: '⛺'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.85em; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
/* --- Brunnen / Fontäne --- */
.wm-well { background: radial-gradient(circle at 50% 50%, #4f7fae 0%, #6a6a6a 45%, #565049 100%); }
.wm-well::after { content: '⛲'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.9em; }
/* --- Garten / Blumen --- */
.wm-garden { background: linear-gradient(180deg, #5f8a37, #4c7029); }
.wm-garden::after { content: '🌷'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.78em; opacity: .95; }
/* --- Hecke --- */
.wm-hedge { background: linear-gradient(180deg, #2f5a24, #1f3f17); box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.wm-hedge::after { content: '🌿'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.78em; opacity: .9; }
/* --- Stadtplatz (Pflasterstein) --- */
.wm-stone {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.10) 0 35%, transparent 36%),
        linear-gradient(180deg, #9a948a, #837c70);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
/* --- Straße (Kopfsteinpflaster, begehbar) --- */
.wm-road {
    background:
        repeating-linear-gradient(45deg, rgba(0,0,0,.06) 0 3px, transparent 3px 6px),
        linear-gradient(180deg, #b3a98f, #9c9176);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
/* --- Holzweg / Brücke --- */
.wm-bridge { background: linear-gradient(180deg, #9a865f, #7c6a45); }
.wm-bridge::after { content: '═'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #d8c79a; font-size: 0.8em; opacity: .8; }
/* --- Pfad (Trampelpfad) --- */
.wm-path  { background: linear-gradient(180deg, #9a7c52, #816641); }
.wm-ent {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 1em; z-index: 2; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7));
}
.wm-player { text-shadow: 0 0 6px rgba(216,175,85,.9); }
.wm-otherplayer { text-shadow: 0 0 6px rgba(80,180,255,.9); filter: hue-rotate(30deg); }
.wm-npc { text-shadow: 0 0 8px rgba(200,150,255,.8); cursor: pointer; filter: brightness(1.1); }
.wm-npc:hover { filter: brightness(1.3); }
.wm-mob { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }

/* Minimap (Overlay im Spielfeld, unter dem Kartennamen) */
.minimap-box {
    position: absolute; top: 12px; right: 12px; left: auto; z-index: 6;
}
/* Zentrierter Spielerpunkt – die Karte darunter wird passend verschoben (WoW-Stil). */
.minimap-you {
    position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
    transform: translate(-50%, -50%); border-radius: 50%; z-index: 5; pointer-events: none;
    background: #ffec6b; box-shadow: 0 0 4px #ffec6b, 0 0 9px rgba(255,236,107,.75);
}
.minimap-frame {
    border: 3px solid var(--gold-soft); border-radius: 10px; padding: 6px; background: rgba(16,12,6,.82);
    box-shadow: 0 4px 12px rgba(0,0,0,.6), inset 0 0 8px rgba(216,175,85,.1);
    position: relative; width: 160px; backdrop-filter: blur(2px);
}
.minimap-zoom-controls {
    position: absolute; bottom: -14px; right: 6px; display: flex; gap: 4px; z-index: 10;
}
.minimap-zoom-btn {
    width: 28px; height: 28px; border: 1px solid var(--border-lt); border-radius: 4px;
    background: rgba(0,0,0,.5); color: var(--gold); font-weight: bold; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
    transition: all .2s; padding: 0;
}
.minimap-zoom-btn:hover { background: rgba(216,175,85,.2); border-color: var(--gold-soft); }
.minimap-canvas {
    position: relative; width: 100%; aspect-ratio: 1; overflow: hidden;
    background: #0a0a0a; border-radius: 6px; border: 1px solid var(--border);
    clip-path: inset(0 round 6px);
}
.minimap-inner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transform-origin: center center; transition: transform .15s ease;
}
.minimap-grid {
    display: grid; width: 100%; height: 100%; gap: 0;
}
.mm-tile {
    background: #1a1410;
}
.mm-tile.wm-grass { background: linear-gradient(135deg, #4a5d2f, #3a4d1f); }
.mm-tile.wm-tree  { background: linear-gradient(135deg, #2a5a1f, #1a4a0f); }
.mm-tile.wm-rock  { background: linear-gradient(135deg, #5a5a5a, #3a3a3a); }
.mm-tile.wm-water { background: linear-gradient(135deg, #1a4a7a, #0a3a6a); }
.mm-tile.wm-void  { background: #050505; }
.mm-tile.wm-field { background: #6f9030; }
.mm-tile.wm-house { background: #b06a3a; }
.mm-tile.wm-roof  { background: #c0432f; }
.mm-tile.wm-wall  { background: #837c70; }
.mm-tile.wm-stone { background: #9a948a; }
.mm-tile.wm-road  { background: #b3a98f; }
.mm-tile.wm-gate  { background: #8a6a3a; }
.mm-tile.wm-well  { background: #4f7fae; }
.mm-tile.wm-garden { background: #5f8a37; }
.mm-tile.wm-market { background: #6a8a4a; }
.mm-tile.wm-hedge { background: #2f5a24; }
.mm-tile.wm-bridge { background: #9a865f; }
.minimap-markers {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.mm-marker {
    position: absolute; font-size: 10px; font-weight: bold; line-height: 1;
    transform: translate(-50%, -50%); pointer-events: none;
}
.mm-player { color: #ffff00; text-shadow: 0 0 3px #ffff00, 0 0 6px rgba(255,255,0,.6); }
.mm-npc    { color: #ff88ff; text-shadow: 0 0 3px #ff88ff, 0 0 6px rgba(255,136,255,.4); }
.mm-mob    { color: #ff4444; text-shadow: 0 0 3px #ff4444, 0 0 6px rgba(255,68,68,.4); }

/* Zone-Map (Full-View) */
.zone-map-fullview { text-align: center; overflow: auto; }
.zone-map-canvas {
    display: block; margin: 0 auto; max-width: 100%; height: auto;
    image-rendering: pixelated; border: 2px solid var(--border); border-radius: 6px;
    background: #1a1410; box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
/* Feste Kachelgröße statt aspect-ratio/1fr – verhindert Layout-Schleifen (Browser-Freeze)
   bei großen Karten (50×50) auf WebKit/Safari. */
.zone-full-map {
    display: inline-grid; gap: 0; border: 2px solid var(--border);
    background: #1a1410; border-radius: 6px; overflow: hidden; margin: 0 auto;
}
.zm-cell {
    width: 11px; height: 11px; display: flex; align-items: center; justify-content: center;
    position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3);
    background-color: #1a1410;
}
.zm-cell.wm-grass { background: linear-gradient(135deg, #4a5d2f, #3a4d1f); }
.zm-cell.wm-tree  { background: linear-gradient(135deg, #2a5a1f, #1a4a0f); }
.zm-cell.wm-rock  { background: linear-gradient(135deg, #5a5a5a, #3a3a3a); }
.zm-cell.wm-water { background: linear-gradient(135deg, #1a4a7a, #0a3a6a); }
.zm-cell.wm-void  { background: #0a0a0a; }
.zm-cell.wm-field { background: linear-gradient(135deg, #7a9a3a, #5f7d28); }
.zm-cell.wm-house { background: linear-gradient(135deg, #c07a4a, #a05a2a); }
.zm-cell.wm-roof  { background: linear-gradient(135deg, #d0533f, #b0331f); }
.zm-cell.wm-wall  { background: linear-gradient(135deg, #9b9387, #6d6559); }
.zm-cell.wm-stone { background: linear-gradient(135deg, #9a948a, #837c70); }
.zm-cell.wm-road  { background: linear-gradient(135deg, #b3a98f, #9c9176); }
.zm-cell.wm-gate  { background: linear-gradient(135deg, #8a6a3a, #5e4423); }
.zm-cell.wm-well  { background: radial-gradient(circle, #4f7fae, #565049); }
.zm-cell.wm-garden { background: linear-gradient(135deg, #5f8a37, #4c7029); }
.zm-cell.wm-market { background: linear-gradient(135deg, #6a8a4a, #4f6d34); }
.zm-cell.wm-hedge { background: linear-gradient(135deg, #2f5a24, #1f3f17); }
.zm-cell.wm-bridge { background: linear-gradient(135deg, #9a865f, #7c6a45); }
.zm-ent { font-size: 12px; font-weight: bold; z-index: 10; }
.zm-player { text-shadow: 0 0 4px #ffff00; }
.zm-npc    { text-shadow: 0 0 4px #ff88ff; }
.zm-mob    { text-shadow: 0 0 4px #ff4444; }
.zm-sample { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 3px; }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* ============================ QUESTS ============================ */
/* Zone-Ansicht: Karte + Quest-Log nebeneinander */
.zone-view { display: flex; gap: 14px; align-items: flex-start; }
.zone-view__map { flex: 1 1 auto; min-width: 0; position: relative; }
/* Event-/Infofenster (Sammeln, „Auf diesem Feld") überlagern den UNTEREN Kartenbereich,
   damit unten Platz für den Chat bleibt. */
.zone-view__map > .gather-hint,
.zone-view__map > .players-here {
    position: absolute; left: 50%; transform: translateX(-50%);
    bottom: 14px; z-index: 28; width: min(94%, 560px); margin: 0;
    backdrop-filter: blur(2px);
}
/* „Auf diesem Feld" sitzt etwas höher, das Sammeln-Fenster direkt am unteren Rand. */
.zone-view__map > .players-here { bottom: 14px; }
.zone-view__map > .gather-hint:not([hidden]) ~ .players-here:not([hidden]) { bottom: 92px; }

/* Quest-Log (Seitenleiste rechts neben der Karte) */
.questlog {
    flex: 0 0 240px; align-self: flex-start;
    height: var(--play-h); max-height: calc(100vh - 76px);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
    overflow: hidden; display: flex; flex-direction: column;
}
.questlog__head {
    display: flex; align-items: center; justify-content: space-between;
    font-family: 'Cinzel', serif; font-size: 14px; color: var(--gold);
    padding: 9px 12px; background: rgba(0,0,0,.22); border-bottom: 1px solid var(--border);
}
.questlog__count {
    background: var(--gold-soft); color: #1b1308; border-radius: 10px; padding: 0 8px;
    font-size: 12px; font-weight: bold; min-width: 20px; text-align: center;
}
.questlog__body { padding: 10px; overflow-y: auto; }
.questlog__empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 14px 6px; line-height: 1.6; }
.ql-npc { color: #d6a7ff; }
.ql-quest {
    background: rgba(0,0,0,.18); border: 1px solid var(--border); border-radius: 6px;
    padding: 8px 10px; margin-bottom: 8px;
}
.ql-quest.is-done { border-color: var(--ok); background: rgba(79,122,58,.16); }
.ql-quest__title { font-family: 'Cinzel', serif; color: #fff; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.ql-quest__ready { color: #8fe06a; font-size: 11px; white-space: nowrap; }
.ql-quest__obj { color: var(--text-dim); font-size: 12px; margin: 3px 0; }
.ql-quest__bar { height: 7px; background: rgba(0,0,0,.4); border-radius: 4px; overflow: hidden; margin: 5px 0 4px; }
.ql-quest__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 4px; transition: width .4s; }
.ql-quest.is-done .ql-quest__bar span { background: linear-gradient(90deg, #4f7a3a, #6fae4a); }
.ql-quest__meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.ql-quest__reward { color: var(--gold-soft); }
.ql-quest__hint { color: #8fe06a; font-size: 11px; margin-top: 4px; }

/* NPC-Dialog-Modal */
.npc-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.npc-modal[hidden] { display: none; }
.npc-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(2px); }
.npc-modal__box {
    position: relative; width: min(560px, 92vw); max-height: 86vh; overflow-y: auto;
    background: linear-gradient(180deg, #2c2114, #1d1509);
    border: 2px solid var(--gold-soft); border-radius: 12px; box-shadow: 0 14px 50px rgba(0,0,0,.7);
    padding: 20px; animation: npcPop .18s ease;
}
@keyframes npcPop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.npc-modal__x {
    position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 6px;
    background: rgba(0,0,0,.4); border: 1px solid var(--border-lt); color: var(--gold); cursor: pointer; font-size: 15px;
}
.npc-modal__x:hover { background: rgba(216,175,85,.18); }
.npc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.npc-head__glyph { font-size: 42px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.npc-head__name { font-family: 'Cinzel', serif; color: var(--gold); font-size: 22px; }
.npc-head__role { color: var(--text-dim); font-size: 13px; font-style: italic; }
.npc-dialogue { color: #e7dcc6; font-style: italic; font-size: 15px; line-height: 1.55; border-left: 3px solid var(--gold-soft); padding: 4px 0 4px 12px; margin: 10px 0 14px; }
.npc-noquests { color: var(--text-dim); text-align: center; padding: 12px; }
.npc-quests { display: flex; flex-direction: column; gap: 10px; }
.npc-quest { background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.npc-quest.is-completable { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(216,175,85,.3); }
.npc-quest.is-done { opacity: .65; }
.npc-quest.is-locked { opacity: .6; }
.npc-quest__name { font-family: 'Cinzel', serif; color: #fff; font-size: 15px; margin-bottom: 4px; }
.npc-quest__tag { font-size: 11px; color: #8fe06a; font-family: 'EB Garamond', serif; }
.npc-quest__tag--rdy { color: var(--gold); }
.npc-quest__desc { color: var(--text); font-size: 13.5px; line-height: 1.5; margin: 4px 0 8px; }
.npc-quest__obj { color: var(--text-dim); font-size: 13px; margin-bottom: 4px; }
.npc-quest__reward { color: var(--gold-soft); font-size: 13px; margin-bottom: 8px; }
.npc-quest__locked, .npc-quest__wip { color: var(--text-dim); font-size: 12px; }
.npc-quest__wip { color: #c8a72e; }

/* NPC-Reiter (Aufträge / Kaufen / Verkaufen) */
.npc-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.npc-tab {
    background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
    color: var(--text-dim); font-family: 'Cinzel', serif; font-size: 13px; padding: 7px 12px; margin-bottom: -1px;
}
.npc-tab:hover { color: var(--text); }
.npc-tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }

/* Shop-Listen */
.shop-goldbar {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 6px;
    padding: 7px 12px; margin-bottom: 10px; font-size: 14px; color: var(--text);
}
.shop-goldbar b { color: var(--gold); }
.shop-goldbar__hint { color: var(--text-dim); font-size: 12px; }
.shop-list { display: flex; flex-direction: column; gap: 7px; }
.shop-row {
    display: flex; align-items: center; gap: 11px;
    background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 7px; padding: 8px 11px;
}
.shop-row__glyph { font-size: 24px; line-height: 1; flex: 0 0 auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.shop-row__info { flex: 1 1 auto; min-width: 0; }
.shop-row__name { color: #fff; font-size: 14px; }
.shop-row__lvl, .shop-row__qty { color: var(--gold-soft); font-size: 12px; }
.shop-row__meta { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-row__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.shop-row__price { color: var(--gold); font-size: 13px; white-space: nowrap; }

/* Mengen-Widget (±) */
.qty-ctrl { display: flex; align-items: center; gap: 2px; }
.qty-ctrl__btn {
    width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border-lt);
    background: rgba(0,0,0,.3); color: var(--gold); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.qty-ctrl__btn:hover { background: rgba(216,175,85,.18); }
.qty-ctrl__val {
    min-width: 24px; text-align: center; font-size: 13px; color: #fff; font-weight: bold;
}

/* ============================ TALENT-BAUM ============================ */
.talent-pts { color: var(--gold); font-weight: bold; font-size: 1.15em; }
.talent-trees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.talent-tree {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.talent-tree__head {
    background: rgba(0,0,0,.25); border-bottom: 1px solid var(--border);
    font-family: 'Cinzel', serif; font-size: 15px; color: var(--gold);
    padding: 10px 14px; text-align: center;
}
.talent-tree__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.talent-node {
    background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; position: relative; opacity: .55; transition: opacity .2s, border-color .2s;
}
.talent-node.is-learned { opacity: .85; border-color: var(--gold-soft); }
.talent-node.is-max { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px rgba(216,175,85,.25); }
.talent-node.is-available { opacity: 1; cursor: pointer; }
.talent-node.is-available:hover { border-color: var(--gold); }
.talent-node__name { font-family: 'Cinzel', serif; font-size: 14px; color: #fff; }
.talent-node__rank {
    position: absolute; top: 10px; right: 12px;
    font-size: 13px; font-weight: bold; color: var(--text-dim);
}
.talent-node__rank.rank--max { color: var(--gold); }
.talent-node__desc { color: var(--text-dim); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.talent-node .btn { margin-top: 6px; }

@media (max-width: 920px) { .talent-trees { grid-template-columns: 1fr; } }

/* Quest-Vollseite (Karten) */
.quest-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.quest-card { background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.quest-card.is-ready { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(216,175,85,.25); }
.quest-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.quest-card__top h3 { margin: 0; font-family: 'Cinzel', serif; color: var(--gold); font-size: 17px; }
.quest-card__diff { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.quest-card__desc { color: var(--text); font-size: 13.5px; line-height: 1.5; margin: 8px 0; }
.quest-card__obj { color: var(--text-dim); font-size: 13px; margin-bottom: 6px; }
.quest-card__foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.quest-card__hint { color: var(--text-dim); font-size: 12px; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.quest-card.is-ready .quest-card__hint { color: #8fe06a; }
.quest-done-list { list-style: none; margin: 0; padding: 0; }
.quest-done-list li { color: var(--text-dim); padding: 4px 0; border-bottom: 1px dashed var(--border); }
.quest-done-list__by { color: #6b5f48; font-size: 12px; }

/* Toasts */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
    min-width: 220px; max-width: 360px; padding: 11px 16px; border-radius: 8px; color: #fff;
    font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.5); opacity: 0; transform: translateX(30px);
    transition: opacity .3s, transform .3s; border: 1px solid rgba(255,255,255,.12);
}
.toast.is-in { opacity: 1; transform: translateX(0); }
.toast--ok  { background: linear-gradient(180deg, #3c6a2c, #2c5020); }
.toast--err { background: linear-gradient(180deg, #8a3326, #6a261c); }

/* Pfeilkreuz */
.dpad {
    position: absolute; bottom: 18px; left: 18px; z-index: 6;
    display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 34px); gap: 4px;
}
.worldmap-big .dpad { bottom: 22px; left: 22px; }
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mob-card { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 6px; padding: 10px; }
.mob-card__icon { font-size: 28px; }
.mob-card__info { flex: 1; min-width: 0; }
.mob-card__name { font-family: 'Cinzel', serif; color: #fff; font-size: 15px; }
.mob-card__meta { color: var(--text-dim); font-size: 12px; }
.dpad__btn {
    border: 1px solid var(--border-lt); background: rgba(20,14,8,.82); color: var(--gold);
    border-radius: 5px; cursor: pointer; font-size: 13px; line-height: 1; padding: 0;
    display: flex; align-items: center; justify-content: center; transition: all .1s ease;
}
.dpad__btn:hover { background: rgba(216,175,85,.85); color: #2a1f0c; }
.dpad__btn:active { transform: scale(.92); }
.dpad__btn[disabled] { opacity: .35; cursor: not-allowed; }
.dpad__btn--n { grid-column: 2; grid-row: 1; }
.dpad__btn--w { grid-column: 1; grid-row: 2; }
.dpad__btn--e { grid-column: 3; grid-row: 2; }
.dpad__btn--s { grid-column: 2; grid-row: 3; }
.dpad__center { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; color: var(--gold-soft); font-size: 12px; opacity: .7; }

.worldmap.is-locked .worldmap__grid { filter: grayscale(.5) brightness(.7); }
.worldmap__lock {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 7;
    background: rgba(20,14,8,.85); color: var(--hp-2); border: 1px solid var(--hp);
    padding: 4px 12px; border-radius: 6px; font-family: 'Cinzel', serif; font-size: 13px;
}
.worldmap__hint { text-align: center; color: var(--text-dim); font-size: 12px; padding: 4px 0 10px; }

/* Charakterkarte unter der Karte */
.panel--char .panel__body, .panel--char { /* kein head -> Innenabstand selbst */ }
.charcard { display: flex; gap: 12px; align-items: center; padding: 14px 14px 6px; }
.charcard .portrait { width: 72px; height: 86px; margin: 0; flex: 0 0 72px; }
.charcard .portrait__glyph { font-size: 40px; }
.charcard__head { min-width: 0; }
.charcard__name { font-family: 'Cinzel', serif; color: #fff; font-size: 18px; }
.charcard__meta { color: var(--text-dim); font-size: 13px; }
.charcard__faction { color: var(--gold-soft); font-size: 13px; font-style: italic; }
.panel--char .bars { padding: 0 14px 14px; gap: 6px; }

/* Paperdoll mit Ausrüstung */
/* --pd-slot skaliert die Ausrüstungsfelder mit der Fensterbreite (schön auf 1080p & kleiner). */
/* --pd-slot skaliert mit der Fensterhöhe (vh) UND -breite (vw) – passt sich an kleine Fenster an. */
.paperdoll { --pd-slot: clamp(20px, min(2.3vw, 3.3vh), 34px); display: grid; grid-template-columns: var(--pd-slot) minmax(0, 1fr) var(--pd-slot); gap: clamp(3px, 0.6vh, 7px); align-items: stretch; padding: clamp(6px, 1vh, 12px) clamp(8px, 1vw, 14px) 4px; }
.pd-col { display: flex; flex-direction: column; gap: clamp(3px, 0.5vh, 6px); }
.pd-figure {
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(26px, min(3vw, 4.6vh), 44px); min-height: clamp(64px, 11vh, 118px);
    background: radial-gradient(circle at 50% 28%, #4a3a22, #20180e);
    border: 2px solid var(--border-lt); border-radius: 8px; box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.pd-bottom { display: flex; justify-content: center; gap: clamp(6px, 0.9vw, 12px); padding: clamp(4px,0.6vh,6px) 14px clamp(6px,0.8vh,8px); }
.pd-slot {
    width: var(--pd-slot, 42px); height: var(--pd-slot, 42px); border: 1px solid var(--border); border-radius: 6px;
    background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center;
    font-size: clamp(13px, min(1.3vw, 1.9vh), 20px); position: relative; cursor: default; flex: 0 0 auto;
}
.pd-bottom .pd-slot { width: clamp(40px, 4.2vh, 52px); height: clamp(28px, 2.9vh, 38px); font-size: clamp(15px, 2vh, 22px); }
.pd-slot.is-filled { border-color: var(--gold-soft); background: rgba(216,175,85,.12); box-shadow: inset 0 0 8px rgba(216,175,85,.18); }
.pd-slot.is-blocked { opacity: .5; }
.pd-slot__hint { opacity: .3; font-size: 16px; }
.charcard__meta-line { text-align: center; color: var(--text-dim); font-size: clamp(11px, 1.5vh, 14px); padding: 2px 14px clamp(4px,0.8vh,10px); }
.charcard__meta-line em { color: var(--gold-soft); font-style: italic; }

/* Komplette Werteübersicht */
.statlist { padding: clamp(3px,0.5vh,6px) 14px clamp(6px,1vh,14px); display: grid; grid-template-columns: 1fr 1fr; gap: 1px 14px; }
.statlist__row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; border-bottom: 1px dashed var(--border); padding: clamp(2px,0.4vh,4px) 2px; font-size: 14px; min-width: 0; }
/* Label darf bei Platzmangel kürzen – die Zahl bleibt IMMER sichtbar. */
.statlist__row span { color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statlist__row b { color: var(--gold); flex: 0 0 auto; white-space: nowrap; }

/* Resistenzen */
.resist-head { padding: 4px 14px 4px; font-family: 'Cinzel', serif; color: var(--gold-soft); font-size: 13px; letter-spacing: .4px; border-top: 1px solid var(--border); margin-top: 4px; }
.resist-grid { padding: 0 14px 12px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.resist {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: rgba(0,0,0,.22); border: 1px solid var(--border); border-radius: 6px; padding: 5px 2px;
}
.resist__icon { font-size: 16px; line-height: 1; }
.resist__name { font-size: 10px; color: var(--text-dim); }
.resist__val { font-size: 13px; color: #fff; }
.resist--fire      { border-color: #7a3a22; }
.resist--water     { border-color: #2f5c8a; }
.resist--lightning { border-color: #8a7d2f; }
.resist--light     { border-color: #8a7f3a; }
.resist--shadow    { border-color: #4a3a6a; }
.resist--nature    { border-color: #3a6a3a; }

/* Item-Tooltip (Mouseover) */
.item-tip {
    position: fixed; z-index: 100; pointer-events: none; max-width: 250px;
    background: linear-gradient(180deg, #2a2013, #1b1308); border: 1px solid var(--gold-soft);
    border-radius: 6px; padding: 8px 11px; box-shadow: 0 6px 20px rgba(0,0,0,.6);
    font-family: 'EB Garamond', serif; font-size: 13px; color: var(--text); line-height: 1.4;
}
.item-tip__name { font-family: 'Cinzel', serif; color: #fff; font-size: 14px; margin-bottom: 2px; }
.item-tip__meta { color: var(--gold-soft); font-size: 12px; margin-bottom: 5px; }
.item-tip__stat { color: #cfe3b8; }
.item-tip__val { color: var(--text-dim); margin-top: 5px; font-size: 12px; }

/* Attributsvergabe (Charakter-Seite) */
.points-badge { display: inline-block; background: linear-gradient(180deg, #caa24c, #9b7a31); color: #2a1f0c; font-family: 'Cinzel', serif; padding: 6px 14px; border-radius: 6px; margin-top: 8px; }
.attr-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 4px; border-bottom: 1px dashed var(--border); }
.attr-row:last-child { border-bottom: 0; }
.attr-row__main { grid-column: 1; grid-row: 1; display: flex; justify-content: space-between; gap: 10px; }
.attr-row__name { font-family: 'Cinzel', serif; color: #fff; }
.attr-row__val { color: var(--gold); font-weight: 700; }
.attr-bonus { color: #7fb86a; font-size: 13px; }
.attr-row__eff { grid-column: 1; grid-row: 2; color: var(--text-dim); font-size: 13px; }
.attr-row__act { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.btn--plus { width: 40px; height: 40px; font-size: 22px; padding: 0; line-height: 1; }
.attr-row__dash { color: var(--text-dim); }

/* Kampf-Aktionen (mehrere Mini-Formulare nebeneinander) */
.combat__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.combat__act { margin: 0; }
.btn .cost { opacity: .8; font-size: .85em; }
.btn--heal { border-color: #5f9a54; }
.btn--heal:hover { border-color: #7fb86a; }

/* Zauberbuch */
.spellbook { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.spell-entry { display: flex; gap: 10px; border: 1px solid var(--border); border-radius: 6px; padding: 10px; background: rgba(0,0,0,.18); }
.spell-entry.is-learned { border-color: var(--gold-soft); background: rgba(216,175,85,.07); }
.spell-entry.is-locked { opacity: .55; }
.spell-entry__icon { font-size: 26px; line-height: 1; }
.spell-entry__name { font-family: 'Cinzel', serif; color: #fff; }
.spell-entry__desc { color: var(--text-dim); font-size: 13px; }
.spell-entry__meta { color: var(--gold-soft); font-size: 12px; margin-top: 3px; }
.tag--ok { background: var(--ok); color: #eaf6e0; }
.tag--warn { background: #7a5a10; color: #f0d060; }

/* Heldenauswahl */
.select__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.select__title { color: var(--gold); margin: 0; }
.select__count { color: var(--text-dim); }
.select__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hero-card { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }
.hero-card.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(216,175,85,.3), var(--shadow); }
.hero-card__portrait { width: 64px; height: 76px; display: flex; align-items: center; justify-content: center; font-size: 40px; background: radial-gradient(circle at 50% 30%, #4a3a22, #20180e); border: 2px solid var(--border-lt); border-radius: 6px; }
.hero-card__name { font-family: 'Cinzel', serif; color: #fff; font-size: 18px; }
.hero-card__meta { color: var(--text-dim); font-size: 13px; }
.hero-card__faction { color: var(--gold-soft); font-size: 13px; }
.hero-card__hp { color: var(--text); font-size: 13px; margin-top: 4px; }
.hero-card__actions { display: flex; gap: 8px; margin-top: auto; }
.hero-card__actions form { margin: 0; }
.hero-card__actions .btn--primary { width: 100%; }
.btn--danger { border-color: #9c3b2e; color: #e6a99c; }
.btn--danger:hover { background: #9c3b2e; color: #fff; border-color: #c25; }
.hero-card--new { align-items: center; justify-content: center; text-align: center; text-decoration: none; border-style: dashed; color: var(--text-dim); min-height: 170px; }
.hero-card--new:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.hero-card__plus { font-size: 46px; line-height: 1; color: var(--gold-soft); }
.hero-card__newlabel { font-family: 'Cinzel', serif; }
.select__foot { margin-top: 22px; text-align: center; }

/* Inventar — Angelegt */
.equip-list { display: flex; flex-direction: column; gap: 6px; }
.equip-entry { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(216,175,85,.06); border: 1px solid var(--border); border-radius: 6px; }
.equip-entry:hover { border-color: var(--gold-soft); }
.equip-entry__icon { font-size: 24px; }
.equip-entry__name { flex: 1; color: #fff; font-size: 14px; }
.equip-entry__slot { color: var(--text-dim); font-size: 12px; text-transform: uppercase; }

/* Inventar — Slot-Grid (Tasche) */
/* Kompakte Mini-Slots: viele kleine Icon-Kacheln */
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; }
.bag-slot {
    aspect-ratio: 1 / 1; min-height: 0; border: 1px dashed var(--border); border-radius: 6px;
    background: rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center;
    position: relative; transition: border-color .15s;
}
.bag-slot.is-filled { border-style: solid; background: rgba(0,0,0,.25); cursor: grab; }
.bag-slot.is-filled:hover { border-color: var(--gold); z-index: 5; }
.bag-slot.drag-over { border-color: var(--gold); background: rgba(216,175,85,.12); }
.bag-slot:not(.is-filled) { opacity: .5; }
.bag-item { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center; }
.bag-item__icon { position: relative; font-size: 22px; line-height: 1; }
.bag-item__qty { position: absolute; right: -4px; bottom: -3px; background: #1b1308; border: 1px solid var(--border-lt); border-radius: 8px; font-size: 9px; padding: 0 4px; color: var(--gold); }
.bag-item__name { display: none; } /* Name nur im Tooltip */
/* Aktionen (Anlegen/Nutzen/✕) als kleines Popover beim Hover */
.bag-item__actions {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
    display: none; gap: 3px; flex-wrap: nowrap; justify-content: center; z-index: 20;
    background: rgba(20,15,8,.97); border: 1px solid var(--border-lt); border-radius: 6px;
    padding: 4px; box-shadow: var(--shadow); white-space: nowrap;
}
.bag-slot.is-filled:hover .bag-item__actions { display: flex; }
.bag-item__actions form { margin: 0; }
.btn--xs { font-size: 10px; padding: 3px 7px; }
.btn--sm { font-size: 12px; padding: 5px 10px; }
.inv-item--equip { cursor: context-menu; }

/* Tooltip-Vergleich */
.item-tip--cmp { border-color: var(--border-lt); }
.item-tip__cmphead { margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--border-lt); color: var(--text-dim); font-size: 12px; }
.item-tip__delta--up { color: #7fc35b; }
.item-tip__delta--down { color: #d6675a; }
.item-tip__cmpitem { color: #fff; }

/* Adminpanel */
.admin-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 18px; max-width: 1240px; margin: 18px auto; padding: 0 18px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; padding: 8px; height: max-content; box-shadow: var(--shadow); }
.admin-nav__item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 5px; color: var(--text); font-family: 'Cinzel', serif; }
a.admin-nav__item:hover { background: rgba(216,175,85,.12); color: #fff; text-decoration: none; }
.admin-nav__item.is-active { background: linear-gradient(90deg, rgba(216,175,85,.22), transparent); border-left: 3px solid var(--gold); }
.admin-main { min-width: 0; }
.admin-title { font-family: 'Cinzel', serif; color: var(--gold); margin: 0 0 6px; }
.admin-lead { color: var(--text-dim); margin: 0 0 18px; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.admin-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); text-align: center; color: var(--text); }
a.admin-card:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-1px); }
.admin-card--soon { opacity: .6; }
.admin-card__icon { font-size: 34px; }
.admin-card__title { font-family: 'Cinzel', serif; color: #fff; font-size: 18px; margin-top: 6px; }
.admin-card__num { color: var(--gold); font-size: 26px; font-weight: 700; }
.admin-card__desc { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

.admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 14px; align-items: end; }
.afield { display: flex; flex-direction: column; gap: 3px; }
.afield > span { font-size: 12px; color: var(--text-dim); }
.afield input, .afield select, .afield textarea { background: #1b1409; border: 1px solid var(--border-lt); border-radius: 5px; color: var(--text); padding: 7px 9px; font-family: inherit; font-size: 14px; width: 100%; }
.afield input:focus, .afield select:focus, .afield textarea:focus { outline: none; border-color: var(--gold-soft); }
.afield input[readonly] { opacity: .6; }
.afield--wide { grid-column: 1 / -1; }
.afield--check { flex-direction: row; align-items: center; gap: 8px; }
.afield--check > span { font-size: 14px; color: var(--text); }
.admin-form__actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.admin-subhead { color: var(--gold); font-family: 'Cinzel', serif; margin: 18px 0 10px; font-size: 16px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--gold-soft); font-family: 'Cinzel', serif; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 8px 10px; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.admin-table .mono { font-family: monospace; color: var(--text-dim); }
.admin-table .dim { color: var(--text-dim); }
.admin-table__act { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.admin-table__act form { margin: 0; }

/* Welt-Editor */
.brush-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.brush { background: var(--panel); border: 1px solid var(--border-lt); color: var(--text); padding: 7px 12px; border-radius: 5px; cursor: pointer; font-family: 'Cinzel', serif; font-size: 13px; }
.brush:hover { border-color: var(--gold-soft); }
.brush.is-selected { background: linear-gradient(180deg, #caa24c, #9b7a31); color: #2a1f0c; border-color: var(--gold); font-weight: 700; }
.brush--reset { margin-left: auto; }
.brush-info { color: var(--text-dim); font-size: 13px; margin-bottom: 6px; }
.brush-info__label { color: var(--gold); font-weight: 700; }
.worldedit__viewport {
    max-height: 70vh; max-width: 100%; overflow: auto;
    background: #14100a; border: 1px solid var(--border); border-radius: 6px; padding: 8px;
    user-select: none; -webkit-user-select: none;
}
.worldedit__grid { display: grid; gap: 1px; user-select: none; -webkit-user-select: none; }
.worldedit__grid .wm-cell { box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.we-cell { width: 22px; height: 22px; cursor: default; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); user-select: none; -webkit-user-select: none; }
.worldedit__grid.is-enabled .we-cell { cursor: crosshair; }
.we-cell:hover { outline: 2px solid var(--gold); outline-offset: -2px; z-index: 2; position: relative; }
.we-cell.is-override { box-shadow: inset 0 0 0 1px var(--gold-soft); }
@media (max-width: 860px) { .admin-wrap { grid-template-columns: 1fr; } }

/* ============================ RESPONSIVE ============================ */
/* Mittelgroße Monitore (z.B. 1440px): Sidebar etwas schmaler */
@media (max-width: 1500px) {
    :root { --sidebar-w: 300px; --adslot-w: 160px; }
    .adslot--left { display: none; }
}

/* Laptops (z.B. 1366×768): Werbung rechts weg, kompaktere Sidebar */
@media (max-width: 1300px) {
    :root { --sidebar-w: 280px; --adslot-w: 0px; }
    .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
    .adslot--right { display: none; }
    .topbar { padding: 8px 14px; }
    .topbar__brand { font-size: 17px; }
    .topnav__item { padding: 6px 9px; font-size: 13px; }
    /* Schmale Sidebar: Werte einspaltig, damit Bezeichnung UND Zahl voll sichtbar bleiben. */
    .statlist { grid-template-columns: 1fr; gap: 1px 0; }
}

/* Kleine Laptops (z.B. 1280×720 / 1024): noch schmalere Sidebar, Topnav-Labels weg */
@media (max-width: 1150px) {
    :root { --sidebar-w: 250px; }
    .topnav__label { display: none; }
    .topnav__item { padding: 6px 8px; gap: 0; }
    .topbar { padding: 7px 10px; gap: 8px; }
}

/* Kleine ODER niedrige Fenster: striktes One-Page aufgeben → sauberes, scrollbares,
   gestapeltes Layout. Verhindert das "Kraut-und-Rüben"-Bild auf kleinen Browsern. */
@media (max-width: 1150px), (max-height: 700px) {
    body.game-view { height: auto; overflow: auto; }
    .game-view .layout {
        height: auto; grid-template-columns: 1fr; align-items: start;
        margin: 8px 0 0; padding: 0 8px 24px;
    }
    .game-view .sidebar { height: auto; max-height: none; overflow: visible; padding-bottom: 0; order: 2; }
    .game-view .content { height: auto; max-height: none; overflow: visible; order: 1; }
    .game-view .content > .zone-view { height: auto; overflow: visible; }
    /* Auftragsfenster nicht mehr zwangs-füllen (sonst riesige leere Fläche beim Scrollen) */
    .game-view .content--quests { display: block; }
    .game-view .content--quests > .panel:last-child { flex: none; }
    .game-view .content--quests > .panel:last-child > .panel__body { overflow: visible; }
    .adslot { display: none; }
    /* Chat wird ein normaler Block unten statt fixiert (höhere Spezifität, da Basis-Regeln
       weiter unten in der Datei stehen). */
    .game-view .chat--docked {
        position: static; left: auto; right: auto; width: 100%; max-width: none;
        height: auto; border-radius: 8px; margin-top: 12px;
    }
    .game-view .chat--docked .chat__log { height: 150px; }
    .game-view .chat--docked.is-collapsed { height: auto; }
    /* Werbebanner-Höhe & Footer zurück auf normalen Fluss */
    .game-view .adslot--right .adslot__inner { height: auto; }
    .game-view .game-footer { position: static; width: auto; text-align: right; padding: 8px 2px 0; }
    .game-view .game-footer .legal-links { justify-content: flex-end; gap: 4px 14px; }
    .game-view .game-footer .legal-links a { font-size: 12px; }
    /* Karte: Höhe aus der BREITE ableiten statt aus 100vh (sonst kollabiert sie kurz). */
    .zone-view { flex-direction: column; align-items: stretch; }
    .questlog { flex-basis: auto; width: 100%; max-height: 280px; }
    .worldmap-big .worldmap__grid { width: min(100%, 68vh) !important; max-width: 100% !important; }
    .minimap-frame { width: 130px; }
    .features, .grid--2, .choices--faction, .combat__arena { grid-template-columns: 1fr; }
    .combat__vs { transform: rotate(90deg); }
}

/* Smartphones */
@media (max-width: 560px) {
    .topbar { flex-wrap: wrap; }
    .topnav { order: 3; width: 100%; }
    .minimap-box { top: 8px; right: 8px; left: auto; }
    .minimap-frame { width: 110px; }
    .worldmap__label { font-size: .9em; padding: 4px 8px; }
}

/* Niedrige Bildschirme (kurze Höhe, z.B. 768px): kompaktere Paperdoll/Stats */
@media (max-height: 800px) and (min-height: 701px) and (min-width: 1151px) {
    .paperdoll { padding: 8px 12px 2px; }
    .panel--char .bars { padding: 0 12px 8px; }
    .statlist { padding: 4px 12px 8px; }
    .chat--docked .chat__log { height: 110px; }
}

/* Sehr große / hochauflösende Monitore (ÜBER 2560px, damit 1440p unverändert bleibt):
   feste Chrome-Größen mitskalieren, damit 4K wie ein vergrößertes 1440p wirkt. */
@media (min-width: 2700px) {
    .topbar__brand { font-size: 26px; }
    .topbar__name  { font-size: 18px; }
    .topnav__item  { font-size: 18px; padding: 9px 16px; }
    .topnav__icon  { font-size: 20px; }
    .panel__head   { font-size: 17px; }
    .minimap-frame { width: 210px; }
    .btn           { font-size: 17px; }
    .questlog      { flex-basis: 300px; }
}
@media (min-width: 3400px) {
    .topbar__brand { font-size: 32px; }
    .topbar__name  { font-size: 22px; }
    .topnav__item  { font-size: 23px; padding: 12px 20px; }
    .topnav__icon  { font-size: 26px; }
    .panel__head   { font-size: 21px; }
    .minimap-frame { width: 270px; }
    .btn           { font-size: 21px; padding: 14px 26px; }
    .questlog      { flex-basis: 380px; }
}

/* ============================ CHAT ============================ */
.chat {
    position: fixed; left: 16px; bottom: 12px; width: 480px; max-width: calc(100vw - 32px);
    background: linear-gradient(180deg, rgba(40,30,18,.96), rgba(24,18,10,.96));
    border: 1px solid var(--border-lt); border-radius: 8px; box-shadow: var(--shadow);
    z-index: 50; display: flex; flex-direction: column; backdrop-filter: blur(2px);
    box-sizing: border-box; overflow-x: hidden; /* nichts läuft seitlich aus dem Fenster */
}
.chat * { box-sizing: border-box; }
/* Chat als breiter Streifen unten; Kopf/Filter als LINKE Spalte, Verlauf+Eingabe rechts. */
.chat--docked {
    left: calc(var(--sidebar-w) + 14px);
    right: calc(var(--adslot-w) + 24px); /* Abstand zur Werbung/Impressum rechts */
    bottom: 8px; width: auto; max-width: none;
    height: var(--chat-h);
    border-radius: 10px; overflow: hidden;
    display: grid;
    grid-template-columns: clamp(118px, 12vw, 180px) 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "head log" "head form";
}
/* Kopf links: Titel, Filter (untereinander), Ein-/Ausklappen */
.chat--docked .chat__head {
    grid-area: head; flex-direction: column; align-items: flex-start; gap: 6px;
    height: 100%; overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--border); border-bottom: none;
    border-radius: 0;
}
.chat--docked .chat__filters { flex-direction: column; flex: 0 0 auto; order: 0; width: 100%; }
.chat--docked .chat__toggle { margin-left: 0; order: 0; }
.chat--docked .chat__log { grid-area: log; flex: 1 1 auto; height: auto; min-height: 0; }
/* Eingabe als Zeile unten rechts. */
.chat--docked .chat__form {
    grid-area: form; position: static; left: auto; right: auto; bottom: auto; transform: none;
    width: 100%; max-width: none; z-index: auto;
    border-radius: 0; border: none; border-top: 1px solid var(--border); box-shadow: none;
    background: rgba(0,0,0,.18);
}
/* Eingeklappt: nur Verlauf ausblenden – Kopf & Eingabe bleiben sichtbar. */
.chat--docked.is-collapsed { height: auto; grid-template-rows: auto; grid-template-areas: "head form"; }
.chat--docked.is-collapsed .chat__form { display: flex; }

/* Immer sichtbare Inventarleiste (fest am unteren Rand) */
.invbar {
    position: fixed; left: 50%; bottom: calc(var(--chat-h) + 14px); transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(180deg, rgba(44,33,19,.97), rgba(24,18,10,.97));
    border: 1px solid var(--border-lt); border-bottom: none;
    border-radius: 10px 10px 0 0; box-shadow: 0 -3px 14px rgba(0,0,0,.5);
    padding: 8px 16px; z-index: 60; max-width: calc(100vw - 24px);
}
.invbar__title { font-family: 'Cinzel', serif; color: var(--gold); font-size: 14px; white-space: nowrap; }
.invbar__slots { display: flex; gap: 5px; flex-wrap: nowrap; }
.invbar__slot {
    width: 40px; height: 40px; border-radius: 6px; position: relative;
    border: 1px solid var(--border-lt); background: rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.invbar__slot.is-filled { background: linear-gradient(180deg, #2c2114, #1d1509); border-color: var(--gold-soft); }
.invbar__qty {
    position: absolute; right: -3px; bottom: -3px; background: #1b1308;
    border: 1px solid var(--border-lt); border-radius: 8px; font-size: 10px;
    padding: 0 4px; color: var(--gold); font-family: 'EB Garamond', serif;
}
.invbar__open { white-space: nowrap; }
@media (max-width: 1100px) { .invbar__title, .invbar__open { display: none; } }
.chat__head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 7px 10px;
    background: rgba(0,0,0,.25); border-bottom: 1px solid var(--border);
    font-family: 'Cinzel', serif; color: var(--gold); font-size: 13px; border-radius: 8px 8px 0 0;
}
.chat__head > span:first-child { flex: 0 0 auto; }
.chat__filters {
    display: flex; flex-wrap: wrap; gap: 3px 8px; flex: 1 1 100%; min-width: 0; order: 3;
    font-family: 'EB Garamond', serif; font-size: 11px; color: var(--text-dim);
}
.chat__filter { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.chat__filter input { margin: 0; }
.chat__toggle {
    background: transparent; border: 1px solid var(--border-lt); color: var(--gold);
    border-radius: 4px; width: 24px; height: 22px; cursor: pointer;
    margin-left: auto; flex: 0 0 auto; order: 2;
}
.chat__log {
    height: 180px; overflow-y: auto; padding: 8px 10px; font-size: 13px; line-height: 1.5;
    background: rgba(0,0,0,.15);
}
.chat.is-collapsed .chat__log, .chat.is-collapsed .chat__form, .chat.is-collapsed .chat__filters { display: none; }
.chatmsg { padding: 1px 0; word-wrap: break-word; }
.chatmsg__time { color: #6b5f48; font-size: 11px; }
.chatmsg__ch { font-family: 'Cinzel', serif; font-size: 11px; }
.chatmsg__text { color: var(--text); }
.chatmsg--say     { color: #e7dcc6; }
.chatmsg--shout   { color: #ffba6f; }
.chatmsg--shout .chatmsg__ch { color: #ffba6f; }
.chatmsg--whisper { color: #d6a7ff; }
.chatmsg--whisper .chatmsg__ch { color: #d6a7ff; }
.chatmsg--world   { color: #7fd8ff; }
.chatmsg--world .chatmsg__ch { color: #7fd8ff; }
.chatmsg--sys     { color: #d6675a; font-style: italic; }
.chat__form { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.chat__channel { flex: 0 1 auto; min-width: 0; max-width: 100%; background: #1b1409; border: 1px solid var(--border-lt); color: var(--text); padding: 6px 8px; border-radius: 5px; font-family: inherit; font-size: 13px; }
.chat__input { flex: 1 1 120px; min-width: 0; background: #1b1409; border: 1px solid var(--border-lt); color: var(--text); padding: 6px 10px; border-radius: 5px; font-family: inherit; font-size: 14px; }
.chat__input:focus { outline: none; border-color: var(--gold-soft); }
.chat__send { flex: 0 0 auto; }
@media (max-width: 860px) {
    .chat { left: 6px; right: 6px; width: auto; bottom: 6px; }
    .chat__log { height: 130px; }
}

/* ═══════════════════════════════════════════════════
   Crafting / Berufe
   ═══════════════════════════════════════════════════ */
.bar--craft { height: 18px; }
.bar__fill--craft { background: linear-gradient(90deg, #d97706, #f59e0b); }

/* Berufswahl */
.craft-choose__intro { text-align: center; color: var(--text-dim); margin-bottom: 1rem; }
.craft-choose__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 800px; margin: 0 auto; }
.craft-prof-card {
    background: var(--panel); border: 1px solid var(--border-lt); border-radius: 8px;
    padding: 1.2rem; text-align: center; transition: border-color .2s, transform .15s;
}
.craft-prof-card:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.craft-prof-card__icon { font-size: 2.5rem; margin-bottom: .5rem; }
.craft-prof-card__name { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin-bottom: .4rem; }
.craft-prof-card__desc { font-size: .85rem; color: var(--text-dim); margin-bottom: .8rem; line-height: 1.4; }

/* Rezeptliste */
.craft-recipes { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: .8rem; }
.craft-recipe {
    background: var(--panel); border: 1px solid var(--border-lt); border-radius: 8px;
    padding: 1rem 1.2rem; border-left: 4px solid #888; transition: border-color .2s;
}
.craft-recipe--orange { border-left-color: #f97316; }
.craft-recipe--yellow { border-left-color: #eab308; }
.craft-recipe--green  { border-left-color: #22c55e; }
.craft-recipe--gray   { border-left-color: #6b7280; }
.craft-recipe--locked { border-left-color: #374151; opacity: .55; }

.craft-recipe__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.craft-recipe__icon { font-size: 1.3rem; }
.craft-recipe__name { font-weight: 700; color: var(--gold); flex: 1; }
.craft-recipe__skill { font-size: .8rem; color: var(--text-dim); background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 4px; }

.craft-recipe__result { font-size: .9rem; margin-bottom: .3rem; }
.craft-recipe__desc { font-size: .82rem; color: var(--text-dim); margin-bottom: .5rem; }

.craft-recipe__mats { font-size: .85rem; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.craft-mat { background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.craft-mat--missing { color: #ef4444; background: rgba(239,68,68,.1); }

.craft-recipe__actions { display: flex; align-items: center; gap: .8rem; }

.craft-unlearn { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-lt); }
.btn--danger { background: #991b1b; color: #fca5a5; border: 1px solid #dc2626; }
.btn--danger:hover { background: #b91c1c; }

.craft-empty { text-align: center; color: var(--text-dim); padding: 2rem; }

/* Rarity badges */
.rarity { font-size: .75rem; padding: 1px 6px; border-radius: 3px; }
.rarity--1 { color: #9ca3af; }
.rarity--2 { color: #22c55e; }
.rarity--3 { color: #3b82f6; }
.rarity--4 { color: #a855f7; }
.rarity--5 { color: #f97316; }

/* Compact paperdoll list (sidebar) */
.pd-list { padding: 2px 10px 6px; }
.pd-list__row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; font-size: 12px; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,.04); }
.pd-list__row.is-filled { color: var(--gold); }
.pd-list__row.is-blocked { opacity: .4; }
.pd-list__slot { font-size: 13px; width: 18px; text-align: center; flex-shrink: 0; }
.pd-list__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Compact statlist (sidebar) */
.statlist--compact { grid-template-columns: repeat(4, 1fr); gap: 1px 8px; padding: 4px 10px 6px; }
.statlist--compact .statlist__row { font-size: 11px; padding: 2px 0; border-bottom: none; }

/* Inline resist bar (sidebar + character page) */
.resist-bar { display: flex; flex-wrap: wrap; gap: 3px 4px; padding: 2px 10px 6px; justify-content: center; }
.resist-inline { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ri { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.ri--fire { color: #f97316; }
.ri--water { color: #3b82f6; }
.ri--lightning { color: #eab308; }
.ri--light { color: #facc15; }
.ri--shadow { color: #a78bfa; }
.ri--nature { color: #22c55e; }

/* Talent points inline label */
.talent-pts-inline { float: right; font-size: .8rem; font-weight: 400; color: var(--text-dim); }

/* Stat row separator */
.stat-row--sep { border-top: 1px solid var(--border-lt); margin-top: 4px; padding-top: 4px; }

/* Info box */
.info-box { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.3); border-radius: 6px; padding: 12px 16px; margin: 8px 0; color: var(--text); font-size: .9rem; line-height: 1.5; }
.info-box--warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); }

/* Specialization badge */
.spec-badge { background: rgba(212,175,55,.12); border: 1px solid var(--gold); border-radius: 6px; padding: 8px 14px; margin: 0 0 12px; font-size: .9rem; }
.spec-badge__hint { color: var(--text-dim); font-size: .8rem; margin-left: 8px; }

/* Talent trees: locked (no spec chosen) */
.talent-trees--locked { opacity: .5; pointer-events: none; }

/* Single-tree wide layout */
.talent-tree--wide { max-width: 100%; }
.talent-trees--single .talent-tree__body { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }

/* Trainer specialization UI (NPC dialog) */
.trainer-spec__intro { margin: 0 0 12px; line-height: 1.5; font-size: .9rem; }
.trainer-spec__trees { display: flex; gap: 12px; flex-wrap: wrap; }
.trainer-spec__tree { flex: 1; min-width: 120px; background: var(--panel-bg); border: 2px solid var(--border); border-radius: 8px; padding: 14px 10px; text-align: center; transition: border-color .2s; }
.trainer-spec__tree.is-active { border-color: var(--gold); background: rgba(212,175,55,.08); }
.trainer-spec__icon { font-size: 1.8rem; margin-bottom: 4px; }
.trainer-spec__name { font-family: var(--font-head); font-size: 1rem; margin-bottom: 8px; color: var(--text-bright); }

/* Trainer spell list */
.trainer-spells { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.trainer-spells__head { font-family: var(--font-head); font-size: .95rem; color: var(--gold); margin: 0 0 10px; }
.trainer-spell { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.trainer-spell:last-child { border-bottom: none; }
.trainer-spell.is-learned { opacity: .65; }
.trainer-spell__info { flex: 1; }
.trainer-spell__name { color: var(--text-bright); font-weight: 600; }
.trainer-spell__meta { color: var(--text-dim); font-size: .8rem; }

/* ============================================================================
   LESBARKEIT & RESPONSIVITÄT (Nachtrag)
   Größere, mit der Fensterbreite skalierende Schriften – behebt die sehr
   kleinen Schriften auf großen/hochauflösenden Displays (z. B. Mac/Retina).
   ============================================================================ */
body { font-size: clamp(18px, 0.5vw + 16px, 23px); }

/* Bislang fix kleine UI-Texte mitskalieren lassen */
.topbar__brand        { font-size: clamp(19px, 0.55vw + 16px, 25px); }
.topnav__item         { font-size: clamp(15px, 0.45vw + 13px, 19px); }
.topnav__icon         { font-size: clamp(17px, 0.45vw + 15px, 21px); }
.topbar__char         { font-size: clamp(15px, 0.4vw + 13px, 18px); }
.btn                  { font-size: clamp(15px, 0.45vw + 13px, 18px); }
.btn--sm              { font-size: clamp(14px, 0.35vw + 12px, 16px); }
.statlist, .statlist__row { font-size: clamp(11px, 1.55vh, 16px); }
.charcard__meta-line  { font-size: clamp(11px, 1.5vh, 15px); }
.worldmap__hint       { font-size: clamp(13px, 0.35vw + 12px, 16px); }
.chat__log            { font-size: clamp(14px, 0.35vw + 12px, 16px); }
.chat__head           { font-size: clamp(14px, 0.3vw + 12px, 16px); }
.chat__filters        { font-size: clamp(13px, 0.3vw + 11px, 15px); }
.chat__input, .chat__channel { font-size: clamp(15px, 0.3vw + 13px, 17px); }

/* Topbar bei wenig Platz sauber umbrechen statt überquellen */
@media (max-width: 1080px) {
    .topbar { flex-wrap: wrap; gap: 6px 10px; }
    .topnav { order: 3; width: 100%; }
}

/* ===================== Spieler auf demselben Feld ===================== */
.players-here {
    margin: 10px auto 0; max-width: 640px;
    background: linear-gradient(180deg, rgba(44,33,19,.96), rgba(24,18,10,.96));
    border: 1px solid var(--border-lt); border-radius: 8px;
    padding: 8px 12px; box-shadow: var(--shadow);
}
.players-here.is-empty { opacity: .7; }
.players-here__head {
    font-family: 'Cinzel', serif; color: var(--gold);
    font-size: clamp(14px, 0.35vw + 12px, 16px); margin-bottom: 4px;
}
.players-here__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.players-here__item { color: var(--text); }
.players-here__meta { color: var(--text-dim); font-size: .85em; }
.players-here__none { color: var(--text-dim); font-style: italic; font-size: .9em; }

/* Einladen-Button im „Auf diesem Feld"-Fenster */
.ph-invite {
    margin-left: 8px; padding: 1px 9px; font-size: 12px; cursor: pointer;
    background: linear-gradient(180deg, rgba(64,48,22,.95), rgba(40,29,13,.95));
    border: 1px solid var(--gold-soft); border-radius: 6px; color: #f4e6c4;
    font-family: 'Cinzel', serif; transition: background .12s, box-shadow .12s;
}
.ph-invite:hover { background: linear-gradient(180deg, #6a5026, #463318); box-shadow: 0 0 8px rgba(216,175,85,.4); }
.ph-invite:disabled { opacity: .5; cursor: default; }
.ph-ingroup { margin-left: 6px; }

/* ===================== Gruppen-Panel (Overlay links unter der Position) ===================== */
.party-panel {
    position: absolute; top: 64px; left: 12px; z-index: 7;
    width: 196px; max-width: 42%;
    background: linear-gradient(180deg, rgba(20,15,8,.92), rgba(12,9,5,.92));
    border: 1px solid var(--gold-soft); border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,.55); backdrop-filter: blur(2px);
    padding: 6px 8px 8px;
}
.party-panel__head {
    display: flex; align-items: center; justify-content: space-between;
    font-family: 'Cinzel', serif; color: var(--gold); font-size: 13px;
    margin-bottom: 5px; border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
.party-panel__leave {
    cursor: pointer; font-size: 11px; color: var(--text-dim);
    background: none; border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px;
}
.party-panel__leave:hover { color: #ff9b8a; border-color: #7a3a30; }
.party-panel__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.party-member { font-size: 12px; color: var(--text); }
.party-member.is-self .party-member__name { color: var(--gold); }
.party-member.is-offline { opacity: .5; }
.party-member__name { display: flex; align-items: center; gap: 3px; margin-bottom: 2px; }
.party-member__leader { color: var(--gold); }
.party-member__lvl { color: var(--text-dim); font-size: 10px; margin-left: auto; }
.party-member__bars { display: flex; flex-direction: column; gap: 2px; }
.party-bar {
    position: relative; height: 11px; border-radius: 4px; overflow: hidden;
    background: rgba(0,0,0,.5); border: 1px solid rgba(0,0,0,.4);
}
.party-bar__fill { position: absolute; inset: 0; border-radius: 3px; }
.party-bar__fill--hp     { background: linear-gradient(180deg, #6fd06f, #3f9b3f); }
.party-bar__fill--mana   { background: linear-gradient(180deg, var(--mana-2), var(--mana)); }
.party-bar__fill--energy { background: linear-gradient(180deg, #e0c44e, var(--energy)); }
.party-bar__fill--rage   { background: linear-gradient(180deg, #d6564a, var(--rage)); }
.party-bar__txt {
    position: relative; z-index: 1; display: block; text-align: center;
    font-size: 9px; line-height: 11px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.8);
}

/* ===================== Gruppen-Einladung (Prompt) ===================== */
.invite-prompt {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index: 120;
}
.invite-prompt__box {
    background: linear-gradient(180deg, rgba(40,30,14,.98), rgba(22,16,8,.98));
    border: 2px solid var(--gold-soft); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 18px rgba(216,175,85,.3);
    padding: 12px 16px; min-width: 280px; text-align: center;
}
.invite-prompt__text { color: #f4e6c4; margin-bottom: 10px; font-size: 14px; }
.invite-prompt__actions { display: flex; gap: 10px; justify-content: center; }

/* ===================== Footer & Rechtliches ===================== */
.legal-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
    margin-bottom: 6px;
}
.legal-links a { color: var(--text-dim); font-size: clamp(13px, 0.3vw + 12px, 15px); }
.legal-links a:hover { color: var(--gold); }

/* Im Spiel ist der Body auf 100vh fixiert (overflow:hidden) – ein normaler Footer
   würde abgeschnitten. Daher als kleine, fixe Leiste unten rechts einblenden. */
/* Sitzt exakt in der Werbespalte (gleiche Breite), ganz unten rechts – direkt UNTER der
   Werbung und rechts vom Chat, damit nichts überlappt. Schrift klein. */
.game-footer {
    position: fixed; right: 8px; bottom: 6px; z-index: 60;
    width: var(--adslot-w);
    background: none; backdrop-filter: none; padding: 0;
}
.game-footer .legal-links { margin: 0; justify-content: flex-end; gap: 1px 8px; }
.game-footer .legal-links a { font-size: 10px; }
/* Schmale Fenster ohne Werbespalte: Links trotzdem sichtbar lassen. */
@media (max-width: 1300px) { .game-footer { width: auto; } }

.legal {
    max-width: 760px; margin: 0 auto; text-align: left;
    background: var(--panel); border: 1px solid var(--border-lt);
    border-radius: 8px; padding: 22px 26px; box-shadow: var(--shadow);
}
.legal h1 { color: var(--gold); margin-top: 0; }
.legal h2 { color: var(--gold-soft); font-size: 1.15em; margin: 1.2em 0 .3em; }
.legal p { margin: .4em 0; }
.legal ul { margin: .4em 0 .6em; padding-left: 1.3em; }
.legal li { margin: .25em 0; }
.legal strong { color: var(--gold-soft); }
.legal em { color: var(--text-dim); }
.legal__note { color: var(--text-dim); font-style: italic; font-size: .9em; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 16px; }

/* "Auf diesem Feld" – NPC-Einträge anklickbar */
.players-here__item { display: flex; align-items: center; gap: 6px; }
.ph-glyph { font-size: 1.1em; }
.players-here__npc { cursor: pointer; border-radius: 6px; padding: 3px 6px; margin: 0 -6px; transition: background .12s ease; }
.players-here__npc:hover { background: rgba(216,175,85,.14); }
.players-here__npc .players-here__meta { color: var(--gold-soft); }

/* ============================ SESSION-SPERRE ============================ */
/* Vollbild-Overlay, wenn anderswo / mit anderem Charakter eingeloggt wurde. */
.session-lock {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(8, 6, 3, .82); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: session-fade .25s ease;
}
@keyframes session-fade { from { opacity: 0; } to { opacity: 1; } }
.session-lock__box {
    max-width: 460px; width: 100%; text-align: center;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 2px solid var(--gold-soft); border-radius: 12px;
    padding: 32px 34px; box-shadow: 0 12px 48px rgba(0, 0, 0, .75);
}
.session-lock__icon { font-size: 48px; line-height: 1; filter: drop-shadow(0 0 10px rgba(216,175,85,.4)); }
.session-lock__title { font-family: 'Cinzel', serif; color: var(--gold); font-size: 23px; margin: 14px 0 10px; }
.session-lock__msg { color: var(--text); font-size: 16px; line-height: 1.5; margin-bottom: 22px; }

/* ============================ BERUFE-SEITE ============================ */
.prof-card { background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.prof-card__head { display: flex; align-items: center; gap: 10px; }
.prof-card__icon { font-size: 24px; line-height: 1; }
.prof-card__title { font-family: 'Cinzel', serif; color: var(--gold); font-size: 16px; flex: 1; }
.prof-card__skill { color: var(--text-dim); font-size: 13px; }
.prof-card__bar { height: 12px; background: rgba(0,0,0,.35); border-radius: 4px; overflow: hidden; margin: 8px 0 10px; }
.prof-card__fill { height: 100%; transition: width .3s ease; }
.prof-card__search { width: 100%; padding: 7px 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 5px; background: rgba(0,0,0,.3); color: var(--text); font-family: inherit; }
.prof-card__empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 10px; }
.prof-recipes { display: flex; flex-direction: column; gap: 7px; max-height: 360px; overflow-y: auto; }
.prof-recipe { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.22); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; }
.prof-recipe.is-locked { opacity: .6; }
.prof-recipe__icon { font-size: 20px; line-height: 1; }
.prof-recipe__info { flex: 1; min-width: 0; }
.prof-recipe__name { color: var(--text); font-weight: 600; font-size: 14px; }
.prof-recipe__mats { color: var(--text-dim); font-size: 12px; }
.prof-teachers { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; color: var(--text); font-size: 15px; }

/* Angel-Hinweis unter der Karte */
.fishing-hint {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 10px; padding: 11px 16px; border-radius: 8px;
    background: linear-gradient(180deg, rgba(16,28,52,.97), rgba(10,18,34,.97));
    border: 2px solid #5a93e6;
    box-shadow: 0 8px 22px rgba(0,0,0,.6), 0 0 16px rgba(63,120,214,.3);
}
.fishing-hint__text { color: #d8e6ff; font-size: 14px; font-weight: 600; }
/* hidden-Attribut muss display:flex der Klasse schlagen, sonst bleibt der Hinweis immer sichtbar */
.fishing-hint[hidden], .gather-hint[hidden] { display: none !important; }
.fishing-cast { flex: 1 1 100%; }
.fishing-cast__bar { height: 14px; background: rgba(0,0,0,.45); border-radius: 7px; overflow: hidden; border: 1px solid #3f78d6; }
.fishing-cast__fill { height: 100%; width: 0; background: linear-gradient(90deg, #2f5caa, #7fc3ff); box-shadow: 0 0 8px rgba(127,195,255,.5); }
.fishing-cast__label { font-size: 12px; color: var(--text-dim); margin-top: 4px; text-align: center; }

/* Generischer Sammel-Hinweis (Angeln/Bergbau/Kräuterkunde) */
.gather-hint { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gather-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px; border-radius: 8px;
    /* Kräftiger, dunkler Hintergrund + Gold-Rahmen & -Schein: hebt sich klar von der Karte ab. */
    background: linear-gradient(180deg, rgba(40,29,13,.97), rgba(22,16,8,.97));
    border: 2px solid var(--gold-soft);
    box-shadow: 0 8px 22px rgba(0,0,0,.6), 0 0 16px rgba(216,175,85,.28);
    color: #f4e6c4; font-weight: 600;
}
.gather-cast { padding: 10px 14px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--gold-soft); }
.gather-cast__bar { height: 16px; background: rgba(0,0,0,.45); border-radius: 8px; overflow: hidden; border: 1px solid var(--gold-soft); }
.gather-cast__fill { height: 100%; width: 0; background: linear-gradient(90deg, #9b7a31, #e0b659); box-shadow: 0 0 8px rgba(224,182,89,.5); }
.gather-cast__label { font-size: 12px; color: var(--text-dim); margin-top: 4px; text-align: center; }

/* Craftbar-Box im Item-Editor */
.craft-box { border: 1px solid var(--gold-soft); border-radius: 8px; padding: 12px 14px; background: rgba(216,175,85,.06); margin-top: 6px; }
.craft-box__toggle { margin-bottom: 10px; }
.craft-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.craft-mats { margin-top: 12px; }
.craft-mats__head { font-family: 'Cinzel', serif; color: var(--gold); font-size: 13px; margin-bottom: 6px; }
.craft-mats__row { display: flex; gap: 8px; margin-bottom: 6px; }
.craft-mats__row select { flex: 1; }
.craft-mats__row input { width: 80px; }

/* Item-Filter (Admin) */
.item-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.item-filter__input { flex: 1; min-width: 180px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: rgba(0,0,0,.3); color: var(--text); font-family: inherit; }
.item-filter__sel { padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: rgba(0,0,0,.3); color: var(--text); }
.item-filter__count { color: var(--text-dim); font-size: 13px; margin-left: auto; }

/* Verlernen-Button auf der Berufe-Seite */
.prof-card__unlearn { background: rgba(156,59,46,.25); border-color: #b85543; color: #f0cabf; font-size: 11px; padding: 4px 8px; }
.prof-card__unlearn:hover { background: rgba(156,59,46,.45); border-color: #d6564a; color: #fff; }

/* Mülleimer im Inventar */
.trash-bin {
    margin-top: 14px; display: flex; align-items: center; gap: 12px; justify-content: center;
    padding: 14px; border: 2px dashed #8a4034; border-radius: 10px;
    background: rgba(156,59,46,.10); color: var(--text-dim); transition: all .15s ease;
}
.trash-bin.is-over { border-color: #d6564a; background: rgba(156,59,46,.30); color: #f0cabf; transform: scale(1.02); }
.trash-bin__icon { font-size: 30px; line-height: 1; }
.trash-bin__text { font-family: 'Cinzel', serif; font-size: 14px; }
.trash-bin__text small { font-family: 'EB Garamond', serif; opacity: .8; }

/* Craft-Fortschrittsbalken (Herstellungszeit) */
.craft-progress { position: relative; width: 110px; height: 24px; border: 1px solid var(--gold-soft); border-radius: 5px; overflow: hidden; background: rgba(0,0,0,.4); }
.craft-progress__fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #9b7a31, #e0b659); }
.craft-progress__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
