:root {
  --wood: #2b1d14; --wood2: #3d2a1c; --wood3: #5a3f28; --parch: #f3e7c9; --parch2: #e7d5ac; --ink: #36271a; --ink2: #6b563c;
  --gold: #e0b23c; --gold2: #f4d77a; --red: #a3272b; --green: #4f7a3a; --blue: #3f5f8f;
  --sab: env(safe-area-inset-bottom, 0px); --sat: env(safe-area-inset-top, 0px);
  --nav-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b2748; color: var(--ink); font-family: 'Alegreya', Georgia, 'Times New Roman', serif; font-size: 16px; overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: var(--ink); user-select: text; -webkit-user-select: text; }
h1, h2, h3 { font-family: 'Cinzel', Georgia, serif; margin: 0; }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- Namensschilder & Sprechblasen ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; will-change: transform; }
.lbl .nm { display: inline-block; font-weight: 700; font-size: 13px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,.7); letter-spacing: .2px; }
.lbl.noble .nm { color: var(--gold2); }
.lbl.me .nm { color: #bfe8a0; }
.lbl.npc .nm { color: #ffe9b8; font-style: italic; font-weight: 500; }
.lbl.mob .nm { color: #ffc9b0; font-weight: 500; }
.lbl .job { font-size: 10.5px; color: rgba(255,255,255,.82); text-shadow: 0 1px 2px #000; margin-top: -2px; }
.lbl .hpb { width: 46px; height: 5px; margin: 2px auto 0; background: rgba(0,0,0,.55); border-radius: 3px; overflow: hidden; }
.lbl .hpb i { display: block; height: 100%; background: #6fc04a; }
.lbl .bubble { display: block; max-width: 210px; white-space: normal; margin: 0 auto 4px; padding: 5px 10px; background: var(--parch); color: var(--ink); border-radius: 12px; font-size: 14px; line-height: 1.2; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 1px solid rgba(90,63,40,.5); width: max-content; }
.float { position: absolute; left: 0; top: 0; font-weight: 700; font-size: 15px; text-shadow: 0 1px 2px #000, 0 0 5px rgba(0,0,0,.6); white-space: nowrap; animation: floatUp 1.3s ease-out forwards; }
.float.dmg { color: #fff; background: var(--red); border: 2px solid #f4d77a; border-radius: 50%; min-width: 26px; height: 26px; line-height: 22px; text-align: center; text-shadow: none; font-size: 14px; }
.float.miss { background: #56708f; }
.float.xp { color: #cfeaa0; } .float.got { color: #ffe9a8; }
@keyframes floatUp { from { opacity: 1; margin-top: 0; } 70% { opacity: 1; } to { opacity: 0; margin-top: -46px; } }

/* ---------- HUD ---------- */
#hud > * { position: fixed; }
.woodbox { background: linear-gradient(#4a3322, #2f2015); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(224,178,60,.35), 0 3px 10px rgba(0,0,0,.4); color: var(--parch); }
#plate { left: 10px; top: calc(10px + var(--sat)); display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 30px 14px 14px 30px; background: linear-gradient(#4a3322, #2f2015); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(224,178,60,.35), 0 3px 10px rgba(0,0,0,.4); color: var(--parch); max-width: calc(100vw - 150px); }
#crest { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: radial-gradient(circle at 35% 30%, #f6e9c8, #cdb27a); border: 2px solid var(--gold); }
.plate-main { min-width: 0; }
#pname { font-weight: 700; font-size: 15px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#prank { font-size: 12px; color: var(--gold2); line-height: 1.2; white-space: nowrap; }
.hpbar { position: relative; width: 118px; max-width: 100%; height: 13px; margin-top: 3px; background: #1c120b; border-radius: 7px; overflow: hidden; border: 1px solid rgba(0,0,0,.6); }
.hpbar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(#d9534f, #a3272b); transition: width .3s; }
.hpbar span { position: absolute; inset: 0; font-size: 10px; line-height: 12px; text-align: center; color: #fff; font-weight: 700; }
#coins { display: flex; flex-direction: column; align-items: center; font-size: 13px; line-height: 1.1; padding-left: 4px; }
#coins b { color: var(--gold2); font-size: 14px; }
#quest { left: 10px; top: calc(74px + var(--sat)); max-width: min(300px, calc(100vw - 150px)); text-align: left; padding: 6px 12px; border-radius: 10px; background: rgba(243,231,201,.93); border: 1px solid var(--wood3); font-size: 13.5px; line-height: 1.25; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#quest b { font-family: 'Cinzel', serif; font-size: 10.5px; letter-spacing: .6px; color: var(--red); display: block; text-transform: uppercase; }
#mini-wrap { right: 10px; top: calc(10px + var(--sat)); width: 112px; height: 112px; }
#mini { width: 112px; height: 112px; border-radius: 50%; border: 3px solid #2b1d14; box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0,0,0,.45); background: #4f9fc4; display: block; }
#clock { position: absolute; left: -8px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: linear-gradient(#4a3322, #2f2015); border: 2px solid var(--gold); }
.round { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: linear-gradient(#4a3322, #2f2015); border: 2px solid var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
#btn-settings { position: absolute; right: -6px; bottom: -6px; }

#toasts { left: 50%; top: calc(132px + var(--sat)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 7px 14px; border-radius: 10px; background: rgba(43,29,20,.92); color: var(--parch); font-size: 14.5px; text-align: center; border: 1px solid rgba(224,178,60,.5); animation: toastIn .25s ease-out, toastOut .4s ease-in 3.4s forwards; }
.toast.good { border-color: #8fc06a; color: #e3f5cf; } .toast.bad { border-color: #d9534f; color: #ffd9d4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } } @keyframes toastOut { to { opacity: 0; } }

#busy { left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 96px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 20px; background: rgba(43,29,20,.93); color: var(--parch); border: 1px solid var(--gold); font-size: 14px; white-space: nowrap; }
#busy .bar { width: 70px; height: 6px; border-radius: 3px; background: #1c120b; overflow: hidden; }
#busy .bar i { display: block; height: 100%; width: 0; background: var(--gold); }
#busy-stop { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; }

#asks { left: 50%; top: calc(180px + var(--sat)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 360px); }
.ask { background: var(--parch); border: 2px solid var(--wood3); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.45); font-size: 15px; }
.ask .row { display: flex; gap: 8px; margin-top: 8px; }

#chatlog { left: 10px; bottom: calc(var(--nav-h) + var(--sab) + 10px); width: min(72vw, 380px); max-height: 92px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; font-size: 14px; line-height: 1.25; }
#chatlog.open { max-height: 44vh; overflow-y: auto; pointer-events: auto; background: rgba(43,29,20,.82); border-radius: 12px; padding: 8px 10px; bottom: calc(var(--nav-h) + var(--sab) + 58px); justify-content: flex-start; touch-action: pan-y; }
.cl { color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px rgba(0,0,0,.8); padding: 1px 0; overflow-wrap: anywhere; }
.cl b { color: #cfe6ff; } .cl.g b { color: #ffd98a; } .cl.g::before { content: '📣 '; } .cl.s { color: #ffe9a8; font-style: italic; } .cl.noble b { color: var(--gold2); }
#chatlog:not(.open) .cl { animation: fadeLine 14s forwards; } @keyframes fadeLine { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#chatbar { left: 10px; right: 10px; bottom: calc(var(--nav-h) + var(--sab) + 8px); display: flex; gap: 6px; max-width: 520px; }
#chatbar input { flex: 1; min-width: 0; height: 42px; border-radius: 21px; border: 2px solid var(--wood3); background: var(--parch); padding: 0 16px; font-size: 16px; outline: none; }
#chatbar button { height: 42px; min-width: 42px; padding: 0 12px; border-radius: 21px; background: linear-gradient(#4a3322, #2f2015); color: var(--parch); border: 2px solid var(--gold); font-weight: 700; font-size: 14px; }

#nav { left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--sab)); padding: 0 6px var(--sab); display: flex; justify-content: center; gap: 4px; background: linear-gradient(#4a3322, #2b1d14); border-top: 2px solid #1c120b; box-shadow: inset 0 2px 0 rgba(224,178,60,.4), 0 -4px 14px rgba(0,0,0,.35); }
#nav button { flex: 1; max-width: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--parch2); font-size: 12px; font-weight: 500; border-radius: 10px; margin: 5px 0; }
#nav button span { font-size: 23px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
#nav button.on { background: rgba(224,178,60,.2); color: var(--gold2); box-shadow: inset 0 0 0 1px rgba(224,178,60,.5); }

/* ---------- Panels (Bottom-Sheet am Handy, Fenster am PC) ---------- */
#panel { left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab)); max-height: min(58vh, 520px); display: flex; flex-direction: column; background: var(--parch); border-top: 3px solid var(--wood3); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.45); animation: sheetUp .2s ease-out; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0; } }
#panel header, #modal-card header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; border-bottom: 1px solid rgba(90,63,40,.3); flex: none; }
#panel h2, #modal-card h2 { font-size: 17px; color: var(--wood2); letter-spacing: .5px; }
#panel-x, #modal-x { width: 32px; height: 32px; border-radius: 50%; background: var(--wood2); color: var(--parch); font-size: 14px; }
#panel-body, #modal-body { overflow-y: auto; padding: 12px 14px 16px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) {
  #panel { left: auto; right: 14px; bottom: calc(var(--nav-h) + 14px); width: 380px; border-radius: 14px; border: 3px solid var(--wood3); max-height: min(70vh, 620px); }
  #nav { left: 50%; right: auto; transform: translateX(-50%); bottom: 10px; border-radius: 16px; border: 2px solid #1c120b; padding: 0 10px; width: 470px; }
  #chatlog { bottom: 88px; } #chatbar { right: auto; width: 380px; bottom: 88px; } #chatlog.open { bottom: 140px; }
  #busy { bottom: 100px; }
  #mini-wrap, #mini { width: 150px; height: 150px; }
  #quest { max-width: 320px; }
}

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.slot { position: relative; aspect-ratio: 1; border-radius: 9px; background: linear-gradient(#e2cf9f, #d4bd85); border: 1.5px solid #b79a5f; display: grid; place-items: center; font-size: 25px; min-width: 0; }
.slot.empty { background: rgba(183,154,95,.18); border-style: dashed; }
.slot.sel { box-shadow: 0 0 0 3px var(--red); }
.slot .tint { position: absolute; inset: 3px; border-radius: 7px; opacity: .5; }
.slot .ic { position: relative; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.slot .q { position: absolute; right: 3px; bottom: 1px; font-size: 11.5px; font-weight: 700; color: var(--ink); background: rgba(243,231,201,.9); border-radius: 5px; padding: 0 3px; line-height: 1.25; }
.equip { display: flex; gap: 8px; margin-bottom: 10px; }
.equip .eq { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(183,154,95,.25); border: 1.5px solid #b79a5f; font-size: 13.5px; text-align: left; min-width: 0; }
.equip .eq .slot { width: 38px; flex: none; font-size: 20px; }
.equip .eq small { display: block; color: var(--ink2); font-size: 11px; }
.detail { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.4); border: 1px solid rgba(90,63,40,.25); }
.detail h3 { font-size: 15px; } .detail p { margin: 3px 0 8px; font-size: 14px; color: var(--ink2); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { min-height: 40px; padding: 0 14px; border-radius: 10px; background: linear-gradient(#5a3f28, #3d2a1c); color: var(--parch); font-weight: 700; font-size: 14.5px; border: 1.5px solid #1c120b; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.btn.gold, .primary { background: linear-gradient(#f0c858, #cf9c2c); color: #3a2608; border-color: #8a6614; }
.btn.red { background: linear-gradient(#b8383a, #8a2023); }
.btn.ghost { background: transparent; color: var(--wood2); border-color: var(--wood3); box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 13.5px; }
.btn:disabled { opacity: .45; }
.btn:active { transform: translateY(1px); }
.muted { color: var(--ink2); font-size: 13.5px; }
.skill { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(90,63,40,.18); }
.skill .ic { font-size: 24px; width: 34px; text-align: center; }
.skill .mid { flex: 1; min-width: 0; } .skill .nm { font-weight: 700; display: flex; justify-content: space-between; }
.xpbar { height: 7px; border-radius: 4px; background: rgba(90,63,40,.25); overflow: hidden; margin-top: 3px; } .xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #6f9f4a, #a8cf6a); }
.skill small { color: var(--ink2); font-size: 11.5px; }
.emotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.emotes button { padding: 10px 4px; border-radius: 12px; background: linear-gradient(#e2cf9f, #d4bd85); border: 1.5px solid #b79a5f; font-size: 14px; font-weight: 500; }
.emotes button span { display: block; font-size: 28px; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; background: rgba(90,63,40,.15); border-radius: 10px; padding: 3px; }
.tabs button { flex: 1; padding: 7px 4px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.tabs button.on { background: var(--wood2); color: var(--parch); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(90,63,40,.18); font-size: 14.5px; }
.li .ic { font-size: 22px; width: 30px; text-align: center; flex: none; position: relative; }
.li .mid { flex: 1; min-width: 0; } .li .mid b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .li .mid small { color: var(--ink2); font-size: 12px; display: block; }
.li .price { font-weight: 700; color: #8a5a10; white-space: nowrap; }
.li.off { opacity: .5; }
.rk { display: inline-block; min-width: 22px; font-weight: 700; color: var(--ink2); }
.kingdom { text-align: center; padding: 4px 0 10px; } .kingdom .big { font-size: 40px; line-height: 1; } .kingdom h3 { font-size: 16px; margin-top: 4px; }
.decree { margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.45); border-left: 4px solid var(--red); font-style: italic; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.stats div { padding: 7px 4px; border-radius: 8px; background: rgba(183,154,95,.25); text-align: center; font-size: 12px; color: var(--ink2); } .stats b { display: block; font-size: 17px; color: var(--ink); }
.fld { width: 100%; height: 42px; border-radius: 10px; border: 1.5px solid #b79a5f; background: #fbf4df; padding: 0 12px; font-size: 16px; outline: none; }
textarea.fld { height: 80px; padding: 8px 12px; resize: none; }
label.lab { display: block; font-size: 12.5px; color: var(--ink2); margin: 8px 0 3px; font-weight: 700; }
.qty { display: flex; gap: 4px; } .qty button { min-width: 38px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-col { border-radius: 10px; padding: 8px; background: rgba(255,255,255,.4); border: 1.5px solid #b79a5f; min-height: 96px; }
.trade-col.ok { border-color: var(--green); background: rgba(111,159,74,.2); }
.trade-col h4 { margin: 0 0 6px; font-size: 13px; font-family: 'Cinzel', serif; }
.trade-col .grid { grid-template-columns: repeat(3, 1fr); }
.talk { display: flex; gap: 12px; align-items: flex-start; } .talk .face { font-size: 44px; line-height: 1; } .talk p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.35; }

#ctx { min-width: 190px; background: var(--parch); border: 2px solid var(--wood3); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5); overflow: hidden; z-index: 30; }
#ctx .head { padding: 8px 12px; background: var(--wood2); color: var(--parch); font-weight: 700; font-size: 14.5px; } #ctx .head small { display: block; color: var(--gold2); font-weight: 400; font-size: 12px; }
#ctx button { display: block; width: 100%; text-align: left; padding: 11px 14px; font-size: 15px; border-bottom: 1px solid rgba(90,63,40,.15); }
#ctx button:active { background: rgba(224,178,60,.3); }

#modal { position: fixed; inset: 0; background: rgba(15,10,6,.5); display: grid; place-items: end center; z-index: 40; }
#modal-card { width: min(100vw, 460px); max-height: 82vh; display: flex; flex-direction: column; background: var(--parch); border: 3px solid var(--wood3); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); animation: sheetUp .2s ease-out; padding-bottom: var(--sab); }
@media (min-width: 760px) { #modal { place-items: center; } #modal-card { border-bottom: 3px solid var(--wood3); border-radius: 16px; } }

/* ---------- Start ---------- */
#login { position: fixed; inset: 0; display: grid; place-items: end center; background: linear-gradient(rgba(12,20,54,.05) 30%, rgba(20,12,6,.55)); z-index: 50; overflow-y: auto; touch-action: pan-y; }
.login-card { width: min(100vw, 430px); background: var(--parch); border: 3px solid var(--wood3); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 16px 20px calc(18px + var(--sab)); box-shadow: 0 -10px 50px rgba(0,0,0,.55); }
@media (min-width: 760px), (min-height: 900px) { #login { place-items: center; } .login-card { border-bottom: 3px solid var(--wood3); border-radius: 22px; } }
.logo { text-align: center; } .logo-crest { font-size: 38px; line-height: 1; display: block; }
.logo h1 { font-size: 34px; font-weight: 800; color: var(--wood2); letter-spacing: 2px; line-height: 1.1; text-shadow: 0 1px 0 #fff8; }
.logo p { margin: 0; color: var(--red); font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
#login-loading { text-align: center; padding: 22px 0 10px; color: var(--ink2); font-style: italic; }
.pitch { font-size: 15px; line-height: 1.35; margin: 10px 0 12px; text-align: center; color: var(--ink); }
.field { display: flex; align-items: center; height: 50px; border-radius: 12px; border: 2px solid var(--wood3); background: #fbf4df; overflow: hidden; }
.field span { width: 42px; text-align: center; font-weight: 700; font-size: 20px; color: var(--ink2); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 18px; }
.creator { display: flex; gap: 10px; align-items: center; margin: 10px 0 4px; }
#preview { width: 110px; height: 140px; flex: none; border-radius: 12px; background: radial-gradient(circle at 50% 70%, #cfe2b0, #9fc0d8); border: 2px solid #b79a5f; }
.swatches { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sw-row { display: flex; align-items: center; gap: 5px; } .sw-row small { width: 46px; flex: none; font-size: 11.5px; color: var(--ink2); font-weight: 700; }
.sw-row .opts { display: flex; gap: 4px; flex-wrap: wrap; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); } .sw.on { box-shadow: 0 0 0 2px var(--parch), 0 0 0 4px var(--red); }
.sw.txt { width: auto; padding: 0 8px; border-radius: 12px; font-size: 12px; background: #e2cf9f; }
#login-err { min-height: 20px; color: var(--red); font-size: 14px; text-align: center; font-weight: 700; }
.primary { width: 100%; height: 52px; border-radius: 13px; font-family: 'Cinzel', serif; font-weight: 800; font-size: 17px; letter-spacing: .5px; border: 2px solid #8a6614; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #8a6614; }
.primary:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 0 #8a6614; }
.slots { text-align: center; font-size: 13.5px; color: var(--ink2); margin-top: 10px; } .slots b { color: var(--red); }
#lost { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 14px 22px; border-radius: 12px; background: rgba(43,29,20,.95); color: var(--parch); border: 2px solid var(--gold); z-index: 60; font-size: 16px; }

/* ---------- Zunft-, Flüster- und Amtsanzeigen ---------- */
.cl.z b { color: #b8e6a0; } .cl.z::before { content: '⚒️ '; }
.cl.w { color: #f3d4ff; } .cl.w b { color: #e3b0ff; }
.lbl:not(.npc) .job { color: var(--gold2); font-style: italic; font-size: 11px; }
select.fld { appearance: auto; }

/* ---------- Große Welt: Gebietsanzeige, Karte, Aufgabenbuch ---------- */
#zone { left: 50%; top: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: zoneIn 4.5s ease forwards; white-space: nowrap; }
#zone b { display: block; font-family: 'Cinzel', serif; font-weight: 800; font-size: clamp(22px, 5.4vw, 38px); color: #fff3d0; letter-spacing: 2px; text-shadow: 0 2px 0 #2b1d14, 0 0 6px #2b1d14, 0 0 22px rgba(0,0,0,.9); -webkit-text-stroke: 1px rgba(43,29,20,.55); }
#zone span { display: inline-block; margin-top: 4px; padding: 2px 14px; border-radius: 12px; background: rgba(43,29,20,.8); color: var(--gold2); font-size: 14px; border: 1px solid rgba(224,178,60,.6); }
#zone.pvp b { color: #ffb0a0; } #zone.pvp span { background: rgba(120,20,20,.85); color: #fff; }
@keyframes zoneIn { 0% { opacity: 0; margin-top: 14px; } 12%, 78% { opacity: 1; margin-top: 0; } 100% { opacity: 0; } }
.lbl.mob .job { color: #ffd9c8; font-size: 10px; } .lbl.boss .nm { color: #ff9a7a; font-size: 16px; font-family: 'Cinzel', serif; }
#mini { cursor: pointer; } #quest { cursor: pointer; }
.task { padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.42); border: 1px solid rgba(90,63,40,.25); margin-bottom: 8px; }
.task h4 { margin: 0; font-size: 14.5px; font-family: 'Cinzel', serif; color: var(--wood2); display: flex; justify-content: space-between; gap: 8px; }
.task p { margin: 2px 0 5px; font-size: 14px; } .task small { color: var(--ink2); font-size: 12.5px; display: block; }
.task.ok { border-color: var(--green); background: rgba(111,159,74,.2); } .task.done { opacity: .55; }
.sec { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin: 12px 0 6px; }
.sec:first-child { margin-top: 0; }
#worldmap { width: 100%; aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--wood3); display: block; background: #4f9fc4; }
.maplegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink2); margin-top: 8px; }
.bank-cols { display: grid; grid-template-columns: 1fr; gap: 10px; } .bank-cols .grid { grid-template-columns: repeat(6, 1fr); }

/* ---------- Geführter Einstieg, Berufungen, Fähigkeiten, Ereignisse ---------- */
#quest small { display: block; margin-top: 3px; color: var(--ink2); font-size: 12px; line-height: 1.25; font-style: italic; }
#guide { left: 10px; top: calc(150px + var(--sat)); display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 20px; background: rgba(43,29,20,.9); color: var(--parch); border: 1px solid var(--gold); font-size: 13.5px; font-weight: 700; pointer-events: none; }
#guide.hot { border-color: #ff6a3a; width: auto; height: auto; }
#guide-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(#f0c858, #cf9c2c); color: #3a2608; font-size: 18px; transition: transform .12s linear; }
#guide.hot #guide-arrow { background: linear-gradient(#ff8a5a, #d9432a); color: #fff; }
#event { right: 10px; top: calc(134px + var(--sat)); max-width: 190px; text-align: left; padding: 6px 10px; border-radius: 10px; background: rgba(120,25,20,.92); color: #fff; border: 1px solid #ff8a5a; font-size: 12.5px; line-height: 1.25; box-shadow: 0 2px 8px rgba(0,0,0,.4); animation: evPulse 1.6s ease-in-out infinite; }
#event b { display: block; font-size: 13px; }
@keyframes evPulse { 50% { box-shadow: 0 0 0 4px rgba(255,138,90,.35), 0 2px 8px rgba(0,0,0,.4); } }
#hotbar { right: 10px; bottom: calc(var(--nav-h) + var(--sab) + 14px); display: flex; gap: 8px; }
#hotbar.wrong .hot { filter: grayscale(.8); }
.hot { position: relative; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6a4a30, #2b1d14); border: 2px solid var(--gold); box-shadow: 0 3px 10px rgba(0,0,0,.5), inset 0 0 0 2px rgba(0,0,0,.35); overflow: hidden; display: grid; place-items: center; }
.hot-ic { font-size: 27px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); position: relative; z-index: 1; }
.hot-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(10,8,6,.72); z-index: 2; }
.hot b { position: absolute; right: 5px; top: 3px; font-size: 10.5px; color: var(--gold2); z-index: 3; text-shadow: 0 1px 2px #000; }
.hot em { display: none; }
.hot.locked { filter: grayscale(1) brightness(.7); } .hot.cool { border-color: #6b563c; }
.hot:active { transform: scale(.94); }
@media (min-width: 760px) { #hotbar { right: 20px; bottom: 96px; } .hot { width: 64px; height: 64px; } #guide { top: 158px; } #event { top: 176px; right: 14px; } }
.cls { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.45); border: 1.5px solid #b79a5f; margin-bottom: 8px; }
.cls.cur { border-color: var(--green); background: rgba(111,159,74,.2); }
.cls-ic { font-size: 34px; width: 46px; text-align: center; flex: none; line-height: 1.1; }
.cls-mid { flex: 1; min-width: 0; } .cls h4 { margin: 0; font-family: 'Cinzel', serif; font-size: 16px; color: var(--wood2); } .cls h4 small { font-family: 'Alegreya', serif; font-weight: 500; color: var(--red); font-size: 13px; }
.cls p { margin: 2px 0 4px; font-size: 14px; } .cls ul { margin: 0 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink2); }
.cls-sk { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; } .cls-sk span { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(90,63,40,.14); }
.unlocks { padding: 4px 0 8px 44px; } .ul { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; color: var(--ink2); } .ul.ok { color: var(--ink); }
.ul .lv { width: 26px; height: 20px; border-radius: 6px; background: rgba(90,63,40,.2); text-align: center; font-weight: 700; font-size: 12px; line-height: 20px; flex: none; } .ul.ok .lv { background: var(--green); color: #fff; }
.ul span:nth-child(2) { flex: 1; }
button.skill { background: none; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 2px; } .chips button { padding: 5px 11px; border-radius: 14px; background: rgba(90,63,40,.14); font-size: 13px; font-weight: 700; color: var(--ink2); } .chips button.on { background: var(--wood2); color: var(--parch); }

/* ---------- Fünf Ausrüstungsplätze ---------- */
.equip.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 6px; }
.equip.five .eq { flex-direction: column; gap: 3px; padding: 5px 2px; text-align: center; }
.equip.five .eq .slot { width: 40px; font-size: 21px; }
.equip.five .eq small { font-size: 10.5px; } .equip.five .eq span { display: block; font-size: 11px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.equip.five .eq > div:last-child { min-width: 0; width: 100%; }
.gearline { margin: 0 0 8px; font-size: 13.5px; color: var(--ink2); text-align: center; } .gearline b { color: var(--ink); }

/* ---------- Ebenen: Fenster liegen immer über Leisten und Anzeigen ---------- */
#hotbar, #guide, #event, #quest, #zone { z-index: 5; }
#chatlog, #chatbar { z-index: 8; }
#panel { z-index: 20; } #nav { z-index: 21; } #ctx { z-index: 30; }
/* Schmale Bildschirme: Fähigkeiten senkrecht am rechten Rand, damit der Chat frei bleibt */
@media (max-width: 759px) { #hotbar { flex-direction: column-reverse; gap: 7px; } .hot { width: 54px; height: 54px; } }

/* ---------- Das eigene Heim ---------- */
#housebar { left: 10px; top: calc(150px + var(--sat)); display: flex; gap: 6px; z-index: 6; }
#housebar .btn { box-shadow: 0 2px 8px rgba(0,0,0,.45); }
#buildbar { left: 8px; right: 78px; bottom: calc(var(--nav-h) + var(--sab) + 8px); z-index: 9; padding: 8px 10px; border-radius: 12px; background: rgba(243,231,201,.96); border: 2px solid var(--wood3); box-shadow: 0 4px 16px rgba(0,0,0,.45); max-width: 520px; }
.bb-hint { font-size: 13px; color: var(--ink2); margin-bottom: 6px; line-height: 1.25; }
.bb-list { display: flex; gap: 6px; overflow-x: auto; touch-action: pan-x; padding-bottom: 2px; } .bb-list .slot { width: 48px; flex: none; }
.lbl.home .nm { color: #fff3d0; font-style: normal; font-weight: 700; font-size: 14px; background: rgba(43,29,20,.75); padding: 2px 9px; border-radius: 10px; border: 1px solid rgba(224,178,60,.7); }
@media (min-width: 760px) { #housebar { top: 158px; } #buildbar { bottom: 88px; right: auto; width: 420px; } }

/* ---------- Verliese, Gruppe, Würfelspiel ---------- */
#dgbar { left: 10px; top: calc(196px + var(--sat)); display: flex; align-items: center; gap: 8px; z-index: 6; padding: 5px 6px 5px 12px; border-radius: 14px; background: rgba(43,29,20,.9); color: var(--parch); border: 1px solid var(--gold); font-size: 12.5px; line-height: 1.25; max-width: min(310px, calc(100vw - 86px)); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
#dgbar b { display: block; font-size: 13.5px; color: var(--gold2); } #dgbar .btn { flex: none; }
#party { left: 10px; top: calc(196px + var(--sat)); z-index: 6; width: 142px; padding: 5px 8px 7px; border-radius: 10px; background: rgba(43,29,20,.86); color: var(--parch); border: 1px solid rgba(224,178,60,.5); font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#dgbar:not([hidden]) ~ #party { top: calc(256px + var(--sat)); }
.pt-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--gold2); }
.pt-head .btn { min-height: 22px; padding: 0 7px; font-size: 11px; border-radius: 7px; }
.pt-row { margin-top: 4px; } .pt-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-hp { height: 6px; border-radius: 3px; background: rgba(0,0,0,.55); overflow: hidden; margin-top: 2px; } .pt-hp i { display: block; height: 100%; background: linear-gradient(#e0554a, #b8322c); transition: width .25s; }
@media (min-width: 760px) { #dgbar { top: 208px; } #party { top: 208px; } #dgbar:not([hidden]) ~ #party { top: 270px; } }
.warn { margin: 6px 0; padding: 7px 10px; border-radius: 8px; background: rgba(163,39,43,.14); color: #7a1c1f; font-size: 13.5px; font-weight: 700; }
.li .mid.wrap b, .li .mid.wrap small { white-space: normal; }
.dice-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.die { width: 84px; height: 84px; flex: none; border-radius: 16px; background: linear-gradient(#fffaf0, #e8dcc0); border: 2px solid var(--wood3); box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 -4px 0 rgba(90,63,40,.18); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; padding: 12px; }
.die i { border-radius: 50%; } .die i.on { background: #2b1d14; box-shadow: inset 0 2px 2px rgba(0,0,0,.5); }
.die.fool { background: linear-gradient(#f8d2cc, #e59c94); } .die.fool i.on { background: #8f1d20; }
.die.idle { display: block; padding: 0; font-size: 46px; line-height: 80px; text-align: center; }
.die.roll { animation: dieRoll .45s ease-out; }
@keyframes dieRoll { 0% { transform: rotate(-220deg) scale(.55); } 60% { transform: rotate(14deg) scale(1.12); } 100% { transform: none; } }
.dice-say b { display: block; font-size: 18px; } .dice-say b.bad { color: var(--red); } .dice-say b.good { color: #2f7a36; } .dice-say small { display: block; color: var(--ink2); font-size: 13px; margin-top: 2px; }
#asks { z-index: 12; } #toasts { z-index: 11; }
.pt-head .btn.ghost { background: rgba(255,255,255,.14); color: var(--parch); border-color: rgba(224,178,60,.55); }

/* ---------- Erfolge & Freunde ---------- */
.toast.ach { border-color: var(--gold); color: #fff3c4; background: linear-gradient(rgba(92,62,18,.96), rgba(58,38,12,.96)); font-weight: 700; box-shadow: 0 0 18px rgba(224,178,60,.45); }
.task.ach p { margin: 2px 0 4px; } .task.ach.ok { opacity: .8; }
.li.fr { gap: 6px; } .li.fr.off .mid b { color: var(--ink2); } .li.fr .btn.sm { padding: 0 8px; min-width: 36px; }

/* ---------- Kampf-Fundament: zweite Leiste, Werte, Zustände, Schadenszahlen ---------- */
.hpbar.res { height: 10px; margin-top: 2px; } .hpbar.res i { background: linear-gradient(#e0b23c, #b5832a); } .hpbar.res.mana i { background: linear-gradient(#5aa0e8, #2f62b0); }
.hpbar.res span { font-size: 8.5px; line-height: 9px; }
#plate { position: fixed; } #pstat { position: absolute; right: 46px; top: -10px; display: flex; gap: 3px; pointer-events: none; } #pstat span { width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; background: rgba(43,29,20,.95); font-size: 13px; border: 1px solid var(--gold); }
#quest { top: calc(86px + var(--sat)); }
.cstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 2px 0 6px; } .cstats div { padding: 5px 2px; border-radius: 8px; background: rgba(183,154,95,.25); text-align: center; font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; } .cstats b { display: block; font-size: 16px; color: var(--ink); }
.hot.poor { filter: saturate(.35) brightness(.75); } .hot.poor .hot-ic { opacity: .6; }
.lbl .fxr { font-size: 12px; line-height: 14px; text-shadow: 0 1px 2px #000; }
.float.dmg { border-radius: 13px; padding: 0 6px; min-width: 14px; }
.float.dmg.crit { background: #e08a1e; font-size: 17px; height: 30px; line-height: 26px; border-radius: 15px; font-weight: 800; }
.float.dmg.dot { background: #5f8f3a; border-color: #cfe8a0; font-size: 12px; height: 22px; line-height: 18px; }
.float.dmg.big { background: #7a1014; font-size: 17px; height: 30px; line-height: 26px; border-radius: 15px; }
@media (min-width: 760px) { #guide { top: 170px; } #housebar { top: 170px; } #dgbar { top: 220px; } #party { top: 220px; } #dgbar:not([hidden]) ~ #party { top: 282px; } }
@media (max-width: 759px) { #guide { top: calc(162px + var(--sat)); } #housebar { top: calc(162px + var(--sat)); } #dgbar, #party { top: calc(208px + var(--sat)); } #dgbar:not([hidden]) ~ #party { top: calc(268px + var(--sat)); } }

/* ---------- Vorhalle: Titelbild, Heldenlager, Erschaffung ---------- */
#login { position: fixed; inset: 0; display: block; background: none; z-index: 50; overflow: hidden; touch-action: none; }
#login:not(.stage) { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 45%, rgba(10,6,4,.55) 100%), linear-gradient(rgba(10,10,30,.25), rgba(0,0,0,0) 30%, rgba(20,10,4,.5)); }
#login.stage { background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 50%, rgba(8,5,3,.5) 100%); }
#login-loading { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); padding: 10px 22px; border-radius: 12px; background: rgba(43,29,20,.9); color: var(--parch); border: 1px solid var(--gold); font-style: italic; z-index: 5; }
.lb-screen { position: absolute; inset: 0; }
.lb-btn { min-height: 44px; padding: 0 20px; border-radius: 9px; font-family: 'Cinzel', serif; font-weight: 800; font-size: 15px; letter-spacing: .4px; color: #f6e7c1; background: linear-gradient(#7a2a22, #4a1612); border: 2px solid #1c0c08; box-shadow: inset 0 0 0 1px rgba(232,192,74,.65), 0 3px 10px rgba(0,0,0,.5); text-shadow: 0 1px 2px #000; }
.lb-btn:active { transform: translateY(1px); } .lb-btn:disabled { filter: grayscale(.8) brightness(.7); }
.lb-btn.gold { background: linear-gradient(#f4d77a, #c9982c); color: #2b1d14; text-shadow: 0 1px 0 rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 3px 12px rgba(0,0,0,.55); }
.lb-btn.ghost { background: rgba(30,20,14,.78); } .lb-btn.sm { min-height: 36px; padding: 0 13px; font-size: 13px; } .lb-btn.big { min-height: 54px; font-size: 19px; padding: 0 34px; }

/* Titelbild */
.lb-logo { position: absolute; left: 26px; top: calc(20px + var(--sat)); text-align: center; filter: drop-shadow(0 4px 14px rgba(0,0,0,.7)); }
.lb-crown { font-size: 34px; line-height: 1; margin-bottom: -6px; }
.lb-logo h1 { font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(44px, 7vw, 76px); letter-spacing: 3px; line-height: 1; background: linear-gradient(#fff3c4 10%, #f0c648 45%, #b5782a 90%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px #3a2208; }
.lb-logo p { margin: 2px 0 0; font-family: 'Cinzel', serif; font-size: 12.5px; letter-spacing: 3.5px; text-transform: uppercase; color: #fff3d0; text-shadow: 0 1px 3px #000; }
.lb-form { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: min(88vw, 330px); display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
.lb-label { font-family: 'Cinzel', serif; font-weight: 700; font-size: 15px; color: #f4d77a; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.8); }
.lb-form .field { margin: 0; background: rgba(20,14,10,.82); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(232,192,74,.5); border-radius: 9px; } .lb-form .field span { color: #f4d77a; } .lb-form .field input { color: #fff3d0; }
.lb-form .field input::placeholder { color: rgba(255,243,208,.45); }
.lb-form #login-err { color: #ffb4a8; text-shadow: 0 1px 2px #000; min-height: 0; } .lb-form .slots { color: #fff3d0; text-shadow: 0 1px 3px #000; font-size: 13.5px; }
.lb-links { position: absolute; left: 22px; bottom: calc(40px + var(--sab)); display: flex; flex-direction: column; gap: 8px; }
.lb-about { position: absolute; left: 22px; bottom: calc(92px + var(--sab)); width: min(86vw, 340px); padding: 12px 14px; border-radius: 12px; background: var(--parch); border: 2px solid var(--wood3); font-size: 14px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0,0,0,.5); } .lb-about b { display: block; margin-bottom: 4px; font-family: 'Cinzel', serif; }
.lb-foot { position: absolute; left: 0; right: 0; bottom: calc(10px + var(--sab)); text-align: center; font-size: 11.5px; color: rgba(255,243,208,.8); text-shadow: 0 1px 2px #000; }

/* Heldenlager */
.lb-plate { position: absolute; left: 50%; top: calc(18px + var(--sat)); transform: translateX(-50%); text-align: center; padding: 8px 26px 10px; border-radius: 12px; background: linear-gradient(rgba(43,29,20,.92), rgba(30,20,14,.86)); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px var(--fc2), 0 6px 20px rgba(0,0,0,.5); color: var(--parch); min-width: 250px; }
.lb-bund { display: inline-block; margin-top: -20px; padding: 2px 14px; border-radius: 10px; background: var(--fc); border: 1px solid var(--fc2); font-family: 'Cinzel', serif; font-weight: 700; font-size: 12.5px; transform: translateY(-9px); }
.lb-plate h2 { font-family: 'Cinzel', serif; font-size: 25px; color: #f4d77a; line-height: 1.1; } .lb-title2 { font-style: italic; color: #fff3d0; font-size: 13.5px; }
.lb-sub { font-weight: 700; font-size: 15px; margin-top: 2px; } .lb-sub2 { font-size: 12.5px; opacity: .85; }
.lb-side { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; width: 150px; }
.lb-stat { padding: 7px 8px; border-radius: 9px; background: rgba(43,29,20,.86); border: 1px solid rgba(232,192,74,.5); color: var(--parch); text-align: center; font-size: 12px; } .lb-stat b { display: block; font-size: 19px; color: #f4d77a; }
.lb-enter { position: absolute; left: 50%; bottom: calc(26px + var(--sab)); transform: translateX(-50%); text-align: center; } .lb-motto { color: #fff3d0; font-style: italic; text-shadow: 0 1px 3px #000; margin-bottom: 8px; font-size: 14.5px; white-space: nowrap; }

/* Erschaffung */
.lb-head { position: absolute; left: 50%; top: calc(12px + var(--sat)); transform: translateX(-50%); text-align: center; color: #fff3d0; text-shadow: 0 2px 4px #000; white-space: nowrap; pointer-events: none; }
.lb-head b { display: block; font-family: 'Cinzel', serif; font-size: clamp(18px, 4.6vw, 26px); color: #f4d77a; } .lb-head span { font-size: 13.5px; }
.lb-col { position: absolute; top: calc(70px + var(--sat)); width: 92px; padding: 0 6px 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; background: linear-gradient(var(--fc), var(--fd)); border: 2px solid #1c120b; border-top: 0; box-shadow: inset 0 0 0 1px var(--fc2), 0 6px 18px rgba(0,0,0,.5); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 16px), 0 100%); padding-bottom: 28px; }
.lb-col.eiche { left: 18px; } .lb-col.rabe { right: 18px; }
.lb-colhead { width: 100%; text-align: center; font-family: 'Cinzel', serif; font-weight: 800; font-size: 11.5px; color: #fff3d0; text-shadow: 0 1px 2px #000; padding-top: 6px; line-height: 1.15; } .lb-colhead span { display: block; font-size: 22px; }
.lb-race { width: 76px; padding: 0; border-radius: 9px; overflow: hidden; background: #1c120b; border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); display: flex; flex-direction: column; }
.lb-race img { width: 100%; aspect-ratio: 1; display: block; } .lb-race span { font-size: 10.5px; font-weight: 700; color: #fff3d0; padding: 2px 0 3px; background: rgba(0,0,0,.45); }
.lb-race.on { border-color: #f4d77a; box-shadow: 0 0 0 2px #f4d77a, 0 0 16px rgba(244,215,122,.7); }
.lb-panel { position: absolute; left: 50%; bottom: calc(10px + var(--sab)); transform: translateX(-50%); width: min(96vw, 560px); padding: 10px 14px 12px; border-radius: 14px; background: rgba(243,231,201,.96); border: 2px solid var(--wood3); box-shadow: 0 8px 26px rgba(0,0,0,.55); }
.lb-note { margin: 0 0 6px; padding: 6px 10px; border-radius: 8px; background: rgba(224,178,60,.3); font-size: 13px; font-weight: 700; }
.lb-info h3 { font-family: 'Cinzel', serif; font-size: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .lb-info h3 small { font-size: 12.5px; color: #fff; background: var(--fc); padding: 1px 10px; border-radius: 9px; font-family: inherit; white-space: nowrap; }
.lb-info p { margin: 3px 0 4px; font-size: 13.5px; line-height: 1.3; color: var(--ink2); } .lb-info ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.35; font-weight: 700; }
.lb-classes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 8px; }
.lb-cls { padding: 4px 0 3px; border-radius: 10px; background: rgba(90,63,40,.14); border: 2px solid transparent; font-size: 10.5px; font-weight: 700; color: var(--ink); display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lb-cls span { font-size: 24px; line-height: 1.15; } .lb-cls.on { border-color: var(--red); background: rgba(224,178,60,.45); } .lb-cls.off { opacity: .32; filter: grayscale(1); }
.lb-clsd { margin: 6px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--ink2); }
.lb-nav { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; } .lb-nav .lb-btn { flex: 1; padding: 0 8px; }
.lb-look .lb-panel { display: flex; flex-direction: column; gap: 5px; } .lb-look .sw { width: 28px; height: 28px; } .lb-look .sw.txt { width: auto; height: 28px; } .lb-nav .lb-btn { font-size: 13.5px; }
@media (min-width: 900px) {
  .lb-col { width: 112px; top: 92px; } .lb-col.eiche { left: 7vw; } .lb-col.rabe { right: 7vw; } .lb-race { width: 92px; } .lb-colhead { font-size: 13px; }
  .lb-look .lb-panel { left: auto; right: 4vw; bottom: auto; top: 50%; transform: translateY(-50%); width: 400px; }
}
@media (max-width: 759px) {
  .lb-logo { left: 50%; transform: translateX(-50%); width: max-content; } .lb-form { top: 60%; }
  .lb-links { left: 12px; bottom: calc(34px + var(--sab)); } .lb-about { left: 12px; }
  .lb-col { width: 72px; top: calc(64px + var(--sat)); padding-left: 4px; padding-right: 4px; } .lb-col.eiche { left: 6px; } .lb-col.rabe { right: 6px; } .lb-race { width: 62px; } .lb-race span { font-size: 9.5px; } .lb-colhead { font-size: 9.5px; }
  .lb-side { right: 8px; top: 34%; width: 96px; transform: none; } .lb-stat b { font-size: 16px; }
  .lb-info p { font-size: 12.5px; } .lb-info ul { font-size: 12px; } .lb-panel { padding: 8px 10px 10px; }
}
/* Bund am Namensschild */
.lbl.f-eiche .nm::before, .lbl.f-rabe .nm::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; transform: rotate(45deg) translateY(-1px); border: 1px solid #fff3d0; }
.lbl.f-eiche .nm::before { background: #3f7a3a; } .lbl.f-rabe .nm::before { background: #5d4590; }

/* ---------- Wettstreit der Bünde ---------- */
.cl.b b { color: #ffd0f0; } .cl.b::before { content: '🚩 '; }
#flagbar { left: 50%; top: calc(96px + var(--sat)); transform: translateX(-50%); z-index: 6; width: min(86vw, 320px); padding: 6px 12px 8px; border-radius: 12px; background: rgba(43,29,20,.92); color: var(--parch); border: 1px solid var(--gold); text-align: center; font-size: 12.5px; box-shadow: 0 3px 12px rgba(0,0,0,.5); pointer-events: none; }
#flagbar b { display: block; font-size: 13.5px; color: var(--gold2); }
.fbar { position: relative; height: 10px; margin: 4px 0 3px; border-radius: 5px; background: #6a6460; overflow: hidden; border: 1px solid #1c120b; } .fbar i { position: absolute; top: 0; bottom: 0; } .fbar u { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 2px; background: #fff3d0; }
.warbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid #1c120b; margin: 4px 0 3px; } .warbar i { display: block; height: 100%; }
.warrow { display: flex; justify-content: space-between; font-size: 13.5px; }
@media (min-width: 760px) { #flagbar { top: 120px; } }

/* ---------------------------------------------------------------- Beute & Ausrüstung: Güte, acht Plätze, Vergleich */
.slot.q1 { border-color: #4c9a3a; box-shadow: inset 0 0 0 1.5px rgba(95,176,74,.75), inset 0 0 9px rgba(95,176,74,.45); }
.slot.q2 { border-color: #2f6fc0; box-shadow: inset 0 0 0 1.5px rgba(74,143,224,.8), inset 0 0 10px rgba(74,143,224,.5); }
.slot.q3 { border-color: #7d3fc0; box-shadow: inset 0 0 0 1.5px rgba(163,90,224,.85), inset 0 0 11px rgba(163,90,224,.55); }
.slot.sel.q1, .slot.sel.q2, .slot.sel.q3 { box-shadow: 0 0 0 3px var(--red); }
.qn1 { color: #3f7f2f !important; } .qn2 { color: #2a62b0 !important; } .qn3 { color: #7438b8 !important; }
.detail.dq1 { border-color: rgba(76,154,58,.7); } .detail.dq2 { border-color: rgba(47,111,192,.75); } .detail.dq3 { border-color: rgba(125,63,192,.8); box-shadow: 0 0 12px rgba(163,90,224,.25); }
.equip.five.eight { grid-template-columns: repeat(4, 1fr); }
.detail .cmp { margin: 0 0 6px; font-size: 13px; } .cmp span { display: inline-block; margin-right: 8px; font-weight: 700; } .cmp .up { color: #3f7f2f; } .cmp .down { color: #a3272b; }
.detail .setline { margin: 0 0 8px; font-size: 12.5px; } .setline span { color: var(--ink2); opacity: .65; } .setline span.on { color: #3f7f2f; opacity: 1; font-weight: 700; }
.float.q1 { color: #8fe07a; } .float.q2 { color: #7fb8ff; } .float.q3 { color: #d09bff; font-size: 17px; }

/* ---------------------------------------------------------------- Fortschritt: Talente, Ruf, Stall */
.tpath { margin: 8px 0 4px; padding: 8px 8px 4px; border-radius: 10px; background: rgba(183,154,95,.18); border: 1px solid rgba(90,63,40,.2); }
.tpath h3 { font-size: 15px; margin: 0; } .tpath h3 small { font-weight: 400; color: var(--ink2); font-size: 12px; } .tpath > p { margin: 1px 0 6px; font-size: 12px; }
.tal { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid rgba(90,63,40,.14); }
.tal .ti { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 19px; border-radius: 8px; background: linear-gradient(#e2cf9f, #d4bd85); border: 1.5px solid #b79a5f; }
.tal .mid { flex: 1; min-width: 0; } .tal b { font-size: 13.5px; } .tal b em { font-style: normal; font-weight: 400; color: var(--ink2); font-size: 12px; }
.tal small { display: block; font-size: 12px; color: var(--ink2); line-height: 1.25; } .tal small i { font-style: normal; color: #3f7f2f; } .tal small.need { color: #a3272b; }
.tal.has .ti { border-color: #c9a23a; box-shadow: 0 0 0 2px rgba(224,178,60,.45); } .tal.max .ti { background: linear-gradient(#f0d88a, #e0b23c); } .tal.max b em { color: #8a6a1a; font-weight: 700; }
.tal.lock { opacity: .5; } .tal .btn.sm { min-width: 34px; font-size: 17px; padding: 3px 0; }
.skill.rep { cursor: default; } .rep .rk1 { color: #3f7f2f; } .rep .rk2 { color: #2a62b0; } .rep .rk3 { color: #7438b8; } .rep .rk4 { color: #b8860b; font-weight: 700; }
.sth { font-size: 14px; margin: 10px 0 4px; }
.hot.ride .hot-ic { filter: none; } .hot.ride.on { box-shadow: 0 0 0 2px #e0b23c, 0 4px 10px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- Welt & Inhalte: Geschichte, seltene Gegner */
.task .chain { display: block; color: #8a6a1a; font-weight: 700; font-size: 11.5px; letter-spacing: .02em; margin-bottom: 2px; }
.task.main { border-color: rgba(201,162,58,.8); background: linear-gradient(rgba(240,216,138,.28), rgba(240,216,138,.1)); }
.task .story { font-style: italic; color: var(--ink); margin: 2px 0 6px; line-height: 1.35; }
.lbl.rare .nm { color: #ffe07a; font-size: 14.5px; font-weight: 700; text-shadow: 0 0 6px rgba(255,200,60,.6), 0 1px 2px #000; }

/* ---------------------------------------------------------------- Schlachtfeld */
#bgbar { position: absolute; left: 50%; top: calc(58px + var(--sat)); transform: translateX(-50%); z-index: 6; padding: 6px 14px 7px; border-radius: 12px; background: rgba(43,29,20,.92); color: var(--parch); border: 1px solid var(--gold); text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.4); pointer-events: none; white-space: nowrap; }
#bgbar .bgs { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 19px; font-family: 'Cinzel', serif; } #bgbar .bgs b.me { text-decoration: underline; text-underline-offset: 4px; }
#bgbar .bgf { display: flex; gap: 7px; } #bgbar .bgf i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-style: normal; }
#bgbar small { display: block; font-size: 11.5px; opacity: .85; margin-top: 2px; }
@media (min-width: 760px) { #bgbar { top: 20px; } }

/* Lautstärkeregler in den Einstellungen */
.vol { width: 46%; max-width: 220px; accent-color: var(--gold); height: 28px; }

/* ---------- Kampf & Steuerung: Zielrahmen, Erfahrungsleiste, Benutzen-Knopf, Steuerknüppel, Warnrand ---------- */
#target { left: 50%; top: calc(12px + var(--sat)); transform: translateX(-50%); width: min(310px, 40vw); display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 30px 14px 14px 30px; background: linear-gradient(#4a3322, #2f2015); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(224,178,60,.35), 0 4px 12px rgba(0,0,0,.45); color: var(--parch); z-index: 6; }
#target[hidden] { display: none; }
#target .tg-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: radial-gradient(circle at 35% 30%, #8a3028, #3a1310); border: 2px solid #c8463a; }
#target.friend .tg-ic { background: radial-gradient(circle at 35% 30%, #3f7a3a, #1f3a1c); border-color: #7fc46a; }
#target.boss .tg-ic, #target.rare .tg-ic { border-color: var(--gold); box-shadow: 0 0 10px rgba(224,178,60,.7); }
#target .tg-main { flex: 1; min-width: 0; }
#target .tg-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 13.5px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#target .tg-sub { font-size: 11.5px; color: var(--gold2); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#target .hpbar { width: 100%; }
#target .tg-fx { position: absolute; left: 54px; top: 100%; margin-top: 2px; font-size: 15px; text-shadow: 0 1px 2px #000; pointer-events: none; }
#target .tg-x { width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(0,0,0,.35); color: var(--parch2); font-size: 12px; }
.lbl.tgt .nm { color: #ffd0c8; text-shadow: 0 0 6px #c8463a, 0 1px 2px #000; }
.lbl.tgt .hpb[hidden] { display: block; }
#plate.combat { box-shadow: inset 0 0 0 1px rgba(255,90,70,.8), 0 0 0 2px #a3272b, 0 0 16px rgba(255,60,40,.55); }
#xpbar { left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab)); height: 7px; background: rgba(28,18,11,.88); border-top: 1px solid #1c120b; z-index: 7; pointer-events: none; }
#xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6a45b8, #c79bff); transition: width .6s ease, filter .3s; }
#xpbar span { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); padding: 1px 10px; border-radius: 9px; background: rgba(43,29,20,.85); color: #e8dcff; font-size: 11.5px; white-space: nowrap; opacity: 0; transition: opacity .4s; }
#xpbar.gain span { opacity: 1; } #xpbar.gain i { filter: brightness(1.5); }
#usebtn { left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 142px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 10px; border-radius: 24px; background: linear-gradient(#f4e6c0, #dcc391); color: var(--ink); font-weight: 600; font-size: 14.5px; border: 2px solid var(--wood3); box-shadow: 0 4px 12px rgba(0,0,0,.45); z-index: 6; max-width: 80vw; white-space: nowrap; }
#usebtn[hidden] { display: none; }
#usebtn kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 6px; background: var(--wood3, #5a3d28); color: #fff3d0; font: 700 12px/1 system-ui, sans-serif; }
#joy { left: 14px; bottom: calc(var(--nav-h) + var(--sab) + 20px); width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(rgba(243,231,201,.08), rgba(43,29,20,.4)); border: 2px solid rgba(243,231,201,.35); touch-action: none; z-index: 7; }
#joy[hidden] { display: none; }
#joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(243,231,201,.55); border: 2px solid rgba(43,29,20,.6); box-shadow: 0 2px 8px rgba(0,0,0,.4); pointer-events: none; }
#joy.on { border-color: var(--gold); } #joy.on i { background: rgba(244,215,122,.85); }
#vignette { inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 52%, rgba(170,20,10,.6) 100%); opacity: 0; transition: opacity .2s; z-index: 1; }
/* Berührung: Knüppel links, Fähigkeiten rechts in zwei Spalten, Rest rückt aus dem Weg */
#hud.touch #usebtn kbd { display: none; } #hud.touch #usebtn { left: auto; right: 10px; transform: none; padding-left: 16px; bottom: calc(var(--nav-h) + var(--sab) + 238px); }
#hud.touch #hotbar { flex-wrap: wrap-reverse; justify-content: flex-end; width: 148px; }
#hud.touch #chatlog { bottom: calc(var(--nav-h) + var(--sab) + 154px); width: min(56vw, 380px); }
@media (max-width: 760px) {
  #target { top: calc(92px + var(--sat)); width: min(290px, 78vw); left: 10px; transform: none; }
  #hud.has-target #quest { display: none; }          /* im Kampf weicht das Aufgabenbuch dem Zielrahmen */
  #hud.has-target #toasts { top: calc(164px + var(--sat)); }
}

/* ---------- Einstieg & Aufgaben: Aufgabenzeichen, Aufgabenleiste, Aufgabenfenster, Meldungen, Banner ---------- */
.lbl .qm { font: 900 30px/1 'Cinzel', Georgia, serif; text-align: center; color: #ffd24a; text-shadow: -2px 0 #1c120b, 2px 0 #1c120b, 0 -2px #1c120b, 0 2px #1c120b, 0 0 12px rgba(255,190,40,.9); animation: qmBob 1.5s ease-in-out infinite; margin-bottom: 2px; }
.lbl .qm[hidden] { display: none; }
.lbl .qm.wait { color: #c9c2b4; text-shadow: -2px 0 #1c120b, 2px 0 #1c120b, 0 -2px #1c120b, 0 2px #1c120b; animation: none; font-size: 24px; }
.lbl .qm.story { color: #ffe9a0; text-shadow: -2px 0 #5a2a00, 2px 0 #5a2a00, 0 -2px #5a2a00, 0 2px #5a2a00, 0 0 16px #ffb400, 0 0 28px rgba(255,150,0,.8); }
@keyframes qmBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
#quest { padding: 0; background: none; border: 0; box-shadow: none; display: flex; flex-direction: column; gap: 4px; width: min(290px, calc(100vw - 150px)); max-width: none; }
#quest button { text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.qt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 12px; border-radius: 10px 10px 4px 4px; background: linear-gradient(#4a3322, #2f2015); border: 1px solid #1c120b; }
.qt-head b { font-family: 'Cinzel', serif; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--gold2) !important; display: inline !important; }
.qt-head span { font-size: 11.5px; color: var(--parch2); }
.qt-row { display: block; padding: 5px 12px 6px; border-radius: 4px; background: rgba(243,231,201,.93); border: 1px solid var(--wood3); border-left: 4px solid var(--wood3); font-size: 13px; line-height: 1.25; }
.qt-row:last-child { border-radius: 4px 4px 10px 10px; }
.qt-row b { display: block; font-family: 'Cinzel', serif; font-size: 11.5px; letter-spacing: .3px; color: var(--red); text-transform: none; }
.qt-row span { display: block; } .qt-row small { display: block; margin-top: 2px; color: var(--ink2); font-size: 12px; font-style: italic; line-height: 1.25; }
.qt-row.main { border-left-color: var(--gold); } .qt-row.ok { border-left-color: var(--green); background: rgba(226,238,200,.95); } .qt-row.ok span { color: #2f5a1e; font-weight: 600; }
.qt-row.on { box-shadow: 0 0 0 2px var(--gold); } .qt-row.intro { border-left-color: var(--blue); }
.qd { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.45); border: 1px solid rgba(90,63,40,.3); }
.qd.main { border-color: rgba(201,162,58,.85); background: linear-gradient(rgba(240,216,138,.3), rgba(240,216,138,.08)); } .qd.ready { border-color: var(--green); }
.qd h3 { margin: 2px 0 6px; font-family: 'Cinzel', serif; font-size: 18px; color: var(--wood2); }
.qd .story { font-style: italic; line-height: 1.45; margin: 0 0 4px; font-size: 14.5px; }
.qd .chain { display: block; color: #8a6a1a; font-weight: 700; font-size: 11.5px; }
.qd-sec { font-family: 'Cinzel', serif; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin: 10px 0 3px; }
.qd-goal { margin: 0 0 4px; font-size: 14.5px; } .qd-goal.ok { color: #2f5a1e; font-weight: 600; }
.rw { display: flex; flex-wrap: wrap; gap: 6px; } .rw span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; background: rgba(43,29,20,.1); border: 1px solid rgba(90,63,40,.3); font-size: 13.5px; } .rw b { font-weight: 700; }
.qd-btns { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.qd-back { background: none; color: var(--wood2); font-size: 13.5px; padding: 2px 0 8px; cursor: pointer; }
.ql { display: flex; flex-direction: column; gap: 6px; }
.ql-row { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.45); border: 1px solid rgba(90,63,40,.3); text-align: left; font-size: 15px; color: var(--ink); cursor: pointer; }
.ql-row i { font-style: normal; font-size: 18px; width: 22px; text-align: center; } .ql-row span { flex: 1; font-family: 'Cinzel', serif; font-weight: 700; color: var(--wood2); } .ql-row small { color: var(--ink2); font-size: 12.5px; }
.ql-row.ready { border-color: var(--green); background: rgba(111,159,74,.2); } .ql-row.main { border-color: rgba(201,162,58,.85); } .ql-row.lock { opacity: .55; cursor: default; } .ql-row.run i { filter: grayscale(1); }
#objective { left: 50%; top: 27%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; z-index: 6; width: min(92vw, 520px); }
#objective div { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(15px, 3.6vw, 19px); color: #ffe27a; text-align: center; text-shadow: 0 2px 0 #2b1d14, 0 0 6px #2b1d14, 0 0 14px rgba(0,0,0,.9); animation: objIn 3.4s ease forwards; }
#objective div.ok { color: #b8f08a; }
@keyframes objIn { 0% { opacity: 0; transform: translateY(8px) scale(.94); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#banner { left: 50%; top: 13%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 34px 12px; pointer-events: none; z-index: 6; width: max-content; max-width: 92vw; background: radial-gradient(ellipse at center, rgba(28,18,11,.82) 0%, rgba(28,18,11,.55) 55%, transparent 76%); animation: banIn 3.2s ease forwards; }
#banner[hidden] { display: none; }
#banner small { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold2); }
#banner b { font-family: 'Cinzel', serif; font-weight: 800; font-size: clamp(20px, 5vw, 32px); color: #fff3d0; text-shadow: 0 2px 0 #2b1d14, 0 0 18px rgba(224,178,60,.6); line-height: 1.15; }
#banner span { font-size: 14.5px; color: var(--parch); max-width: 60ch; } #banner em { font-style: normal; font-weight: 700; color: var(--gold2); font-size: 14.5px; margin-top: 2px; }
#banner.done small { color: #b8f08a; } #banner.level b { color: #ffe27a; font-size: clamp(26px, 6.4vw, 42px); } #banner.new { animation-duration: 2.4s; }
@keyframes banIn { 0% { opacity: 0; transform: translateX(-50%) scale(.86); } 9% { opacity: 1; transform: translateX(-50%) scale(1.03); } 14% { transform: translateX(-50%) scale(1); } 84% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
.intro { text-align: center; padding: 6px 4px 2px; } .intro-ic { font-size: 54px; line-height: 1.1; } .intro h3 { font-family: 'Cinzel', serif; font-size: 20px; color: var(--wood2); margin: 6px 0 8px; } .intro p { font-size: 15.5px; line-height: 1.5; margin: 0 auto 12px; max-width: 46ch; }
.intro-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 4px; } .intro-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(90,63,40,.3); } .intro-dots i.on { background: var(--gold); }
.intro .qd-btns { justify-content: center; }
@media (max-width: 760px) { #quest { width: min(250px, calc(100vw - 140px)); } .qt-row small { display: none; } #banner { top: 17%; } }
@media (prefers-reduced-motion: reduce) { .lbl .qm, #banner, #objective div { animation-duration: 3.2s; animation-timing-function: step-end; } .lbl .qm { animation: none; } }

/* Wegweiser gehört zur Aufgabenleiste; Heim-, Verlies- und Gruppenanzeige rücken unter die Leiste */
#quest #guide { position: static; align-self: flex-start; margin: 1px 0; }
#housebar { top: calc(var(--qt-b, 170px) + 8px) !important; } #dgbar, #party { top: calc(var(--qt-b, 170px) + 8px) !important; } #dgbar:not([hidden]) ~ #party { top: calc(var(--qt-b, 170px) + 70px) !important; }

@media (max-width: 760px) { #quest .qt-row small { display: none; } #quest .qt-row { padding: 4px 10px 5px; font-size: 12.5px; } #quest .qt-row span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }

/* ---------- Belohnung & Beute: Beuteflug, Beuteliste, Beutekarte, Hinweis „besser“, Merkpunkte ---------- */
.lootfly { position: absolute; left: 0; top: 0; margin: -16px 0 0 -16px; width: 32px; height: 32px; display: grid; place-items: center; font-size: 24px; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); z-index: 3; }
.lootfly.q1 { filter: drop-shadow(0 0 6px #5fb04a); } .lootfly.q2 { filter: drop-shadow(0 0 8px #4a8fe0); } .lootfly.q3 { filter: drop-shadow(0 0 10px #a35ae0); font-size: 30px; }
#lootcol { right: 12px; bottom: calc(var(--nav-h) + var(--sab) + 180px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; z-index: 6; max-width: min(280px, 70vw); }
#lootfeed { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lf { display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 8px; border-radius: 16px; background: rgba(43,29,20,.88); color: var(--parch); border: 1px solid rgba(243,231,201,.25); font-size: 13.5px; animation: lfIn 4.3s ease forwards; white-space: nowrap; }
.lf i { font-style: normal; font-size: 17px; } .lf b { color: var(--gold2); }
.lf.q1 { border-color: #5fb04a; } .lf.q2 { border-color: #4a8fe0; box-shadow: 0 0 10px rgba(74,143,224,.55); animation-duration: 7s; } .lf.q3 { border-color: #a35ae0; box-shadow: 0 0 14px rgba(163,90,224,.7); animation-duration: 7s; font-size: 15px; }
.lf .qn1 { color: #8fe07a; } .lf .qn2 { color: #8fc0ff; } .lf .qn3 { color: #d3a6ff; }
@keyframes lfIn { 0% { opacity: 0; transform: translateX(30px); } 6% { opacity: 1; transform: none; } 88% { opacity: 1; } 100% { opacity: 0; } }
#lootcard { pointer-events: auto; cursor: pointer; padding: 10px 14px 9px; border-radius: 14px; background: linear-gradient(#f4e6c0, #e2cc9c); color: var(--ink); border: 2px solid var(--gold); box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 22px rgba(224,178,60,.35); min-width: 190px; animation: lcIn .35s ease; }
#lootcard[hidden] { display: none; }
#lootcard > b { display: block; font-family: 'Cinzel', serif; font-size: 13.5px; color: var(--wood2); margin-bottom: 6px; }
#lootcard small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink2); }
.lc-items { display: flex; flex-direction: column; gap: 4px; } .lc-it { display: flex; align-items: center; gap: 8px; padding: 4px 9px; border-radius: 8px; background: rgba(43,29,20,.1); border: 1px solid rgba(90,63,40,.25); font-size: 14px; } .lc-it i { font-style: normal; font-size: 18px; }
.lc-it.q1 { border-color: #5fb04a; } .lc-it.q2 { border-color: #4a8fe0; background: rgba(74,143,224,.14); } .lc-it.q3 { border-color: #a35ae0; background: rgba(163,90,224,.16); }
#lootcard .qn1 { color: #2f7a22; font-weight: 700; } #lootcard .qn2 { color: #1f5fae; font-weight: 700; } #lootcard .qn3 { color: #7a2fc0; font-weight: 700; }
@keyframes lcIn { 0% { opacity: 0; transform: translateY(14px) scale(.94); } 100% { opacity: 1; transform: none; } }
#upgrade { left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sab) + 198px); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 14px; background: rgba(43,29,20,.94); color: var(--parch); border: 2px solid #5fb04a; box-shadow: 0 4px 14px rgba(0,0,0,.5), 0 0 16px rgba(95,176,74,.45); z-index: 7; max-width: 92vw; animation: lcIn .3s ease; }
#upgrade[hidden] { display: none; }
#upgrade small { display: block; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #9fe08a; font-weight: 700; } #upgrade span { display: block; font-weight: 700; font-size: 14.5px; } #upgrade em { display: block; font-style: normal; font-size: 12.5px; color: var(--parch2); }
#upgrade .qn1 { color: #8fe07a; } #upgrade .qn2 { color: #8fc0ff; } #upgrade .qn3 { color: #d3a6ff; }
#upgrade .up-x { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--parch2); font-size: 12px; flex: none; }
#nav button { position: relative; }
.nb { position: absolute; top: 2px; right: calc(50% - 26px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c8322a; color: #fff; font: 700 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #2b1d14; }
.nb[hidden] { display: none; }
#coinval.gain { color: #fff3b0; text-shadow: 0 0 8px rgba(255,220,90,.9); }
#hud.touch #lootcol { bottom: calc(var(--nav-h) + var(--sab) + 294px); }
#hud.touch #upgrade { left: 10px; transform: none; bottom: calc(var(--nav-h) + var(--sab) + 226px); max-width: 62vw; }
@media (max-width: 760px) { #lootcol { bottom: calc(var(--nav-h) + var(--sab) + 300px); } .lf { font-size: 12.5px; } }

/* Sprachwahl am Titelbild (im Spiel steht sie in den Einstellungen) */
#langbtn { position: fixed; right: 12px; top: calc(10px + var(--sat, 0px)); z-index: 40; padding: 7px 12px; min-height: 36px; border-radius: 18px; background: rgba(43,29,20,.85); color: var(--parch); border: 1px solid rgba(224,178,60,.6); font-size: 13px; cursor: pointer; }
#hud:not([hidden]) ~ #langbtn { display: none; }

/* ---------- Mitspieler: Gruß-Hinweis, Spieler in der Nähe ---------- */
#social { left: 50%; top: 36%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 7; max-width: 92vw; }
.so { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 22px; background: rgba(43,29,20,.93); color: var(--parch); border: 1px solid var(--gold); box-shadow: 0 4px 14px rgba(0,0,0,.45); font-size: 14.5px; animation: lcIn .3s ease; }
.so i { font-style: normal; font-size: 20px; }
#nearby { position: absolute; left: -14px; top: -6px; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 13px; background: linear-gradient(#4a3322, #2f2015); color: var(--parch); border: 2px solid var(--gold); font-size: 12.5px; font-weight: 700; cursor: pointer; }
#nearby[hidden] { display: none; }

/* ---------- Fenster & Leisten: Aktionsleiste, Schnellplätze, Hinweise, Wirkungen ---------- */
.hot.quick { border-color: #b9a688; } .hot.quick.off { opacity: .5; }
.hot .cnt { position: absolute; left: 6px; bottom: 3px; font: 700 11px/1 system-ui, sans-serif; color: #fff; text-decoration: none; text-shadow: 0 1px 2px #000, 0 0 3px #000; z-index: 3; }
#pstat .buff { width: auto; padding: 0 6px 0 4px; border-radius: 11px; display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
#pstat .buff small { font: 700 10.5px/1 system-ui, sans-serif; color: var(--gold2); }
#tip { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; max-width: 290px; padding: 9px 12px; border-radius: 10px; background: rgba(28,18,11,.97); color: var(--parch); border: 1px solid var(--gold); box-shadow: 0 6px 18px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.35; }
#tip[hidden] { display: none; }
#tip b { font-family: 'Cinzel', serif; font-size: 14px; } #tip small { color: var(--parch2); font-size: 12px; } #tip .tip-cmp { font-size: 12.5px; }
#tip .qn1 { color: #8fe07a; } #tip .qn2 { color: #8fc0ff; } #tip .qn3 { color: #d3a6ff; } #tip .up { color: #8fe07a; font-weight: 700; } #tip .down { color: #ff9a8a; font-weight: 700; }
.grab { cursor: grab; } .grab:active { cursor: grabbing; }
/* Am Rechner: Aktionsleiste unten in der Mitte, eckige Plätze mit Tastenzahl */
@media (min-width: 900px) and (pointer: fine) {
  #hotbar { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sab) + 14px); padding: 6px 8px; gap: 6px; border-radius: 14px; background: linear-gradient(#4a3322, #2b1d14); border: 2px solid #1c120b; box-shadow: inset 0 0 0 1px rgba(224,178,60,.35), 0 4px 14px rgba(0,0,0,.5); }
  #hotbar .hot { width: 56px; height: 56px; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); }
  #hotbar .hot b { left: 5px; right: auto; top: 3px; }
  #busy { bottom: calc(var(--nav-h) + var(--sab) + 104px); } #usebtn { bottom: calc(var(--nav-h) + var(--sab) + 152px); } #upgrade { bottom: calc(var(--nav-h) + var(--sab) + 208px); }
  #lootcol { bottom: calc(var(--nav-h) + var(--sab) + 30px); }
}
@media (max-width: 759px) { #hotbar { flex-wrap: wrap-reverse; justify-content: flex-end; width: 126px; flex-direction: row !important; } }

/* ---------- Figurenfenster: Figur in der Mitte, getragene Stücke links und rechts ---------- */
.doll { display: grid; grid-template-columns: minmax(74px, 1fr) minmax(140px, 210px) minmax(74px, 1fr); gap: 8px; align-items: stretch; margin-bottom: 8px; }
.doll-col { display: flex; flex-direction: column; gap: 6px; justify-content: space-between; }
.doll-mid { border-radius: 12px; background: radial-gradient(ellipse at 50% 88%, rgba(90,63,40,.42), rgba(43,29,20,.06) 72%); border: 1px solid rgba(90,63,40,.3); overflow: hidden; }
.doll-cv { width: 100%; height: 290px; display: block; touch-action: none; cursor: grab; }
.doll-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 4px; border-radius: 10px; background: rgba(255,255,255,.45); border: 2px solid rgba(90,63,40,.35); color: var(--ink); cursor: pointer; font: inherit; }
.doll-slot .ic { font-size: 22px; line-height: 1; } .doll-slot small { font-size: 11px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.doll-slot.empty { opacity: .55; cursor: default; } .doll-slot.empty .ic { filter: grayscale(1); }
.doll-slot.q1 { border-color: #5fb04a; } .doll-slot.q2 { border-color: #4a8fe0; background: rgba(74,143,224,.12); } .doll-slot.q3 { border-color: #a35ae0; background: rgba(163,90,224,.14); }
#plate { cursor: pointer; }
.doll ~ .stats { grid-template-columns: repeat(4, 1fr); }

/* ---------------------------------------------------------------- Talentbäume und Fähigkeitenbuch (dunkles Fenster mit Goldrand) */
#modal-card.talwin { width: min(100vw, 1060px); max-height: 94vh; background: linear-gradient(#2b1d14, #1a110b); border-color: #7a5a2c; color: #eadfc4; }
#modal-card.talwin > header { border-bottom-color: rgba(224,178,60,.35); } #modal-card.talwin h2 { color: var(--gold2); letter-spacing: 1px; }
#modal-card.talwin #modal-x { background: #7a2a22; color: #ffe9c0; }
#modal-card.talwin #modal-body { padding: 10px 10px 12px; }
.talwin .tabs { background: rgba(0,0,0,.4); max-width: 420px; } .talwin .tabs button { color: #cdbb94; } .talwin .tabs button.on { background: linear-gradient(#f0c858, #cf9c2c); color: #2b1d14; }
.talwin .muted { color: #b8a888; } .talwin .btn.ghost { color: #eadfc4; border-color: rgba(234,223,196,.4); }
.thead { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; font-size: 14.5px; color: #fff3d0; } .thead .spec { margin-left: auto; text-align: right; font-size: 13px; color: #cdbb94; } .thead .spec b { color: var(--gold2); }
.ttabs { display: flex; gap: 6px; margin-bottom: 8px; }
.ttabs button { flex: 1; min-width: 0; padding: 6px 4px 5px; border-radius: 10px; border: 1px solid rgba(224,178,60,.3); background: rgba(0,0,0,.3); color: #cdbb94; font-size: 12.5px; line-height: 1.15; }
.ttabs button b { display: block; font-size: 16px; color: #fff3d0; } .ttabs button.on { border-color: var(--gold); color: var(--gold2); background: rgba(224,178,60,.16); }
.ttree { position: relative; display: none; border-radius: 12px; overflow: hidden; border: 1px solid #7a5a2c; box-shadow: inset 0 0 0 2px rgba(0,0,0,.5); isolation: isolate; }
.ttree.cur { display: block; }
.tart { position: absolute; inset: 0; z-index: -1; } .tart svg { width: 100%; height: 100%; display: block; }
.tart::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(10,8,6,.2), rgba(10,8,6,.62)); }
.ttree > header { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; background: linear-gradient(rgba(10,8,6,.8), rgba(10,8,6,0)); border: 0; }
.tt-ic { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: radial-gradient(circle at 35% 30%, #6a4a30, #2b1d14); border: 2px solid var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.ttree h3 { font-size: 15.5px; color: #fff3d0; text-shadow: 0 1px 3px #000; } .ttree > header small { display: block; font-size: 11.5px; line-height: 1.2; color: #e6d8b6; text-shadow: 0 1px 2px #000; }
.tt-n { margin-left: auto; min-width: 32px; text-align: center; padding: 2px 6px; border-radius: 8px; background: rgba(0,0,0,.6); border: 1px solid rgba(224,178,60,.5); color: var(--gold2); font-size: 15px; }
.tgrid { --cell: 46px; display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); grid-auto-rows: var(--cell); gap: 18px 16px; justify-content: center; padding: 4px 8px 20px; }
.tn { position: relative; z-index: 1; width: var(--cell); height: var(--cell); border-radius: 10px; display: grid; place-items: center; background: linear-gradient(#4a3524, #241710); border: 2px solid #5b4a36; box-shadow: 0 2px 6px rgba(0,0,0,.65), inset 0 0 0 1px rgba(0,0,0,.6); }
.tn-ic { font-size: 23px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); } .tn-ic.big { font-size: 32px; flex: none; }
.tn-r { position: absolute; right: -7px; bottom: -8px; min-width: 25px; padding: 1px 3px; border-radius: 6px; background: #120c08; border: 1px solid #5b4a36; font: 700 10.5px/1.25 system-ui, sans-serif; color: #9a8a6c; text-align: center; }
.tn.lock .tn-ic { filter: grayscale(1) brightness(.6); } .tn.lock { background: linear-gradient(#33291f, #1c1510); }
.tn.open, .tn.has { border-color: #5fbf4a; } .tn.open { box-shadow: 0 0 0 1px #1c3a14, 0 0 11px rgba(110,220,90,.5), 0 2px 6px rgba(0,0,0,.6); }
.tn.open .tn-r, .tn.has .tn-r { color: #7fe06a; border-color: #3f7f2f; }
.tn.max { border-color: var(--gold); box-shadow: 0 0 0 1px #5a4310, 0 0 11px rgba(240,200,80,.55), 0 2px 6px rgba(0,0,0,.6); } .tn.max .tn-r { color: var(--gold2); border-color: #8a6a1a; }
.tn.cap { border-radius: 50%; } .tn.cap .tn-ic { font-size: 26px; }
.tn.sel { outline: 2px solid #fff; outline-offset: 2px; }
.tn u { position: absolute; left: -7px; top: -8px; padding: 1px 4px; border-radius: 6px; background: #2f6fd0; border: 1px solid #9fc4ff; color: #fff; font: 700 10.5px/1.25 system-ui, sans-serif; text-decoration: none; }
.tn:active { transform: scale(.94); }
.tarrow { position: relative; justify-self: center; width: 4px; margin: calc(var(--cell) + 2px) 0 calc(var(--cell) + 7px); background: #5b4a36; border-radius: 2px; }
.tarrow::after { content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 0; border-top-color: #5b4a36; }
.tarrow.on { background: var(--gold); box-shadow: 0 0 6px rgba(240,200,80,.6); } .tarrow.on::after { border-top-color: var(--gold); }
.tdetail { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0; padding: 9px 10px; min-height: 78px; border-radius: 10px; background: rgba(0,0,0,.42); border: 1px solid rgba(224,178,60,.3); }
p.tdetail { align-items: center; font-size: 13.5px; }
.tdetail .mid { flex: 1; min-width: 0; } .tdetail b { color: #fff3d0; font-size: 15px; } .tdetail b em { font-style: normal; font-weight: 400; color: #cdbb94; font-size: 12.5px; }
.tdetail small { display: block; font-size: 13px; line-height: 1.3; color: #eadfc4; } .tdetail small.next { color: #7fe06a; } .tdetail small.need { color: #ff8a7a; } .tdetail small.cap { color: var(--gold2); }
.tbtns { display: flex; flex-direction: column; gap: 6px; } .tbtns .btn { min-width: 46px; font-size: 20px; padding: 0; }
.tfoot { position: sticky; bottom: -12px; z-index: 3; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 0; background: linear-gradient(rgba(26,17,11,0), #1a110b 30%); }
.tpts { display: flex; align-items: center; gap: 8px; margin-right: auto; color: #cdbb94; font-size: 13px; line-height: 1.2; } .tpts small { display: block; font-size: 11.5px; color: #9a8a6c; }
.tpts b { font: 800 24px/1.3 'Cinzel', Georgia, serif; color: var(--gold2); min-width: 44px; text-align: center; border-radius: 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(224,178,60,.5); }
.tfoot .btn { white-space: nowrap; flex: none; } .tpts { min-width: 0; }
@media (max-width: 899px) { .tbtns { flex-direction: row-reverse; align-self: center; } .tgrid { --cell: 44px; gap: 14px 16px; padding-bottom: 14px; } .ttree > header { padding-bottom: 6px; } }          /* Handy: Baum, Erklärung und Fußzeile passen ohne Scrollen auf einen Schirm */
.tnote { font-size: 12px; margin: 2px 0 0; } .tnote .btn { margin-right: 6px; }
.book { max-width: 620px; margin: 0 auto; padding: 4px 12px 8px; border-radius: 12px; background: linear-gradient(#f3e7c9, #e7d5ac); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(90,63,40,.4), 0 4px 14px rgba(0,0,0,.5); }
.book .muted { color: var(--ink2); }
.bk-h { font-size: 16px; color: var(--wood2); margin: 12px 0 2px; padding-bottom: 4px; border-bottom: 1px solid rgba(90,63,40,.35); }
.bk { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid rgba(90,63,40,.14); } .bk.off { opacity: .5; }
.bk-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: radial-gradient(circle at 35% 30%, #6a4a30, #2b1d14); border: 2px solid #b98a22; }
.bk b { font-size: 14.5px; } .bk b em { font-style: normal; font-weight: 400; color: var(--ink2); font-size: 12px; margin-left: 6px; } .bk small { display: block; font-size: 13px; line-height: 1.3; color: var(--ink2); }
@media (min-width: 900px) {
  .ttabs { display: none; } .ttrees { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; } .ttree { display: block; }
  .tgrid { --cell: 54px; gap: 20px 20px; padding-bottom: 24px; } .tn-ic { font-size: 27px; } .tn.cap .tn-ic { font-size: 30px; }
}
