/* Settla-Portal – Grundgerüst (Layout und Komponenten, vom alten Settla-Portal). Farben, Schrift und Formen setzt settla.css. */
:root {
    --bg: #f4efe8;
    --bg-2: #ede5e2;
    --card: #ffffff;
    --card-2: #f7f2ef;
    --line: #d0c5c0;
    --text: #171615;
    --muted: #6b6562;
    --green: #3c8527;
    --green-2: #52a535;
    --green-3: #2a641c;
    --gold: #a8740c;
    --red: #ca3636;
    --blue: #1157be;
    --sky: #8ecdf7;
    --overlay: rgba(255, 255, 255, .95);
    --ok-bg: #edf8e7; --ok-fg: #1d4d13; --ok-line: #a0e081;
    --err-bg: #fdeceb; --err-fg: #8f1f0b; --err-line: #ff925b;
    --hl-bg: #fff6d8; --hl-line: #e2b923;
    --admin: #e07b25; --admin-bg: #fff1e3; --admin-fg: #9a4a0c; --admin-line: #f0b37a;
    --radius: 4px;
    --shadow: 0 4px 0 rgba(23, 22, 21, .07), 0 10px 26px rgba(60, 40, 20, .08);
    --pixel: "Pixelify Sans", "Noto Sans", ui-sans-serif, system-ui, sans-serif;
    font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1, h2 { font-family: var(--pixel); font-weight: 700; letter-spacing: .01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: .95rem; color: var(--muted); font-weight: 700; }
p { line-height: 1.6; }
code, kbd { background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px; padding: .1rem .35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.gold { color: var(--gold); }
.red { color: var(--red); }

/* Top bar: a grass block – green on top, a pixel dirt strip below */
.topbar { display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.5rem; position: sticky; top: 0; z-index: 10;
    flex-wrap: wrap; background: linear-gradient(#6fb43f, #5c9e31); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; pointer-events: none;
    background:
        linear-gradient(90deg, #866043 0 12.5%, #79553a 12.5% 25%, #966c4a 25% 37.5%, #7f5a3e 37.5% 50%,
                               #8b6446 50% 62.5%, #73513a 62.5% 75%, #9a7050 75% 87.5%, #80593d 87.5% 100%);
    background-size: 64px 8px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--pixel); font-weight: 700; font-size: 1.35rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
.brand:hover { text-decoration: none; }
.brand-sub { color: #fff6a8; font-weight: 600; margin-left: .35rem; }
.nav { display: flex; gap: .1rem; flex: 1; flex-wrap: wrap; }
.nav a, .nav-soon { padding: .45rem .55rem; border-radius: 3px; color: #fff; font-family: var(--pixel); font-weight: 600; font-size: 1.02rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .25); }
.nav a:hover { background: rgba(0, 0, 0, .14); text-decoration: none; }
.nav a.active { background: rgba(0, 0, 0, .24); box-shadow: inset 0 -3px 0 #fff6a8; }
.user { display: flex; align-items: center; gap: .7rem; color: #f3ffe8; }
.user span { color: #fff; font-weight: 700; }
.user .link { color: #fff6a8; }
.count { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 3px;
    background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; text-align: center; text-shadow: none; }

/* Layout */
.container { width: 100%; max-width: 1150px; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; color: #d0c5c0;
    font-size: .85rem; flex-wrap: wrap; background: #3d3938; position: relative; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
    background: linear-gradient(90deg, #6b6562 0 25%, #575250 25% 50%, #7a7471 50% 75%, #4d4947 75% 100%); background-size: 48px 6px; }
.footer a { color: #fff6a8; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.section { margin-top: 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }

/* Cards: white blocks with a little depth */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: .3rem 0 .15rem; }
.stat .sub { color: var(--muted); font-size: .85rem; }
.value.green { color: var(--green); }
.value.gold { color: var(--gold); }
.value.red { color: var(--red); }
td.green { color: var(--green); font-weight: 700; }
td.gold { color: var(--gold); font-weight: 700; }
td.red { color: var(--red); font-weight: 700; }

/* Bars */
.bar { height: 12px; border-radius: 2px; background: var(--bg-2); overflow: hidden; display: flex; margin: .6rem 0 .4rem;
    box-shadow: inset 0 0 0 1px var(--line); }
.bar > span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; color: var(--muted); }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; margin-right: .35rem; vertical-align: baseline; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .6rem .7rem; border-bottom: 1px solid var(--bg-2); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; background: var(--card-2); }
tbody tr:hover { background: #f9f6e9; }
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 3px; font-size: .76rem; font-weight: 800;
    background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.badge.buy { color: var(--gold); border-color: var(--hl-line); background: var(--hl-bg); }
.badge.sell { color: var(--green); border-color: var(--ok-line); background: var(--ok-bg); }
.badge.on { color: var(--green); border-color: var(--ok-line); background: var(--ok-bg); }
.item-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 3px; background: #c6c6c6;
    border: 2px solid; border-color: #f0f0f0 #555 #555 #f0f0f0; font-size: .7rem; font-weight: 800; color: #555; margin-right: .6rem; vertical-align: middle; }

/* Forms */
form { display: grid; gap: .8rem; }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .9rem; }
label input, label textarea, label select { font-weight: 400; }
@media (max-width: 1480px) { .brand-sub { display: none; } }
@media (max-width: 1560px) and (min-width: 901px) { .brand > span { display: none; } .nav a { padding: .45rem .42rem; font-size: .98rem; } }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number] {
    background: #fff; border: 2px solid var(--line); color: var(--text); border-radius: 3px; padding: .6rem .75rem;
    font-size: 1rem; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(82, 165, 53, .45); outline-offset: 0; border-color: var(--green); }
select { font: inherit; }
button { font: inherit; cursor: pointer; }

/* Buttons like in Minecraft: blocky, with a light top-left edge and a dark bottom */
.btn { font-family: var(--pixel); font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; color: #fff;
    background: var(--green); border: 2px solid #1e1e1f; border-radius: 0; padding: .55rem 1.1rem .7rem;
    box-shadow: inset 0 -4px 0 var(--green-3), inset 3px 3px 0 rgba(255, 255, 255, .28);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); transition: transform .05s; display: inline-block; text-align: center; }
.btn:hover { background: var(--green-2); text-decoration: none; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 var(--green-3), inset 2px 2px 0 rgba(255, 255, 255, .2); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.secondary { color: #1e1e1f; background: #d0d1d4; text-shadow: none;
    box-shadow: inset 0 -4px 0 #8b8b8f, inset 3px 3px 0 rgba(255, 255, 255, .7); }
.btn.secondary:hover { background: #e2e3e6; }
.btn.danger { background: var(--red); box-shadow: inset 0 -4px 0 #8f1f0b, inset 3px 3px 0 rgba(255, 255, 255, .25); }
.btn.danger:hover { background: #e04848; }
.btn.confirm { background: #e2b923; color: #1e1e1f; text-shadow: none; box-shadow: inset 0 -4px 0 #a07c00, inset 3px 3px 0 rgba(255, 255, 255, .4); }
.btn.secondary.active { background: #fff6a8; }
.small-btn { padding: .35rem .75rem .5rem; font-size: .9rem; }
.link { background: none; border: 0; color: var(--green); padding: 0; font-weight: 700; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.switch { display: block; font-weight: 700; line-height: 1.5; }
.switch input { width: 1.2rem; height: 1.2rem; accent-color: var(--green); vertical-align: -4px; margin: 0 .55rem 0 0; }

/* Messages */
.notice { padding: .75rem 1rem; border-radius: 3px; border: 2px solid var(--line); background: var(--card-2); margin: .6rem 0; }
.notice.error { border-color: var(--err-line); color: var(--err-fg); background: var(--err-bg); }
.notice.ok { border-color: var(--ok-line); color: var(--ok-fg); background: var(--ok-bg); }
.empty { color: var(--muted); padding: 1rem 0; }

/* Login: blurred live-map snapshots in the background, Minecraft-like window in front */
body.login-mode main.container { max-width: none; padding: 0; display: flex; }
.login-scene { position: relative; flex: 1; min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 3rem 1rem; background: #5c9e31; }
.login-bg { position: absolute; inset: -12%; background-size: cover; background-position: center; image-rendering: pixelated;
    filter: blur(7px) saturate(1.15) brightness(1.05); opacity: 0; transition: opacity 2.2s ease; transform: scale(1.08);
    animation: drift 18s ease-in-out infinite alternate; }
.login-bg.show { opacity: 1; }
@keyframes drift { from { transform: scale(1.1) translate(-4%, -2.5%); } to { transform: scale(1.22) translate(4%, 2.5%); } }
.login-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, .05), rgba(30, 60, 20, .35)); }
.login { position: relative; z-index: 1; max-width: 920px; width: 100%; }
.login-hero { text-align: center; margin-bottom: 1.6rem; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
.login-hero h1 { font-size: 2.6rem; }
.login-hero p { max-width: 560px; margin: .5rem auto 0; font-weight: 600; }
.login-hero a { color: #fff6a8; }
.login .card { border: 3px solid #1e1e1f; box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 20px 50px rgba(0, 0, 0, .25); }
.steps { padding-left: 1.2rem; line-height: 1.8; }

@media (max-width: 640px) {
    .topbar { gap: .6rem; padding: .7rem 1rem; }
    .container { padding: 1.2rem 1rem; }
    .stat .value { font-size: 1.4rem; }
    .login-hero h1 { font-size: 1.9rem; }
}

/* Legal pages and the cookie banner */
.legal { max-width: 820px; }
.legal h2 { margin-top: 1.6rem; }
.legal li { line-height: 1.6; margin: .2rem 0; }
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50; max-width: 760px; margin: 0 auto;
    background: #fff; border: 3px solid #1e1e1f; box-shadow: 0 6px 0 rgba(0, 0, 0, .2), 0 20px 50px rgba(0, 0, 0, .25);
    padding: 1rem 1.2rem; display: grid; gap: .6rem; }
.cookie-banner h2 { margin: 0; font-size: 1.15rem; }
.cookie-banner p { margin: 0; font-size: .92rem; }
.cookie-options { display: grid; gap: .35rem; font-size: .9rem; }

/* Charts */
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { fill: var(--text, currentColor); opacity: .75; font-size: 13px; font-weight: 500; }
.chart-svg .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart-svg .bar-rect:hover { opacity: .8; }
.chart-tip { position: absolute; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem;
    font-size: .82rem; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.dot-inline { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented a { padding: .35rem .7rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
.segmented a:hover { background: var(--card); text-decoration: none; color: var(--text); }
.segmented a.active { background: var(--card-2); color: var(--text); }

/* Shop rows with history + icons */
tr.clickable { cursor: pointer; }
.history-row td { background: var(--bg-2); }
.history-chart { margin: .3rem 0; }
.item-icon { position: relative; overflow: hidden; }
.item-icon img { position: absolute; inset: 3px; width: 24px; height: 24px; image-rendering: pixelated;
    object-fit: cover; object-position: top; /* animated textures are strips: show the first frame */ }
.item-icon.has-img .item-letters { visibility: hidden; }

/* Community: mails, news, forum */
.count { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 99px;
    background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; text-align: center; }
.badge.team { color: var(--blue); border-color: var(--blue); }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.mail-list li:last-child { border-bottom: 0; }
.mail-list li.unread .mail-text { font-weight: 700; }
.mail-text { margin: .25rem 0; white-space: pre-wrap; }
.news h2 a { color: var(--text); }
.news-teaser { display: block; color: var(--text); }
.news-teaser:hover { text-decoration: none; border-color: var(--green-2); }
.news-teaser h3 { color: var(--text); margin-top: .3rem; }
.prose { line-height: 1.6; overflow-wrap: anywhere; }
.prose h3, .prose h4, .prose h5 { margin: 1rem 0 .4rem; color: var(--text); }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: .7rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose ul { padding-left: 1.3rem; }
.forum-title { font-weight: 700; color: var(--text); }
.posts { display: grid; gap: .8rem; }
.post-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.post-actions { margin-top: .4rem; }
.danger-link { color: var(--red); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 1.2rem 0; }
.editor { display: grid; gap: .8rem; }
textarea { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .65rem .75rem;
    font: inherit; width: 100%; resize: vertical; }
textarea:focus { outline: 2px solid var(--green-2); outline-offset: 1px; border-color: transparent; }
.preview { border: 1px dashed var(--line); border-radius: 8px; padding: .8rem; }

/* Map (#/karte): full height below the top bar, sidebar left, canvas right */
.gold { color: var(--gold); }
.red { color: var(--red); }
body.map-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.map-mode .footer { display: none; }
body.map-mode main.container { max-width: none; padding: 0; min-height: 0; display: flex; }
.map-page { flex: 1; display: grid; grid-template-columns: 320px 1fr; min-height: 0; }
.map-side { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.map-side-head { padding: .8rem; display: grid; gap: .5rem; border-bottom: 1px solid var(--line); position: relative; }
.map-side-head select { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
    padding: .5rem .6rem; font: inherit; font-weight: 600; }
.map-side-head input { padding: .55rem .7rem; font-size: .95rem; }
.map-results { position: absolute; left: .8rem; right: .8rem; top: 100%; z-index: 5; background: var(--card); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow); padding: .3rem; max-height: 50vh; overflow-y: auto; }
.map-results button { display: grid; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
    padding: .45rem .55rem; border-radius: 7px; }
.map-results button:hover { background: var(--card-2); }
.map-results p { margin: .4rem .5rem; }
.map-side-body { overflow-y: auto; padding: .4rem .8rem 1rem; }
.map-side-body section { margin: .9rem 0; }
.map-side-body h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .45rem; }
.map-list { display: grid; gap: .25rem; }
.map-item { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; background: none;
    border: 1px solid transparent; border-radius: 9px; padding: .4rem .5rem; color: var(--text); }
button.map-item:hover, .map-item:hover { background: var(--card); border-color: var(--line); }
.map-item.active { border-color: var(--gold); background: var(--hl-bg); }
.map-item .grow { flex: 1; display: grid; min-width: 0; }
.map-item .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-item-main { flex: 1; display: flex; align-items: center; gap: .55rem; background: none; border: 0; color: inherit;
    text-align: left; padding: 0; min-width: 0; }
.map-follow-btn { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 7px;
    width: 2rem; height: 2rem; font-size: 1rem; line-height: 1; }
.map-follow-btn:hover { color: var(--text); }
.map-follow-btn.on { color: var(--gold); border-color: var(--gold); }
.map-head { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; background: var(--card-2);
    flex: none; vertical-align: middle; }
.map-head.missing { visibility: hidden; }
.sw { display: inline-block; width: .85rem; height: .85rem; border-radius: 3px; border: 2px solid transparent; flex: none;
    vertical-align: middle; margin-right: .4rem; }
.map-item .sw { margin-right: 0; }
.map-legend { display: grid; gap: .35rem; font-size: .85rem; color: var(--muted); }
.map-layers { display: grid; gap: .35rem; }
.map-me { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; display: grid; gap: .5rem; }
.small-btn { padding: .4rem .7rem; font-size: .85rem; }
.btn.confirm { background: var(--gold); }
.live-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 0 rgba(60, 133, 39, .5); animation: live 1.6s infinite; vertical-align: middle; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(60, 133, 39, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 133, 39, 0); } }

.map-stage { position: relative; overflow: hidden; min-height: 0; background: #2b2a29; }
.map-stage canvas { display: block; touch-action: none; cursor: grab; outline: none; }
.map-stage canvas:active { cursor: grabbing; }
.map-controls { position: absolute; top: .8rem; right: .8rem; display: grid; gap: .35rem; z-index: 2; }
.map-btn { width: 2.4rem; height: 2.4rem; border-radius: 9px; background: var(--overlay); border: 1px solid var(--line);
    color: var(--text); font-size: 1.15rem; font-weight: 700; box-shadow: var(--shadow); }
.map-btn:hover { background: var(--card-2); }
.only-mobile { display: none; }
.map-follow { position: absolute; top: .8rem; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--hl-bg);
    border: 1px solid var(--gold); color: var(--text); border-radius: 99px; padding: .4rem .9rem; font-size: .9rem;
    box-shadow: var(--shadow); white-space: nowrap; }
.map-follow .live-dot { background: var(--gold); }
.map-coords { position: absolute; left: .8rem; bottom: 2.4rem; z-index: 2; font-size: .78rem; color: var(--muted);
    background: var(--overlay); padding: .2rem .5rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.map-coords:empty { display: none; }
.map-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; background: var(--overlay);
    border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .84rem; line-height: 1.4;
    box-shadow: var(--shadow); max-width: 260px; }
.map-status { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 3; background: var(--card);
    border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; box-shadow: var(--shadow); font-size: .9rem; }
.map-panel { position: absolute; top: .8rem; right: 3.9rem; width: 330px; max-height: calc(100% - 1.6rem); overflow-y: auto;
    z-index: 4; background: var(--overlay); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem;
    box-shadow: var(--shadow); }
.map-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .5rem; }
.map-panel-head .badge { margin-right: .35rem; }
.map-panel h4 { margin: .8rem 0 .3rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.map-panel p { margin: .4rem 0; }
.map-tag { font-size: 1.1rem; font-weight: 800; }
.map-district { background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; margin: .4rem 0; }
.map-people { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.map-people li { display: flex; align-items: center; gap: .5rem; }
.map-people li .link { margin-left: auto; font-size: .8rem; }
.map-form { margin-top: .9rem; gap: .5rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.map-form input[type=text] { padding: .5rem .6rem; font-size: .95rem; }
.map-buy { border: 2px solid var(--hl-line); background: var(--hl-bg); border-radius: 10px; padding: .6rem .75rem; margin-top: .6rem; }

@media (max-width: 800px) {
    .map-page { grid-template-columns: 1fr; position: relative; }
    .map-side { position: absolute; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 6; transform: translateX(-100%);
        transition: transform .2s ease; box-shadow: var(--shadow); }
    .map-side.open { transform: none; }
    .only-mobile { display: block; }
    .map-panel { left: .6rem; right: .6rem; top: auto; bottom: .6rem; width: auto; max-height: 55%; }
    .map-follow { top: auto; bottom: 4.2rem; }
}

/* Small screens: brand + user in one row, navigation as a scrollable strip below */
@media (max-width: 800px) {
    .topbar { gap: .4rem .8rem; padding: .55rem .8rem; }
    .brand { font-size: 1rem; }
    .brand img { width: 24px; height: 24px; }
    .user { margin-left: auto; font-size: .9rem; }
    .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .15rem; }
    .nav::-webkit-scrollbar { display: none; }
    .nav a { white-space: nowrap; padding: .35rem .6rem; font-size: .9rem; }
}

/* Team area (#/admin) */
.admin-tabs { margin-bottom: 1.2rem; }
.admin-body .section { margin-top: 1rem; }
.section-tight { margin-top: .8rem; }
.admin-search { margin-bottom: .5rem; flex-wrap: nowrap; }
.admin-search input { flex: 1; }
.admin-form { gap: .55rem; }
.admin-form .row input { flex: 1; min-width: 180px; }
.admin-form select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
    padding: .55rem .6rem; font: inherit; }
.admin-narrow { max-width: 640px; }
.player-head { display: flex; gap: 1rem; align-items: center; }
.player-head .grow { flex: 1; min-width: 0; }
.player-head h2 { margin-bottom: .25rem; }
.player-avatar { width: 56px; height: 56px; border-radius: 10px; image-rendering: pixelated; background: var(--card-2); flex: none; }
.player-avatar.missing { visibility: hidden; }
.red-badge { color: var(--red); border-color: var(--err-line); }
table.audit td { vertical-align: top; }
tr.warn-row td { background: var(--err-bg); }

/* Rank badge (LuckPerms group, colour from its prefix) */
.badge.rank { color: var(--gold); border-color: var(--hl-line); }
h1 .badge.rank { font-size: .85rem; vertical-align: middle; margin-left: .3rem; }
.map-admin { background: var(--admin-bg); border: 1px solid var(--admin-line); border-radius: 10px; padding: .6rem .7rem; }
.map-admin h3 { color: var(--admin-fg); }
.map-admin p { margin: .4rem 0 0; }
.map-admin-box { margin-top: 1rem; border-top: 2px solid var(--admin-line); padding-top: .3rem; }
.map-admin-box h4 { color: var(--admin-fg) !important; }
.map-panel select, .map-form select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: .45rem .5rem; font: inherit; }
.map-backups { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; font-size: .88rem; }
.map-backups li { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.map-backups li > span { display: grid; }

/* AdminShop price editing (admins) */
.price-input { width: 7.5rem; text-align: right; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 7px; padding: .35rem .5rem; font: inherit; }
.price-input.changed { border-color: var(--gold); background: var(--hl-bg); }
.shop-savebar { position: sticky; top: 4.2rem; z-index: 5; display: flex; gap: .6rem; align-items: center; justify-content: flex-end;
    background: var(--hl-bg); border: 1px solid var(--gold); border-radius: 10px; padding: .55rem .8rem; margin-top: .8rem; }
.shop-savebar span { margin-right: auto; font-weight: 700; }
.btn.secondary.active { border-color: var(--gold); color: var(--gold); }

/* Map admin: switch, layers, jobs */
.admin-bar { position: absolute; top: .8rem; left: .8rem; z-index: 3; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
    max-width: calc(100% - 5rem); }
.admin-switch { display: inline-flex; align-items: center; gap: .5rem; background: var(--overlay); border: 1px solid var(--line);
    color: var(--muted); border-radius: 99px; padding: .4rem .8rem .4rem .45rem; font-weight: 700; font-size: .88rem; box-shadow: var(--shadow); }
.admin-switch .knob { width: 2rem; height: 1.1rem; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.admin-switch .knob::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: .8rem; height: .8rem; border-radius: 50%;
    background: var(--text); transition: left .15s; }
.admin-switch.on { color: var(--admin-fg); border-color: var(--admin-line); background: var(--admin-bg); }
.admin-switch.on .knob { background: var(--admin); }
.admin-switch.on .knob::after { left: 1.05rem; }
.admin-layers { background: var(--overlay); box-shadow: var(--shadow); }
.admin-layers a.active { background: var(--admin); color: #fff; }
.admin-online, .admin-job { background: var(--overlay); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .7rem;
    font-size: .8rem; font-weight: 700; box-shadow: var(--shadow); }
.admin-online.yes { color: var(--green); border-color: var(--ok-line); }
.admin-online.no { color: var(--muted); }
.admin-job { color: var(--gold); border-color: var(--hl-line); }
.map-stage.admin-on { box-shadow: inset 0 0 0 3px var(--admin); }
.map-stage.admin-on canvas { cursor: crosshair; }
.map-stage.admin-on[data-layer="player"] canvas, .map-stage:not(.admin-on) canvas { cursor: grab; }
.map-panel.admin-panel { border-color: var(--admin-line); }
.badge.admin-badge { color: var(--admin-fg); border-color: var(--admin-line); }
.admin-list { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .5rem; }
.admin-list li { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: .45rem; }
.admin-list .row { flex-wrap: nowrap; }
.map-form label input[type=number] { width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: .45rem .5rem; font: inherit; }
.map-form .row label { flex: 1; min-width: 7rem; }
.map-form.row input[type=text] { flex: 1; min-width: 8rem; }
.dir-list { display: grid; gap: .25rem; max-height: 14rem; overflow-y: auto; margin: .4rem 0; }
.dir-row { display: flex; align-items: center; gap: .25rem; }
.dir-row span { flex: 1; }
.dir { width: 1.9rem; height: 1.9rem; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-weight: 800; }
.dir.on { background: var(--admin); border-color: var(--admin); color: #fff; }
button[data-game]:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 800px) {
    .admin-bar { top: .6rem; left: .6rem; max-width: calc(100% - 4.2rem); }
    .admin-layers a { padding: .3rem .45rem; font-size: .8rem; }
}
.map-stage.admin-on .map-follow { top: 3.6rem; }

.style-legend { display: grid; gap: .3rem; font-size: .88rem; margin: .3rem 0 .6rem; }
.sw-dashed { border: 2px dashed rgba(255,170,150,.9); background: transparent; }
.admin-list select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: .3rem .4rem; font: inherit; }

/* Player-name suggestions */
.suggest-host { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--card); border: 1px solid var(--line);
    border-radius: 9px; box-shadow: var(--shadow); padding: .25rem; margin-top: .2rem; max-height: 16rem; overflow-y: auto; }
.suggest button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
    padding: .35rem .45rem; border-radius: 6px; font-weight: 600; }
.suggest button .muted { margin-left: auto; font-weight: 400; }
.suggest button:hover, .suggest button.on { background: var(--card-2); }

/* Design cards */
.theme-grid { margin-top: 1rem; }
.theme-card { background: var(--card); color: var(--text); border-color: var(--line); }
.theme-card.current { outline: 2px solid var(--green); }
.theme-card h2 { margin-top: .8rem; }
.theme-sample { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); height: 110px; }
.ts-bar { display: flex; gap: .4rem; align-items: center; background: var(--bg-2); padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.ts-logo { width: 1.1rem; height: 1.1rem; border-radius: 4px; background: var(--green); }
.ts-nav { width: 2.6rem; height: .45rem; border-radius: 99px; background: var(--line); }
.ts-body { display: flex; gap: .5rem; padding: .6rem; align-items: flex-end; }
.ts-card { flex: 1; height: 3.4rem; border-radius: 7px; background: var(--card); border: 1px solid var(--line); padding: .4rem; display: grid; gap: .3rem; }
.ts-card b { display: block; height: .45rem; width: 60%; background: var(--muted); border-radius: 99px; opacity: .6; }
.ts-card i { display: block; height: .8rem; width: 45%; background: var(--green); border-radius: 4px; }
.ts-btn { width: 3rem; height: 1.4rem; border-radius: 7px; background: var(--green-2); }
/* Street height plan */
.plan { display: grid; gap: .4rem; max-height: 22rem; overflow-y: auto; margin: .4rem 0; }
.plan-row { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .5rem; background: var(--bg-2); }
.plan-row.warn { border-color: var(--red); }
.plan-head { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.plan-controls { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.plan-controls input { width: 4.2rem; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: .25rem .35rem; font: inherit; }
.plan-controls select { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: .25rem; font: inherit; }
.plan-controls label { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }
.plan-controls input.gesetzt { border-color: var(--gold); }
.delta { margin-left: auto; font-weight: 800; font-size: .8rem; padding: .05rem .4rem; border-radius: 99px; border: 1px solid var(--line); }
.delta.ok { color: var(--green); } .delta.mid { color: var(--gold); } .delta.bad { color: var(--red); border-color: var(--red); }
.plan-hint { font-size: .82rem; margin-top: .25rem; color: var(--gold); }
.plan-hint.bad { color: var(--red); }
.structure-list li { align-items: flex-start; justify-content: flex-start; }
.structure-list .grow { flex: 1; display: grid; gap: .1rem; }
.style-edit { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; margin: .35rem 0; }
.style-edit summary { cursor: pointer; }
.style-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin: .4rem 0; }
.style-kinds label { display: grid; gap: .15rem; font-weight: 600; }
.style-kinds select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: .25rem; font: inherit; }

/* ------------------------------------------------------------------------------------------
   Designs (Team → Design): [data-theme] on <html> for the page, on a card for its preview.
   "tag" is the default above; the others only change colours.
   ------------------------------------------------------------------------------------------ */
[data-theme="abend"] {
    --bg: #2b2826; --bg-2: #353130; --card: #3d3938; --card-2: #47423f; --line: #5d5754;
    --text: #fcf5f1; --muted: #c4bab5; --green: #86d562; --green-2: #6cc349; --green-3: #2a641c; --gold: #ffd166;
    --red: #ff7b6e; --blue: #7fb6ff; --overlay: rgba(43, 40, 38, .95);
    --ok-bg: #2d3f24; --ok-fg: #c9f2b6; --ok-line: #52a535; --err-bg: #4a2620; --err-fg: #ffd2c9; --err-line: #b42d10;
    --hl-bg: #4a3f1f; --hl-line: #e2b923; --admin-bg: #4a3220; --admin-fg: #ffc48a; --admin-line: #a05a1e;
    color-scheme: dark;
}
[data-theme="abend"] .topbar { background: linear-gradient(#3e6e24, #335c1d); }
[data-theme="abend"] tbody tr:hover { background: #4a4542; }
[data-theme="abend"] .btn.secondary { background: #6b6562; color: #fff; box-shadow: inset 0 -4px 0 #3d3938, inset 3px 3px 0 rgba(255, 255, 255, .2); }
[data-theme="abend"] input[type=text], [data-theme="abend"] input[type=password], [data-theme="abend"] input[type=email],
[data-theme="abend"] input[type=search], [data-theme="abend"] input[type=number], [data-theme="abend"] textarea { background: #2b2826; color: var(--text); }
[data-theme="abend"] .cookie-banner { background: #3d3938; }
[data-theme="kirschbluete"] {
    --bg: #fdf1f4; --bg-2: #f8e1e8; --card: #fff; --card-2: #fff6f8; --line: #efc6d3;
    --green: #c2477a; --green-2: #e0679a; --green-3: #8e2a55; --gold: #a8740c; --sky: #ffd1e0;
}
[data-theme="kirschbluete"] .topbar { background: linear-gradient(#f3a6c4, #e58bb0); }
[data-theme="ozean"] {
    --bg: #eef7fb; --bg-2: #dceef6; --card: #fff; --card-2: #f4fafd; --line: #b9dbe9;
    --green: #127fa3; --green-2: #1a9fc9; --green-3: #0b5a76; --gold: #a8740c;
}
[data-theme="ozean"] .topbar { background: linear-gradient(#3fb2d8, #2a95bd); }
[data-theme="ozean"] .topbar::after, [data-theme="kirschbluete"] .topbar::after {
    background: linear-gradient(90deg, #e9d8a6 0 25%, #dcc88f 25% 50%, #f1e2b4 50% 75%, #d6c286 75% 100%); background-size: 48px 8px; }

/* ---- Life on the page: sky, pixel clouds, landscape, hero, skins ---------------------- */
body:not(.map-mode) { background: linear-gradient(#cfeaff 0, #e7f4ff 220px, var(--bg) 520px) no-repeat, var(--bg); }
[data-theme="abend"] body:not(.map-mode) { background: linear-gradient(#26324a 0, #2f2c37 260px, var(--bg) 520px) no-repeat, var(--bg); }
[data-theme="kirschbluete"] body:not(.map-mode) { background: linear-gradient(#ffe0ec 0, #fff0f5 240px, var(--bg) 520px) no-repeat, var(--bg); }
.container, .footer { position: relative; z-index: 1; }
.decor-clouds { position: absolute; left: 0; right: 0; top: 64px; height: 320px; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud { position: absolute; width: 168px; height: 32px; background: rgba(255, 255, 255, .92); animation: cloud linear infinite;
    box-shadow: 0 6px 0 rgba(200, 225, 245, .6); }
.cloud span { position: absolute; background: inherit; box-shadow: inherit; }
.cloud span:first-child { left: 24px; top: -20px; width: 72px; height: 22px; }
.cloud span:last-child { left: 96px; top: -12px; width: 48px; height: 14px; }
.cloud-0 { top: 40px; animation-duration: 140s; animation-delay: -20s; }
.cloud-1 { top: 120px; animation-duration: 190s; animation-delay: -120s; transform: scale(.7); opacity: .8; }
.cloud-2 { top: 70px; animation-duration: 160s; animation-delay: -70s; transform: scale(1.3); }
.cloud-3 { top: 200px; animation-duration: 220s; animation-delay: -160s; opacity: .7; }
@keyframes cloud { from { left: -220px; } to { left: 110%; } }
[data-theme="abend"] .cloud { background: rgba(255, 255, 255, .12); box-shadow: none; }
.decor-land { position: relative; height: 240px; margin-top: 1.5rem; margin-bottom: -2px; pointer-events: none; z-index: 0;
    overflow: hidden; background: linear-gradient(rgba(207, 234, 255, 0), rgba(207, 234, 255, .75) 70%); }
.decor-land > div { position: absolute; inset: 0; background-repeat: repeat-x; background-size: 1440px 240px;
    background-position: 0 100%; image-rendering: pixelated; will-change: background-position; animation: land linear infinite; }
.land-mountains { animation-duration: 840s !important; opacity: .9; }
.land-hills { animation-duration: 420s !important; }
.land-near { animation-duration: 210s !important; }
@keyframes land { from { background-position-x: 0; } to { background-position-x: -1440px; } }
@media (max-width: 700px) { .decor-land { height: 180px; } .decor-land > div { background-size: 1080px 180px; }
    @keyframes land { from { background-position-x: 0; } to { background-position-x: -1080px; } } }
[data-theme="abend"] .decor-land { background: linear-gradient(rgba(38, 50, 74, 0), rgba(38, 50, 74, .8) 70%); }
[data-theme="abend"] .decor-land > div { filter: brightness(.5) saturate(.75); }
[data-theme="kirschbluete"] .land-hills { filter: hue-rotate(-100deg) saturate(.6) brightness(1.1); }
[data-theme="kirschbluete"] .decor-land { background: linear-gradient(rgba(255, 224, 236, 0), rgba(255, 224, 236, .7) 70%); }
@media (prefers-reduced-motion: reduce) { .decor-land > div, .cloud { animation: none; } }
body.map-mode .decor-clouds, body.login-mode .decor-clouds, body.map-mode .decor-land, body.login-mode .decor-land { display: none; }

.hero { position: relative; display: grid; grid-template-columns: 200px 1fr; align-items: end; gap: 1.2rem; min-height: 230px;
    margin-bottom: 1.6rem; border: 3px solid #1e1e1f; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); overflow: hidden; background: #5c9e31; }
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55)); pointer-events: none; }
.hero-skin { position: relative; z-index: 1; display: grid; place-items: end center; height: 100%; min-height: 230px; }
.hero-text { position: relative; z-index: 2; padding: 1.4rem 1.6rem 1.4rem 0; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .4); }
.hero-text h1 { font-size: 2.3rem; }
.hero-text p { margin: .2rem 0 .9rem; font-weight: 600; }
.hero .badge { text-shadow: none; }
.skin-head { width: 22px; height: 22px; image-rendering: pixelated; border-radius: 2px; vertical-align: middle; flex: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.skin-head.missing { display: none; }
.small-head { width: 18px; height: 18px; margin-right: .35rem; }
.hero-head { width: 96px; height: 96px; margin-bottom: 1.5rem; box-shadow: 0 0 0 3px #1e1e1f; }
.user .skin-head { width: 26px; height: 26px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .3); }
.skin-card { display: grid; grid-template-columns: 260px 1fr; gap: 1.4rem; align-items: center;
    background: linear-gradient(135deg, #e7f4ff, #fff 60%); }
.skin-stage { display: grid; place-items: center; min-height: 330px; background: radial-gradient(circle at 50% 70%, #cfe9b8, transparent 65%); }
.skin-stage canvas { cursor: grab; }
@media (max-width: 700px) {
    .hero { grid-template-columns: 1fr; }
    .hero-skin { min-height: 180px; }
    .hero-text { padding: 0 1.2rem 1.2rem; }
    .skin-card { grid-template-columns: 1fr; }
}

/* Join instructions on the login page */
.join-card { margin-bottom: 1rem; }
.join-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.join-steps { margin: .6rem 0 0; padding-left: 1.3rem; line-height: 1.7; }
.join-steps li { margin: .35rem 0; }
.ip-row { display: flex; align-items: center; gap: .7rem; margin: .4rem 0; flex-wrap: wrap; }
.server-ip { font-family: var(--pixel); font-size: 1.5rem; padding: .3rem .8rem; background: #1e1e1f; color: #7dff6a; border: 0;
    border-radius: 2px; letter-spacing: .04em; }
.server-status { font-weight: 800; font-size: .88rem; padding: .25rem .7rem; border: 2px solid var(--line); background: var(--card-2); }
.server-status.up { color: var(--green); border-color: var(--ok-line); background: var(--ok-bg); }

/* ---- Gallery ------------------------------------------------------------------------------- */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-item { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.gallery-thumb { display: block; aspect-ratio: 16 / 10; background: #1e1e1f; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gallery-thumb:hover img { transform: scale(1.04); }
.gallery-item figcaption { padding: .7rem .85rem .8rem; display: grid; gap: .35rem; }
.gallery-title { color: var(--text); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.gallery-meta .small { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.gallery-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.gallery-actions .spacer { flex: 1; }
.gallery-manage { display: flex; gap: .9rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.like { font: inherit; font-weight: 800; font-size: .9rem; border: 2px solid var(--line); background: var(--card); color: var(--muted);
    border-radius: 3px; padding: .15rem .55rem; cursor: pointer; }
.like:hover { border-color: var(--red); color: var(--red); }
.like.on { background: var(--red); border-color: var(--red); color: #fff; }
.gallery-full { margin: 0 0 1rem; padding: 0; overflow: hidden; }
.gallery-full img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: #1e1e1f; }
.gallery-full figcaption { padding: .7rem 1rem; }
.upload-form .drop { position: relative; display: grid; place-items: center; min-height: 220px; border: 3px dashed var(--line);
    border-radius: var(--radius); background: var(--card-2); cursor: pointer; text-align: center; padding: 1rem; overflow: hidden; }
.upload-form .drop.over, .upload-form .drop:hover { border-color: var(--green); }
.upload-form .drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-form .drop.has-image .drop-text { display: none; }
.drop-preview { max-width: 100%; max-height: 420px; display: block; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.modal-box { width: min(560px, 100%); }

/* ---- Team page ------------------------------------------------------------------------------ */
.team-hero { text-align: center; max-width: 720px; margin: 0 auto 1rem; }
.team-hero h1 { font-size: 2.4rem; margin-bottom: .4rem; }
.team-hero p { color: var(--muted); font-size: 1.05rem; }
.team-group-head { --role: var(--green); text-align: center; margin-bottom: 1.2rem; }
.team-group-head h2 { display: inline-block; margin: 0 0 .3rem; padding: 0 .4rem .2rem; border-bottom: 4px solid var(--role); }
.team-group-head p { max-width: 640px; margin: .3rem auto 0; }
.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
.team-card { --role: var(--green); width: 230px; padding: 0; overflow: hidden; text-align: center; cursor: grab; outline: none;
    transition: transform .2s, box-shadow .2s; }
.team-card:hover, .team-card:focus-visible, .team-card.is-live { transform: translateY(-4px);
    box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 16px 30px rgba(60, 40, 20, .14); }
.team-stage { position: relative; height: 270px; overflow: hidden;
    background: linear-gradient(#bfe3ff, #e8f5ff 70%, #79c05a 70%, #79c05a 76%, #866043 76%); }
.team-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 12px, transparent 12px 24px); pointer-events: none; }
[data-theme="abend"] .team-stage { background: linear-gradient(#26324a, #3a3550 70%, #3f6a2a 70%, #3f6a2a 76%, #4d3826 76%); }
.team-figure { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); height: 260px; width: auto; z-index: 1;
    filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, .18)); }
.team-figure.team-head-only { height: 96px; bottom: 90px; image-rendering: pixelated; }
.team-live { position: absolute; inset: 0; z-index: 2; display: grid; place-items: end center; }
.team-live canvas { width: 214px !important; height: 270px !important; }
.team-card.is-live .team-figure { visibility: hidden; }
.team-info { padding: .8rem 1rem 1rem; border-top: 4px solid var(--role); display: grid; gap: .25rem; justify-items: center; }
.team-role { font-family: var(--pixel); font-weight: 700; font-size: .85rem; color: var(--role-fg, #fff); background: var(--role);
    padding: .1rem .55rem; border-radius: 3px; border: 2px solid rgba(0, 0, 0, .15); }
.team-info h3 { margin: .1rem 0 0; font-size: 1.2rem; }
.team-text { margin: 0; color: var(--muted); font-size: .88rem; }
.team-seen { min-height: 1.2rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.row-between h2 { margin: 0 0 .2rem; }
.small-prose { font-size: .92rem; }

/* ---- Leaderboards -------------------------------------------------------------------------- */
.board-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.board h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; margin: 0 0 .7rem; }
.board-icon { width: 28px; height: 28px; image-rendering: pixelated; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.board-list li { display: grid; grid-template-columns: 1.8rem 22px 1fr auto; align-items: center; gap: .55rem; padding: .3rem .35rem;
    border-radius: 3px; }
.board-list li:nth-child(odd) { background: var(--card-2); }
.board-list li.mine { outline: 2px solid var(--green); }
.board-rank { font-weight: 800; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-rank.medal-1, .board-rank.medal-2, .board-rank.medal-3 { color: #fff; border-radius: 3px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.board-rank.medal-1 { background: #d9a520; }
.board-rank.medal-2 { background: #9aa4ad; }
.board-rank.medal-3 { background: #b06d3b; }
.board-dot { width: 12px; height: 12px; justify-self: center; background: var(--green); border-radius: 2px; }
.board-name { display: grid; min-width: 0; }
.board-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-value { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-me { margin-top: .6rem; padding-top: .5rem; border-top: 1px solid var(--line); min-height: 1.6rem; }

/* ---- Building catalog ---------------------------------------------------------------------- */
.catalog-filter { margin-bottom: 1rem; }
.catalog-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.catalog-card { padding: 0; overflow: hidden; color: var(--text); display: flex; flex-direction: column; transition: transform .15s; }
.catalog-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--green-2); }
.catalog-thumb { aspect-ratio: 3 / 2; display: grid; place-items: center; background: linear-gradient(#bfe3ff, #eaf6ff 75%, #d8ecc8); }
[data-theme="abend"] .catalog-thumb, [data-theme="abend"] .catalog-stage { background: linear-gradient(#26324a, #3a3550); }
.catalog-thumb img { width: 100%; height: 100%; object-fit: contain; }
.catalog-card-body { padding: .8rem 1rem 1rem; display: grid; gap: .3rem; }
.catalog-card-body h3 { margin: 0; }
.catalog-card-body p { margin: 0; }
.catalog-loading { width: 28px; height: 28px; border: 4px solid rgba(60, 133, 39, .25); border-top-color: var(--green); border-radius: 50%;
    animation: spin 0.9s linear infinite; }
.catalog-loading.big { width: 44px; height: 44px; }
@keyframes spin { to { transform: rotate(360deg); } }
.catalog-free { display: flex; flex-wrap: wrap; gap: .4rem; }
.catalog-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .catalog-detail { grid-template-columns: 1fr; } }
.catalog-stage { position: relative; height: min(62vh, 560px); border: 3px solid #1e1e1f; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(#a9d8ff, #e7f4ff 70%, #cfe8bd); display: grid; place-items: center; cursor: grab; }
.catalog-stage:active { cursor: grabbing; }
.catalog-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.catalog-stage.loading::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px;
    border: 3px solid rgba(60, 133, 39, .25); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
.catalog-stage-bar { margin-top: .6rem; align-items: center; }
.catalog-stage-bar .spacer { flex: 1; }
.catalog-features { padding-left: 1.2rem; }
.catalog-features li { margin: .25rem 0; }
.variant-row { margin: .4rem 0; }
.variant-row select { min-width: 14rem; }
.admin-card { border-color: var(--admin-line); background: var(--admin-bg); }
.catalog-card { position: relative; }
.catalog-ribbon { position: absolute; top: 10px; left: -4px; z-index: 2; background: var(--gold); color: #fff; font-family: var(--pixel);
    font-weight: 700; font-size: .85rem; padding: .15rem .7rem .15rem .6rem; box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.catalog-ribbon.new { background: #e04f9d; }
.catalog-badge { background: var(--gold); color: #fff; border-color: transparent; }
.catalog-badge.new { background: #e04f9d; }
.catalog-price { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; margin-top: .2rem; }
.catalog-new { margin-bottom: 1rem; padding: 1rem; border-radius: var(--radius); background: linear-gradient(135deg, rgba(224, 79, 157, .1), rgba(60, 133, 39, .1)); }
.catalog-new h2 { margin-top: 0; }
.catalog-buy { margin: .8rem 0; border-color: var(--green-2); }
.catalog-buy-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.catalog-buy-price { font-size: 1.6rem; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.variant-row input[name=price] { max-width: 13rem; }
.editor-table { width: 100%; }
.editor-table td { padding: .25rem .3rem; }
.editor-table input, .editor-table select { width: 100%; min-width: 4rem; }
.editor-table .center { text-align: center; }
.editor-table input[type=checkbox] { width: auto; }
.catalog-upgrades td, .catalog-upgrades th { font-size: .85rem; white-space: nowrap; }
.catalog-stage-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
#variant-pickers { display: flex; gap: .5rem; flex-wrap: wrap; }
.limit-input { width: 6rem; text-align: right; }
.player-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.player-card { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; }
.player-card-head { width: 40px; height: 40px; image-rendering: pixelated; border-radius: 3px; }
.player-card.no-consent { opacity: .7; }
/* Special items in the catalog */
.item-thumb { background: radial-gradient(circle at 50% 45%, #fff6d8, #cfe8bd 70%); }
.item-thumb img { width: 46%; height: auto; image-rendering: pixelated; filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, .2)); }
.catalog-stage.item-stage { cursor: default; background: radial-gradient(circle at 50% 40%, #fff6d8, #cfe8bd 75%); }
.item-showcase { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; padding: 1rem; }
.item-showcase img { width: 160px; height: 160px; image-rendering: pixelated; filter: drop-shadow(6px 8px 0 rgba(0, 0, 0, .2));
    animation: item-bob 3s ease-in-out infinite alternate; }
@keyframes item-bob { from { transform: translateY(-6px) rotate(-4deg); } to { transform: translateY(6px) rotate(4deg); } }
.mc-tooltip { background: rgba(16, 0, 16, .94); border: 2px solid #2b0b5c; outline: 2px solid rgba(16, 0, 16, .94); padding: .5rem .7rem;
    font-family: var(--pixel); font-size: .95rem; line-height: 1.35; color: #fff; max-width: 420px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.mc-tooltip .mc-name { margin-bottom: .2rem; }
.for-item, .kind-item .for-structure, .kind-item .for-structure-label { display: none; }
.kind-item .for-item { display: table-cell; }

/* ---- Settla 2027: Ergänzungen ---------------------------------------------------------- */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.level-bar { max-width: 420px; }
.city-card table td { padding: .25rem 0; }
.achievements { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.achievement { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .6rem; border: 1px solid var(--line, #ccc);
    border-radius: 4px; background: var(--bg-2, #f6f6f6); }

/* Gebäudekatalog (#/katalog) */
.katalog-filter { margin: .6rem 0 1rem; flex-wrap: wrap; }
.katalog .produkt h3 { margin: 0; }
.produkt-kopf { display: flex; gap: .7rem; align-items: center; margin-bottom: .4rem; }
.varianten { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .45rem; }
.varianten li { display: flex; justify-content: space-between; gap: .6rem; align-items: center; flex-wrap: wrap;
    border-top: 1px solid var(--line); padding-top: .45rem; }
.variante-rechts { display: flex; gap: .6rem; align-items: center; }
.baustellen { display: grid; gap: .6rem; }
.baustelle .bar > span { background: var(--green); }
.bau-raster-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.bau-raster { display: grid; gap: 3px; margin-top: .5rem; max-width: 100%; overflow-x: auto; }
.bau-raster .zelle { width: 28px; height: 28px; border-radius: 4px; border: 2px solid transparent; padding: 0; }
.bau-raster .eigen { background: var(--card-2); border-color: var(--line); cursor: pointer; }
.bau-raster .fremd { background: transparent; }
.bau-raster .flaeche { border-color: var(--green); background: color-mix(in srgb, var(--green) 30%, var(--card-2)); }
.bau-raster .ecke { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.richtungen { margin: .3rem 0 .6rem; }

/* Geburtstag im Profil */
.birthday-form { display: flex; flex-direction: column; gap: 8px; }
.birthday-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.birthday-form label.check { display: flex; gap: 8px; align-items: flex-start; }
.birthday-form label.check input[type=checkbox] { width: auto; margin-top: 3px; }

/* Premium (Echtgeld-Shop) */
.premium-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.premium-produkt ul { padding-left: 1.2rem; margin: .6rem 0; }
.premium-preis { font-size: 1.8rem; font-weight: 700; margin: .2rem 0; }
.premium-kauf { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.premium-zustimmung { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; max-width: 60rem; }
.shop-reiter { margin: 0 0 1rem; }
.katalog .produkt { padding-top: 0; overflow: hidden; }
.katalog .catalog-thumb { position: relative; width: calc(100% + 2.4rem); margin: 0 -1.2rem .8rem; padding: 0; border: 0; border-bottom: 2px solid var(--line);
    cursor: zoom-in; font: inherit; }
.katalog .catalog-thumb:hover img { transform: scale(1.04); }
.katalog .catalog-thumb img { transition: transform .2s; }
.catalog-3d-hinweis { position: absolute; right: 8px; bottom: 8px; background: rgba(30, 30, 31, .75); color: #fff; font-family: var(--pixel);
    font-size: .8rem; padding: .1rem .45rem; border-radius: var(--radius); }
#katalog-3d .catalog-stage-bar { display: flex; gap: .6rem; flex-wrap: wrap; }
#katalog-3d .catalog-stage-bar .segmented:empty { display: none; }
