/* =====================================================================
   Fünf Wunder – Gestaltung
   Art déco × historischer Handelsatlas
   ===================================================================== */

@font-face { font-family: "Lora"; src: url("../fonts/Lora-Variable.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic-Variable.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --navy: #102b3b;
  --navy-1: #0b1f2c;
  --navy-2: #163649;
  --navy-3: #1f4760;
  --gold: #d7ac61;
  --gold-l: #f0d08e;
  --gold-d: #a87a35;
  --parch: #f5e9d1;
  --parch-2: #ecdcb9;
  --parch-3: #e2cd9f;
  --ink: #1d2b35;
  --ink-2: #4a4234;
  --muted: #7a6a50;
  --petrol: #527e78;
  --red: #a4442f;
  --green: #3f7a3d;
  --line: rgba(168, 122, 53, .38);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --radius: 3px;
  --shadow: 0 10px 30px rgba(3, 12, 20, .35), 0 2px 6px rgba(3, 12, 20, .25);
  --header-h: 74px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--navy-1);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(215, 172, 97, .14), transparent 55%),
    repeating-linear-gradient(45deg, rgba(215, 172, 97, .025) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgba(215, 172, 97, .025) 0 1px, transparent 1px 22px);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-3); }
a:hover { color: var(--gold-d); }
code { font-size: .88em; background: rgba(16, 43, 59, .08); padding: 1px 5px; border-radius: 2px; word-break: break-all; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; }
.muted { color: var(--muted); }
.r { text-align: right; }
.c { text-align: center; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.mini-lock { width: 12px; height: 12px; opacity: .8; }

/* ---------------------------------------------------------------- Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: stretch; gap: 0;
  height: var(--header-h);
  background: linear-gradient(180deg, #14364a 0%, var(--navy) 55%, #0c2331 100%);
  border-bottom: 1px solid var(--gold-d);
  box-shadow: 0 1px 0 rgba(240, 208, 142, .35), 0 6px 18px rgba(0, 0, 0, .35);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-d) 15%, var(--gold-l) 50%, var(--gold-d) 85%, transparent);
  opacity: .55; pointer-events: none;
}
.brand { display: flex; align-items: center; padding: 0 20px 0 16px; border-right: 1px solid rgba(215, 172, 97, .28); flex: none; }
.brand img { height: 56px; width: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.mainnav { display: flex; align-items: stretch; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0 16px; min-width: 92px;
  color: #d9c9a6; text-decoration: none; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  border-right: 1px solid rgba(215, 172, 97, .14);
  transition: background .2s, color .2s;
}
.mainnav a .ic { width: 24px; height: 24px; color: var(--gold); }
.mainnav a:hover { background: rgba(255, 255, 255, .05); color: #fff3d6; }
.mainnav a.active { background: linear-gradient(180deg, rgba(240, 208, 142, .14), rgba(240, 208, 142, .04)); color: #fff3d6; }
.mainnav a.active::before { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l), var(--gold-d)); }
.mainnav a.locked { color: #8f9aa0; }
.mainnav a.locked .ic:not(.mini-lock) { color: #8a8e86; }
.mainnav a .mini-lock { position: absolute; top: 12px; right: calc(50% - 22px); color: var(--gold); }

.topbar-right { display: flex; align-items: center; gap: 18px; padding: 0 16px 0 18px; border-left: 1px solid rgba(215, 172, 97, .28); flex: none; }
.era { color: #f2e2bf; min-width: 210px; }
.era-year { font-size: 18px; font-weight: 600; letter-spacing: .02em; color: #fff4dc; }
.era-name { font-size: 12.5px; color: #d9c9a6; margin-bottom: 4px; }
.era .bar { height: 5px; }
.era-next { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #a9a088; margin-top: 3px; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; color: #f2e2bf; }
.usermenu summary::-webkit-details-marker { display: none; }
.mini-avatar { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(215, 172, 97, .25); background: var(--parch-2); flex: none; }
.mini-avatar img, .mini-avatar svg { width: 100%; height: 100%; object-fit: cover; }
.um-name { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-chev { width: 16px; height: 16px; color: var(--gold); transition: transform .2s; }
.usermenu[open] .um-chev { transform: rotate(180deg); }
.um-menu {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 250px; z-index: 60;
  background: var(--parch); border: 1px solid var(--gold-d); box-shadow: var(--shadow), inset 0 0 0 4px var(--parch), inset 0 0 0 5px var(--line);
  padding: 8px;
}
.um-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-head strong { display: block; font-size: 16px; }
.um-head small { color: var(--muted); }
.um-menu a, .um-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none;
  font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.um-menu a:hover, .um-menu button:hover { background: var(--parch-2); }
.um-menu .ic { color: var(--gold-d); }

/* ---------------------------------------------------------------- Reiseleiste */
.travelbar {
  display: flex; align-items: center; gap: 14px; padding: 8px 24px; color: #f2e2bf; font-size: 14px;
  background: linear-gradient(90deg, #1b4058, #163649); border-bottom: 1px solid rgba(215, 172, 97, .35);
}
.travelbar .ic { color: var(--gold); }
.tb-bar { flex: 1; max-width: 360px; height: 6px; background: rgba(0, 0, 0, .35); border-radius: 3px; overflow: hidden; }
.tb-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); transition: width 1s linear; }
.tb-time { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Seite */
.page { max-width: 1680px; margin: 0 auto; padding: 22px 22px 40px; }
.page-head { margin: 4px 4px 18px; color: #f2e2bf; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: .01em; }
.page-head .muted { color: #a9a088; }
.foot { display: flex; justify-content: center; gap: 12px; padding: 18px 16px 30px; color: #8c8a7c; font-size: 12.5px; letter-spacing: .04em; flex-wrap: wrap; }
.foot-orn { color: var(--gold-d); }

/* ---------------------------------------------------------------- Karten */
.card { position: relative; border-radius: var(--radius); box-shadow: var(--shadow); }
.parchment {
  background-color: var(--parch);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 252, 240, .7), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(201, 165, 103, .18), transparent 55%);
  border: 1px solid #b88e48;
  box-shadow: var(--shadow), inset 0 0 0 4px var(--parch), inset 0 0 0 5px var(--line);
  padding: 18px 20px;
}
.parchment::before, .parchment::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 1px solid var(--gold-d); opacity: .75;
}
.parchment::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.parchment::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.card-title {
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.card-title-aside { font-size: 12px; letter-spacing: .04em; text-transform: none; color: var(--muted); font-weight: 400; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.navy-card { background: linear-gradient(180deg, var(--navy-2), var(--navy)); border: 1px solid var(--gold-d); color: #f2e2bf; }

.bar { height: 7px; background: rgba(16, 43, 59, .14); border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-3), var(--petrol)); border-radius: 4px; }
.topbar .bar, .travelbar .bar { background: rgba(0, 0, 0, .35); }
.topbar .bar > span { background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }
.bar.thin { height: 4px; }
.bar.wide { max-width: 420px; margin: 10px auto 0; height: 8px; }

/* ---------------------------------------------------------------- Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 2px; border: 1px solid transparent;
  font: 600 13px/1.2 var(--serif); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: filter .15s, transform .05s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.btn .ic { width: 18px; height: 18px; }
.btn-navy { background: linear-gradient(180deg, #1d4660, var(--navy)); color: #f6e6c2; border-color: var(--gold-d); box-shadow: inset 0 0 0 1px rgba(240, 208, 142, .25); }
.btn-navy:hover:not(:disabled) { filter: brightness(1.15); color: #fff; }
.btn-gold { background: linear-gradient(180deg, #f3d895, var(--gold) 55%, #b98a42); color: #2a1d0c; border-color: #8f652a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); color: #1a1206; }
.btn-ghost { background: rgba(16, 43, 59, .55); color: #f6e6c2; border-color: rgba(240, 208, 142, .55); backdrop-filter: blur(2px); }
.btn-ghost:hover { background: rgba(16, 43, 59, .8); color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--navy); border-color: var(--gold-d); }
.btn-ghost-dark:hover { background: var(--parch-2); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 14px; }
.btn-sm { padding: 6px 10px; font-size: 11px; letter-spacing: .08em; }

/* ---------------------------------------------------------------- Meldungen */
.toasts { position: fixed; top: calc(var(--header-h) + 14px); right: 18px; z-index: 70; display: flex; flex-direction: column; gap: 10px; max-width: min(440px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; font-size: 14px;
  background: var(--parch); color: var(--ink); border: 1px solid var(--gold-d); border-left-width: 5px;
  box-shadow: var(--shadow); animation: toast-in .35s ease-out;
}
.toast .ic { margin-top: 1px; }
.toast span { flex: 1; }
.toast-success { border-left-color: var(--green); } .toast-success > .ic { color: var(--green); }
.toast-error { border-left-color: var(--red); } .toast-error > .ic { color: var(--red); }
.toast-info { border-left-color: var(--navy-3); } .toast-info > .ic { color: var(--navy-3); }
.toast-rank { border-left-color: var(--gold); background: linear-gradient(90deg, #fff1cf, var(--parch)); } .toast-rank > .ic { color: var(--gold-d); }
.toast-x { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); }
.toast-x .ic { width: 16px; height: 16px; }
.toast.static { animation: none; box-shadow: none; margin-bottom: 12px; }
.toast.hide { opacity: 0; transform: translateX(20px); transition: all .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.notice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: rgba(82, 126, 120, .12); border: 1px solid rgba(82, 126, 120, .45); margin: 0 0 14px; font-size: 14px; }
.notice .ic { color: var(--petrol); }

/* ---------------------------------------------------------------- Übersicht */
.dash {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr) minmax(0, .82fr) minmax(0, 1fr);
  grid-template-areas:
    "hero epoch quests quests"
    "hero epoch cargo market"
    "wonders auction cargo market"
    "news news news news";
}
.hero { grid-area: hero; } .epoch { grid-area: epoch; } .wonders { grid-area: wonders; }
.auction { grid-area: auction; } .worldmarket { grid-area: market; } .quests { grid-area: quests; }
.cargo-card { grid-area: cargo; } .news { grid-area: news; }
/* Kacheln einer Reihe sind gleich hoch; Knöpfe sitzen jeweils unten */
.dash > .card.parchment { display: flex; flex-direction: column; }
.dash > .card.parchment > .btn-block { margin-top: auto; }
.dash > .card.parchment > .checklist, .dash > .card.parchment > .auction-body { margin-bottom: 16px; }
.dash .cargo { display: flex; flex-direction: column; flex: 1; }
.dash .cargo .fineprint { margin-top: auto; padding-top: 10px; }
.dash .quests .goals { flex: 1; align-content: start; }
.dash .quests .next-rank { margin-top: auto; }
.dash .wonders .wonder-row { flex: 1; align-content: center; }
.dash .news .newslist { flex: 1; align-content: start; }

.hero {
  overflow: hidden; min-height: 470px; border: 1px solid #b88e48;
  box-shadow: var(--shadow), inset 0 0 0 4px rgba(245, 233, 209, .0);
  display: flex; background: var(--navy);
}
.hero-bg, .hero-veil { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-img.art svg { width: 100%; height: 100%; display: block; }
.hero-veil { background: linear-gradient(90deg, rgba(245, 233, 209, .97) 0%, rgba(245, 233, 209, .92) 58%, rgba(245, 233, 209, .55) 70%, rgba(245, 233, 209, 0) 84%); }
.hero::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(240, 208, 142, .6); pointer-events: none; }
.hero-body { position: relative; display: flex; gap: 26px; padding: 30px 30px 28px; width: 100%; align-items: flex-start; }
.hero-portrait { flex: none; }
.oval {
  width: 190px; height: 232px; border-radius: 50%; overflow: hidden; background: var(--parch-2);
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 2px #7a5a24, 0 0 0 7px rgba(240, 208, 142, .55), 0 0 0 8px #8f652a, 0 12px 28px rgba(0, 0, 0, .35);
}
.oval img, .oval svg { width: 100%; height: 100%; object-fit: cover; }
.hero-info { min-width: 0; max-width: 250px; }
.hero-name { font-size: 32px; font-weight: 600; color: var(--navy); letter-spacing: .01em; }
.hero-house { font-size: 17px; font-style: italic; color: var(--ink-2); margin: 2px 0 18px; }
.hero-stats { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 9px; }
.hero-stats li { display: flex; gap: 10px; align-items: center; }
.hero-stats .ic { width: 28px; height: 28px; color: var(--gold-d); }
.hero-stats small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.hero-stats strong { font-size: 16px; color: var(--navy); font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 8px; flex-wrap: nowrap; }
.hero-actions .btn { padding: 9px 13px; white-space: nowrap; }
.hero-actions .btn-ghost { color: var(--navy); background: rgba(245, 233, 209, .7); border-color: var(--gold-d); }
.hero-quote {
  position: absolute; right: 26px; bottom: 24px; margin: 0; max-width: 250px; padding: 12px 18px;
  font-style: italic; font-size: 15px; text-align: center; color: var(--navy);
  background: rgba(245, 233, 209, .92); border: 1px solid var(--gold-d); box-shadow: inset 0 0 0 3px rgba(245, 233, 209, .9), inset 0 0 0 4px var(--line), 0 6px 14px rgba(0, 0, 0, .25);
}

.epoch-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.epoch-num { font-size: 58px; line-height: .9; font-weight: 500; color: var(--navy); font-family: var(--serif); letter-spacing: -.02em; }
.epoch-num.small { font-size: 26px; min-width: 40px; text-align: center; }
.epoch-years { font-size: 18px; font-weight: 600; }
.epoch-name { font-size: 18px; }
.epoch-img { height: 150px; width: 100%; object-fit: cover; border: 1px solid var(--gold-d); margin-bottom: 12px; overflow: hidden; }
.epoch-img.art svg { width: 100%; height: 100%; display: block; }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.chk { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--navy-3); display: grid; place-items: center; flex: none; }
.chk .ic { width: 13px; height: 13px; color: #fff; }
li.done .chk { background: var(--petrol); border-color: var(--petrol); }
.cl-title { flex: 1; }
.cl-num { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

.wonder-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wonder { margin: 0; text-align: center; }
.wonder-img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border: 1px solid var(--gold-d); background: linear-gradient(180deg, #1d4660, var(--navy)); display: grid; place-items: center; overflow: hidden; }
.wonder-img.art { color: var(--gold); }
.wonder-art { width: 78%; height: auto; filter: drop-shadow(0 0 6px rgba(240, 208, 142, .35)); }
.wonder figcaption { font-size: 12.5px; line-height: 1.25; margin-top: 6px; min-height: 2.5em; }
.wonder-state { color: var(--muted); font-size: 12px; }

.auction-body { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.auction-lock { width: 64px; height: 80px; flex: none; display: grid; place-items: center; border: 1px solid var(--gold-d); background: linear-gradient(180deg, #1d4660, var(--navy)); color: var(--gold); }
.auction-lock .ic { width: 30px; height: 30px; }
.auction-body strong { font-size: 17px; }
.auction-body p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }

.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: left; padding: 0 6px 6px; border-bottom: 1px solid var(--line); }
.mini-table th.r { text-align: right; }
.mini-table td { padding: 7px 6px; border-bottom: 1px solid rgba(168, 122, 53, .2); vertical-align: middle; font-variant-numeric: tabular-nums; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table tfoot td { border-top: 1px solid var(--line); font-weight: 600; }
.mini-table td small { display: block; font-size: 11.5px; color: var(--muted); }
.good { display: inline-flex; align-items: center; gap: 9px; }
.good small { display: block; font-size: 11.5px; color: var(--muted); }
.good-ic { width: 26px; height: 26px; flex: none; object-fit: contain; }
.good-lg .good-ic { width: 36px; height: 36px; }
.trend { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.trend .ic { width: 10px; height: 10px; }
.trend-up { color: var(--green); } .trend-down { color: var(--red); } .trend-flat { color: var(--muted); }

.chapter-head { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: rgba(16, 43, 59, .06); border: 1px solid var(--line); margin-bottom: 8px; }
.chapter-head .ic { width: 30px; height: 30px; color: var(--gold-d); }
.chapter-head small { display: block; color: var(--muted); font-style: italic; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 26px; }
.goals li { padding: 9px 0 10px; border-bottom: 1px solid var(--line); }

.goal-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.goal-title { flex: 1; font-size: 14.5px; }
.goal-title small { display: block; color: var(--muted); font-size: 12px; }
.goal-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy); }
.goals li.done .goal-title { color: var(--ink-2); }
.goals li.done .bar > span { background: var(--petrol); }
.next-rank { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.next-rank .ic { color: var(--gold-d); }

.cargo-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.cargo-eh { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; margin-bottom: 12px; }
.cargo-eh strong { font-size: 20px; color: var(--navy); }
.cargo-vehicle { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.cargo-vehicle > div:last-child { flex: 1; }
.cargo-vehicle strong { display: block; }
.cargo-vehicle small { display: block; color: var(--muted); margin-bottom: 6px; }
.vehicle-img { width: 96px; height: 60px; object-fit: cover; border: 1px solid var(--gold-d); flex: none; overflow: hidden; }
.vehicle-img.art svg { width: 100%; height: 100%; display: block; }
.cargo-empty { font-style: italic; margin: 6px 0 0; }
.fineprint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.newslist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 26px; }
.newslist li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.news-ic .good-ic, .news-ic .ic { width: 32px; height: 32px; color: var(--gold-d); }
.newslist strong { display: block; font-size: 14.5px; }
.newslist p { margin: 2px 0 4px; font-size: 13px; color: var(--ink-2); }
.newslist small { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Dialog */
.dialog { border: 0; padding: 0; background: transparent; max-width: min(640px, calc(100vw - 24px)); width: 100%; }
.dialog::backdrop { background: rgba(5, 15, 24, .7); backdrop-filter: blur(2px); }
.dialog-inner { position: relative; padding: 26px 28px; }
.dialog-title { font-size: 22px; margin-bottom: 8px; }
.dialog-x { position: absolute; top: 12px; right: 12px; border: 0; background: none; cursor: pointer; color: var(--ink-2); z-index: 2; }
.epoch-list { list-style: none; padding: 0; margin: 14px 0 0; }
.epoch-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: .65; }
.epoch-list li.current { opacity: 1; }
.epoch-list li.current .epoch-num { color: var(--gold-d); }
.epoch-list p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }

/* ---------------------------------------------------------------- Handel */
.city-banner { position: relative; height: 180px; border: 1px solid var(--gold-d); overflow: hidden; box-shadow: var(--shadow); background: var(--navy); }
.city-img { width: 100%; height: 100%; object-fit: cover; }
.city-img.art svg { width: 100%; height: 100%; display: block; }
.city-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(245, 233, 209, .95) 0, rgba(245, 233, 209, .75) 26%, rgba(245, 233, 209, 0) 55%); }
.city-banner-text { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); z-index: 1; }
.city-banner h1 { font-size: 42px; font-weight: 600; color: var(--navy); }
.city-country { font-size: 16px; font-style: italic; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 8px 0 0; border-bottom: 2px solid var(--gold-d); overflow-x: auto; }
.tabs a {
  padding: 9px 20px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--navy); background: var(--parch-2); border: 1px solid var(--gold-d); border-bottom: 0; display: inline-flex; gap: 6px; align-items: center;
}
.tabs a.active { background: linear-gradient(180deg, #1d4660, var(--navy)); color: #f6e6c2; }
.tabs a.locked { color: var(--muted); }
.trade-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.trade-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 14px); }
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.market-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.market-table th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--gold-d); white-space: nowrap; }
.market-table th.r { text-align: right; } .market-table th.c { text-align: center; }
.market-table td { padding: 10px 8px; border-bottom: 1px solid rgba(168, 122, 53, .25); vertical-align: middle; }
.market-table tr:hover td { background: rgba(255, 252, 240, .55); }
.market-table tr.is-cheap td:first-child { box-shadow: inset 3px 0 0 var(--petrol); }
.market-table tr.is-dear td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.market-table td.num { font-weight: 600; white-space: nowrap; }
.tag-cheap, .tag-dear { font-style: normal; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; border-radius: 2px; }
.tag-cheap { background: rgba(82, 126, 120, .16); color: #2f5c56; }
.tag-dear { background: rgba(215, 172, 97, .25); color: #7a5520; }
.trade-form { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stepper { display: inline-flex; border: 1px solid var(--gold-d); background: #fffaf0; }
.stepper button { width: 28px; border: 0; background: var(--parch-2); cursor: pointer; display: grid; place-items: center; color: var(--navy); }
.stepper button:hover { background: var(--parch-3); }
.stepper .ic { width: 14px; height: 14px; }
.stepper input { width: 64px; border: 0; text-align: center; font: 600 15px var(--serif); padding: 6px 2px; background: transparent; -moz-appearance: textfield; color: var(--ink); }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quick { display: flex; gap: 8px; }
.quick button { border: 0; background: none; padding: 0; font: 11.5px var(--serif); color: var(--navy-3); cursor: pointer; text-decoration: underline dotted; }
.quick button:disabled { color: #b4a68a; cursor: default; text-decoration: none; }
.actions { white-space: nowrap; text-align: right; }
.actions .btn { min-width: 98px; }
.actions .btn + .btn { margin-left: 4px; }
.preview { font-size: 12px; color: var(--ink-2); min-height: 18px; margin-top: 4px; white-space: normal; text-align: right; }
.preview .warn { color: var(--red); }
.lead { font-size: 16.5px; color: var(--ink-2); margin: 0 0 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips-label { font-size: 13px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); background: #fffaf0; font-size: 13.5px; }
.chip .good-ic { width: 20px; height: 20px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th { font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--gold-d); text-align: left; white-space: nowrap; }
.compare-table th.r { text-align: right; }
.compare-table td { padding: 8px; border-bottom: 1px solid rgba(168, 122, 53, .22); }
.compare-table .here { background: rgba(215, 172, 97, .16); }
.compare-table td.best { color: var(--green); font-weight: 700; }
.compare-table td.worst { color: var(--red); font-weight: 700; }
.legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.legend::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.legend.best::before { background: var(--green); } .legend.worst::before { background: var(--red); }
.travel-form { display: flex; flex-direction: column; gap: 12px; }
.travel-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.travel-facts div { background: rgba(16, 43, 59, .05); border: 1px solid var(--line); padding: 8px 10px; }
.travel-facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.travel-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
.travel-eta { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.locked-panel { text-align: center; padding: 40px 30px; }
.locked-panel h2 { font-size: 26px; margin: 10px 0; }
.locked-panel p { max-width: 520px; margin: 0 auto 10px; color: var(--ink-2); }
.locked-ic { width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #1d4660, var(--navy)); color: var(--gold); border: 2px solid var(--gold); }
.locked-ic .ic { width: 34px; height: 34px; }
.unlock { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-d); font-weight: 600; }

/* ---------------------------------------------------------------- Formulare */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .inline-form input, .inline-form select {
  font: 15px var(--serif); padding: 9px 11px; color: var(--ink);
  background: #fffaf0; border: 1px solid #c4a26a; border-radius: 2px; width: 100%;
}
.field input:focus, .field select:focus, .stepper:focus-within { outline: 2px solid rgba(82, 126, 120, .55); outline-offset: 1px; }
.field-row { display: flex; gap: 12px; } .field-row .field { flex: 1; } .field-row .field.small { flex: 0 0 110px; }
.field-group { border: 1px solid var(--line); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.field-group legend { padding: 0 8px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 12.5px; color: var(--navy); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: 1 / -1; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.avatar-opt { position: relative; cursor: pointer; }
.avatar-opt input { position: absolute; opacity: 0; }
.avatar-opt img { aspect-ratio: 5 / 6; object-fit: cover; width: 100%; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.avatar-opt input:checked + img { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215, 172, 97, .45); }
.avatar-opt input:focus-visible + img { outline: 2px solid var(--petrol); }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.mode-opt { cursor: pointer; }
.mode-opt input { position: absolute; opacity: 0; }
.mode-opt > span { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); background: #fffaf0; height: 100%; }
.mode-opt .ic { width: 26px; height: 26px; color: var(--gold-d); margin-bottom: 4px; }
.mode-opt small { color: var(--muted); }
.mode-opt input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.mode-opt input:disabled + span { opacity: .6; cursor: not-allowed; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.stat-grid div { border: 1px solid var(--line); padding: 10px 12px; background: rgba(255, 252, 240, .5); }
.stat-grid dt { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-grid dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-tools { display: flex; flex-direction: column; gap: 10px; }
.admin-tools form { margin: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; flex: 1 1 140px; }
.city-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.city-toggle { margin: 0; }
.city-toggle button { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--line); background: #fffaf0; font: 14px var(--serif); cursor: pointer; text-align: left; }
.city-toggle small { width: 100%; padding-left: 18px; color: var(--muted); font-size: 11.5px; }
.city-toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: #b9ad98; }
.city-toggle.on button { border-color: var(--petrol); background: rgba(82, 126, 120, .1); }
.city-toggle.on .dot { background: var(--green); }

/* ---------------------------------------------------------------- Gesperrte Bereiche */
.locked-hero { text-align: center; color: #f2e2bf; padding: 34px 20px 26px; }
.locked-hero h1 { font-size: 38px; font-weight: 600; margin: 16px 0 10px; color: #fff3d6; }
.locked-hero .lead { color: #d9c9a6; max-width: 640px; margin: 0 auto 14px; }
.locked-hero .unlock { color: var(--gold-l); font-weight: 400; display: block; }
.locked-hero .unlock a { color: var(--gold-l); }
.locked-hero .bar { background: rgba(0, 0, 0, .35); }
.locked-hero .bar > span { background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }
.locked-medal { position: relative; width: 110px; height: 110px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle at 50% 35%, #24506b, var(--navy-1)); border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(215, 172, 97, .15), 0 0 40px rgba(215, 172, 97, .25); }
.locked-medal > .ic { width: 52px; height: 52px; }
.locked-badge { position: absolute; right: -2px; bottom: 4px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy); border: 2px solid var(--navy); }
.locked-badge .ic { width: 18px; height: 18px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px; }
.feature .ic { width: 34px; height: 34px; color: var(--gold-d); }
.feature small { color: var(--muted); }

/* ---------------------------------------------------------------- Weltkarte */
.map-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; height: min(calc(100vh - var(--header-h) - 60px), 900px); min-height: 520px; }
body:has(.travelbar) .map-layout { height: min(calc(100vh - var(--header-h) - 98px), 900px); }
.map-side { padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.map-search { display: flex; align-items: center; gap: 8px; background: rgba(245, 233, 209, .95); border: 1px solid var(--gold-d); padding: 7px 10px; color: var(--muted); }
.map-search input { border: 0; background: none; font: 14px var(--serif); width: 100%; color: var(--ink); outline: none; }
.map-filters, .map-regions { display: flex; flex-direction: column; gap: 3px; }
.mf, .mr {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; background: none;
  font: 14px var(--serif); color: #d9c9a6; cursor: pointer; text-align: left; border-radius: 2px;
}
.mf .ic { color: var(--gold); width: 18px; height: 18px; }
.mf:hover:not(:disabled), .mr:hover { background: rgba(255, 255, 255, .06); color: #fff3d6; }
.mf.active { color: #fff3d6; background: rgba(240, 208, 142, .1); border-color: rgba(240, 208, 142, .3); }
.mf:disabled { opacity: .45; cursor: not-allowed; }
.mf .mini-lock { margin-left: auto; }
.map-regions { border-top: 1px solid rgba(215, 172, 97, .3); padding-top: 12px; }
.mr { border: 1px solid rgba(215, 172, 97, .3); justify-content: center; letter-spacing: .06em; }
.mr.active { background: linear-gradient(180deg, #1f4a63, #143448); color: #fff3d6; border-color: var(--gold); }
.map-legend { margin-top: auto; font-size: 12.5px; color: #b9b096; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(215, 172, 97, .3); padding-top: 12px; }
.map-legend div { display: flex; align-items: center; gap: 8px; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; background: #9a907b; border: 2px solid #f1e3c3; }
.lg-dot.active { background: var(--gold); border-color: var(--navy); box-shadow: 0 0 0 1px var(--gold); }
.lg-line { width: 26px; height: 0; border-top: 2px dashed #f3e2bf; }
.lg-line.rail { border-top: 3px dotted #c49a5c; }

.map-stage { position: relative; overflow: hidden; background: #3f6672; border: 1px solid var(--gold-d); }
.map-stage::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(240, 208, 142, .5); pointer-events: none; }
.worldmap { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.worldmap.dragging { cursor: grabbing; }
.worldmap .grat { fill: none; stroke: rgba(244, 230, 196, .2); stroke-width: .8; }
.worldmap .grat-major { stroke: rgba(240, 208, 142, .55); stroke-width: 1.1; stroke-dasharray: 10 6; }
.worldmap .grat-tropic { stroke: rgba(240, 208, 142, .32); stroke-width: .9; stroke-dasharray: 3 6; fill: none; }
.worldmap .ring { fill: none; stroke: #cfe0d6; stroke-linejoin: round; }
.worldmap .ring.r1 { stroke-width: 4; opacity: .32; }
.worldmap .ring.r2 { stroke-width: 10; opacity: .14; }
.worldmap .ring.r3 { stroke-width: 19; opacity: .07; }
.worldmap .ring, .worldmap .landmass, .worldmap .land-inner, .worldmap .inland-sea, .worldmap .grat, .worldmap .grat-major, .worldmap .grat-tropic, .worldmap .route, .worldmap .route-preview, .worldmap .journey { vector-effect: non-scaling-stroke; }
.worldmap .landmass { fill: url(#landfill); stroke: #6e5634; stroke-width: 1.3; stroke-linejoin: round; }
.worldmap .land-inner { fill: none; stroke: #c9ab74; stroke-width: 12; opacity: .5; stroke-linejoin: round; }
.worldmap .ocean { fill: #5a838c; }
.map-grain {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .22 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 120px rgba(8, 24, 34, .55);
}
.worldmap .inland-sea { fill: #6f969d; stroke: #6e5634; stroke-width: 1.1; }
.worldmap .ocean-label { font: italic 22px var(--serif); letter-spacing: .5em; fill: rgba(244, 232, 205, .45); text-anchor: middle; }
.worldmap .sea-label { font: italic 11px var(--serif); letter-spacing: .25em; fill: rgba(244, 232, 205, .55); text-anchor: middle; }
.worldmap .route { fill: none; stroke-linecap: round; }
.worldmap .route-sea { stroke: rgba(248, 236, 206, .8); stroke-width: 1.6; stroke-dasharray: 6 6; }
.worldmap .route-rail { stroke: #5b3e1e; stroke-width: 2.4; stroke-dasharray: 2 4; }
.worldmap .route-preview { fill: none; stroke: var(--gold-l); stroke-width: 3.2; stroke-dasharray: 9 7; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .5)); animation: march 1.2s linear infinite; pointer-events: none; }
.worldmap .journey { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 9 7; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -16; } }
.worldmap .voyager-ring { fill: var(--navy); stroke: var(--gold); stroke-width: 2.5; }
.worldmap .voyager svg { color: var(--gold-l); }
.worldmap .city { cursor: pointer; outline: none; }
.worldmap .city-dot { fill: #9a907b; stroke: #f6ead0; stroke-width: 2; }
.worldmap .is-active .city-dot { fill: var(--gold); stroke: var(--navy); stroke-width: 2.5; }
.worldmap .city-core { fill: var(--navy); }
.worldmap .city-label rect { fill: var(--navy); stroke: var(--gold); stroke-width: 1; }
.worldmap .city-label text:not(.inactive-label) { font: 600 15px var(--serif); fill: #f6e6c2; text-anchor: middle; letter-spacing: .02em; }
.worldmap .city-goods rect { fill: #f5e9d1; stroke: var(--gold-d); stroke-width: 1; }
.worldmap .inactive-label { font: italic 12px var(--serif) !important; fill: #4b3c26 !important; paint-order: stroke; stroke: rgba(241, 227, 195, .85); stroke-width: 3px; }
.worldmap .is-inactive { opacity: .85; }
.worldmap .city:hover .city-label rect, .worldmap .city:focus .city-label rect, .worldmap .city.selected .city-label rect { fill: #24506b; stroke: var(--gold-l); }
.worldmap .city:hover .city-dot, .worldmap .city.selected .city-dot { stroke: var(--gold-l); }
.worldmap .is-here .city-dot { fill: var(--gold-l); }
.worldmap .here-pulse { fill: rgba(240, 208, 142, .25); stroke: var(--gold-l); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.worldmap .city-event circle { fill: var(--red); stroke: #fff3d6; stroke-width: 1.5; }
.worldmap .city-event text { font: 700 10px var(--serif); fill: #fff; text-anchor: middle; }
.worldmap.no-routes [data-layer="routen"], .worldmap.no-events [data-layer="ereignisse"] { display: none; }
.worldmap.only-ports .city:not(.is-port) { opacity: .25; }
.worldmap.hide-inactive .is-inactive { display: none; }
.worldmap .city.dim { opacity: .2; }
.map-cartouche {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 8px 26px; text-align: center; pointer-events: none;
  background: rgba(245, 233, 209, .92); border: 1px solid var(--gold-d); box-shadow: inset 0 0 0 3px rgba(245, 233, 209, .9), inset 0 0 0 4px var(--line), 0 4px 12px rgba(0, 0, 0, .3);
}
.map-cartouche span { display: block; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; color: var(--navy); }
.map-cartouche small { font-style: italic; color: var(--ink-2); }
.map-compass { position: absolute; left: 18px; bottom: 18px; width: 92px; height: 92px; pointer-events: none; opacity: .9; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.map-zoom { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 38px; height: 38px; display: grid; place-items: center; background: var(--navy); color: var(--gold-l); border: 1px solid var(--gold-d); cursor: pointer; }
.map-zoom button:hover { background: var(--navy-3); }
.map-card { position: absolute; width: 310px; z-index: 5; padding: 16px 18px; font-size: 14px; }
.map-card h3 { font-size: 21px; padding-right: 24px; }
.map-card .mc-country { font-style: italic; color: var(--ink-2); margin-bottom: 8px; }
.map-card .mc-img { height: 92px; width: 100%; object-fit: cover; border: 1px solid var(--gold-d); margin-bottom: 8px; }
.map-card p { margin: 0 0 8px; color: var(--ink-2); font-size: 13.5px; }
.map-card .mc-h { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.map-card .mc-goods { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.map-card .mc-goods span { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; }
.map-card .mc-goods .good-ic { width: 20px; height: 20px; }
.map-card .mc-ev { font-size: 13px; padding: 5px 8px; background: rgba(164, 68, 47, .08); border-left: 3px solid var(--red); margin-bottom: 4px; }
.map-card .mc-travel { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.map-card .mc-facts { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.map-card .mc-facts strong { display: block; font-size: 15px; }
.map-card .mc-x { position: absolute; top: 10px; right: 10px; border: 0; background: none; cursor: pointer; color: var(--ink-2); z-index: 2; }
.map-card form { margin: 0; }
.map-card .mc-note { font-style: italic; color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------------------------------------------------------------- Anmeldung */
.auth-body { min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; z-index: -1; }
.auth-bg-img { width: 100%; height: 100%; object-fit: cover; }
.auth-bg-img.art svg { width: 100%; height: 100%; display: block; }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(11, 31, 44, .45), rgba(11, 31, 44, .88)); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.auth-card {
  width: 100%; max-width: 440px; padding: 30px 32px 26px; text-align: left;
  background: linear-gradient(180deg, rgba(20, 54, 74, .96), rgba(11, 31, 44, .97));
  border: 1px solid var(--gold-d); box-shadow: 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 0 5px rgba(11, 31, 44, .9), inset 0 0 0 6px rgba(215, 172, 97, .45);
  color: #f2e2bf;
}
.auth-card.wide { max-width: 620px; }
.auth-logo { width: 100%; max-width: 330px; height: auto; margin: 0 auto 6px; }
.auth-tag { text-align: center; font-style: italic; color: #cbbd9c; margin: 0 0 22px; font-size: 14px; }
.auth-card .field > span, .auth-card .field-group legend { color: #d9c9a6; }
.auth-card .field-group { border-color: rgba(215, 172, 97, .35); }
.auth-card .fineprint { color: #a9a088; }
.auth-card .check { color: #d9c9a6; }
.auth-switch { text-align: center; margin: 18px 0 0; color: #cbbd9c; }
.auth-switch a { color: var(--gold-l); }
.auth-closed { text-align: center; }
.install-checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; display: grid; gap: 4px; }
.install-checks .ok { color: #9fd08f; } .install-checks .bad { color: #f0a08f; }

/* ---------------------------------------------------------------- Mobile Navigation */
.tabbar { display: none; }
.moresheet { position: fixed; inset: auto 0 64px 0; z-index: 80; padding: 10px; }
.moresheet-inner { background: var(--parch); border: 1px solid var(--gold-d); box-shadow: var(--shadow); display: grid; }
.moresheet-inner a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.moresheet-inner .ic { color: var(--gold-d); }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1440px) {
  .mainnav a { min-width: 76px; padding: 0 10px; letter-spacing: .08em; }
  .era { min-width: 170px; }
  .um-name { display: none; }
}
@media (max-width: 1320px) {
  .hero-info { max-width: 420px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .hero-veil { background: linear-gradient(90deg, rgba(245, 233, 209, .97) 0%, rgba(245, 233, 209, .9) 48%, rgba(245, 233, 209, .5) 60%, rgba(245, 233, 209, 0) 74%); }
  .dash {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "hero hero" "quests quests" "epoch cargo" "epoch market" "wonders auction" "news news";
  }
  .trade-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1160px) {
  .mainnav a span { font-size: 10px; }
  .era-next { display: none; }
  .hide-m { display: none; }
  .trade-layout { grid-template-columns: minmax(0, 1fr); }
  .trade-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  :root { --header-h: 60px; }
  .brand img { height: 44px; }
  .mainnav { display: none; }
  .topbar { justify-content: space-between; }
  .topbar-right { border-left: 0; }
  .mini-avatar { width: 40px; height: 40px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1)); border-top: 1px solid var(--gold-d);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; color: #cbbd9c; text-decoration: none; font: 11px var(--serif); background: none; border: 0; cursor: pointer; }
  .tabbar .ic { color: var(--gold); width: 22px; height: 22px; }
  .tabbar a.active { color: #fff3d6; background: rgba(240, 208, 142, .1); }
  body { padding-bottom: 70px; }
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "quests" "cargo" "epoch" "market" "wonders" "auction" "news"; }
  .dash > .card.parchment > .btn-block { margin-top: 4px; }
  .newslist { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(420px, 1fr); height: auto !important; }
  .map-side { flex-direction: column; }
  .map-filters, .map-regions { flex-direction: row; flex-wrap: wrap; }
  .mf, .mr { width: auto; }
  .mf:disabled { display: none; }
  .map-legend { display: none; }
  .map-stage { height: 62vh; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .toasts { top: auto; bottom: 80px; }
}
@media (max-width: 700px) {
  .page { padding: 14px 10px 30px; }
  .era { min-width: 0; }
  .era-name { display: none; }
  .era-year { font-size: 15px; }
  .hero { min-height: 0; }
  .hero-veil { background: linear-gradient(180deg, rgba(245, 233, 209, .2) 0, rgba(245, 233, 209, .92) 150px, rgba(245, 233, 209, .97) 100%); }
  .hero-body { flex-direction: column; align-items: center; padding: 22px 16px; text-align: center; }
  .oval { width: 140px; height: 172px; }
  .hero-info { max-width: none; }
  .hero-stats { text-align: left; }
  .hero-actions { justify-content: center; }
  .hero-quote { position: static; margin-top: 4px; }
  .wonder-row { grid-template-columns: repeat(3, 1fr); }
  .trade-side { grid-template-columns: minmax(0, 1fr); }
  .city-banner { height: 130px; }
  .city-banner h1 { font-size: 30px; }
  .hide-s { display: none; }
  .market-table thead { display: none; }
  .market-table, .market-table tbody { display: block; }
  .market-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "good buy sell" "form act act"; column-gap: 14px; align-items: center; padding: 10px 2px 10px 8px; border-bottom: 1px solid rgba(168, 122, 53, .3); }
  .market-table td { display: block; padding: 0; border: 0; }
  .market-table td:first-child { grid-area: good; }
  .market-table .td-buy { grid-area: buy; } .market-table .td-sell { grid-area: sell; }
  .market-table .td-buy::before, .market-table .td-sell::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
  .market-table .td-have, .market-table .hide-s, .market-table .hide-m { display: none; }
  .market-table .td-form { grid-area: form; margin-top: 8px; }
  .market-table .td-form .trade-form { align-items: flex-start; }
  .market-table .actions { grid-area: act; margin-top: 8px; align-self: start; }
  .market-table tr.is-cheap td:first-child, .market-table tr.is-dear td:first-child { box-shadow: none; }
  .market-table tr.is-cheap { box-shadow: inset 3px 0 0 var(--petrol); } .market-table tr.is-dear { box-shadow: inset 3px 0 0 var(--gold); }
  .actions .btn { min-width: 0; }
  .stepper input { width: 46px; }
  .stepper button { width: 24px; }
  .good-lg .good-ic { width: 28px; height: 28px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .mode-options { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .map-cartouche { display: none; }
  .map-compass { width: 60px; height: 60px; }
  .map-card { left: 8px !important; right: 8px; width: auto; top: auto !important; bottom: 8px; max-height: 70%; overflow-y: auto; }
  .travelbar { padding: 8px 12px; font-size: 13px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.worldmap:not(.zoomed) .city-goods { display: none; }
.dash .epoch .epoch-img { flex: 1 1 150px; min-height: 150px; max-height: 340px; }
.dash .quests .goals { grid-template-columns: repeat(auto-fill, minmax(max(250px, 30%), 1fr)); }
.goal-num { white-space: nowrap; }
.dash .cargo-vehicle .vehicle-img { width: 84px; height: 54px; }
.mini-table td.r { white-space: nowrap; }
.goal-title { min-width: 0; }
