/* =====================================================================
   Xenthrone 3D – Oberfläche
   Ein Designsystem für alles: gleiche Rahmen, Flächen, Abstände, Schrift,
   Linien-Icons und Rohstoff-Chips in HUD, Panels, Karten, Dialogen, Login.
   ===================================================================== */
:root {
  /* Farben */
  --gold: #e3b955; --gold-hi: #ffe7a3; --gold-lo: #b8862e; --gold-soft: rgba(227, 185, 85, .35);
  --ink: #f4ead0; --ink2: #c9bb98; --ink3: #948769;
  --line: rgba(227, 185, 85, .26); --line-hi: rgba(227, 185, 85, .55); --hair: rgba(255, 255, 255, .07);
  --green: #7fc45a; --green-hi: #b6f08f; --red: #e2574c; --red-hi: #ffb0a6; --blue: #5fa8ef; --blue-hi: #9ecbff;
  /* Flächen */
  --frame: linear-gradient(180deg, rgba(42, 33, 22, .93), rgba(19, 14, 10, .95));
  --frame-solid: linear-gradient(180deg, #2b2117, #15100b);
  --inset: rgba(0, 0, 0, .28); --inset-hover: rgba(0, 0, 0, .4); --inset-ring: inset 0 0 0 1px var(--hair);
  --sel: linear-gradient(180deg, rgba(227, 185, 85, .26), rgba(227, 185, 85, .08));
  --shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
  /* Maße */
  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 16px;
  /* Schrift */
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0c0a08; color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; user-select: none; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(227, 185, 85, .3); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(227, 185, 85, .5); }
::-webkit-scrollbar-track { background: transparent; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, transparent 58%, rgba(8, 5, 2, .42) 100%); }

/* ---------- Linien-Icons ---------- */
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- Gemeinsamer Rahmen (alle schwebenden Flächen) ---------- */
#topbar, #dock, .card, #panel, #mapcard, #modal .box, .toast, .login-card {
  background: var(--frame); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
#topbar::before, #dock::before, .card::before, #panel::before, #mapcard::before, #modal .box::before, .login-card::before {
  content: ""; position: absolute; left: 14%; right: 14%; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 222, 150, .75), transparent);
}

