* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #171310;
  --bg2: #211b16;
  --panel: #2a221b;
  --panel2: #332921;
  --border: #4a3a2a;
  --gold: #f0b429;
  --gold-dim: #c99a1e;
  --text: #e8dcc8;
  --text-dim: #a89880;
  --green: #7fb069;
  --red: #d9594c;
  --blue: #6fa8dc;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, #2a2018 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header ---------- */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #2b2118, #221a13);
  border-bottom: 2px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo { font-size: 30px; filter: drop-shadow(0 0 6px rgba(240,180,41,.5)); }
.brand-name {
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 18px;
  color: var(--gold);
  text-shadow: 0 1px 0 #000;
}
.brand-sub { font-size: 10px; letter-spacing: 2px; color: var(--text-dim); text-transform: uppercase; }

.world-badge, .preview-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  white-space: nowrap;
}
.world-badge { color: var(--gold); border-color: #6b5320; }

.res-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.res {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 11px;
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.res.gold { border-color: #6b5320; color: var(--gold); box-shadow: 0 0 8px rgba(240,180,41,.12) inset; }
.res.cap { color: var(--text-dim); font-weight: 400; }
.res-ico { font-size: 15px; }
.res.full span:not(.res-ico) { color: var(--red); }

/* ---------- Tabs ---------- */
#tabs {
  display: flex;
  gap: 4px;
  padding: 8px 18px 0;
  border-bottom: 2px solid var(--border);
  background: var(--bg2);
  overflow-x: auto;
}
.tab {
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--panel2);
  color: var(--gold);
  font-weight: 700;
  border-color: var(--gold-dim);
  border-bottom: 2px solid var(--panel2);
  margin-bottom: -2px;
}

/* ---------- Main ---------- */
#main { flex: 1; padding: 18px; max-width: 1200px; width: 100%; margin: 0 auto; }

h2.section {
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.muted { color: var(--text-dim); font-size: 12.5px; }
.small { font-size: 12px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.grid { display: grid; gap: 12px; }
.grid-buildings { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ---------- Building cards ---------- */
.bcard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bcard.goldmine { border-color: #6b5320; background: linear-gradient(160deg, #33291b, #2a221b); }
.bcard-head { display: flex; align-items: center; gap: 10px; }
.bcard-ico { font-size: 26px; }
.bcard-title { font-weight: 700; font-size: 15px; }
.bcard-lvl {
  margin-left: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}
.bcard-info { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.bcard-info b { color: var(--text); }
.cost-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cost { display: flex; gap: 4px; align-items: center; }
.cost.lack { color: var(--red); }
.cost.ok { color: var(--text); }
.cost .g { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  background: linear-gradient(180deg, #8a6a1e, #6b5216);
  border: 1px solid #a8842a;
  color: #fff2d0;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: filter .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); font-weight: 400; }
.btn-red { background: linear-gradient(180deg, #8a3a2e, #6b2a20); border-color: #a85040; }
.btn-green { background: linear-gradient(180deg, #4e7a3a, #3a5c2a); border-color: #6a9a50; }

/* ---------- Dorf-Szene ---------- */
.village-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.village-topbar .hint { margin-left: auto; }

#sceneWrap {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #0a1020;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
#scene3d {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 340px;
  max-height: 74vh;
  touch-action: none;
  user-select: none;
  position: relative;
}
#scene3d canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
#scene3d canvas:active { cursor: grabbing; }
.scene-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 15px;
}

#v3dLabels {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.v3d-label {
  position: absolute;
  top: 0; left: 0;
  background: rgba(14,12,20,.78);
  border: 1px solid rgba(240,180,41,.35);
  color: var(--text);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(3px);
  transition: border-color .15s, background .15s;
}
.v3d-label b { color: var(--gold); }
.v3d-label:hover { border-color: var(--gold); background: rgba(30,24,14,.92); }
.v3d-label.building { border-color: var(--gold-dim); }
.v3d-label .v3d-queue { color: var(--gold); font-variant-numeric: tabular-nums; }

#zoomCtrls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#v3dMinimap {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 1.5px solid rgba(201, 154, 30, .5);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(10, 14, 24, .7);
  cursor: pointer;
  z-index: 4;
  opacity: .55;
  transition: opacity .2s, border-color .2s;
  line-height: 0;
}
#v3dMinimap canvas { display: block; width: 96px; height: 96px; transition: width .2s, height .2s; }
#v3dMinimap:hover { opacity: 1; border-color: var(--gold); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
#v3dMinimap:hover canvas { width: 170px; height: 170px; }

.tile2 .mk.unknown-mk { font-size: 15px; opacity: .8; }
.tile2.unknown::after { box-shadow: inset 0 0 0 2px rgba(160,160,170,.4); }
#zoomCtrls button {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--gold-dim);
  background: rgba(24,18,12,.88);
  color: var(--gold);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}
#zoomCtrls button:hover { background: rgba(50,38,24,.95); }

#bpanel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(390px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: rgba(26,20,14,.96);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.bp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bp-close {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 7px;
  width: 30px; height: 30px;
  cursor: pointer;
  font-size: 14px;
}
.bp-close:hover { color: var(--text); border-color: var(--text-dim); }
.bp-section { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.bp-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.bp-title { display: block; margin-bottom: 8px; color: var(--gold); font-size: 13.5px; }

.preview-row { display: flex; align-items: center; gap: 6px; }
.preview-arrow { color: var(--gold); font-size: 20px; }
.preview-box {
  flex: 1;
  background: radial-gradient(ellipse at 50% 40%, #1c2438 0%, #0d1322 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 6px 4px;
  text-align: center;
}
.preview-box.next { border-color: var(--gold-dim); box-shadow: 0 0 12px rgba(240,180,41,.15); }
.preview-box svg, .preview-box img { width: 100%; height: auto; display: block; border-radius: 6px; }

.trade-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trade-row select, .trade-row input {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 8px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
}
.trade-row input { width: 84px; }

.bp-stats { display: flex; gap: 10px; margin-top: 10px; }
.bp-stats > div {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}
.bp-stats .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.bp-stats .v { font-size: 14.5px; font-weight: 700; margin-top: 2px; }

.hq-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.hq-row:last-child { border-bottom: none; }
.hq-ico { font-size: 20px; }
.hq-mid { flex: 1; line-height: 1.5; }
.hq-mid .small span { margin-right: 6px; }
.goldTxt { color: var(--gold); }
.lackTxt { color: var(--red); }
.hq-row.locked, .unit-row.locked { opacity: .55; }
.bp-rec-input {
  width: 56px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 7px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.siegel-row { font-size: 20px; color: var(--gold); letter-spacing: 4px; margin-top: 4px; }

@media (max-width: 720px) {
  #bpanel { position: static; width: 100%; max-height: none; margin-top: 10px; }
  #sceneWrap { overflow: visible; }
  #scene { border-radius: 12px; overflow: hidden; }
}

/* ---------- Queue ---------- */
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.queue-item .timer { margin-left: auto; color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 700; }
.progress {
  height: 5px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
  min-width: 60px;
}
.progress > div { height: 100%; background: var(--gold); transition: width .5s linear; }

/* ---------- Map ---------- */
:root { --tile: 42px; }
.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.range-label { display: flex; align-items: center; gap: 8px; }
.range-label b { color: var(--gold); min-width: 18px; text-align: center; }
.range-label input[type=range] { width: 140px; accent-color: var(--gold); }

#mapWrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
#mapGrid {
  display: grid;
  gap: 1px;
  background: #101a0c;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  max-width: 100%;
  overflow: auto;
}
.tile2 {
  width: var(--tile); height: var(--tile);
  border-radius: 3px;
  position: relative;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile2.t-g1 { background: linear-gradient(135deg, #33481f, #2d401b); background-color: #33481f; }
.tile2.t-g2 { background: #2f431d; }
.tile2.t-g3 { background: #36491f; }
.tile2.t-f  { background: #24371a; }
.tile2.t-w  { background: radial-gradient(circle at 40% 35%, #3d6a86, #2a4a63); }
.tile2.t-void { background: #0d140a; }
.tile2 .mk {
  font-size: 21px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.6));
  z-index: 1;
}
.tile2 .mk.deco { font-size: 15px; opacity: .55; filter: none; }
.tile2.v { cursor: pointer; }
.tile2.v::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 4px;
  pointer-events: none;
}
.tile2.own::after { box-shadow: inset 0 0 0 2px var(--gold), 0 0 10px rgba(240,180,41,.5); }
.tile2.barb::after { box-shadow: inset 0 0 0 2px rgba(217,89,76,.65); }
.tile2.player::after { box-shadow: inset 0 0 0 2px rgba(111,168,220,.6); }
.tile2.v:hover { z-index: 3; transform: scale(1.12); transition: transform .1s; }
.tile2.selected::after { box-shadow: inset 0 0 0 2.5px var(--blue), 0 0 12px rgba(111,168,220,.6); }
.lvlchip {
  position: absolute;
  right: 2px; bottom: 2px;
  background: rgba(14,10,6,.85);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 800;
  font-style: normal;
  padding: 0 4px;
  border-radius: 6px;
  z-index: 2;
}
#mapSide { flex: 1; min-width: 300px; }

.unit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.unit-row:last-child { border-bottom: none; }
.unit-row input[type=number] {
  width: 70px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.unit-ico { font-size: 19px; }
.unit-name { font-weight: 600; min-width: 110px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
th { color: var(--text-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; }
tr.active-tier { background: rgba(240,180,41,.08); }
tr.active-tier td:first-child { color: var(--gold); font-weight: 700; }
tr.me td { color: var(--gold); font-weight: 700; }

/* ---------- Wallet ---------- */
.wallet-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.wallet-box .amount { font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.wallet-box .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.flow-arrow { text-align: center; color: var(--text-dim); font-size: 18px; padding: 2px 0; }

.input-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.input-row input {
  flex: 1;
  min-width: 110px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.stat .v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.stat.burn .v { color: var(--red); }
.stat.pool .v { color: var(--green); }
.stat.gold .v { color: var(--gold); }

/* ---------- Reports ---------- */
.report {
  border-left: 3px solid var(--border);
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
}
.report.win { border-left-color: var(--green); }
.report.loss { border-left-color: var(--red); }
.report .when { color: var(--text-dim); font-size: 11px; }

/* ---------- Kampf-Berichte ---------- */
.rep-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--panel);
}
.rep-card.win { border-color: rgba(127,176,105,.5); }
.rep-card.loss { border-color: rgba(217,89,76,.5); }
.rep-banner {
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.rep-card.win .rep-banner { background: linear-gradient(90deg, rgba(127,176,105,.25), transparent); color: var(--green); }
.rep-card.loss .rep-banner { background: linear-gradient(90deg, rgba(217,89,76,.25), transparent); color: var(--red); }
.rep-sub { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--text-dim); }
.rep-body { padding: 12px 16px; }
.rep-power { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 10px; }
.rep-bar {
  flex: 1;
  min-width: 120px;
  height: 10px;
  border-radius: 5px;
  background: rgba(217,89,76,.5);
  overflow: hidden;
}
.rep-bar > div { height: 100%; background: var(--green); border-radius: 5px 0 0 5px; }
.rep-table { width: 100%; margin: 6px 0; }
.rep-table th { font-size: 10.5px; }
.rep-loot {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 13.5px;
  font-weight: 600;
}
.winTxt { color: var(--green); }
.lossTxt { color: var(--red); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--panel2);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  animation: slidein .25s ease;
}
.toast.err { border-color: var(--red); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Handy drehen (mobil nur Querformat) ---------- */
#rotateOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #2a2018 0%, #120e0a 75%);
  padding: 24px;
}
@media (max-width: 900px) and (orientation: portrait) {
  body.in-game #rotateOverlay { display: flex; }
}
.rotate-icon {
  font-size: 64px;
  display: inline-block;
  animation: rotatePhone 2s ease-in-out infinite;
}
@keyframes rotatePhone {
  0%, 25% { transform: rotate(0deg); }
  55%, 80% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}
.rotate-box h2 { color: var(--gold); letter-spacing: 2px; margin: 14px 0 10px; }
.rotate-box p { color: var(--text); font-size: 15px; line-height: 1.7; max-width: 320px; }

/* ---------- Login ---------- */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #2a2018 0%, #120e0a 75%);
  padding: 20px;
}
#loginOverlay.hidden { display: none; }
.login-box {
  max-width: 440px;
  width: 100%;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(240,180,41,.08);
}
.login-logo { font-size: 52px; filter: drop-shadow(0 0 14px rgba(240,180,41,.6)); }
.login-box h1 { color: var(--gold); letter-spacing: 6px; font-size: 28px; margin-top: 6px; }
.login-sub { color: var(--text-dim); letter-spacing: 4px; font-size: 11px; margin-top: 4px; }
.login-text { margin: 18px 0; font-size: 14px; line-height: 1.7; color: var(--text); }
#loginName {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 16px;
  text-align: center;
  margin-bottom: 12px;
}
#loginName:focus { outline: none; border-color: var(--gold-dim); }
.login-btn { width: 100%; font-size: 15px; padding: 12px; }
.login-note { margin-top: 16px; font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }
.player-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--gold-dim);
  background: var(--panel);
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
#footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11.5px;
  background: var(--bg2);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge.on { color: var(--green); border-color: var(--green); }
.badge.gold { color: var(--gold); border-color: #6b5320; }