/* ---------- Rohstoffe & Werte ---------- */
.ri { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.ri-stack { display: inline-flex; margin-right: 2px; } .ri-stack .ri { width: 16px; height: 16px; margin-right: -3px; }
.rn { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--ink); font-weight: 600; }
.rc, .sc { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 4px; border-radius: 999px; background: var(--inset); box-shadow: var(--inset-ring); white-space: nowrap; vertical-align: middle; }
.rc img { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.rc b, .sc b { font: 650 12.5px var(--sans); color: var(--ink); }
.sc { padding: 0 9px 0 7px; } .sc .ico { color: var(--gold); width: 15px; height: 15px; }
.sc.time { color: var(--ink2); } .sc.time b { color: var(--ink2); font-weight: 600; }
.rc.no { box-shadow: inset 0 0 0 1px rgba(226, 87, 76, .55); background: rgba(226, 87, 76, .12); } .rc.no b { color: #ff9a8f; }
.rc.lg { height: 38px; padding: 0 12px 0 6px; gap: 7px; } .rc.lg img { width: 28px; height: 28px; } .rc.lg b { font-size: 15px; }
.desc .rc { height: 22px; padding: 0 7px 0 3px; } .desc .rc img { width: 17px; height: 17px; } .desc .rc b { font-size: 11.5px; color: var(--gold-hi); }
.cost { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0; }
.cost .time { margin-left: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; } .stats .sc { height: 22px; } .stats .sc b { font-size: 11.5px; }

/* ---------- 3D-Beschriftungen ---------- */
.label3d { position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap; pointer-events: auto; }
.label3d.bl { display: flex; align-items: center; gap: 6px; padding: 3px 11px 3px 3px; border-radius: 999px; background: linear-gradient(180deg, rgba(42, 33, 22, .93), rgba(19, 14, 10, .93)); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); cursor: pointer; font-family: var(--serif); font-size: 13px; letter-spacing: .02em; transition: border-color .15s, box-shadow .15s, filter .15s; }
.label3d.bl::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 1px; height: 7px; background: var(--gold-soft); }
.label3d.bl .lv, .label3d.bl .plus, .label3d.bl .lk { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; font: 700 12px var(--sans); color: #2a1c06; background: linear-gradient(180deg, #f6d57e, #c4912f); }
.label3d.bl .plus { background: linear-gradient(180deg, #a6e07c, #4f9a35); color: #0e2606; }
.label3d.bl .plus .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.label3d.bl .lk { background: #3a3128; color: var(--ink2); } .label3d.bl .lk .ico { width: 12px; height: 12px; stroke-width: 2.2; }
.label3d.bl .tm { font: 600 12px var(--sans); color: #ffd98a; padding-left: 6px; border-left: 1px solid var(--line); }
.label3d.bl.hot { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 185, 85, .25), 0 6px 18px rgba(0, 0, 0, .5); filter: brightness(1.15); }
.label3d.bl.plot { background: linear-gradient(180deg, rgba(30, 44, 22, .93), rgba(16, 26, 12, .93)); border-color: rgba(127, 196, 90, .5); animation: bob 2.4s ease-in-out infinite; }
.label3d.bl.locked { opacity: .62; }
.label3d.bl.building { border-color: #ffb648; }
@keyframes bob { 50% { margin-top: -5px; } }
.label3d.wl { pointer-events: none; text-align: center; padding: 4px 10px; border-radius: var(--r-sm); background: rgba(20, 15, 10, .9); border: 1px solid var(--line); font-family: var(--serif); font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.label3d.wl small { display: block; font: 11px var(--sans); color: var(--ink2); }
.label3d.wl.own { background: linear-gradient(180deg, rgba(74, 56, 16, .95), rgba(40, 30, 8, .95)); border-color: var(--gold); color: var(--gold-hi); padding: 2px 9px; font-size: 12px; }
.label3d.wl.cmd { display: flex; align-items: center; gap: 5px; padding: 2px 9px 2px 3px; border-radius: 999px; border-color: var(--gold); font: 700 12px var(--sans); color: #ffe9ad; }
.label3d.wl.cmd img { width: 22px; height: 22px; }
.label3d.wl.cmd.foe { border-color: var(--red); background: rgba(70, 14, 10, .92); color: #ffc4bc; animation: pulse 1.2s infinite; }

/* ---------- Ladebild & Login ---------- */
#loading { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(circle at 50% 40%, #2a2014, #0b0806 70%); transition: opacity .8s; }
#loading.gone { opacity: 0; pointer-events: none; }
#loading img { width: 150px; filter: drop-shadow(0 8px 30px rgba(227, 185, 85, .35)); }
#loading p { font-family: var(--serif); color: var(--ink2); letter-spacing: .08em; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(227, 185, 85, .2); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#login { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: linear-gradient(90deg, rgba(8, 5, 2, .72), rgba(8, 5, 2, .2) 55%, transparent); padding: 20px; }
.login-card { position: relative; width: min(410px, 100%); justify-self: start; margin-left: clamp(0px, 7vw, 120px); padding: 30px 32px 22px; border-radius: var(--r-lg); text-align: center; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.login-card .logo { width: 104px; margin-top: -78px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }
.login-card h1 { margin: 4px 0 2px; font: 700 38px var(--serif); letter-spacing: .09em; background: linear-gradient(180deg, #fff0bf, #d9a53a 60%, #9a6a1c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card .sub { margin: 0 0 18px; color: var(--ink2); font-family: var(--serif); font-size: 15px; }
.tabs, .seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .35); box-shadow: var(--inset-ring); }
.tabs { margin-bottom: 14px; }
.tabs button, .seg button { flex: 1; padding: 7px 6px; border-radius: var(--r-xs); color: var(--ink2); font-weight: 600; font-size: 12.5px; transition: background .15s, color .15s; }
.tabs button:hover, .seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.tabs button.on, .seg button.on { background: var(--sel); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line); }
form label { display: block; text-align: left; font-size: 12px; color: var(--ink2); margin-bottom: 10px; letter-spacing: .03em; }
input[type=text], input[type=password], input[type=number], input:not([type]), select { width: 100%; margin-top: 4px; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid rgba(227, 185, 85, .22); background: rgba(0, 0, 0, .38); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; user-select: text; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 185, 85, .15); }
input[type=number] { -moz-appearance: textfield; } input[type=number]::-webkit-inner-spin-button { opacity: .4; }
input[type=range] { accent-color: var(--gold); }
.err { min-height: 18px; margin: 2px 0 8px; color: #ff9a8f; font-size: 13px; }
.fine { margin: 14px 0 0; font-size: 11px; color: var(--ink3); }

/* ---------- Schaltflächen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 650; font-size: 13px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .08s, filter .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn .ico { width: 16px; height: 16px; stroke-width: 2; }
.btn:hover { background: rgba(255, 255, 255, .11); box-shadow: inset 0 0 0 1px var(--line); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.gold { color: #2a1b05; background: linear-gradient(180deg, #f8dc8b, #d9a63c 55%, #b9832a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(120, 80, 20, .45), 0 4px 14px rgba(185, 131, 42, .3); text-shadow: 0 1px 0 rgba(255, 255, 255, .3); }
.btn.gold:hover { filter: brightness(1.08); }
.btn.red { color: #fff; background: linear-gradient(180deg, #e2685c, #a8322a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(80, 10, 6, .5); }
.btn.blue { color: #fff; background: linear-gradient(180deg, #5c9fe0, #2f66a8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(10, 30, 70, .5); }
.btn.red:hover, .btn.blue:hover { filter: brightness(1.1); }
.btn.big { width: 100%; padding: 11px; font-size: 14.5px; border-radius: 11px; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-xs); gap: 5px; } .btn.sm .ico { width: 14px; height: 14px; }
.btn:disabled, .btn.off { filter: grayscale(.9) brightness(.7); cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink2); background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); transition: background .15s, color .15s, box-shadow .15s; }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(227, 185, 85, .16); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn.off, .icon-btn.muted { color: var(--ink3); opacity: .55; }
.icon-btn.muted { position: relative; }
.icon-btn.muted::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: currentColor; transform: rotate(-40deg); border-radius: 2px; }
.close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); color: var(--ink2); z-index: 2; transition: background .15s, color .15s; }
.close .ico { width: 16px; height: 16px; stroke-width: 2.1; }
.close:hover { background: rgba(226, 87, 76, .45); color: #fff; }

/* ---------- Kopfleiste ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud > * { pointer-events: auto; }
#topbar { position: absolute; top: 10px; left: 10px; right: 10px; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 10px; border-radius: var(--r-lg); }
.brand { display: flex; align-items: center; gap: 8px; font: 700 19px var(--serif); letter-spacing: .08em; color: #f6dc97; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.village-btn { display: flex; flex-direction: column; align-items: flex-start; padding: 5px 32px 5px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); position: relative; max-width: 230px; transition: box-shadow .15s, background .15s; }
.village-btn:hover { background: rgba(0, 0, 0, .42); box-shadow: inset 0 0 0 1px var(--line); }
.village-btn::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border: solid var(--gold); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); }
.village-btn b { font: 600 14px var(--serif); color: var(--gold-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.village-btn small { color: var(--ink3); font-size: 11px; }
#resbar { display: flex; gap: 6px; margin: 0 auto; }
.res { position: relative; display: flex; align-items: center; gap: 8px; min-width: 132px; padding: 4px 12px 7px 5px; border-radius: 10px; background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); }
.res img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.res b { display: block; font-size: 15px; line-height: 1.1; }
.res small { color: var(--ink3); font-size: 10.5px; }
.res .cap { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.res .cap i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8fd16a, #d8c44e); }
.res.full b { color: #ff9a6a; } .res.full .cap i { background: var(--red); }
.res.bump b { animation: bump .5s; } @keyframes bump { 30% { transform: scale(1.18); color: #ffe38a; } }
.top-right { display: flex; align-items: center; gap: 6px; }
.pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px 0 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); font-size: 12px; color: var(--ink2); cursor: pointer; white-space: nowrap; transition: box-shadow .15s, background .15s; }
.pill:hover { box-shadow: inset 0 0 0 1px var(--line); background: rgba(0, 0, 0, .42); }
.pill .ico { color: var(--gold); width: 17px; height: 17px; }
.pill i { width: 1px; height: 16px; background: var(--line); }
.pill b { color: var(--gold-hi); }

/* ---------- Navigation ---------- */
#dock { position: absolute; left: 10px; top: 78px; display: flex; flex-direction: column; gap: 4px; padding: 7px; border-radius: var(--r-lg); }
#dock button { position: relative; width: 62px; padding: 6px 2px 5px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; color: var(--ink2); transition: background .15s, color .15s; }
#dock button img { width: 36px; height: 36px; object-fit: contain; transition: transform .2s; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
#dock button:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
#dock button:hover img { transform: scale(1.1) translateY(-1px); }
#dock button.on { background: var(--sel); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line); }
#dock .badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--sans); box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 2px rgba(20, 15, 10, .9); }
#dock hr { width: 70%; border: 0; border-top: 1px solid var(--line); margin: 3px auto; }

/* ---------- Überschriften (eine Form für Karten und Panels) ---------- */
.card h4, .sec > h3, .field-label { margin: 0 0 8px; font: 650 10.5px var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.sec > h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.card h4 { justify-content: space-between; }
.card h4 > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.card h4 .ico { width: 14px; height: 14px; stroke-width: 2; }
.card h4 .cnt { padding: 1px 7px; border-radius: 999px; background: rgba(227, 185, 85, .14); color: var(--gold-hi); letter-spacing: .04em; }
.field-label { margin: 12px 0 6px; color: var(--ink3); letter-spacing: .12em; }

/* ---------- Aktivität (rechts) ---------- */
#activity { position: absolute; right: 10px; top: 78px; width: 272px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 100px); overflow: hidden; transition: opacity .25s, transform .25s; }
#hud.panel-open #activity { opacity: 0; transform: translateX(20px); pointer-events: none; }
.card { position: relative; padding: 10px 12px; border-radius: var(--r); animation: slidein .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
.card.alert { border-color: rgba(226, 87, 76, .8); background: linear-gradient(180deg, rgba(80, 18, 14, .92), rgba(40, 12, 10, .94)); animation: pulse 1.4s infinite; }
.card.alert h4 { color: var(--red-hi); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(226, 87, 76, .25), 0 8px 24px rgba(0, 0, 0, .35); } }
.q { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 5px 0; }
.q + .q { border-top: 1px solid var(--hair); }
.q img { width: 30px; height: 30px; object-fit: contain; }
.q .t { font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q .t small { display: block; color: var(--ink3); font-size: 11px; }
.q .tm { font: 600 12px var(--sans); color: #ffd98a; }
.q > span:last-of-type { display: inline-flex; align-items: center; gap: 4px; }
.q .x { width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--r-xs); color: var(--ink3); }
.q .x .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.q .x:hover { background: rgba(226, 87, 76, .4); color: #fff; }
.bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #d9a63c, #f8dc8b); transition: width .25s linear; }
.q.waiting { opacity: .6; }

/* ---------- Aufgabe & Hinweis ---------- */
#quest { position: absolute; left: 100px; bottom: 14px; width: 340px; }
#quest .card { cursor: pointer; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; transition: border-color .15s; }
#quest .card:hover { border-color: var(--line-hi); }
#quest .card img { width: 40px; }
#quest b { font: 600 14px var(--serif); color: var(--gold-hi); }
#quest p { margin: 2px 0 0; font-size: 12px; color: var(--ink2); line-height: 1.35; }
#quest .go { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; color: var(--gold); opacity: .85; }
#quest .go svg { width: 12px; height: 12px; }
#quest .card:hover .go { opacity: 1; }
#quest .card.done { border-color: var(--green); background: linear-gradient(180deg, rgba(30, 52, 20, .93), rgba(16, 30, 12, .94)); animation: pulseg 1.6s infinite; }
@keyframes pulseg { 50% { box-shadow: 0 0 0 4px rgba(127, 196, 90, .22), 0 8px 24px rgba(0, 0, 0, .35); } }
#hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(12, 9, 6, .62); box-shadow: var(--inset-ring); color: var(--ink2); font-size: 11.5px; backdrop-filter: blur(8px); pointer-events: none !important; white-space: nowrap; }
#hint kbd { color: #ffe08a; font: inherit; font-weight: 700; }

/* ---------- Seitenpanel ---------- */
#panel { position: absolute; top: 78px; right: 10px; bottom: 10px; width: min(440px, calc(100vw - 110px)); border-radius: var(--r-lg); animation: drawer .32s cubic-bezier(.2, .8, .2, 1) both; overflow: hidden; }
@keyframes drawer { from { opacity: 0; transform: translateX(30px); } }
#panelBody { height: 100%; overflow-y: auto; padding: 18px 18px 22px; scrollbar-width: thin; scrollbar-color: rgba(227, 185, 85, .4) transparent; }
.ph { display: flex; align-items: center; gap: 14px; margin: 0 -18px 14px; padding: 0 52px 14px 18px; border-bottom: 1px solid var(--hair); }
#modal .ph { margin: 0 -22px 14px; padding: 0 52px 14px 22px; }
#mapcard .ph { margin: 0 -16px 10px; padding: 0 46px 10px 16px; }
.ph img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); }
.ph h2 { margin: 0; font: 700 22px var(--serif); letter-spacing: .03em; color: #ffe9ad; line-height: 1.2; }
.ph small { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ink2); font-size: 12.5px; }
.ph .lvl { display: inline-block; margin-top: 5px; padding: 2px 10px; border-radius: 999px; background: rgba(227, 185, 85, .14); color: var(--gold-hi); font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.desc { color: var(--ink2); line-height: 1.55; margin: 0 0 12px; font-size: 13px; }
.desc b { color: var(--ink); }
.sec { margin-top: 18px; }
.box2 { padding: 10px 12px; border-radius: var(--r); background: var(--inset); box-shadow: var(--inset-ring); }
.stat { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; padding: 4px 0; font-size: 13px; color: var(--ink2); }
.stat + .stat { border-top: 1px solid rgba(255, 255, 255, .04); }
.stat .lbl { display: inline-flex; align-items: center; gap: 8px; }
.stat .lbl > .ico { color: var(--gold); width: 16px; height: 16px; }
.stat .lbl > .ri { width: 20px; height: 20px; }
.stat.done .lbl > .ico { color: var(--green); }
.stat.sub { min-height: 0; padding: 0; font-size: 12px; color: var(--ink3); }
.stat b { color: var(--ink); text-align: right; }
.stat .up { color: var(--green); font-weight: 600; }
.lock { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(226, 87, 76, .12); color: var(--red-hi); font-size: 12.5px; box-shadow: inset 0 0 0 1px rgba(226, 87, 76, .3); }
.lock .ico { width: 15px; height: 15px; }
.req { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); color: var(--ink3); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.req .ico { width: 13px; height: 13px; }
.req.ok { color: var(--gold-hi); }
.row { display: grid; grid-template-columns: 48px 1fr auto; gap: 11px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--inset); box-shadow: var(--inset-ring); margin-bottom: 6px; transition: background .15s, box-shadow .15s; }
.row:hover { background: var(--inset-hover); box-shadow: inset 0 0 0 1px rgba(227, 185, 85, .16); }
.row > img { width: 48px; height: 48px; object-fit: contain; border-radius: var(--r-sm); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.row b { font: 600 14.5px var(--serif); color: var(--ink); }
.row small { display: block; color: var(--ink3); font-size: 11.5px; line-height: 1.4; }
.row .cost { margin: 5px 0 0; gap: 4px; } .row .rc, .row .sc.time { height: 22px; } .row .rc img { width: 17px; height: 17px; } .row .rc b, .row .sc b { font-size: 11.5px; }
.row.dim { opacity: .5; }
.row .ctl { display: flex; gap: 5px; align-items: center; }
.row .ctl input { width: 64px; margin: 0; padding: 6px 7px; text-align: center; }
.reward { margin-top: 6px; } .reward .field-label { margin: 0; font-size: 9.5px; } .reward .cost { margin: 4px 0 0; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.unit { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border-radius: var(--r-sm); background: var(--inset); box-shadow: var(--inset-ring); }
.unit img { width: 30px; height: 30px; object-fit: contain; }
.unit.zero { opacity: .35; }
.unit .lost { color: #ff8a7d; font-size: 11px; font-weight: 600; }
.empty { padding: 22px 10px; text-align: center; color: var(--ink3); font-size: 13px; line-height: 1.5; }
.empty img { width: 64px; opacity: .7; display: block; margin: 0 auto 8px; }
.rep { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--inset); margin-bottom: 5px; cursor: pointer; box-shadow: var(--inset-ring); transition: background .15s; }
.rep:hover { background: rgba(227, 185, 85, .1); }
.rep img { width: 38px; height: 38px; object-fit: contain; }
.rep b { font-size: 13px; font-weight: 500; color: var(--ink2); }
.rep.unread b { font-weight: 700; color: var(--ink); }
.rep.unread { box-shadow: inset 3px 0 0 var(--gold), var(--inset-ring); }
.rep small { color: var(--ink3); font-size: 11px; }
.rep .w { width: 8px; height: 8px; border-radius: 50%; } .rep .w.win { background: var(--green); } .rep .w.loss { background: var(--red); }
.rank { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: var(--r-sm); font-size: 13px; }
.rank:nth-child(odd) { background: rgba(0, 0, 0, .2); }
.rank.me { background: rgba(227, 185, 85, .14); box-shadow: inset 0 0 0 1px var(--line); }
.rank .n { font: 700 14px var(--serif); color: var(--gold); text-align: center; }
.rank small { color: var(--ink3); }
.pts { color: var(--gold-hi); } .pts small { color: var(--ink3); font-weight: 500; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.actions .btn { flex: 1; }

/* ---------- Markt: Rohstoffauswahl ---------- */
.respick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.respick button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .3); box-shadow: var(--inset-ring); color: var(--ink2); font-size: 11.5px; font-weight: 600; transition: background .15s, box-shadow .15s, color .15s; }
.respick button img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); transition: transform .15s; }
.respick button small { color: var(--ink3); font-size: 10.5px; font-weight: 500; }
.respick button:hover { background: rgba(0, 0, 0, .42); color: var(--ink); } .respick button:hover img { transform: translateY(-1px) scale(1.06); }
.respick button.on { background: var(--sel); box-shadow: inset 0 0 0 1px var(--line-hi); color: var(--gold-hi); }
.trade-amount { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin: 12px 0 0; padding: 8px; border-radius: var(--r); background: rgba(0, 0, 0, .22); box-shadow: var(--inset-ring); }
.trade-amount input { margin: 0; height: 38px; font-size: 15px; font-weight: 650; }
.trade-amount .arrow { color: var(--gold); display: grid; } .trade-amount .arrow .ico { width: 20px; height: 20px; }
.trade-amount .rc.out { min-width: 104px; justify-content: flex-start; background: rgba(227, 185, 85, .1); box-shadow: inset 0 0 0 1px var(--line); } .trade-amount .rc.out b { color: var(--gold-hi); }

/* ---------- Kartenkarte ---------- */
#mapcard { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); width: min(460px, calc(100vw - 30px)); padding: 14px 16px; border-radius: var(--r-lg); animation: rise .3s both; }
#mapcard .ph img { width: 56px; height: 56px; } #mapcard .ph h2 { font-size: 19px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-right: 4px; }
.tag.mine { background: rgba(227, 185, 85, .22); color: #ffe08a; } .tag.barb { background: rgba(255, 255, 255, .1); color: #ddd; } .tag.foe { background: rgba(226, 87, 76, .22); color: var(--red-hi); }

/* ---------- Dialog ---------- */
#modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(6, 4, 2, .6); backdrop-filter: blur(4px); padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
#modal .box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px; border-radius: var(--r-lg); background: var(--frame-solid); box-shadow: 0 30px 90px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); animation: rise .28s cubic-bezier(.2, .8, .2, 1) both; scrollbar-width: thin; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; margin: 10px 0; }
.vs .side { padding: 10px; border-radius: var(--r); background: var(--inset); box-shadow: var(--inset-ring); }
.vs .side b { display: block; font: 600 15px var(--serif); } .vs .side small { color: var(--ink3); }
.vs .x { color: var(--gold); } .vs .x .ico { width: 24px; height: 24px; }
.vs-val { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-weight: 650; } .vs-val.att { color: #ffd98a; } .vs-val.def { color: var(--blue-hi); }
.result { text-align: center; padding: 8px; border-radius: 10px; font: 700 17px var(--serif); letter-spacing: .06em; margin-bottom: 4px; }
.result.win { background: linear-gradient(90deg, transparent, rgba(127, 196, 90, .25), transparent); color: var(--green-hi); }
.result.loss { background: linear-gradient(90deg, transparent, rgba(226, 87, 76, .28), transparent); color: #ffa79c; }
.menu-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 10px 12px; border-radius: var(--r); text-align: left; margin-bottom: 6px; background: var(--inset); box-shadow: var(--inset-ring); transition: background .15s, box-shadow .15s; }
.menu-item b { font-family: var(--serif); font-size: 14.5px; }
.menu-item:hover { background: var(--inset-hover); box-shadow: inset 0 0 0 1px rgba(227, 185, 85, .2); }
.menu-item.on { background: var(--sel); box-shadow: inset 0 0 0 1px var(--line); }
.menu-item small { color: var(--ink3); display: inline-flex; align-items: center; gap: 4px; } .menu-item small .ico { width: 13px; height: 13px; }

/* ---------- Meldungen ---------- */
#toasts { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 9px; border-radius: 999px; font-size: 13.5px; animation: toast 4.2s cubic-bezier(.2, .8, .2, 1) both; }
.toast img { width: 30px; height: 30px; object-fit: contain; }
.toast .cost { margin: 0; flex-wrap: nowrap; } .toast .rc { height: 24px; } .toast .rc b { color: var(--green-hi); }
.toast.good { border-color: rgba(127, 196, 90, .7); } .toast.bad { border-color: rgba(226, 87, 76, .8); color: #ffc4bc; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-14px) scale(.95); } 7%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1100px) { .brand span, #rankPill { display: none; } .res { min-width: 0; padding-right: 8px; } .res small { display: none; } }
@media (max-width: 820px) {
  #topbar { height: auto; flex-wrap: wrap; padding: 6px 8px; gap: 6px; } #resbar { order: 5; width: 100%; justify-content: space-between; margin: 0; gap: 4px; } .res img { width: 22px; height: 22px; } .res b { font-size: 12.5px; }
  .top-right { margin-left: auto; } #dock { top: auto; bottom: 8px; left: 8px; right: 8px; flex-direction: row; overflow-x: auto; justify-content: space-between; padding: 4px; } #dock button { width: 50px; flex: none; } #dock button img { width: 28px; height: 28px; } #dock hr { display: none; }
  #activity { top: 152px; width: 210px; } #toasts { top: 152px; } #quest { left: 8px; bottom: 76px; width: min(300px, calc(100vw - 16px)); } #hint { display: none; }
  #panel { top: 150px; left: 8px; right: 8px; bottom: 74px; width: auto; } #mapcard { bottom: 76px; } .login-card { margin: 0 auto; justify-self: center; }
  .respick button span { display: none; }
}
.cost.worth { margin: -4px 0 4px; gap: 5px; } .cost.worth .field-label { margin: 0 4px 0 0; } .cost.worth .rc { height: 24px; } .cost.worth .rc img { width: 18px; height: 18px; } .cost.worth .rc b { font-size: 12px; color: var(--gold-hi); }
.row-foot { grid-column: 1 / -1; margin-top: -2px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .05); }
.row-foot .cost { margin: 0; }
.row .stats { gap: 12px; margin: 3px 0 2px; } .row .stats .sc { height: auto; padding: 0; gap: 4px; background: none; box-shadow: none; } .row .stats .sc .ico { width: 14px; height: 14px; }
.row-foot { display: flex; align-items: center; gap: 8px; } .row-foot .cost { flex: 1; }
.row-foot .sc.have { height: 22px; padding: 0 8px 0 6px; } .row-foot .sc.have b { font-size: 11.5px; }
.row .stats { gap: 10px; }
.row .stats { gap: 8px; } .row .stats .sc b { font-size: 11px; } .row .stats .sc .ico { width: 13px; height: 13px; }
.row .ctl input { width: 56px; }
.lvl-in { color: var(--gold-hi); font-weight: 600; }
@media (max-width: 1320px) { #hint { left: auto; right: 14px; transform: none; } #hud.panel-open #hint { display: none; } }
#quest, #hint { transition: opacity .2s; }
#hud.map-sel #quest, #hud.map-sel #hint { opacity: 0; pointer-events: none; }
/* Dauerhafte Dorfnamen auf der Weltkarte */
.label3d.wl.name { display: flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; font: 600 11px var(--sans); letter-spacing: .02em; color: #efe3c6; background: rgba(18, 13, 8, .72); border-color: rgba(200, 170, 110, .28); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); white-space: nowrap; }
.label3d.wl.name i { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.label3d.wl.name.own { color: var(--gold-hi); border-color: var(--gold); background: linear-gradient(180deg, rgba(74, 56, 16, .92), rgba(40, 30, 8, .92)); font-size: 12px; }
.label3d.wl.name.barb { color: #b9b2a6; background: rgba(22, 20, 18, .62); border-color: rgba(150, 140, 125, .22); font-weight: 500; }
.vlbl { display: block; margin: 6px 0 2px; font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
/* Barbaren auf der Weltkarte: nur ein kleines Helm-Abzeichen (Name per Hover) */
.label3d.wl.name.barb { width: 22px; height: 22px; padding: 0; justify-content: center; border-radius: 50%; color: #d9cbb3; background: radial-gradient(circle at 50% 35%, rgba(70, 52, 38, .92), rgba(24, 17, 12, .92)); border: 1px solid rgba(180, 150, 110, .45); }
.label3d.wl.name.barb .ico { width: 15px; height: 15px; stroke-width: 1.8; }
.label3d.wl.name.barb.t2 { color: #f0b48a; border-color: rgba(214, 128, 70, .6); }
.label3d.wl.name.barb.t3 { color: #ff9b8a; border-color: rgba(210, 70, 55, .75); width: 25px; height: 25px; box-shadow: 0 0 8px rgba(200, 50, 30, .35), 0 2px 8px rgba(0, 0, 0, .4); }

/* =====================================================================
   Smartphone & Tablet – nur Ergänzungen, Desktop bleibt unverändert.
   --top-h wird per JS aus der echten Höhe der Kopfleiste gesetzt.
   ===================================================================== */
@media (hover: none) and (pointer: coarse) {
  html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
  #hud, #dock, #labels, .label3d { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  button, .label3d.bl { touch-action: manipulation; }
  #dock button:hover img { transform: none; } /* kein „klebender“ Hover nach dem Antippen */
}

/* Smartphone hochkant */
@media (max-width: 560px) {
  #topbar { top: calc(6px + env(safe-area-inset-top)); left: 6px; right: 6px; padding: 6px; gap: 6px; }
  .brand { display: none; }
  .village-btn { max-width: 52vw; padding: 4px 26px 4px 10px; } .village-btn b { font-size: 13px; max-width: 40vw; } .village-btn small { font-size: 10.5px; }
  .top-right { gap: 4px; } .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
  #resbar { gap: 4px; } .res { padding: 3px 7px 7px 4px; } .res img { width: 20px; height: 20px; } .res b { font-size: 12px; }
  #activity { top: calc(var(--top-h, 110px) + 6px); right: 6px; width: min(230px, 62vw); }
  #toasts { top: calc(var(--top-h, 110px) + 6px); width: calc(100vw - 16px); }
  #panel { top: calc(var(--top-h, 110px) + 6px); left: 6px; right: 6px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  #dock { left: 6px; right: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); gap: 0; overflow: hidden; justify-content: stretch; }
  #dock button { flex: 1 1 0; width: auto; min-width: 0; padding: 5px 0 4px; font-size: 9px; letter-spacing: -.01em; }
  #dock button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #dock button img { width: 26px; height: 26px; }
  #dock .badge { top: 0; right: 2px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
  #quest { left: 6px; right: 6px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
  #quest .card { grid-template-columns: 32px 1fr; gap: 8px; padding: 8px 10px; } #quest .card img { width: 32px; } #quest b { font-size: 13px; } #quest p { font-size: 11.5px; }
  #mapcard { bottom: calc(72px + env(safe-area-inset-bottom)); width: calc(100vw - 12px); padding: 12px; max-height: calc(100vh - var(--top-h, 110px) - 90px); overflow-y: auto; }
  #modal { padding: 8px; } #modal .box { padding: 16px 14px; max-height: calc(100vh - 16px); }
  .label3d.bl { font-size: 11.5px; padding: 2px 8px 2px 2px; gap: 4px; } .label3d.bl .lv, .label3d.bl .plus, .label3d.bl .lk { min-width: 18px; height: 18px; font-size: 10.5px; }
  .label3d.wl.name { font-size: 10px; padding: 1px 6px 1px 5px; }
}

/* Smartphone quer (wenig Höhe): Kopfleiste einzeilig, Leiste links als reine Symbolleiste */
@media (max-height: 520px) and (orientation: landscape) {
  #topbar { top: 6px; left: calc(6px + env(safe-area-inset-left)); right: calc(6px + env(safe-area-inset-right)); height: 46px; flex-wrap: nowrap; padding: 0 8px; gap: 8px; }
  .brand { display: none; }
  .village-btn { padding: 3px 26px 3px 10px; max-width: 190px; } .village-btn b { font-size: 12.5px; } .village-btn small { font-size: 10px; }
  #resbar { order: 0; width: auto; flex: 1; justify-content: center; margin: 0; gap: 6px; }
  .res { min-width: 0; padding: 2px 8px 6px 4px; } .res img { width: 20px; height: 20px; } .res b { font-size: 12px; } .res small { display: none; }
  .top-right { margin-left: 0; gap: 4px; } .icon-btn { width: 32px; height: 32px; }
  #dock { top: 58px; bottom: 6px; left: calc(6px + env(safe-area-inset-left)); right: auto; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 4px; overflow-y: auto; scrollbar-width: none; }
  #dock::-webkit-scrollbar { display: none; }
  #dock button { width: 40px; flex: none; padding: 3px 0; } #dock button span { display: none; } #dock button img { width: 26px; height: 26px; }
  #dock hr { display: block; margin: 1px auto; }
  #activity { top: 58px; right: calc(6px + env(safe-area-inset-right)); width: 220px; max-height: calc(100vh - 66px); }
  #toasts { top: 58px; }
  #quest { left: calc(62px + env(safe-area-inset-left)); right: auto; bottom: 6px; width: 270px; }
  #quest .card { grid-template-columns: 28px 1fr; padding: 6px 10px; } #quest .card img { width: 28px; } #quest b { font-size: 12.5px; } #quest p { display: none; }
  #panel { top: 58px; bottom: 6px; left: auto; right: calc(6px + env(safe-area-inset-right)); width: min(430px, calc(100vw - 72px)); }
  #mapcard { left: calc(50% + 28px); bottom: 6px; width: min(440px, calc(100vw - 80px)); padding: 10px 12px; max-height: calc(100vh - 70px); overflow-y: auto; }
  #modal { padding: 6px; } #modal .box { max-height: calc(100vh - 12px); padding: 14px; }
  .label3d.bl { font-size: 11px; padding: 2px 8px 2px 2px; gap: 4px; } .label3d.bl .lv, .label3d.bl .plus, .label3d.bl .lk { min-width: 18px; height: 18px; font-size: 10.5px; }
  .label3d.wl.name { font-size: 10px; padding: 1px 6px 1px 5px; }
  #hint { display: none; }
}

/* ---------- Gefechte auf der Weltkarte ---------- */
.label3d.wl.battle-ico { padding: 0; background: none; border: 0; box-shadow: none; }
.bt-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff3d6; background: radial-gradient(circle at 50% 35%, #d8503f, #7a1e16 70%); border: 2px solid #f0c060; box-shadow: 0 0 0 3px rgba(226, 87, 76, .25), 0 0 18px rgba(255, 120, 60, .55), 0 4px 12px rgba(0, 0, 0, .5); animation: btPulse 1s ease-in-out infinite; }
.bt-ico .ico { width: 19px; height: 19px; stroke-width: 2.2; }
@keyframes btPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); box-shadow: 0 0 0 6px rgba(226, 87, 76, .12), 0 0 26px rgba(255, 140, 60, .75), 0 4px 12px rgba(0, 0, 0, .5); } }
.label3d.wl.battle-res { padding: 0; background: none; border: 0; box-shadow: none; animation: brIn .55s cubic-bezier(.2, 1.5, .4, 1) both, brOut .6s ease-in 4.9s forwards; }
.br-card { position: relative; min-width: 168px; padding: 26px 16px 10px; border-radius: 12px; text-align: center; background: linear-gradient(180deg, rgba(56, 42, 20, .97), rgba(24, 17, 10, .97)); border: 1.5px solid var(--gold); box-shadow: 0 0 0 4px rgba(227, 185, 85, .16), 0 0 34px rgba(255, 200, 90, .35), 0 10px 28px rgba(0, 0, 0, .6); }
.battle-res.bad .br-card { background: linear-gradient(180deg, rgba(64, 22, 18, .97), rgba(26, 10, 8, .97)); border-color: var(--red); box-shadow: 0 0 0 4px rgba(226, 87, 76, .16), 0 0 30px rgba(226, 87, 76, .35), 0 10px 28px rgba(0, 0, 0, .6); }
.br-ico { position: absolute; left: 50%; top: -24px; width: 46px; height: 46px; transform: translateX(-50%); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.br-card b { display: block; font: 700 23px/1.1 var(--serif); letter-spacing: .04em; color: var(--gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 14px rgba(255, 210, 120, .45); }
.battle-res.bad .br-card b { color: var(--red-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 14px rgba(255, 110, 90, .45); }
.br-card small { display: block; margin-top: 2px; font: 11px var(--sans); color: var(--ink2); }
.br-loss { display: flex; justify-content: center; gap: 10px; margin-top: 7px; font: 600 11.5px var(--sans); color: var(--ink); }
.br-loss span { display: inline-flex; align-items: center; gap: 4px; } .br-loss .ico { width: 13px; height: 13px; color: var(--gold); }
.br-loot { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(227, 185, 85, .22); font: 700 11.5px var(--sans); color: var(--gold-hi); }
.battle-res.bad .br-loot { color: var(--red-hi); }
.br-loot span { display: inline-flex; align-items: center; gap: 3px; } .br-loot img { width: 16px; height: 16px; }
@keyframes brIn { from { opacity: 0; transform-origin: 50% 100%; scale: .4; } to { opacity: 1; scale: 1; } }
@keyframes brOut { to { opacity: 0; translate: 0 -14px; } }
