:root {
  --gold: #d99b31;
  --gold-bright: #f7c35f;
  --gold-dark: #6f4215;
  --ink: #07131c;
  --ink-2: #0a1b27;
  --panel: rgba(5, 18, 27, .92);
  --panel-soft: rgba(8, 25, 37, .86);
  --text: #f2ede2;
  --muted: #b9c0c3;
  --green: #53dc73;
  --amber: #ffb03b;
  --red: #ff6156;
  --blue: #57b8e6;
  --sidebar: 252px;
  --top: 154px;
  --bg-brightness: .88;
  --ui-scale: 1;
}
* { box-sizing: border-box; }
html, body { margin:0; width:100%; min-width:1100px; min-height:100%; background:#02070b; color:var(--text); font-family: Georgia, "Times New Roman", serif; }
body { overflow-x:auto; }
button, input, select { font: inherit; }
button { color:inherit; }
.game-shell {
  min-height:100vh;
  background:
    linear-gradient(rgba(2,9,14,.12), rgba(2,9,14,.2)),
    url('assets/background.png') center/cover fixed no-repeat;
  position:relative;
}
.game-shell::before { content:""; position:fixed; inset:0; background:rgba(0,0,0,calc(1 - var(--bg-brightness))); pointer-events:none; z-index:0; }
.game-shell > * { position:relative; z-index:1; }
.panel-gold, .panel {
  background:linear-gradient(180deg, rgba(9,27,40,.96), rgba(4,14,22,.96));
  border:1px solid var(--gold-dark);
  box-shadow: inset 0 0 0 1px #1a2a32, inset 0 0 0 2px rgba(230,161,52,.2), 0 2px 9px rgba(0,0,0,.35);
}
.panel-gold { border-color:var(--gold); }
.topbar {
  height:var(--top); display:grid; grid-template-columns:var(--sidebar) 1fr; background:rgba(2,10,15,.97);
  border-bottom:2px solid var(--gold); box-shadow:0 5px 18px rgba(0,0,0,.55);
}
.logo-panel { margin:4px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.logo-panel img { width:96%; height:96%; object-fit:contain; object-position:center; }
.top-content { min-width:0; display:grid; grid-template-rows:88px 62px; }
.status-row { display:grid; grid-template-columns:1.25fr .9fr 1fr .9fr 1.1fr .62fr; gap:4px; padding:4px 5px 2px 2px; }
.status-card { min-width:0; display:flex; align-items:center; gap:10px; padding:8px 12px; }
.status-icon { color:var(--gold-bright); font-size:25px; width:30px; text-align:center; flex:0 0 auto; }
.status-label { color:var(--gold-bright); font-size:15px; line-height:1.1; }
.status-value { font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.status-sub { color:var(--green); font-size:13px; margin-top:2px; }
.progress { height:10px; background:#1d2630; border:1px solid #754b22; border-radius:8px; overflow:hidden; margin-top:4px; }
.progress > span { display:block; height:100%; background:linear-gradient(90deg,#2db75a,#7de38b); }
.resource-row { display:grid; grid-template-columns:repeat(8, 1fr); gap:3px; padding:2px 5px 5px 2px; }
.resource-card { min-width:0; display:grid; grid-template-columns:38px 1fr; align-items:center; gap:7px; padding:3px 9px; }
.resource-card img { width:34px; height:34px; object-fit:contain; }
.resource-name { font-size:14px; color:#f7ead0; white-space:nowrap; }
.resource-value { font-size:16px; white-space:nowrap; }
.main-grid { min-height:calc(100vh - var(--top)); display:grid; grid-template-columns:var(--sidebar) 1fr; }
.side-menu { margin:4px; align-self:start; overflow:hidden; position:sticky; top:calc(var(--top) + 4px); }
.menu-btn { width:100%; min-height:53px; background:linear-gradient(180deg,rgba(8,25,36,.96),rgba(4,15,23,.96)); border:0; border-bottom:1px solid #6f4215; display:grid; grid-template-columns:44px 1fr; align-items:center; padding:4px 13px; text-align:left; cursor:pointer; transition:.15s ease; }
.menu-btn:hover { background:linear-gradient(180deg,#133448,#071c29); }
.menu-btn.active { background:linear-gradient(180deg,#183245,#0b1f2b); box-shadow:inset 0 0 14px rgba(255,170,50,.22), inset 3px 0 0 var(--gold-bright); }
.menu-btn.active .menu-label { color:#fff0c4; }
.menu-icon { color:var(--gold-bright); font-size:25px; text-align:center; filter:drop-shadow(0 0 4px rgba(245,177,63,.24)); }
.menu-label { font-size:17px; color:#f1e6cf; }
.menu-badge { float:right; background:#d6332f; border-radius:999px; padding:1px 7px; font-size:12px; margin-left:8px; }
.content { min-width:0; padding:8px; }
.page { animation:fade .18s ease; }
@keyframes fade { from { opacity:.65; transform:translateY(2px);} to {opacity:1; transform:none;} }
.page-title { min-height:94px; padding:14px 20px; display:flex; align-items:center; gap:18px; margin-bottom:8px; background:linear-gradient(90deg,rgba(5,18,27,.96),rgba(6,18,27,.78),rgba(6,18,27,.45)); }
.page-title .big-icon { font-size:48px; color:var(--gold-bright); }
.page-title h1 { margin:0 0 4px; font-size:31px; color:#f6d889; }
.page-title p { margin:0; color:#d8d6ce; font-size:15px; }
.dashboard { display:grid; grid-template-columns:300px minmax(420px,1fr) 390px; grid-template-rows:minmax(370px,1fr) 300px; gap:8px; height:calc(100vh - var(--top) - 16px); min-height:700px; }
.dashboard .stats { grid-column:1; grid-row:1; }
.dashboard .orders { grid-column:1; grid-row:2; }
.dashboard .center-hero { grid-column:2; grid-row:1; min-width:0; overflow:hidden; position:relative; }
.dashboard .bonuses { grid-column:2; grid-row:2; }
.dashboard .market-mini { grid-column:3; grid-row:1; }
.dashboard .right-bottom { grid-column:3; grid-row:2; display:grid; grid-template-rows:1fr 1.05fr; gap:7px; }
.panel-head { height:48px; display:flex; align-items:center; justify-content:space-between; padding:0 14px; border-bottom:1px solid var(--gold-dark); color:var(--gold-bright); font-size:19px; }
.panel-body { padding:11px 14px; }
.stat-list, .bonus-list, .event-list { list-style:none; margin:0; padding:0; }
.stat-list li, .bonus-list li { display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid rgba(205,153,65,.17); }
.stat-list span:first-child { color:#d4d2cb; }
.hero-copy { position:absolute; left:0; right:0; top:0; padding:18px 22px; background:linear-gradient(180deg,rgba(3,14,22,.93),rgba(4,15,23,.58),transparent); z-index:2; }
.hero-copy h1 { margin:0; color:#f7d98c; font-size:31px; }
.hero-copy p { color:#d9dde0; margin:4px 0 0; }
.hero-space { height:100%; background:linear-gradient(180deg,rgba(8,24,34,.07),rgba(3,10,15,.22)); }
.order-item { padding:9px 0; border-bottom:1px solid rgba(205,153,65,.19); }
.order-title { display:flex; justify-content:space-between; color:#e9deca; margin-bottom:7px; }
.order-meta { display:flex; justify-content:space-between; font-size:13px; color:var(--muted); margin-top:5px; }
.bonus-list li { display:grid; grid-template-columns:1.1fr 1fr auto; font-size:14px; }
.bonus-name { color:#f0dfbd; }
.bonus-effect { color:var(--green); }
.market-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; padding:5px; }
.market-tile { min-width:0; padding:7px 6px; background:rgba(6,20,29,.82); border:1px solid #6b431d; text-align:center; }
.market-tile img { width:32px; height:32px; object-fit:contain; vertical-align:middle; }
.market-top { display:flex; align-items:center; justify-content:center; gap:4px; min-height:34px; font-size:12px; }
.market-price { font-size:17px; color:#fff3d3; }
.mini-chart { width:100%; height:54px; display:block; margin:4px 0; }
.trend { color:var(--green); font-size:12px; }
.event-list li { display:grid; grid-template-columns:50px 12px 1fr; gap:7px; padding:5px 0; font-size:13px; border-bottom:1px solid rgba(205,153,65,.12); }
.dot { width:9px; height:9px; border-radius:50%; align-self:center; background:var(--blue); box-shadow:0 0 7px currentColor; }
.dot.ok { background:var(--green); } .dot.warn {background:var(--amber);} .dot.bad {background:var(--red);}
.chat-log { height:98px; overflow:auto; font-family:Arial,sans-serif; font-size:12px; line-height:1.45; padding:4px 7px; background:rgba(0,8,13,.55); }
.chat-line .name { color:#45c5e8; }
.chat-compose { display:grid; grid-template-columns:1fr 82px; gap:5px; padding:5px; }
.chat-compose input { background:#0a1720; border:1px solid #765025; color:white; padding:7px; min-width:0; }
.btn { border:1px solid #9a6726; background:#152532; padding:8px 15px; cursor:pointer; border-radius:4px; }
.btn.primary { background:linear-gradient(180deg,#b16e16,#70400b); border-color:#f0b14f; font-weight:bold; }
.btn.primary:hover { filter:brightness(1.13); }
.btn.secondary:hover { background:#213849; }
.card-grid { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:9px; }
.build-card { overflow:hidden; }
.build-head { height:46px; display:flex; align-items:center; justify-content:space-between; padding:0 12px; border-bottom:1px solid var(--gold-dark); color:var(--gold-bright); font-size:21px; }
.build-main { display:grid; grid-template-columns:45% 55%; min-height:220px; }
.build-image { background:rgba(0,0,0,.18); display:flex; align-items:center; justify-content:center; padding:8px; }
.build-image img { width:100%; height:205px; object-fit:contain; }
.build-info { padding:14px 12px; font-family:Arial,sans-serif; font-size:13px; line-height:1.45; }
.build-info p { margin-top:0; color:#d9dde0; }
.costs { padding:8px 10px; border-top:1px solid var(--gold-dark); }
.cost-row { display:flex; flex-wrap:wrap; gap:7px 13px; font-family:Arial,sans-serif; font-size:12px; }
.cost-pill { display:flex; align-items:center; gap:4px; color:#e7e4dd; }
.cost-pill img { width:21px; height:21px; object-fit:contain; }
.card-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-top:1px solid #6f4215; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; background:rgba(4,15,22,.88); }
th,td { padding:10px; border-bottom:1px solid rgba(214,154,49,.2); text-align:left; }
th { color:#f3c765; background:rgba(12,35,48,.94); position:sticky; top:0; }
.resource-table-icon { width:32px; height:32px; object-fit:contain; vertical-align:middle; margin-right:8px; }
.research-grid { display:grid; grid-template-columns:repeat(2,minmax(340px,1fr)); gap:9px; }
.research-card { padding:14px; }
.research-card h2 { color:#f2cb70; margin:0 0 5px; }
.research-meta { display:grid; grid-template-columns:1fr auto; gap:5px; font-family:Arial,sans-serif; color:#d9d9d5; }
.research-card .cost-row { margin-top:10px; }
.market-full-grid { display:grid; grid-template-columns:repeat(4,minmax(220px,1fr)); gap:9px; }
.market-card { padding:12px; }
.market-card .resource-title { display:flex; align-items:center; gap:10px; font-size:20px; color:#f1d07f; }
.market-card img { width:42px; height:42px; object-fit:contain; }
.market-card .big-chart { width:100%; height:105px; }
.split { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.setting { padding:14px 0; border-bottom:1px solid rgba(205,153,65,.17); }
.setting label { display:flex; justify-content:space-between; gap:20px; }
.setting input[type=range] { width:240px; }
.note { color:#d5b977; font-style:italic; }
.placeholder { padding:25px; color:#d5d5d2; line-height:1.65; }
.toast { position:fixed; right:22px; bottom:22px; min-width:280px; max-width:430px; background:#0a1a25; border:1px solid var(--gold); color:#fff3d9; padding:13px 16px; border-radius:5px; box-shadow:0 5px 24px rgba(0,0,0,.55); opacity:0; transform:translateY(16px); pointer-events:none; transition:.2s ease; z-index:50; }
.toast.show { opacity:1; transform:none; }
.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.68); display:flex; align-items:center; justify-content:center; z-index:60; }
.modal-backdrop[hidden] { display:none; }
.modal { width:min(520px,90vw); padding:22px; }
.modal h2 { color:#f4cd76; margin-top:0; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; }
@media (max-width:1450px) {
  :root { --sidebar:220px; --top:146px; }
  .status-row { grid-template-columns:1.1fr .8fr .9fr .82fr 1fr .5fr; }
  .status-card { padding:6px 8px; gap:6px; }
  .status-icon { display:none; }
  .dashboard { grid-template-columns:270px minmax(390px,1fr) 340px; }
  .menu-label { font-size:15px; }
  .market-grid { grid-template-columns:repeat(2,1fr); }
}

/* Schritt 2: Java-API Status */
.api-live .status-card:first-child .status-sub { color:#67df84; }
.api-offline .status-card:first-child .status-sub { color:#ffb04c; }

/* Schritt 3: echte Bau-/Forschungsauftraege */
.live-order-badge { margin-left:auto; font-size:10px; letter-spacing:.12em; color:#7de38b; border:1px solid rgba(125,227,139,.45); padding:2px 6px; border-radius:9px; }
.order-item.active-order { background:linear-gradient(90deg,rgba(70,112,64,.10),transparent); }
.order-item.inactive { opacity:.72; }
.order-live-name { color:#f2d58d; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-progress > span { box-shadow:0 0 9px rgba(90,220,115,.35); transition:width .45s linear; }

.empty-live{padding:14px 10px;color:#c9c1b3;font-size:13px;text-align:center;border:1px dashed rgba(205,159,67,.35);border-radius:6px;background:rgba(0,0,0,.16)}

/* Schritt 5: Live-Produktion und Live-Lager */
.live-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:9px; margin-bottom:9px; }
.live-summary-card { min-height:88px; padding:12px 14px; display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,rgba(7,24,34,.96),rgba(17,24,29,.9)); }
.summary-icon { width:43px; height:43px; display:grid; place-items:center; flex:0 0 43px; border:1px solid #a87933; border-radius:8px; color:#f2cc72; background:#101b22; font-size:24px; }
.summary-label { color:#c8b47c; font-size:12px; text-transform:uppercase; letter-spacing:.06em; }
.summary-value { color:#f6e1a1; font-weight:800; font-size:22px; line-height:1.2; }
.summary-sub { color:#aeb8bd; font-size:12px; margin-top:2px; }
.live-data-table td, .live-data-table th { white-space:nowrap; }
.live-data-table tbody tr:hover { background:rgba(219,169,72,.075); }
.state-pill { display:inline-block; padding:3px 7px; border-radius:10px; border:1px solid; font-size:11px; font-weight:700; }
.state-pill.ok { color:#8ce39d; border-color:#377c49; background:rgba(44,119,65,.18); }
.state-pill.warn { color:#ffd37a; border-color:#9c7030; background:rgba(156,112,48,.17); }
.state-pill.locked { color:#9aa1a5; border-color:#50575b; background:rgba(64,69,72,.2); }
.row-locked { opacity:.58; }
.storage-meter { padding:14px 16px; margin-bottom:9px; }
.storage-meter-head { display:flex; justify-content:space-between; gap:14px; margin-bottom:7px; color:#e5d7ae; }
.big-progress { height:17px; }
.live-note { margin:8px 4px 0; color:#b9c1c4; }
@media(max-width:1250px){ .live-summary-grid { grid-template-columns:repeat(2,minmax(190px,1fr)); } }


/* Schritt 6: Fabriken LIVE */
.factory-live-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr); gap:10px; }
.factory-live-status { padding:0 16px 16px; }
.factory-resource-focus { display:flex; align-items:center; gap:14px; padding:18px 6px 14px; border-bottom:1px solid rgba(205,160,67,.22); }
.factory-resource-focus img, .factory-resource-placeholder { width:72px; height:72px; object-fit:contain; flex:0 0 72px; }
.factory-resource-placeholder { display:grid; place-items:center; border:1px solid var(--gold); border-radius:10px; font-size:32px; color:#caa64d; }
.factory-resource-name { color:#f4d47f; font-size:26px; font-weight:700; margin:3px 0; }
.factory-stat-list { margin-top:10px; }
.factory-stat-list li { padding:9px 2px; }
.factory-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.factory-visual-panel { min-height:420px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:18px; overflow:hidden; }
.factory-visual-panel img { width:100%; max-width:600px; max-height:365px; object-fit:contain; filter:drop-shadow(0 18px 20px rgba(0,0,0,.45)); }
.factory-visual-copy { width:100%; display:flex; justify-content:space-between; gap:18px; border-top:1px solid rgba(205,160,67,.25); padding-top:12px; color:#d8d2c3; }
.factory-visual-copy strong { color:#f2cc72; }
@media(max-width:1200px){ .factory-live-layout { grid-template-columns:1fr; } .factory-visual-panel { min-height:300px; } }


/* Schritt 7: Fabrik-Rohstoff aus dem Browser umstellen */
.factory-resource-actions { align-items:flex-end; flex-wrap:wrap; }
.factory-resource-picker { display:flex; flex-direction:column; gap:4px; min-width:205px; margin-left:auto; }
.factory-resource-picker span { color:#c8b47c; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.factory-resource-picker select { min-height:38px; padding:7px 34px 7px 10px; border:1px solid #9d7738; border-radius:5px; background:#0c171e; color:#f4d47f; font:inherit; outline:none; }
.factory-resource-picker select:focus { border-color:#e0b85c; box-shadow:0 0 0 2px rgba(224,184,92,.12); }
.btn:disabled, .factory-resource-picker select:disabled { opacity:.45; cursor:not-allowed; }
@media(max-width:800px){ .factory-resource-picker { width:100%; margin-left:0; } .factory-resource-picker select { width:100%; } }

/* ===== Schritt 8: Gebäude live bauen ===== */
.build-live-banner { display:flex; align-items:center; gap:12px; padding:9px 12px; margin-bottom:9px; font-size:13px; color:#d9d4c7; }
.build-head { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 11px; border-bottom:1px solid #8d5c20; color:#f2cc72; font-size:19px; font-weight:700; }
.build-status { font:700 9px/1 Arial,sans-serif; letter-spacing:.08em; padding:5px 6px; border-radius:10px; border:1px solid currentColor; white-space:nowrap; }
.build-status.ok { color:#70df8d; }
.build-status.warn { color:#d9a954; }
.build-main { display:grid; grid-template-columns:minmax(120px,42%) 1fr; min-height:180px; }
.build-image { display:flex; align-items:center; justify-content:center; padding:8px; border-right:1px solid rgba(166,112,36,.55); background:rgba(3,14,21,.5); }
.build-image img { max-width:100%; max-height:168px; object-fit:contain; }
.build-info { padding:10px 11px; min-width:0; }
.build-info p { margin:0 0 8px; line-height:1.35; color:#ddd7cb; }
.build-meta { display:grid; grid-template-columns:1fr auto; gap:4px 8px; font:12px/1.25 Arial,sans-serif; }
.build-meta span { color:#aeb9bd; }
.build-meta strong { color:#eee2c4; text-align:right; }
.build-resource-picker { display:flex; flex-direction:column; gap:4px; margin-top:10px; }
.build-resource-picker span { color:#c8b47c; font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.build-resource-picker select { min-height:34px; padding:6px 28px 6px 9px; border:1px solid #9d7738; border-radius:4px; background:#0c171e; color:#f4d47f; outline:none; }
.build-resource-picker select:focus { border-color:#e0b85c; box-shadow:0 0 0 2px rgba(224,184,92,.12); }
.build-missing { margin-top:8px; padding:6px 8px; border:1px solid rgba(198,105,48,.55); background:rgba(95,33,15,.26); color:#e2ad77; font:11px/1.35 Arial,sans-serif; }
.build-message { overflow:hidden; text-overflow:ellipsis; color:#c9c3b4; font:11px/1.25 Arial,sans-serif; }
.card-footer { min-height:47px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 10px; border-top:1px solid #6f4215; }
@media(max-width:1250px){ .card-grid { grid-template-columns:repeat(2,minmax(280px,1fr)); } }

/* ==========================================
   0.6 Schritt 10 - Markt LIVE
   ========================================== */
.market-summary { margin-bottom:9px; }
.market-card.selected { box-shadow:0 0 0 1px rgba(238,183,75,.55),0 0 20px rgba(224,167,55,.15) inset; }
.market-card-prices { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:7px 0 2px; font:11px/1.25 Arial,sans-serif; color:#aeb8bb; }
.market-card-prices strong { display:block; color:#f2dfb0; font-size:14px; }
.market-card-meta { display:flex; flex-wrap:wrap; gap:5px 10px; min-height:35px; margin:3px 0 9px; font:11px/1.2 Arial,sans-serif; color:#b9c0c1; }
.market-card-meta .positive,.trend.positive { color:#6bdd8c; }
.market-card-meta .negative,.trend.negative { color:#ee7469; }
.market-card > .btn { width:100%; }
.market-trade-panel { margin-top:10px; }
.market-selected-head { display:flex; align-items:center; gap:12px; padding:10px 12px; border-bottom:1px solid rgba(154,101,32,.6); }
.market-selected-head img { width:52px; height:52px; object-fit:contain; }
.market-selected-head strong { display:block; color:#f2cf77; font-size:20px; }
.market-selected-head span { display:block; margin-top:2px; color:#c8c7bf; font:12px/1.3 Arial,sans-serif; }
.market-actions-grid { display:grid; grid-template-columns:repeat(3,minmax(240px,1fr)); gap:9px; padding:10px; }
.market-action-box { min-width:0; padding:10px; border:1px solid rgba(142,91,30,.75); background:rgba(4,16,23,.72); }
.market-action-box h3 { margin:0 0 6px; color:#f1cb70; }
.market-action-box p { min-height:42px; margin:0 0 9px; color:#c4c7c5; font:11px/1.35 Arial,sans-serif; }
.market-action-box label { display:grid; grid-template-columns:1fr minmax(90px,130px); align-items:center; gap:8px; margin:6px 0; color:#cbb77d; font:11px/1.2 Arial,sans-serif; }
.market-action-box input { width:100%; min-width:0; box-sizing:border-box; padding:7px 8px; background:#091821; border:1px solid #815b29; color:#f7e3b0; border-radius:4px; }
.market-action-box > .btn { width:100%; margin-top:8px; }
.market-button-row { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }
.market-own-offers { margin-top:10px; }
.market-own-offers .empty-live { padding:14px; }
@media(max-width:1200px){ .market-actions-grid{grid-template-columns:1fr;} }

/* Schritt 11: Gebäude-Verwaltung + Abriss */
.building-management { margin-bottom:12px; overflow:hidden; }
.management-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; padding:10px; }
.manage-card { min-height:90px; display:flex; align-items:center; gap:10px; padding:10px; border:1px solid rgba(176,120,45,.65); background:linear-gradient(180deg,rgba(10,31,43,.93),rgba(5,20,30,.93)); }
.manage-card.non-removable { opacity:.88; }
.manage-icon { font-size:28px; color:#f1c463; min-width:32px; text-align:center; }
.manage-card-copy { flex:1; min-width:0; display:flex; flex-direction:column; }
.manage-label { color:#e5c36f; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.manage-card strong { font-size:22px; color:#fff2c5; }
.manage-card small { color:#b9b8ae; }
.btn.danger { background:linear-gradient(180deg,#74352c,#431a17); border-color:#b96350; color:#ffd9ce; }
.btn.danger:hover:not(:disabled) { filter:brightness(1.16); }
.btn.small { padding:5px 9px; font-size:12px; }
.management-columns { display:grid; grid-template-columns:1.1fr .9fr; gap:10px; padding:0 10px 10px; }
.management-columns h3 { margin:5px 0 8px; color:#efca70; font-size:16px; }
.plant-management-list,.demolition-list { display:flex; flex-direction:column; gap:6px; }
.plant-manage-row { display:grid; grid-template-columns:minmax(130px,1fr) 90px 90px 100px; align-items:center; gap:8px; min-height:42px; padding:6px 8px; border:1px solid rgba(140,91,31,.55); background:rgba(3,17,25,.74); }
.plant-name { display:flex; align-items:center; gap:8px; }
.plant-name img { width:28px; height:28px; object-fit:contain; }
.demolition-order { padding:8px; border:1px solid rgba(140,91,31,.55); background:rgba(3,17,25,.74); }
.demolition-head { display:flex; justify-content:space-between; gap:10px; margin-bottom:5px; }
.demolition-order small { display:block; margin-top:4px; color:#b8b8ae; }
.demolition-warning { margin:0 10px 10px; padding:8px 10px; border-left:3px solid #b45d43; background:rgba(81,27,20,.28); }
.empty-live { color:#9da6a7; padding:12px; }
.section-divider-title { display:flex; justify-content:space-between; align-items:center; margin:14px 2px 7px; color:#f1cd72; font-size:20px; }
.section-divider-title small { color:#a9aaa7; font-size:12px; }
@media(max-width:1450px){ .management-summary{grid-template-columns:repeat(3,1fr)} }
@media(max-width:1150px){ .management-summary{grid-template-columns:repeat(2,1fr)} .management-columns{grid-template-columns:1fr} }


/* Schritt 12: Spielerdaten + Statistiken LIVE */
.profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.profile-card { min-width:0; overflow:hidden; }
.profile-wide { grid-column:1 / -1; }
.profile-lines { padding:10px 14px; }
.profile-line { display:flex; justify-content:space-between; gap:18px; padding:9px 0; border-bottom:1px solid rgba(184,132,50,.22); }
.profile-line:last-child { border-bottom:0; }
.profile-line span { color:#adb7b9; }
.profile-line strong { color:#f1dfac; text-align:right; }
.profile-section { padding:14px; }
.resource-chip-list { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.resource-chip { display:flex; align-items:center; gap:7px; padding:6px 10px; border:1px solid rgba(211,157,55,.7); border-radius:14px; background:rgba(12,32,43,.84); color:#f0d489; }
.resource-chip img { width:25px; height:25px; object-fit:contain; }
.profile-progress-copy { padding:7px 0; border-top:1px solid rgba(184,132,50,.18); color:#bdc4c4; }
.profile-progress-copy strong { color:#f1d178; }
.achievement-grid { display:grid; grid-template-columns:repeat(3,minmax(220px,1fr)); gap:8px; padding:10px; }
.achievement { padding:11px; border:1px solid rgba(169,111,35,.58); background:rgba(4,19,28,.72); }
.achievement strong { display:block; color:#f2cc72; margin-bottom:5px; }
.achievement span { color:#bdc2c1; font:12px/1.35 Arial,sans-serif; }
.season-placeholder { padding:15px; color:#bdc2c1; line-height:1.55; }
.stats-trend-grid { display:grid; grid-template-columns:repeat(3,minmax(280px,1fr)); gap:9px; margin-bottom:10px; }
.stat-trend-card { padding:11px 13px; min-height:215px; }
.stat-trend-head,.stat-trend-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.stat-trend-head span { color:#e1bd65; font-size:17px; }
.stat-trend-head strong { color:#fff0bf; font-size:20px; }
.stat-trend-card svg { width:100%; height:125px; margin:8px 0; border-top:1px solid rgba(180,127,45,.18); border-bottom:1px solid rgba(180,127,45,.18); background:rgba(1,11,17,.28); }
.stat-trend-foot { color:#9ea7a9; font:11px/1.2 Arial,sans-serif; }
.positive { color:#6bdd8c !important; }
.negative { color:#ee7469 !important; }
.stats-total-panel,.stats-resource-panel { margin-top:10px; }
.stats-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(180px,1fr)); gap:8px; padding:10px; }
.stat-kpi { min-height:75px; padding:10px; border:1px solid rgba(151,96,31,.55); background:rgba(4,18,27,.7); display:flex; flex-direction:column; justify-content:center; }
.stat-kpi span { color:#aeb7b9; font:11px/1.2 Arial,sans-serif; text-transform:uppercase; letter-spacing:.04em; }
.stat-kpi strong { margin-top:6px; color:#f1d27b; font-size:19px; }
.stat-resource-name { display:flex; align-items:center; gap:8px; }
.stat-resource-name img { width:27px; height:27px; object-fit:contain; }
@media(max-width:1350px){ .stats-trend-grid{grid-template-columns:repeat(2,minmax(280px,1fr));}.stats-kpi-grid{grid-template-columns:repeat(2,minmax(180px,1fr));}.achievement-grid{grid-template-columns:repeat(2,minmax(220px,1fr));} }
@media(max-width:950px){ .profile-grid{grid-template-columns:1fr}.profile-wide{grid-column:auto}.stats-trend-grid{grid-template-columns:1fr}.achievement-grid{grid-template-columns:1fr} }

/* Schritt 13 – Live-Ereignisse / Nachrichten */
.top-message-btn { position:relative; }
.top-unread { position:absolute; top:-8px; right:-8px; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:#b9362f; color:#fff; font-size:10px; line-height:19px; font-weight:700; border:1px solid #efb05b; box-shadow:0 0 8px rgba(185,54,47,.6); }
.unread-event { background:rgba(206,157,63,.08); }
.event-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 16px; margin-bottom:12px; }
.event-table tr.event-row-unread { background:rgba(206,157,63,.08); }
.event-table td { vertical-align:middle; }
.unread-text { color:#f0c66a; }
.event-level { display:inline-flex; min-width:72px; justify-content:center; border:1px solid rgba(255,255,255,.14); border-radius:4px; padding:3px 7px; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.event-level.ok { color:#77df91; border-color:rgba(119,223,145,.35); }
.event-level.info { color:#d7d2c4; border-color:rgba(215,210,196,.25); }
.event-level.warning { color:#efbd55; border-color:rgba(239,189,85,.4); }
.event-level.critical { color:#ff6d65; border-color:rgba(255,109,101,.45); }
.dot.warning { background:#efbd55; box-shadow:0 0 6px rgba(239,189,85,.55); }
.dot.critical { background:#e74e46; box-shadow:0 0 7px rgba(231,78,70,.65); }

/* Schritt 14: TEST-/Debug-Menü */
.dev-warning{display:flex;align-items:center;gap:18px;padding:12px 16px;margin-bottom:14px;border-color:#c78335;background:linear-gradient(90deg,rgba(126,54,24,.9),rgba(42,24,17,.94));}
.dev-warning strong{color:#ffd27b;letter-spacing:1.2px;font-size:16px}.dev-warning span{color:#f5e6c6}
.debug-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:14px;padding-bottom:20px}
.debug-card{padding:14px;min-height:180px}.debug-card h2{margin:0 0 12px;color:#f2cc72;font-size:18px}.debug-card label{display:flex;flex-direction:column;gap:5px;margin:9px 0;color:#d9ccb0;font-size:13px}.debug-card input,.debug-card select{background:#111924;color:#eee;border:1px solid #78603c;border-radius:4px;padding:9px 10px;font:inherit}.debug-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.debug-note{font-size:12px;color:#bcb09a;line-height:1.45}.btn.danger{border-color:#8d4239;color:#ffd0c8;background:#3b1d1b}.btn.danger:hover{background:#562622}
@media(max-width:1400px){.debug-grid{grid-template-columns:repeat(2,minmax(240px,1fr))}}
@media(max-width:900px){.debug-grid{grid-template-columns:1fr}}

/* Schritt 14.1: Debug-Marktkaufsimulation */
.debug-market-sim{margin-top:14px;padding-top:12px;border-top:1px solid rgba(196,151,67,.45)}
.debug-market-sim h3{margin:0 0 10px;color:#f2cc72;font-size:16px}

/* Schritt 15: Angebotstimer + lokaler Entwicklungs-Global-Chat */
[data-offer-timer]{font-variant-numeric:tabular-nums;white-space:nowrap;}
[data-offer-timer].timer-warning{color:#f0b64d;font-weight:700;}
[data-offer-timer].timer-expired{color:#e86b5f;font-weight:700;}
.chat-time{color:#8c9bac;font-size:.86em;font-variant-numeric:tabular-nums;}
.chat-log{scroll-behavior:smooth;}


/* Schritt 16: Hilfe- & Tutorial-Hub */
.help-hub{padding:0;overflow:hidden}.help-tabs{display:flex;gap:0;border-bottom:1px solid var(--gold);background:rgba(3,14,22,.92);overflow-x:auto}.help-tab{appearance:none;border:0;border-right:1px solid rgba(183,128,31,.45);background:transparent;color:#d8d6ce;padding:12px 16px;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}.help-tab:hover{background:rgba(181,121,22,.12);color:#f6d889}.help-tab.active{background:linear-gradient(180deg,rgba(217,153,34,.22),rgba(117,72,9,.15));color:#ffd978;box-shadow:inset 0 -3px 0 #d59a31}.help-content{padding:16px}.help-intro{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}.help-intro h2{margin:0 0 5px;color:#f2cc72;font-size:24px}.help-intro p{margin:0;color:#d1d2cf;max-width:930px}.help-live-chip{border:1px solid rgba(193,141,46,.65);background:#071a24;color:#77db8d;padding:7px 10px;border-radius:4px;font-weight:700;white-space:nowrap}.help-live-chip.dev-off{color:#e0b35f}.tutorial-steps{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:9px}.tutorial-step{display:flex;gap:12px;align-items:flex-start;padding:13px;border:1px solid rgba(178,124,31,.48);background:rgba(4,17,26,.86)}.tutorial-step.done{border-color:rgba(59,160,83,.55)}.tutorial-number{width:32px;height:32px;flex:0 0 32px;border-radius:50%;display:grid;place-items:center;background:#17242b;border:1px solid #a87423;color:#f5d174;font-weight:800}.tutorial-step.done .tutorial-number{border-color:#4ba662;color:#75df8e}.tutorial-step h3,.help-rule-grid h3,.help-building-card h3,.help-resource-card h3,.help-research-grid h3,.help-bonus-list h3{margin:0 0 4px;color:#f1cc73}.tutorial-step p,.help-rule-grid p,.help-building-card p,.help-resource-card p,.help-research-grid p,.help-bonus-list p{margin:0;color:#cfd2d0}.help-tip{margin-top:12px;padding:12px 14px;color:#d8d6ce}.help-tip strong{color:#f2cc72}.help-resource-grid{display:grid;grid-template-columns:repeat(4,minmax(190px,1fr));gap:8px}.help-resource-card{display:flex;gap:11px;align-items:center;padding:12px;border:1px solid rgba(183,128,31,.45);background:rgba(4,17,26,.88)}.help-resource-card img{width:50px;height:50px;object-fit:contain}.help-resource-card.locked{opacity:.62;filter:saturate(.65)}.help-resource-card small{color:#aeb4b2}.help-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:9px;margin-top:12px}.help-rule-grid.three{grid-template-columns:repeat(3,minmax(220px,1fr))}.help-rule-grid article,.help-research-grid article{padding:13px;border:1px solid rgba(183,128,31,.42);background:rgba(4,17,26,.86)}.help-building-grid{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:9px}.help-building-card{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center;padding:10px;border:1px solid rgba(183,128,31,.42);background:rgba(4,17,26,.88)}.help-building-card img{width:120px;height:100px;object-fit:contain}.help-building-card .btn{margin-top:9px}.help-research-grid{display:grid;grid-template-columns:repeat(3,minmax(230px,1fr));gap:9px}.help-research-head{display:flex;align-items:center;gap:8px}.help-research-head span{font-size:26px;color:#f0b94b}.help-research-grid small{display:block;margin-top:8px;color:#aeb4b2}.help-bonus-list{display:grid;gap:6px}.help-bonus-list article{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid rgba(183,128,31,.4);background:rgba(4,17,26,.84)}.help-bonus-icon{color:#f4c45c;font-size:22px}.help-bonus-list strong{color:#7bdd8f}.help-shortcuts{display:grid;gap:8px;margin-top:12px}.help-shortcuts>div{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid rgba(183,128,31,.38);background:rgba(4,17,26,.82)}kbd{min-width:48px;text-align:center;padding:5px 8px;border:1px solid #a9782b;border-radius:4px;background:#0a1820;color:#f1cf7c;box-shadow:inset 0 -2px 0 rgba(0,0,0,.5)}
@media(max-width:1450px){.help-resource-grid{grid-template-columns:repeat(2,minmax(220px,1fr))}.help-building-grid{grid-template-columns:repeat(2,minmax(280px,1fr))}.help-research-grid{grid-template-columns:repeat(2,minmax(240px,1fr))}.help-rule-grid.three{grid-template-columns:repeat(2,minmax(240px,1fr))}}
@media(max-width:950px){.tutorial-steps,.help-rule-grid,.help-rule-grid.three,.help-resource-grid,.help-building-grid,.help-research-grid{grid-template-columns:1fr}.help-intro{flex-direction:column}.help-building-card{grid-template-columns:100px 1fr}.help-building-card img{width:100px;height:90px}}


/* Schritt 17: Mehrfach-Abriss + Einstellungen */
.game-shell { zoom: var(--ui-scale); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
.notifications-off .menu-badge, .notifications-off .top-unread { display:none !important; }
.manage-card.selectable, .plant-manage-row.selectable { position:relative; transition:border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.manage-card.selectable.selected, .plant-manage-row.selectable.selected { border-color:var(--gold-bright); box-shadow:inset 0 0 0 1px rgba(247,195,95,.32),0 0 12px rgba(217,155,49,.12); background:linear-gradient(180deg,rgba(24,48,59,.96),rgba(7,24,33,.96)); }
.demolition-select { display:flex; align-items:center; justify-content:center; min-width:28px; }
.demolition-select input { width:18px; height:18px; accent-color:var(--gold); cursor:pointer; }
.demolition-qty { margin-left:auto; display:flex; flex-direction:column; gap:3px; color:#c6b891; font-size:11px; min-width:70px; }
.demolition-qty input { width:70px; background:#07151e; border:1px solid #77501e; color:#fff1d0; padding:5px 7px; border-radius:3px; }
.demolition-qty.compact { min-width:64px; }
.demolition-qty.compact input { width:64px; }
.demolition-batchbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:10px; padding:11px 13px; border:1px solid #7d541f; background:rgba(6,22,31,.92); }
.demolition-batchbar > div:first-child { display:flex; flex-direction:column; gap:3px; }
.demolition-batchbar strong { color:#f6d889; font-size:16px; }
.demolition-batchbar small { color:#b8b8ae; }
.demolition-batch-actions { display:flex; gap:8px; flex-wrap:wrap; }
.settings-live, .settings-system { padding:0; max-width:1100px; margin-bottom:10px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(260px,1fr)); gap:10px; padding:14px; }
.setting-card, .setting-toggle { display:flex; gap:10px; padding:13px; border:1px solid rgba(126,86,31,.65); background:rgba(5,18,27,.82); }
.setting-card { flex-direction:column; }
.setting-card > span, .setting-toggle strong { color:#f6d889; }
.setting-card > strong { color:#fff; font-size:18px; }
.setting-card input[type=range] { width:100%; accent-color:var(--gold); }
.setting-card small, .setting-toggle small { color:#aeb5b8; }
.setting-toggle { align-items:center; justify-content:space-between; }
.setting-toggle > span { display:flex; flex-direction:column; gap:4px; }
.setting-toggle input { width:22px; height:22px; accent-color:var(--gold); }
.settings-actions { padding:0 14px 14px; display:flex; justify-content:flex-end; }
.settings-system-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:1px; background:#65461d; }
.settings-system-grid > div { background:#081923; padding:12px; display:flex; flex-direction:column; gap:4px; }
.settings-system-grid span { color:#bdb6a7; font-size:12px; }
.settings-system-grid strong { color:#f2ede2; }
.status-live { color:#71dc89 !important; }
@media (max-width:1450px) { .settings-grid { grid-template-columns:1fr; } .settings-system-grid { grid-template-columns:repeat(2,1fr); } .demolition-batchbar { align-items:flex-start; flex-direction:column; } }
.plant-manage-row.selectable { grid-template-columns:28px minmax(130px,1fr) 90px 90px 75px; }

/* Schritt 18: Sprachvorbereitung */
.language-setting select{margin-top:8px;width:100%;background:#071725;color:#eee1bd;border:1px solid #9d6f20;padding:8px 10px;border-radius:3px}.language-setting option:disabled{color:#7f7f7f}.settings-system-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}

/* =========================================================
   Schritt 19: Responsive Desktop-Layout
   Referenz: 1920x1080 | Test: 1600x900 + 1366x768
   ========================================================= */

/* Große Desktopfenster unterhalb der 1920er Referenz */
@media (max-width: 1700px) {
  :root { --sidebar: 220px; --top: 142px; }
  .top-content { grid-template-rows: 82px 58px; }
  .status-row { grid-template-columns: 1.16fr .86fr .92fr .84fr 1fr .54fr; }
  .status-card { padding: 6px 9px; gap: 7px; }
  .status-icon { font-size: 22px; width: 25px; }
  .status-label { font-size: 13px; }
  .status-value { font-size: 16px; }
  .status-sub { font-size: 11px; }
  .resource-card { grid-template-columns: 32px 1fr; gap: 5px; padding: 3px 6px; }
  .resource-card img { width: 29px; height: 29px; }
  .resource-name { font-size: 12px; }
  .resource-value { font-size: 14px; }
  .menu-btn { min-height: 48px; grid-template-columns: 38px 1fr; padding: 3px 10px; }
  .menu-icon { font-size: 22px; }
  .menu-label { font-size: 15px; }
  .dashboard {
    grid-template-columns: 255px minmax(360px,1fr) 325px;
    grid-template-rows: minmax(310px,1fr) 270px;
    min-height: 0;
  }
  .panel-head { height: 44px; font-size: 17px; padding: 0 11px; }
  .panel-body { padding: 9px 11px; }
  .stat-list li, .bonus-list li { padding: 6px 0; }
  .market-grid { gap: 3px; padding: 4px; }
  .market-tile { padding: 5px 4px; }
  .market-tile img { width: 28px; height: 28px; }
  .mini-chart { height: 45px; }
}

/* 1600x900-Klasse */
@media (max-width: 1600px) {
  :root { --sidebar: 205px; --top: 136px; }
  .top-content { grid-template-rows: 78px 56px; }
  .status-row { gap: 3px; padding: 3px 4px 1px 2px; }
  .status-card { padding: 5px 7px; gap: 5px; }
  .status-icon { display: none; }
  .status-label { font-size: 12px; }
  .status-value { font-size: 15px; }
  .resource-row { gap: 2px; padding: 2px 4px 4px 2px; }
  .resource-card { grid-template-columns: 29px 1fr; padding: 2px 5px; }
  .resource-card img { width: 27px; height: 27px; }
  .resource-name { font-size: 11px; }
  .resource-value { font-size: 13px; }
  .menu-btn { min-height: 46px; grid-template-columns: 35px 1fr; padding: 3px 8px; }
  .menu-icon { font-size: 20px; }
  .menu-label { font-size: 14px; }
  .content { padding: 6px; }
  .dashboard {
    gap: 6px;
    grid-template-columns: 240px minmax(340px,1fr) 310px;
    grid-template-rows: minmax(285px,1fr) 255px;
    height: calc(100vh - var(--top) - 12px);
  }
  .hero-copy { padding: 14px 17px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p { font-size: 13px; }
  .bonus-list li { font-size: 12px; }
  .chat-log { height: 76px; }
  .page-title { min-height: 80px; padding: 10px 16px; }
  .page-title .big-icon { font-size: 39px; }
  .page-title h1 { font-size: 27px; }
}

/* 1366x768-Klasse: kompakter, aber weiterhin echte Desktopansicht */
@media (max-width: 1450px) {
  html, body { min-width: 1040px; }
  :root { --sidebar: 184px; --top: 126px; }
  .top-content { grid-template-rows: 72px 52px; }
  .logo-panel { margin: 3px; }
  .logo-panel img { width: 94%; height: 94%; }
  .status-row { grid-template-columns: 1.12fr .82fr .91fr .84fr 1fr .44fr; gap: 2px; padding: 3px 3px 1px 1px; }
  .status-card { padding: 4px 6px; gap: 4px; }
  .status-label { font-size: 11px; }
  .status-value { font-size: 14px; }
  .status-sub { font-size: 10px; }
  .progress { height: 8px; margin-top: 3px; }
  .resource-row { gap: 2px; padding: 1px 3px 3px 1px; }
  .resource-card { grid-template-columns: 26px minmax(0,1fr); gap: 4px; padding: 2px 4px; }
  .resource-card img { width: 24px; height: 24px; }
  .resource-name { font-size: 10px; }
  .resource-value { font-size: 12px; }
  .side-menu { margin: 3px; top: calc(var(--top) + 3px); }
  .menu-btn { min-height: 42px; grid-template-columns: 31px 1fr; padding: 2px 7px; }
  .menu-icon { font-size: 18px; }
  .menu-label { font-size: 13px; }
  .menu-badge { font-size: 10px; padding: 1px 5px; }
  .content { padding: 5px; }
  .dashboard {
    gap: 5px;
    grid-template-columns: 220px minmax(310px,1fr) 286px;
    grid-template-rows: minmax(255px,1fr) 225px;
    height: calc(100vh - var(--top) - 10px);
    min-height: 0;
  }
  .panel-head { height: 38px; padding: 0 8px; font-size: 15px; }
  .panel-head .btn { padding: 4px 7px; font-size: 10px; }
  .panel-body { padding: 6px 8px; }
  .dashboard .stats,
  .dashboard .orders,
  .dashboard .bonuses,
  .dashboard .market-mini,
  .dashboard .right-bottom > .panel-gold { min-height: 0; overflow: hidden; }
  .dashboard .stats > .panel-body,
  .dashboard .orders > .panel-body,
  .dashboard .bonuses > .panel-body,
  .dashboard .right-bottom > .panel-gold > .panel-body { max-height: calc(100% - 38px); overflow: auto; }
  .stat-list li, .bonus-list li { padding: 4px 0; font-size: 11px; }
  .bonus-list li { grid-template-columns: 1fr .95fr auto; gap: 5px; }
  .hero-copy { padding: 10px 13px; }
  .hero-copy h1 { font-size: 22px; }
  .hero-copy p { font-size: 11px; }
  /* Die frühere 1450-Regel mit 2 Spalten wird hier bewusst überschrieben: 8 Rohstoffe = 2 kompakte Reihen. */
  .market-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2px; padding: 3px; height: calc(100% - 38px); align-content: stretch; }
  .market-tile { padding: 3px 2px; min-height: 0; overflow: hidden; }
  .market-tile img { width: 22px; height: 22px; }
  .market-top { min-height: 25px; font-size: 9px; gap: 2px; }
  .market-price { font-size: 12px; }
  .mini-chart { height: 34px; margin: 2px 0; }
  .trend { font-size: 9px; }
  .dashboard .right-bottom { gap: 4px; grid-template-rows: .92fr 1.08fr; min-height: 0; }
  .event-list li { grid-template-columns: 38px 9px 1fr; gap: 4px; padding: 3px 0; font-size: 10px; }
  .chat-log { height: 58px; font-size: 10px; line-height: 1.3; }
  .chat-compose { grid-template-columns: 1fr 62px; gap: 3px; padding: 3px; }
  .chat-compose input { padding: 5px; font-size: 10px; }
  .chat-compose .btn { padding: 5px 6px; font-size: 10px; }
  .page-title { min-height: 68px; padding: 8px 12px; gap: 12px; margin-bottom: 5px; }
  .page-title .big-icon { font-size: 33px; }
  .page-title h1 { font-size: 23px; }
  .page-title p { font-size: 12px; }
  .live-summary-grid { grid-template-columns: repeat(4,minmax(130px,1fr)); gap: 5px; }
  .live-summary-card { min-height: 70px; padding: 8px 9px; gap: 7px; }
  .summary-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 18px; }
  .summary-value { font-size: 17px; }
  .summary-label,.summary-sub { font-size: 10px; }
  th, td { padding: 7px; font-size: 12px; }
  .card-grid { gap: 6px; }
  .build-main { min-height: 160px; }
  .build-image img { height: 150px; }
  .build-info { padding: 8px; font-size: 11px; }
  .build-head { font-size: 17px; }
}

/* Kleine Bildschirmhöhe (z.B. 1366x768) */
@media (max-height: 820px) {
  :root { --top: 120px; }
  .top-content { grid-template-rows: 68px 50px; }
  .menu-btn { min-height: 39px; }
  .dashboard {
    grid-template-rows: minmax(245px,1fr) 215px;
    height: calc(100vh - var(--top) - 10px);
  }
  .panel-head { height: 36px; }
  .dashboard .stats > .panel-body,
  .dashboard .orders > .panel-body,
  .dashboard .bonuses > .panel-body,
  .dashboard .right-bottom > .panel-gold > .panel-body { max-height: calc(100% - 36px); }
  .stat-list li, .bonus-list li { padding: 3px 0; }
  .hero-copy h1 { font-size: 21px; }
  .hero-copy p { margin-top: 2px; }
  .market-grid { height: calc(100% - 36px); }
  .mini-chart { height: 30px; }
  .chat-log { height: 49px; }
  .page-title { min-height: 62px; }
}

/* Unterhalb unserer Testzielbreite bleibt die Bedienung nutzbar; komplexe Tabellen dürfen horizontal scrollen. */
@media (max-width: 1200px) {
  :root { --sidebar: 170px; }
  .menu-btn { grid-template-columns: 28px 1fr; }
  .menu-label { font-size: 12px; }
  .dashboard { grid-template-columns: 205px minmax(300px,1fr) 270px; }
  .table-wrap { overflow-x: auto; }
  .market-actions-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Schritt 20: Testkorrekturen + freigegebene UI-Assets
   - größeres, unverzerrtes Logo
   - ornamentaler Doppelrahmen wie im Master-Mockup
   - einheitliche goldene Menü-SVGs
   ========================================================= */
:root { --sidebar: 300px; }

.logo-panel {
  margin: 3px;
  padding: 0;
  background: linear-gradient(180deg,rgba(8,23,34,.98),rgba(3,12,19,.98));
}
.logo-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 2px 4px;
}

.panel-gold {
  position: relative;
  border: 2px solid #9f681f;
  box-shadow:
    inset 0 0 0 1px rgba(247,195,95,.72),
    inset 0 0 0 4px rgba(40,24,9,.78),
    inset 0 0 0 5px rgba(165,102,28,.32),
    0 2px 10px rgba(0,0,0,.48);
}
.panel-gold::before {
  content:"";
  position:absolute;
  inset:4px;
  border:1px solid rgba(225,159,54,.34);
  pointer-events:none;
  z-index:3;
}
.panel-gold::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:4;
  background:
    radial-gradient(circle at 7px 7px,#f7c35f 0 2px,#7d4a13 2.5px 4px,transparent 4.5px),
    radial-gradient(circle at calc(100% - 7px) 7px,#f7c35f 0 2px,#7d4a13 2.5px 4px,transparent 4.5px),
    radial-gradient(circle at 7px calc(100% - 7px),#f7c35f 0 2px,#7d4a13 2.5px 4px,transparent 4.5px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px),#f7c35f 0 2px,#7d4a13 2.5px 4px,transparent 4.5px);
}
.side-menu.panel-gold { padding:4px; background:linear-gradient(180deg,rgba(4,15,23,.98),rgba(2,10,16,.98)); }
.menu-btn {
  position:relative;
  min-height:53px;
  margin:0 0 2px;
  border:1px solid rgba(111,66,21,.95);
  box-shadow:inset 0 0 0 1px rgba(218,150,45,.08);
}
.menu-btn:last-child { margin-bottom:0; }
.menu-btn.active {
  border-color:#d99b31;
  box-shadow:inset 0 0 0 1px rgba(247,195,95,.42), inset 0 0 18px rgba(255,170,50,.24), 0 0 7px rgba(217,155,49,.18);
}
.menu-icon { display:flex; align-items:center; justify-content:center; width:36px; height:36px; }
.menu-icon img { width:30px; height:30px; object-fit:contain; filter:drop-shadow(0 0 4px rgba(245,177,63,.22)); }
.menu-btn.active .menu-icon img { filter:drop-shadow(0 0 6px rgba(247,195,95,.55)); }
.debug-newgame { border-color:#a94837; background:linear-gradient(180deg,rgba(46,18,17,.94),rgba(17,13,15,.96)); }
.debug-newgame h2 { color:#ffd08b; }

@media (max-width:1700px){ :root{--sidebar:260px;} }
@media (max-width:1600px){ :root{--sidebar:235px;} }
@media (max-width:1450px){
  :root{--sidebar:210px;}
  .logo-panel img{width:100%;height:100%;padding:1px 2px;}
  .menu-icon{width:31px;height:31px}.menu-icon img{width:25px;height:25px}
}
@media (max-width:1200px){ :root{--sidebar:185px;} }

/* =========================================================
   Schritt 21: Logo / Master-Rahmen / Dashboard-Tutorial
   ========================================================= */
:root { --sidebar: 270px; }

/* Das Logo-Asset ist jetzt auf seinen echten sichtbaren Inhalt beschnitten.
   Es bleibt proportional und wird exakt im Kopfblock zentriert. */
.logo-panel {
  margin: 3px;
  padding: 2px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.logo-panel img {
  display:block;
  width:auto;
  height:calc(100% - 2px);
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:50% 50%;
  padding:0;
  margin:auto;
}

/* Kräftigerer EOT-Masterrahmen: äußere Messingkante, dunkler Zwischensteg,
   helle innere Linie und ausgeprägte Eckbeschläge mit Nieten. */
.panel-gold {
  border:2px solid #8d5718;
  outline:1px solid rgba(242,174,61,.72);
  outline-offset:-4px;
  box-shadow:
    inset 0 0 0 1px rgba(255,210,107,.62),
    inset 0 0 0 4px rgba(31,18,8,.94),
    inset 0 0 0 5px rgba(190,120,30,.38),
    0 0 0 1px rgba(21,12,5,.9),
    0 3px 11px rgba(0,0,0,.52);
}
.panel-gold::before {
  inset:6px;
  border:1px solid rgba(231,165,59,.42);
  box-shadow:inset 0 0 0 1px rgba(40,24,9,.5);
}
.panel-gold::after {
  inset:0;
  background:
    linear-gradient(90deg,#d89b35,#6e4012) left 7px top 7px / 26px 2px no-repeat,
    linear-gradient(180deg,#d89b35,#6e4012) left 7px top 7px / 2px 26px no-repeat,
    linear-gradient(270deg,#d89b35,#6e4012) right 7px top 7px / 26px 2px no-repeat,
    linear-gradient(180deg,#d89b35,#6e4012) right 7px top 7px / 2px 26px no-repeat,
    linear-gradient(90deg,#6e4012,#d89b35) left 7px bottom 7px / 26px 2px no-repeat,
    linear-gradient(0deg,#d89b35,#6e4012) left 7px bottom 7px / 2px 26px no-repeat,
    linear-gradient(270deg,#6e4012,#d89b35) right 7px bottom 7px / 26px 2px no-repeat,
    linear-gradient(0deg,#d89b35,#6e4012) right 7px bottom 7px / 2px 26px no-repeat,
    radial-gradient(circle at 8px 8px,#ffe095 0 1.6px,#c18329 2px 3.2px,#4f2c0d 3.5px 5px,transparent 5.4px),
    radial-gradient(circle at calc(100% - 8px) 8px,#ffe095 0 1.6px,#c18329 2px 3.2px,#4f2c0d 3.5px 5px,transparent 5.4px),
    radial-gradient(circle at 8px calc(100% - 8px),#ffe095 0 1.6px,#c18329 2px 3.2px,#4f2c0d 3.5px 5px,transparent 5.4px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px),#ffe095 0 1.6px,#c18329 2px 3.2px,#4f2c0d 3.5px 5px,transparent 5.4px);
}

/* Tutorial direkt unter „Herzlich willkommen“ im Dashboard. */
#dashboardTutorial { position:absolute; left:14px; right:14px; top:96px; z-index:5; }
.tutorial-dashboard-card {
  padding:12px 14px 11px;
  background:linear-gradient(180deg,rgba(7,24,34,.97),rgba(3,14,22,.96));
  box-shadow:inset 0 0 24px rgba(219,150,42,.06),0 8px 20px rgba(0,0,0,.34);
}
.tutorial-dashboard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:9px; padding:1px 5px 8px; border-bottom:1px solid rgba(217,155,49,.35); }
.tutorial-dashboard-head h2 { margin:1px 0 0; color:#f4d486; font-size:21px; }
.tutorial-kicker { color:#cf9636; font-size:11px; font-weight:bold; letter-spacing:.12em; }
.tutorial-progress { color:#fff0c7; border:1px solid #8d5b20; background:#10212b; border-radius:999px; padding:5px 10px; white-space:nowrap; }
.tutorial-dashboard-steps { display:grid; grid-template-columns:1fr 1fr; gap:6px 8px; }
.tutorial-mini-step { display:grid; grid-template-columns:31px 1fr; gap:8px; align-items:center; padding:7px 8px; min-width:0; border:1px solid rgba(126,82,28,.68); background:rgba(4,16,24,.75); }
.tutorial-mini-step > span { width:27px; height:27px; border-radius:50%; display:grid; place-items:center; border:1px solid #87581f; color:#e9bb62; font-weight:bold; }
.tutorial-mini-step strong { display:block; color:#e8dcc1; font-size:14px; }
.tutorial-mini-step small { display:block; color:#aeb7bb; font-size:11px; line-height:1.25; margin-top:2px; }
.tutorial-mini-step.done { border-color:rgba(64,151,82,.62); background:rgba(9,38,27,.56); }
.tutorial-mini-step.done > span { color:#79e28b; border-color:#428d55; }
.tutorial-mini-step.done strong { color:#caefd0; }
.tutorial-mini-step.current { border-color:#d99b31; box-shadow:inset 3px 0 0 #e2a23c,0 0 9px rgba(217,155,49,.1); }
.tutorial-dashboard-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:9px; }

@media (max-width:1700px){ :root{--sidebar:252px;} }
@media (max-width:1600px){ :root{--sidebar:232px;} }
@media (max-width:1450px){
  :root{--sidebar:208px;}
  .logo-panel img{height:100%;max-width:100%;}
  #dashboardTutorial{top:82px;left:9px;right:9px}
  .tutorial-dashboard-card{padding:9px 10px 8px}
  .tutorial-dashboard-head{margin-bottom:6px;padding-bottom:5px}
  .tutorial-dashboard-head h2{font-size:17px}
  .tutorial-mini-step{grid-template-columns:25px 1fr;padding:5px 6px;gap:6px}
  .tutorial-mini-step>span{width:23px;height:23px;font-size:11px}
  .tutorial-mini-step strong{font-size:12px}.tutorial-mini-step small{font-size:9px}
  .tutorial-dashboard-actions{margin-top:6px}
}
@media (max-width:1200px){ :root{--sidebar:185px;} }
@media (max-height:820px){
  #dashboardTutorial{top:72px}
  .tutorial-dashboard-card{padding:7px 9px}
  .tutorial-dashboard-head{display:none}
  .tutorial-mini-step small{display:none}
  .tutorial-mini-step{padding:4px 6px}
  .tutorial-dashboard-actions{margin-top:5px}
}

/* Schritt 23: einheitliche Overlay-Symbole und Baugruppen */
.status-icon-img{width:29px;height:29px;object-fit:contain;display:block;filter:drop-shadow(0 0 4px rgba(247,195,95,.22))}
.build-group-control{display:grid;grid-template-columns:minmax(150px,210px) 1fr;gap:12px;align-items:center;padding:9px 12px;border-top:1px solid rgba(181,132,49,.42);border-bottom:1px solid rgba(181,132,49,.28);background:rgba(5,18,26,.58)}
.build-group-control label{display:flex;flex-direction:column;gap:4px;color:#d4bd84;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.build-group-control input{height:34px;border:1px solid #9d7738;border-radius:4px;background:#0b171f;color:#f7d98c;padding:5px 9px;font:inherit;font-size:15px;outline:none}
.build-group-control input:focus{border-color:#e0b85c;box-shadow:0 0 0 2px rgba(224,184,92,.12)}
.build-group-control>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.build-group-control strong{color:#f3d178;font-size:15px}.build-group-control small{color:#aeb7b7;font-size:11px}
@media(max-width:1600px){.status-icon-img{width:25px;height:25px}.build-group-control{grid-template-columns:145px 1fr;padding:7px 9px;gap:8px}}
@media(max-width:1400px){.status-icon-img{width:22px;height:22px}.build-group-control{grid-template-columns:130px 1fr}.build-group-control strong{font-size:13px}}

/* Schritt 24: finales 0.6-Iconset aus der freigegebenen Gold-/Industrie-Referenz. */
.status-icon-img{width:34px;height:34px;object-fit:contain;display:block;filter:drop-shadow(0 0 5px rgba(247,195,95,.28))}
.menu-icon{display:grid;place-items:center;width:38px;height:38px}
.menu-icon img{width:35px;height:35px;object-fit:contain;filter:drop-shadow(0 0 5px rgba(245,177,63,.28))}
.menu-btn.active .menu-icon img{filter:drop-shadow(0 0 7px rgba(247,195,95,.62))}
@media(max-width:1600px){.status-icon-img{width:30px;height:30px}.menu-icon{width:34px;height:34px}.menu-icon img{width:31px;height:31px}}
@media(max-width:1400px){.status-icon-img{width:26px;height:26px}.menu-icon{width:31px;height:31px}.menu-icon img{width:28px;height:28px}}


/* Testfix: Premium-Bauwarteschlange + robuste Baugruppen-Vorschau */
.build-queue-panel{margin-bottom:8px;padding:9px 12px;background:linear-gradient(180deg,rgba(9,27,40,.94),rgba(4,14,22,.90))}
.build-queue-summary{display:flex;justify-content:space-between;gap:14px;align-items:center;color:#e6d8b0}
.build-queue-panel.premium-on .build-queue-summary strong{color:#7de38b}
.build-queue-panel.premium-off .build-queue-summary strong{color:#c8baa0}
.build-queue-items{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.build-queue-items span{padding:5px 8px;border:1px solid rgba(217,155,49,.45);background:rgba(2,12,18,.55);color:#e8dfca}
.build-queue-items b{color:#f7c35f}
.build-queue-empty{margin-top:7px;color:#9eaaa9;font-size:12px}
.order-queue-mini{display:flex;justify-content:space-between;gap:8px;padding:6px 0 8px;border-bottom:1px solid rgba(205,153,65,.19);color:#7de38b;font-size:12px}
.order-queue-mini.inactive{color:#a7a095}

/* =========================================================
   TESTFIX8 – Report-Gesamtfix
   ========================================================= */

/* Dashboard: Begrüßungsbereich transparenter, Hintergrund bleibt sichtbar. */
.dashboard .center-hero {
  background: linear-gradient(180deg, rgba(7,24,34,.34), rgba(3,14,22,.18));
}
.dashboard .center-hero .hero-copy {
  background: linear-gradient(180deg, rgba(3,14,22,.66), rgba(4,15,23,.30), rgba(4,15,23,.08));
}
.dashboard .center-hero .hero-space {
  background: linear-gradient(180deg, rgba(8,24,34,.02), rgba(3,10,15,.09));
}

/* Rohstoff-Freischaltung erscheint automatisch im Dashboard, sobald eine Schwelle offen ist. */
.resource-unlock-dashboard {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(217,155,49,.78);
  background: rgba(5,20,28,.84);
  box-shadow: inset 3px 0 0 #e0a13a, 0 4px 14px rgba(0,0,0,.28);
  font-family: Arial, sans-serif;
}
.resource-unlock-copy { display:flex; flex-direction:column; gap:3px; }
.resource-unlock-copy strong { color:#f3d17d; font-size:15px; }
.resource-unlock-copy span { color:#e1e4e3; font-size:13px; }
.resource-unlock-actions { display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:8px; margin-top:9px; }
.resource-unlock-actions select {
  min-width:0; height:36px; padding:5px 9px; border:1px solid #966728; border-radius:4px;
  background:#0a1922; color:#f6dfaa;
}
.resource-unlock-dashboard small { display:block; margin-top:6px; color:#b8c0c0; }

/* Markt: Lagerbestand direkt am Rohstoffnamen und größere Meta-Zeile. */
.market-card .resource-title span { display:flex; align-items:baseline; flex-wrap:wrap; gap:7px; }
.market-card .resource-title small { color:#d0d3cf; font:600 13px/1.2 Arial,sans-serif; }
.market-card-meta { font-size:14px; line-height:1.3; font-weight:600; min-height:40px; align-items:center; }
.market-card-meta span { white-space:nowrap; }
.market-available-stock {
  margin:2px 0 8px; padding:6px 8px; border:1px solid rgba(142,91,30,.55);
  background:rgba(9,27,36,.62); color:#d7d2c5; font:12px/1.3 Arial,sans-serif;
}
.market-available-stock strong { color:#f3d278; }
.market-price-preview {
  min-height:34px; display:flex; align-items:center; margin:8px 0 2px; padding:7px 8px;
  border:1px solid rgba(181,132,49,.42); background:rgba(7,24,33,.78);
  color:#d9ddd8; font:13px/1.3 Arial,sans-serif;
}
.market-price-preview strong { color:#f3d278; font-size:14px; }
.market-price-preview .preview-warning, .market-price-preview em { color:#ffb65a; font-style:normal; }

/* Globaler Chat: normal kompakt, bei Bedarf bis an die Oberkante des Dashboards aufklappbar. */
.dashboard .right-bottom { position:relative; }
.chat-panel { min-height:0; display:grid; grid-template-rows:48px minmax(0,1fr) auto; }
.chat-head-actions { display:flex; align-items:center; gap:7px; }
.chat-expand-btn { padding:3px 9px; min-width:34px; font-size:16px; line-height:1.1; }
.chat-panel .chat-log { height:auto; min-height:0; }
.chat-panel.expanded {
  position:absolute;
  right:0;
  bottom:0;
  width:100%;
  height:calc(100vh - var(--top) - 16px);
  z-index:30;
  box-shadow:0 10px 34px rgba(0,0,0,.72), inset 0 0 0 1px rgba(230,161,52,.2);
}
.chat-panel.expanded .chat-log { font-size:13px; padding:8px 10px; }

@media (max-height:820px) {
  .resource-unlock-dashboard { margin-top:7px; padding:8px 9px; }
  .resource-unlock-copy span { font-size:11px; }
  .resource-unlock-actions { margin-top:6px; }
}

/* Falls Tutorial und Rohstoffwahl gleichzeitig offen sind, nicht überlagern. */
.dashboard .hero-copy:has(#dashboardResourceUnlock:not(:empty)) + #dashboardTutorial { top:220px; }
@media (max-width:1450px) {
  .dashboard .hero-copy:has(#dashboardResourceUnlock:not(:empty)) + #dashboardTutorial { top:205px; }
}
@media (max-height:820px) {
  .dashboard .hero-copy:has(#dashboardResourceUnlock:not(:empty)) + #dashboardTutorial { top:185px; }
}

/* =========================================================
   TESTFIX9 – 6-Punkte-Fixrunde
   Dashboard-Mitte / Tick-sichere Dropdowns / Diagramm-Zeiträume
   ========================================================= */

/* Dashboard exakt nach freigegebener Skizze:
   Statistik links, transparente Begrüßung oben Mitte,
   darunter Bau | Forschung, darunter Boni Fläche | Boni Forschung,
   Markt/Ereignisse/Chat rechts unverändert. */
.dashboard {
  grid-template-columns:300px minmax(0,1fr) minmax(0,1fr) 390px;
  grid-template-rows:minmax(330px,1fr) 180px 190px;
  gap:8px;
}
.dashboard .stats { grid-column:1; grid-row:1; min-height:0; overflow:hidden; }
.dashboard .center-hero { grid-column:2 / span 2; grid-row:1; min-width:0; min-height:0; overflow:hidden; }
.dashboard .dashboard-build { grid-column:2; grid-row:2; min-width:0; min-height:0; overflow:hidden; }
.dashboard .dashboard-research { grid-column:3; grid-row:2; min-width:0; min-height:0; overflow:hidden; }
.dashboard .dashboard-area-bonuses { grid-column:2; grid-row:3; min-width:0; min-height:0; overflow:hidden; }
.dashboard .dashboard-research-bonuses { grid-column:3; grid-row:3; min-width:0; min-height:0; overflow:hidden; }
.dashboard .market-mini { grid-column:4; grid-row:1; min-height:0; overflow:hidden; }
.dashboard .right-bottom { grid-column:4; grid-row:2 / span 2; min-height:0; }

/* Begrüßungsfenster bewusst durchsichtig: Spielhintergrund bleibt sichtbar. */
.dashboard .center-hero {
  background:rgba(4,16,24,.18);
}
.dashboard .center-hero .hero-copy {
  background:linear-gradient(180deg,rgba(3,14,22,.42),rgba(4,15,23,.16),transparent);
}
.dashboard .center-hero .hero-space {
  background:rgba(3,12,18,.03);
}

.dashboard .dashboard-build > .panel-body,
.dashboard .dashboard-research > .panel-body,
.dashboard .dashboard-area-bonuses > .panel-body,
.dashboard .dashboard-research-bonuses > .panel-body {
  height:calc(100% - 48px);
  min-height:0;
  overflow:auto;
  padding:10px 14px;
}
.dashboard-order-compact { font-family:Arial,sans-serif; }
.dashboard-order-line,
.dashboard-order-meta,
.dashboard-queue-line { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dashboard-order-line { color:#e9deca; margin-bottom:8px; }
.dashboard-order-line strong { color:#f0dfbd; font-size:14px; }
.dashboard-order-line span { color:#fff0bf; font-weight:700; white-space:nowrap; }
.dashboard-order-meta { margin-top:5px; color:#9eaaa9; font-size:11px; }
.dashboard-queue-line { margin-top:7px; padding-top:7px; border-top:1px solid rgba(205,153,65,.19); color:#7de38b; font-size:12px; }
.dashboard-order-compact.inactive .dashboard-queue-line { color:#a7a095; }
.dashboard-queue-line strong { color:inherit; }

.dashboard-bonus-list { list-style:none; margin:0; padding:0; }
.dashboard-bonus-list li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid rgba(205,153,65,.17); font:13px/1.2 Arial,sans-serif; }
.dashboard-bonus-list li:last-child { border-bottom:0; }
.dashboard-bonus-list span { color:#e6ddca; }
.dashboard-bonus-list strong { color:#61e188; white-space:nowrap; }

/* Zeitraum-Umschaltung für Markt und Statistiken. */
.chart-range-bar {
  min-height:50px;
  margin:0 0 9px;
  padding:7px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:linear-gradient(180deg,rgba(8,27,39,.92),rgba(4,16,24,.92));
}
.chart-range-bar > span { color:#d8d5ca; font:13px/1.2 Arial,sans-serif; }
.chart-range-bar > span strong { color:#f3d278; }
.chart-range-actions { display:flex; gap:6px; flex-wrap:wrap; }
.chart-range-actions .btn[disabled] { opacity:.48; cursor:not-allowed; }

/* Der Chat bleibt rechts unten und klappt über die rechte Spalte nach oben auf. */
.dashboard .right-bottom { position:relative; }
.chat-panel.expanded {
  top:auto;
  bottom:0;
  height:calc(100vh - var(--top) - 16px);
  max-height:calc(100vh - var(--top) - 16px);
}

@media (max-width:1700px) {
  .dashboard { grid-template-columns:255px minmax(0,1fr) minmax(0,1fr) 325px; grid-template-rows:minmax(300px,1fr) 165px 175px; }
  .dashboard .dashboard-build > .panel-body,
  .dashboard .dashboard-research > .panel-body,
  .dashboard .dashboard-area-bonuses > .panel-body,
  .dashboard .dashboard-research-bonuses > .panel-body { height:calc(100% - 44px); padding:8px 11px; }
}
@media (max-width:1600px) {
  .dashboard { grid-template-columns:240px minmax(0,1fr) minmax(0,1fr) 310px; grid-template-rows:minmax(270px,1fr) 155px 165px; }
}
@media (max-width:1450px) {
  .dashboard { grid-template-columns:220px minmax(0,1fr) minmax(0,1fr) 286px; grid-template-rows:minmax(245px,1fr) 145px 155px; }
  .dashboard .dashboard-build > .panel-body,
  .dashboard .dashboard-research > .panel-body,
  .dashboard .dashboard-area-bonuses > .panel-body,
  .dashboard .dashboard-research-bonuses > .panel-body { height:calc(100% - 38px); padding:6px 8px; }
  .dashboard-order-line strong { font-size:11px; }
  .dashboard-order-line span,.dashboard-queue-line,.dashboard-bonus-list li { font-size:10px; }
}
@media (max-height:820px) {
  .dashboard { grid-template-rows:minmax(235px,1fr) 135px 145px; }
  .dashboard .dashboard-build > .panel-body,
  .dashboard .dashboard-research > .panel-body,
  .dashboard .dashboard-area-bonuses > .panel-body,
  .dashboard .dashboard-research-bonuses > .panel-body { height:calc(100% - 36px); }
}
@media (max-width:1200px) {
  .dashboard { grid-template-columns:205px minmax(0,1fr) minmax(0,1fr) 270px; }
  .chart-range-bar { align-items:flex-start; flex-direction:column; }
}

/* =========================================================
   TESTFIX10 – 6-Punkte-Fixrunde
   Spieltage / Hintergrund / Markt-Schrift / Dashboard-Angebote /
   Bau-Timer / Statistik ab Spielstart
   ========================================================= */

/* 1+2: Der Spielhintergrund gehört zur Seite und scrollt mit. Er wird
   vertikal wiederholt, damit bei langen Seiten kein schwarzer Bereich entsteht. */
.game-shell {
  min-height:100vh;
  background-image:
    linear-gradient(rgba(2,9,14,.12), rgba(2,9,14,.2)),
    url('assets/background.png');
  background-position:center top, center top;
  background-size:100% 100%, 100% auto;
  background-attachment:scroll, scroll;
  background-repeat:no-repeat, repeat-y;
}
.game-shell::before { position:absolute; }

/* 3: Markt verwendet dieselbe gut lesbare Grundschrift wie der Rest des Spiels. */
.market-card-prices { font-size:14px; line-height:1.3; }
.market-card-prices strong { font-size:15px; }
.market-card-meta { font-size:14px; line-height:1.35; }
.market-selected-head span { font-size:14px; line-height:1.35; }
.market-action-box p,
.market-action-box label,
.market-available-stock,
.market-price-preview { font-size:14px; line-height:1.35; }
.market-action-box input { font-size:14px; }
.market-price-preview strong { font-size:15px; }
.market-own-offers table,
.market-own-offers th,
.market-own-offers td { font-size:14px; }
.market-own-offers .panel-head { font-size:19px; }

/* 4: Eigene Marktangebote füllen den freien linken Dashboard-Bereich. */
.dashboard .dashboard-market-offers {
  grid-column:1;
  grid-row:2 / span 2;
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.dashboard .dashboard-market-offers > .panel-body {
  height:calc(100% - 48px);
  min-height:0;
  overflow:auto;
  padding:11px 14px;
}
.dashboard-market-offers-copy,
.dashboard-market-offers-empty { font:14px/1.4 Arial,sans-serif; color:#d7d6cf; }
.dashboard-market-offers-copy > strong,
.dashboard-market-offers-empty > strong { display:block; color:#f2cf77; margin-bottom:8px; }
.dashboard-market-offers-copy ul { list-style:none; padding:0; margin:0; }
.dashboard-market-offers-copy li { padding:7px 0; border-bottom:1px solid rgba(205,153,65,.18); color:#ece4d3; }
.dashboard-market-offers-empty span { display:block; color:#aeb7b7; }

/* 5: Aktiver Bauauftrag + Restzeit direkt auf der Gebäudeseite. */
.building-active-build { margin:8px 0; }
.building-active-build > .panel-body { padding:10px 14px 12px; }
.building-active-line,
.building-active-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; font-family:Arial,sans-serif; }
.building-active-line { margin-bottom:8px; }
.building-active-line strong { color:#f1d184; font-size:15px; }
.building-active-line span { color:#f5e7c8; font-weight:700; }
.building-active-meta { margin-top:5px; color:#aeb8b8; font-size:12px; }
.building-active-empty { color:#b8c0bf; font:14px/1.4 Arial,sans-serif; }

/* Kleinere Ansichten: dieselbe Struktur, nur kompakter. */
@media (max-width:1700px) {
  .dashboard .dashboard-market-offers > .panel-body { height:calc(100% - 44px); padding:9px 11px; }
}
@media (max-width:1450px) {
  .dashboard .dashboard-market-offers > .panel-body { height:calc(100% - 38px); padding:7px 8px; }
  .dashboard-market-offers-copy,.dashboard-market-offers-empty { font-size:11px; }
  .market-action-box p,.market-action-box label,.market-available-stock,.market-price-preview { font-size:13px; }
  .market-own-offers table,.market-own-offers th,.market-own-offers td { font-size:13px; }
}


/* =========================================================
   TESTFIX11 – Abschlussfix
   Forschungstimer / Baugruppen-Pfeiltasten / Scroll-Hintergrund
   ========================================================= */

/* Hintergrund liegt auf dem gesamten Dokument. So bewegt er sich mit dem
   Seiten-Scroll und steht auch unter langen Seiten weiter zur Verfügung. */
html { background:#02070b; }
body {
  min-height:100vh;
  background-color:#02070b;
  background-image:url('assets/background.png');
  background-position:center top;
  background-size:100% auto;
  background-repeat:repeat-y;
  background-attachment:scroll;
}
.game-shell {
  min-height:100vh;
  background:transparent !important;
}
.game-shell::before {
  position:fixed;
  inset:0;
}

/* Aktive Forschung nutzt dieselbe klare Timerdarstellung wie Aktiver Bau. */
.research-active-order { margin-bottom:8px; }
.research-active-order > .panel-body { padding:10px 14px 12px; }

/* Zahleneingaben bleiben gut tastaturbedienbar; native Spinner bleiben aktiv. */
.build-group-control input[type=number] { appearance:auto; -moz-appearance:auto; }


/* 0.61 Rang & Forschung */
.menu-rank-points { float:right; margin-left:8px; padding:2px 7px; border:1px solid rgba(214,154,49,.55); border-radius:10px; color:#f7c75f; font-size:12px; font-weight:700; background:rgba(121,75,16,.18); }
.ranking-summary { margin-bottom:12px; }
.ranking-table .panel-head { border-bottom:1px solid rgba(214,154,49,.28); }
.ranking-own-row { background:rgba(214,154,49,.08); }
.ranking-own-row .state-pill { margin-left:8px; }
.ranking-rule { margin-top:12px; padding:16px 18px; }
.ranking-rule h2 { margin:0 0 8px; color:#f4c15c; }
.ranking-rule p { margin:7px 0; line-height:1.55; }
@media(max-width:1200px){ .menu-rank-points{font-size:10px;padding:1px 5px;} }

/* EOT 0.62 TEST2: genau drei vom Nutzer freigegebene industrielle Medaillenbilder. */
.eot-note{color:#bdc6c7;font:13px/1.5 Arial,sans-serif;margin:10px 14px}
.eot-medal-counts{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;padding:12px}
.eot-medal-count{display:flex;align-items:center;gap:12px;min-width:142px;padding:8px;background:rgba(12,21,26,.72);border:1px solid #736343}
.eot-medal-count img{width:75px;height:75px;object-fit:contain;border-radius:6px}
.eot-medal-count strong{display:block;font-size:24px;color:#f8dc95}
.eot-medal-count span{font-size:14px;color:#c8d0d2}
.eot-badges-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;padding:13px}
.eot-badge{min-height:185px;background:rgba(7,17,24,.85);border:1px solid #856436;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:10px}
.eot-badge img{width:140px;max-width:100%;aspect-ratio:1;object-fit:contain;border-radius:5px}
.eot-badge strong{font:600 13px Arial,sans-serif;color:#efcb84}
.eot-special{display:flex;flex-wrap:wrap;gap:10px;margin:5px 12px}
.eot-special>div{display:flex;gap:10px;align-items:center;background:rgba(37,32,22,.7);border:1px solid #8e6d3e;padding:7px 12px;color:#f0d49c}
.eot-special img{width:45px;height:45px;object-fit:contain}
.eot-wood{font-size:32px;color:#a47c4e}
.eot-badge-details{margin:9px 12px 14px;border:1px solid #65553b;background:rgba(6,15,22,.76);color:#d7e0dd}
.eot-badge-details>summary{padding:12px;cursor:pointer;color:#f0d48f;font-weight:600}
.eot-badge-details .table-wrap{overflow-x:auto;margin:6px}
.eot-badge-history{display:flex;flex-direction:column;padding:8px;gap:5px;max-height:240px;overflow-y:auto}
.eot-badge-history span{font:12px/1.4 Arial,sans-serif}
.eot-achievement-group h3{color:#eecb86;border-bottom:1px solid #816a42;padding:8px 15px;margin:8px 0 0}
.eot-achievement-group h3 small{color:#b6c1c2;font-weight:400}
.eot-ach-head{display:flex;justify-content:space-between;gap:6px}
.eot-ach-head span{white-space:nowrap;color:#d6ac55;font-size:11px}
.achievement.eot-locked{opacity:.75;border-color:#52606a}
.achievement.eot-unlocked{border-color:#cca045;background:rgba(50,44,25,.5)}
.eot-progress{margin-top:10px;height:7px;background:#0a1014;border-radius:7px;overflow:hidden}
.eot-progress i{display:block;height:100%;background:linear-gradient(90deg,#8c632d,#f6cd76)}
.achievement small{display:block;text-align:right;color:#ccd0c7;padding-top:4px}
.eot-debug-badges{grid-column:span 2}
.eot-debug-badges h3{color:#eccb85;margin-top:16px}
@media(max-width:950px){.eot-debug-badges{grid-column:span 1}}
@media(max-width:600px){.eot-badges-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}.eot-medal-count img{width:58px;height:58px}.eot-medal-count{min-width:95px}.eot-badge img{width:105px}}

/* 0.62 TEST3 FIX – maximal 4 Abzeichen pro Reihe, immer 14 Kategorien. */
.eot-badges-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.eot-badge-missing{background:rgba(105,113,120,.12);border:1px dashed rgba(161,164,169,.48);}
.eot-badge-missing img{opacity:.17;filter:grayscale(1) contrast(.7);}
.eot-badge-missing strong{color:#b0b4b8;}
.eot-badge-missing small{color:#a8afb3;font:12px Arial,sans-serif;}
.eot-badge-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:5px 13px 15px;}
.eot-badge-controls span{color:#b3b9ba;font:12px Arial,sans-serif;}
.eot-history-view{margin:0 13px 14px;padding:12px;border:1px solid #826633;background:rgba(8,16,22,.85);}
.eot-history-view h3{color:#e3bd72;margin:0 0 10px;}
.eot-history-category{margin:7px 0;border:1px solid #75603b;background:rgba(26,33,37,.85)}
.eot-history-category>summary{cursor:pointer;display:flex;justify-content:space-between;gap:14px;align-items:center;padding:12px;list-style-position:inside;}
.eot-history-category>summary strong{color:#f0ce8b;}
.eot-history-count{font:12px Arial,sans-serif;color:#c4ced0;text-align:right}
.eot-history-entries{padding:10px 13px 12px;border-top:1px solid rgba(159,137,91,.35)}
.eot-history-entries p{margin:0;color:#a8afb5;}
.eot-history-entry{display:grid;grid-template-columns:45px minmax(75px,1fr) minmax(80px,1fr) minmax(135px,1fr);align-items:center;gap:10px;margin:5px 0;padding:5px 8px;background:rgba(0,0,0,.2);color:#d9d9d0;font:13px Arial,sans-serif;}
.eot-history-entry img{width:42px;height:42px;object-fit:contain;}
.eot-history-entry time{text-align:right;}
@media(max-width:920px){.eot-badges-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.eot-badges-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.eot-history-entry{grid-template-columns:36px 1fr 1fr;}.eot-history-entry time{grid-column:2 / -1;text-align:left}.eot-history-category>summary{flex-wrap:wrap;}}

/* 0.62 TEST3 Supporter-Fix: eigene sichtbare Profil-Kachel; kein Holz-Abzeichen. */
.eot-supporter-body{padding:14px;display:flex;flex-direction:column;gap:12px}
.eot-supporter-earned,.eot-supporter-none{display:flex;align-items:center;gap:20px;padding:14px;min-height:110px;border:1px solid rgba(200,166,96,.55);background:rgba(38,35,25,.52)}
.eot-supporter-earned img,.eot-supporter-none img{width:104px;height:104px;max-width:35%;object-fit:contain;flex-shrink:0;border-radius:6px}
.eot-supporter-earned strong,.eot-supporter-none strong{display:block;color:#f0cd88;font-size:17px;margin-bottom:8px}
.eot-supporter-earned span,.eot-supporter-none span{display:block;color:#ccd0d0;font:13px/1.5 Arial,sans-serif}
.eot-supporter-none{border-style:dashed;border-color:rgba(161,164,169,.5);background:rgba(105,113,120,.11)}
.eot-supporter-none img{opacity:.18;filter:grayscale(1)}
.eot-supporter-none strong{color:#c4c7c7}
.eot-supporter-levels{display:flex;flex-wrap:wrap;gap:10px;color:#d7cab3;font:13px Arial,sans-serif}
.eot-supporter-levels span{padding:6px 10px;background:rgba(19,24,30,.65);border:1px solid rgba(190,165,108,.3);border-radius:4px}
.eot-supporter-notice{margin:0;color:#9faeb4;font:12px/1.5 Arial,sans-serif}
@media(max-width:550px){.eot-supporter-earned,.eot-supporter-none{gap:10px;padding:10px}.eot-supporter-earned img,.eot-supporter-none img{width:80px;height:80px}.eot-supporter-earned strong,.eot-supporter-none strong{font-size:14px}}

/* 0.62 TEST4: eigenständige über der Spielseite liegende Profil-Fenster. */
.eot-achievement-overview-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px 13px;}
.eot-achievement-overview-categories>div{display:flex;justify-content:space-between;gap:8px;padding:11px 12px;background:rgba(10,22,30,.8);border:1px solid rgba(170,130,69,.42);color:#e5c788;}
.eot-achievement-overview-categories span{font:13px Arial,sans-serif;color:#c5cdd0;white-space:nowrap;}
.eot-profile-dialog{position:fixed;inset:0;width:min(1140px,calc(100vw - 30px));max-width:1140px;height:min(88dvh,960px);max-height:88dvh;margin:auto;padding:0;border:2px solid #ad7a2f;background:#0c1b25;color:#e9d7b4;box-shadow:0 22px 85px rgba(0,0,0,.9);overflow:hidden;}
.eot-profile-dialog::backdrop{background:rgba(0,0,0,.79);backdrop-filter:blur(3px);}
.eot-profile-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 18px;background:linear-gradient(180deg,#183041,#081621);border-bottom:2px solid #956d32;}
.eot-profile-dialog-head h2{font-size:23px;color:#f0cd83;margin:0;}
.eot-profile-dialog-body{height:calc(100% - 70px);overflow:auto;overscroll-behavior:contain;padding:14px 18px 28px;}
.eot-dialog-lead{background:rgba(20,38,49,.9);border:1px solid rgba(180,140,80,.4);padding:13px 15px;color:#c9d2d2;font:14px/1.5 Arial,sans-serif;}
.eot-dialog-lead strong{color:#f3cd80;}
.eot-dialog-counts{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;padding:14px 0 10px;}
.eot-dialog-count{display:flex;align-items:center;gap:8px;padding:5px 12px;border:1px solid rgba(180,140,80,.48);background:#12212a;}
.eot-dialog-count img{width:40px;height:40px;object-fit:contain;}
.eot-dialog-count strong{font-size:13px;color:#f0d69c;}
.eot-dialog-history{padding:3px 0 12px;}
.eot-profile-dialog .eot-history-category{margin:7px 0;}
.eot-profile-dialog .eot-history-category[open]{border-color:#c39a56;}
.eot-profile-dialog .eot-history-category>summary:hover,.eot-profile-dialog .eot-history-category>summary:focus-visible{background:rgba(177,129,47,.19);outline-color:#e2c37e;}
.eot-profile-dialog .eot-history-entry{grid-template-columns:46px minmax(100px,1fr) minmax(120px,1fr) minmax(175px,1fr);}
.eot-dialog-footer-note{font:12px/1.5 Arial,sans-serif;color:#a9bdc7;}
.eot-profile-dialog .eot-achievement-group h3{margin-top:18px;}
.eot-profile-dialog .achievement-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
@media(max-width:940px){.eot-achievement-overview-categories{grid-template-columns:repeat(2,minmax(0,1fr));}.eot-profile-dialog .achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.eot-profile-dialog{width:calc(100vw - 12px);height:95dvh;max-height:95dvh;}.eot-profile-dialog-head{padding:10px;}.eot-profile-dialog-head h2{font-size:16px;}.eot-profile-dialog-body{padding:8px;height:calc(100% - 60px);}.eot-achievement-overview-categories{grid-template-columns:1fr 1fr;}.eot-profile-dialog .achievement-grid{grid-template-columns:1fr;}.eot-profile-dialog .eot-history-entry{grid-template-columns:35px 1fr 1fr;}.eot-profile-dialog .eot-history-entry time{grid-column:2/-1;text-align:left;}.eot-profile-dialog .eot-history-category>summary{flex-wrap:wrap;}}

/* 0.63 – Lokales dauerhaftes Rundenarchiv */
.eot-round-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px 12px 5px}
.eot-round-overview>div{display:flex;flex-direction:column;gap:6px;background:rgba(7,17,24,.72);border:1px solid rgba(191,141,67,.45);padding:12px}
.eot-round-overview small,.eot-round-current span,.eot-round-entry summary small{color:#b8c2c9;font:12px Arial,sans-serif}
.eot-round-overview strong{color:#f1d28c;font-size:17px}
.eot-round-current{display:flex;flex-direction:column;gap:8px;border:1px solid #826130;padding:12px;margin-bottom:14px;background:rgba(18,29,33,.75)}
.eot-round-current strong{color:#efcd82}
.eot-round-history{display:flex;flex-direction:column;gap:7px}
.eot-round-empty{padding:20px 14px;background:rgba(18,28,36,.76);color:#d5d1c6}
.eot-round-entry{border:1px solid #685333;background:rgba(23,32,36,.8)}
.eot-round-entry[open]{border-color:#c79a51}
.eot-round-entry summary{cursor:pointer;padding:13px 15px;display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:center;list-style:none}
.eot-round-entry summary::-webkit-details-marker{display:none}
.eot-round-entry summary>div{display:flex;flex-direction:column;gap:5px}
.eot-round-entry summary strong{color:#ebcb82}
.eot-round-expand{color:#bca16d;font-size:13px}
.eot-round-entry[open] .eot-round-expand{color:#f4ce84}
.eot-round-entry summary:hover{background:rgba(186,128,44,.11)}
.eot-round-details{padding:13px 17px 17px;border-top:1px solid #685333;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.eot-round-details>div{display:flex;justify-content:space-between;align-items:center;gap:15px;background:rgba(10,20,27,.65);padding:10px;border:1px solid rgba(100,86,61,.35)}
.eot-round-details span{color:#bac2c7;font:13px Arial,sans-serif}
.eot-round-details strong{color:#eed39e;text-align:right;overflow-wrap:anywhere}
@media(max-width:690px){.eot-round-overview{grid-template-columns:1fr}.eot-round-entry summary{grid-template-columns:1fr auto}.eot-round-entry summary>div:nth-child(2){grid-column:1}.eot-round-details{grid-template-columns:1fr}.eot-round-entry summary strong{font-size:13px}}

/* 0.64 – kompakter Rundenstatus, ohne Dashboard-Grid zu ändern */
.eot-round-banner { padding:9px 15px; margin-bottom:8px; border-color:#9c7b42; background:rgba(12,40,48,.92); }
.eot-round-banner.paused { background:rgba(39,35,25,.94); border-color:#bd8a41; }
.eot-round-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; color:#f1cf8b; font-size:15px; }
.eot-round-heading span { color:#c5bba1; font-size:12px; }
.eot-round-banner p { margin:3px 0 0; color:#d3d9d3; font-size:12px; }
@media(max-width:680px){ .eot-round-heading{flex-direction:column;align-items:flex-start;} }

/* 0.64 TEST2: Restzeit direkt rechts neben der vorhandenen Spieluhr */
.eot-round-clockline {display:flex; flex-wrap:wrap; gap:0 .4rem; align-items:baseline; white-space:normal;}
#roundClockRemaining {font-size:11px; font-weight:600; white-space:nowrap;}

/* 0.65 Startrohstoff-Statistik: keine externen Chart-Libraries, nur CSS. */
.eot-start-stat {display:grid;grid-template-columns:minmax(160px,225px) minmax(230px,1fr);gap:18px;align-items:center;padding:16px;}
.eot-start-stat.compact {grid-template-columns:125px minmax(180px,1fr);gap:10px;padding:10px 0;}
.eot-start-stat-pie {aspect-ratio:1;width:100%;max-width:225px;border-radius:50%;background:var(--eot-start-pie,#454d55);padding:18%;display:grid;place-items:center;box-shadow:inset 0 0 10px #000c,0 0 0 1px #c59e59a0;}
.eot-start-stat-pie>div {width:100%;height:100%;border-radius:50%;background:#15212c;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:2px solid #977241;color:#f7d99c;}
.eot-start-stat-pie strong{font-size:clamp(17px,2vw,32px);line-height:1.1;}
.eot-start-stat-pie span{font-size:11px;color:#c2c7c4;}
.eot-start-stat.compact .eot-start-stat-pie span{font-size:9px;}
.eot-start-stat-list{min-width:0;display:flex;flex-direction:column;gap:6px;}
.eot-start-stat-row{display:grid;grid-template-columns:12px minmax(66px,1fr) minmax(62px,auto) 50px;gap:8px;align-items:center;border-bottom:1px solid #a1784933;padding:2px 0;color:#d9dce0;font-size:13px;}
.eot-start-stat-row b{color:#f0c979;text-align:right;}
.eot-start-stat-dot{width:10px;height:10px;border-radius:2px;}
.stat-test-notice{display:block;border-left:3px solid #bb934e;padding:6px 8px;color:#c0c9ca;font-size:11px;background:#0b131a66;}
@media(max-width:800px){.eot-start-stat,.eot-start-stat.compact{grid-template-columns:1fr;justify-items:center}.eot-start-stat-list{width:100%}}

/* 0.66: Wirtschaftstabellen in der bestehenden Industrie-UI */
.eot-economy-grid{margin-top:10px}
.eot-economy-inner{padding:10px}
.eot-economy-inner .debug-note{margin:9px 4px 3px;line-height:1.5;opacity:.85}
.eot-economy-inner .live-data-table{width:100%}

/* 0.67 – sachliche, platzsparende Hilfetexte und Startrohsstoff-Auswahl. */
.founding-page{max-width:1180px;margin:0 auto;display:grid;grid-template-columns: minmax(0,1fr) minmax(310px,.82fr);gap:12px;padding-bottom:36px}
.founding-page>.page-title,.founding-info,.founding-stats{grid-column:1/-1}
.founding-info,.founding-form,.founding-stats{padding:16px 20px}
.founding-info h2,.founding-form h2,.founding-stats h2{color:#eac77a;font-size:1.25rem;margin:0 0 10px}
.founding-info p{line-height:1.65;max-width:950px}
.founding-thresholds{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:15px 0}
.founding-thresholds span{padding:10px 8px;text-align:center;background:rgba(20,30,38,.8);border:1px solid #705629;border-radius:4px;font-size:13px;color:#edcf87}
.founding-form label{display:block;color:#edcf87;margin:10px 0 4px;font-weight:bold}
.founding-form input,.founding-form select{display:block;width:100%;max-width:460px;padding:11px;background:#0a151c;color:#f3e6d0;border:1px solid #886c3f;border-radius:4px;font-size:15px}
.founding-form button{margin-top:14px}
.founding-company-summary{background:rgba(9,24,34,.8);border:1px solid #856437;padding:12px;color:#f0d7a7;overflow-wrap:anywhere}
.founding-actions{display:flex;flex-wrap:wrap;gap:12px}
.founding-actions .btn:not(.primary){border:1px solid #887047;background:#182b36;color:#f1d18c}
.founding-note,.founding-rule-note{font-size:13px;line-height:1.5;color:#ccd7d8}
.founding-rule-note{padding:10px;border-left:3px solid #ba8b3f;margin:8px 0}
.founding-form #foundError{color:#ffb1a4;min-height:1em}
.founding-side-hint{padding:16px;color:#edcf87;text-align:center}
.founding-status{padding:14px;color:#edcf87;font-weight:600}
@media(max-width:900px){.founding-page{grid-template-columns:minmax(0,1fr)}.founding-thresholds{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 0.67 TEST2 – Runde bei Gründung, responsive Bauvorschau und gut lesbares Tutorial */
.founding-round{grid-column:1/-1;padding:16px 20px;border-color:#9c763d;background:rgba(12,30,39,.94)}
.founding-round-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.founding-round h2{color:#ecc67a;font-size:20px;margin:0}
.founding-round-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.founding-round-grid>div{display:flex;flex-direction:column;gap:5px;background:#0f222d;border:1px solid #806138;padding:11px;min-width:0}
.founding-round-grid small{font-size:12px;color:#cad5d8}
.founding-round-grid strong{font-size:15px;color:#f5d796;overflow-wrap:anywhere}
.founding-round p{font-size:13px;line-height:1.6;color:#cdd9d9;margin:7px 0 0}
.tutorial-mini-step{padding:9px 10px;grid-template-columns:34px minmax(0,1fr);gap:10px}
.tutorial-mini-step>span{font-size:14px;width:31px;height:31px}
.tutorial-mini-step strong{font-size:16px;line-height:1.35}
.tutorial-mini-step small{font-size:14px;line-height:1.48;margin-top:4px}
.building-active-build .build-cancel-actions{display:flex;justify-content:flex-end;margin-top:12px}
.queue-build-line{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:5px 8px;border-bottom:1px solid #5558}
.queue-build-line>span{flex:1 1 220px}
.section-divider-title:has([data-area-bonus]){display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.eot-info-dialog{box-sizing:border-box;width:min(1050px,calc(100% - 28px));max-width:1050px;max-height:85vh;overflow:auto;color:#e6e9e7;background:#13212b;border:2px solid #a88749;border-radius:10px;padding:24px;box-shadow:0 16px 70px #000c}
.eot-info-dialog::backdrop{background:rgba(0,0,0,.78)}
.eot-info-dialog>p{font-size:14px;line-height:1.6;color:#d5ddd8}
.eot-info-title{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:15px;flex-wrap:wrap}
.eot-info-title h2{font-size:23px;color:#e8c781;margin:0}
.eot-info-bonus-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.eot-info-bonus{border:1px solid #846237;background:#0c1822;padding:14px;border-radius:6px}
.eot-info-bonus h3{font-size:18px;color:#f3c978;margin:0 0 6px}
.eot-info-bonus p{font-size:13px;line-height:1.6;color:#c5cdd0;min-height:50px;margin:6px 0 12px}
.eot-info-bonus-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.eot-info-bonus-stats span{font-size:12px;display:flex;flex-direction:column;gap:4px;border-top:1px solid #6c6c523b;padding-top:7px;color:#bfc8ca}
.eot-info-bonus-stats strong{font-size:14px;color:#f2d7a1}
.eot-dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:20px}
.eot-info-dialog .table-wrap{max-width:100%;overflow-x:auto}
.eot-info-dialog .live-data-table{width:100%;min-width:500px}
.build-cancel-note{color:#ecc389!important;border-left:3px solid #e0a244;padding-left:10px}
@media(max-width:1100px){.eot-info-bonus-list{grid-template-columns:1fr}.founding-round-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.eot-info-dialog{padding:14px}.founding-round-grid{grid-template-columns:1fr}.tutorial-dashboard-steps{grid-template-columns:1fr}.tutorial-mini-step small{font-size:13px!important;display:block!important}.tutorial-mini-step strong{font-size:15px!important}}
@media(max-width:1500px){.tutorial-mini-step small{font-size:13px!important}.tutorial-mini-step strong{font-size:15px!important}.tutorial-mini-step>span{font-size:13px!important}}
@media(max-width:1300px){.tutorial-mini-step small{display:block!important}.tutorial-dashboard-card{max-height:none}}

/* 0.67 TEST3: Eigenes Industriefenster für alle Spieleraktionen. */
.eot-confirm-dialog{min-width:min(520px,94vw);max-width:min(680px,94vw);max-height:88vh;overflow-y:auto;padding:20px 24px;}
.eot-confirm-dialog > p{line-height:1.5;color:#e0d5c4;}
.eot-confirm-rows{border:1px solid #86612c;background:rgba(10,23,32,.82);padding:11px 14px;display:grid;gap:9px;}
.eot-confirm-rows>div{display:flex;justify-content:space-between;align-items:baseline;gap:20px;border-bottom:1px solid rgba(201,152,69,.22);padding:4px 0;}
.eot-confirm-rows strong{color:#f7d58b;text-align:right;}
.eot-confirm-rows span{color:#c3c6c8;}
.eot-confirm-note{font-size:13px;color:#d9ba83!important;}
.research-cancel-row{display:flex;justify-content:flex-end;padding-top:10px;}
.build-queue-items button[data-cancel-research]{margin-left:10px;padding:4px 8px;}


/* TEST3.1: zwei dezente Schaltflächen direkt über dem linken Menü */
.eot-sidebar-actions { display:flex; flex-direction:column; gap:7px; padding:9px 7px 14px; }
.eot-side-pill { width:100%; min-height:39px; border-radius:999px; border:1px solid rgba(170,188,204,.35); background:rgba(16,27,39,.95); color:#eee; display:flex; align-items:center; justify-content:center; gap:10px; font-family:Arial,sans-serif; font-size:14px; font-weight:600; cursor:pointer; transition:background-color .16s,border-color .16s; }
.eot-side-pill:focus-visible { outline:2px solid #f0c779; outline-offset:2px; }
.eot-premium-state.is-active { color:#6be492; border-color:rgba(74,187,115,.65); }
.eot-premium-state.is-inactive { color:#ff7874; border-color:rgba(214,98,94,.68); }
.eot-premium-state:hover { background:#1b303e; }
.eot-side-support { background:#f5f6f8; color:#1d2a34; border-color:#f5f6f8; }
.eot-side-support:hover { background:#e0e8ee; }
.eot-side-pill-symbol { font-size:19px; font-weight:normal; line-height:1; }
.eot-text-active { color:#66e390; }
.eot-text-inactive { color:#ff7874; }
/* TEST3.1: Rundenanzeige im Kopf bewusst auf zwei gut lesbare Werte reduziert. */
.eot-playtime-content { min-width:0; flex:1; }
.eot-playtime-round { font-size:clamp(13px,.92vw,17px); line-height:1.14; color:#f3e6c9; font-weight:700; margin-top:4px; }
.eot-playtime-clock { font-size:clamp(17px,1.18vw,22px); line-height:1.12; font-weight:700; color:#f0cd88; margin-top:5px; font-variant-numeric:tabular-nums; }
@media(max-width:1460px){ .eot-playtime-card { gap:4px;padding:4px 6px; } .eot-playtime-card .status-icon {width:22px;flex-basis:22px;} .eot-playtime-round {font-size:13px;} }
@media(max-width:1220px){ .eot-playtime-round {font-size:12px;} .eot-side-pill{font-size:12px;min-height:34px;} .eot-sidebar-actions{gap:5px;padding:7px 3px 10px;} }


/* ===========================================================
   Version 0.67 TEST3.3: KOMPAKTE NAVIGATION + SCROLLBEREICHE
   Alles Spielinterne ist weiterhin unberuehrt (Java, Kosten,
   Runden, Markt, Speicherung). Auf 1920x1080 bleibt der Aufbau.
   =========================================================== */
/* Sticky-Menue zuvor top:var(--top) – das verursachte den
   unerwuenschten zweiten Abstand unter dem Logo. */
.side-menu,
.side-menu.panel-gold {
  /* Navigation bleibt beim Scrollen der Hauptseite fixiert.
     Sie hat keine eigene Scrollleiste: bei wenig Hoehe scrollt
     die ganze Seite und alle Menuepunkte bleiben erreichbar. */
  position:sticky;
  top:4px;
  margin-top:0;
  max-height:none;
  min-height:0;
  overflow:visible;
  scrollbar-gutter:auto;
}
.eot-sidebar-actions { padding-top:6px; }
.eot-premium-state { letter-spacing:.02em; }
/* Sidebar-Buttons bleiben mit den richtigen Tastaturfokus-Stilen. */
.side-menu .menu-btn,
.side-menu .eot-side-pill { flex-shrink:0; }

/* Die 4 Dashboard-Spalten bleiben am Desktop. Bei engem Platz
   duerfen Inhalte je Panel scrollen, statt verdeckt zu werden. */
.dashboard > .panel-gold,
.dashboard .right-bottom > .panel-gold { min-height:0; min-width:0; }
.dashboard .stats,
.dashboard .market-mini,
.dashboard .dashboard-market-offers,
.dashboard .dashboard-build,
.dashboard .dashboard-research,
.dashboard .dashboard-area-bonuses,
.dashboard .dashboard-research-bonuses { display:flex; flex-direction:column; }
.dashboard .stats > .panel-body,
.dashboard .market-mini > .market-grid,
.dashboard .dashboard-market-offers > .panel-body,
.dashboard .dashboard-build > .panel-body,
.dashboard .dashboard-research > .panel-body,
.dashboard .dashboard-area-bonuses > .panel-body,
.dashboard .dashboard-research-bonuses > .panel-body,
.dashboard .right-bottom > .panel-gold > .panel-body {
  flex:1 1 auto;
  min-height:0;
  height:auto;
  max-height:none;
  overflow-y:auto;
  overflow-x:auto;
  overscroll-behavior:contain;
}
.dashboard .market-mini > .market-grid {
  /* Gridinhalte behalten ihren Platz und koennen vertikal scrollen. */
  min-height:0;
  height:auto;
  flex:1 1 auto;
  align-content:start;
}
/* Damit die Tutorialschritte auf kleinen Viewports erreichbar
   bleiben – auch wenn das Tutorial absolut positioniert wird. */
.dashboard .center-hero {
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
}
.dashboard .center-hero #dashboardTutorial {
  padding-bottom:8px;
}
/* Lange Texte duerfen umbrechen statt unter eine Karte zu laufen. */
.dashboard .panel-body,
.dashboard .market-grid,
.dashboard .tutorial-mini-step,
.dashboard .bonus-list li { overflow-wrap:anywhere; }

/* Eigene Dialoge (Flaechenboni, Bestätigungen, Historien, Exit)
   bleiben auch bei 768px Bildschirmhoehe bedienbar. */
.eot-info-dialog, .eot-confirm-dialog {
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.eot-profile-dialog {
  height:min(88dvh,960px);
  max-height:calc(100dvh - 20px);
  display:flex;
  flex-direction:column;
}
.eot-profile-dialog-head { flex:0 0 auto; flex-wrap:wrap; }
.eot-profile-dialog-body {
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.modal-backdrop { padding:10px; overflow-y:auto; overscroll-behavior:contain; }
.modal { max-height:calc(100dvh - 20px); overflow-y:auto; max-width:calc(100vw - 20px); }
.content { min-width:0; }
.page { min-width:0; }
.table-wrap { max-width:100%; overflow-x:auto; }

/* 1600x900/1366x768 – im knappen Layout muessen gerade die
   rechte Ereignisliste und der Chat unabhängige Scrollfelder haben. */
@media (max-height:900px) {
  .dashboard .right-bottom > .panel-gold { min-height:0; overflow:hidden; }
  .dashboard .right-bottom .event-list { min-width:0; }
  .dashboard .right-bottom .chat-panel .chat-log { overflow-y:auto; }
  .dashboard .center-hero { scrollbar-width:thin; }
  .dashboard .panel-body { scrollbar-width:thin; }
}

/* Unter 1150 Pixeln ist das komplexe Dashboard in vier Spalten
   nicht mehr sinnvoll; wir wechseln in zwei Spalten und lassen
   die Seite normal vertikal scrollen. */
@media (max-width:1150px) {
  html,body { min-width:0; }
  .topbar,.main-grid { grid-template-columns:var(--sidebar) minmax(0,1fr); }
  .top-content { min-width:0; }
  .status-row { overflow-x:auto; grid-template-columns:repeat(6,minmax(138px,1fr)); }
  .resource-row { overflow-x:auto; grid-template-columns:repeat(8,minmax(104px,1fr)); }
  .dashboard {
    display:grid;
    height:auto;
    min-height:0;
    grid-template-columns:minmax(170px,.8fr) minmax(0,1.4fr);
    grid-template-rows:330px 210px 210px 200px 200px;
    gap:7px;
  }
  .dashboard .stats { grid-column:1;grid-row:1; }
  .dashboard .center-hero {grid-column:2;grid-row:1;}
  .dashboard .market-mini {grid-column:1;grid-row:2;}
  .dashboard .dashboard-market-offers {grid-column:1;grid-row:3;}
  .dashboard .dashboard-build {grid-column:2;grid-row:2;}
  .dashboard .dashboard-research {grid-column:2;grid-row:3;}
  .dashboard .dashboard-area-bonuses {grid-column:2;grid-row:4;}
  .dashboard .dashboard-research-bonuses {grid-column:2;grid-row:5;}
  .dashboard .right-bottom {grid-column:1;grid-row:4 / span 2;min-height:0;}
  .dashboard .market-mini .market-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .dashboard .center-hero .hero-copy {padding:10px;}
  .dashboard .hero-copy:has(#dashboardResourceUnlock:not(:empty)) + #dashboardTutorial { top:190px; }
  .research-grid,.card-grid,.market-actions-grid { grid-template-columns:1fr; }
  .management-summary,.stats-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
  :root { --sidebar:140px; --top:118px; }
  .top-content { grid-template-rows:67px 49px; }
  .side-menu,.side-menu.panel-gold { max-height:none; overflow:visible; }
  .menu-btn { grid-template-columns:25px minmax(0,1fr); padding:4px; }
  .menu-icon,.menu-icon img { max-width:25px; }
  .menu-label { font-size:12px; overflow-wrap:anywhere; }
  .eot-side-pill { font-size:11px; gap:3px; }
  .dashboard { display:flex; flex-direction:column; height:auto; }
  .dashboard > .panel-gold,.dashboard .right-bottom > .panel-gold { min-height:190px; max-height:350px; overflow:hidden; }
  .dashboard .center-hero { min-height:350px; max-height:460px; }
  .dashboard .right-bottom { display:flex; flex-direction:column; }
  .dashboard .right-bottom > .panel-gold {min-height:200px;}
  .dashboard .hero-copy:has(#dashboardResourceUnlock:not(:empty)) + #dashboardTutorial { top:185px; }
  .dashboard .market-mini .market-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-title { flex-wrap:wrap; }
  .eot-profile-dialog { width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px); }
  .eot-info-dialog,.eot-confirm-dialog { width:calc(100vw - 12px); max-height:calc(100dvh - 12px); min-width:0; padding:12px; }
}

/* Kopfaktionen bleiben auch bei 1366px innerhalb des Viewports. */
@media (max-width:1450px) {
  .status-row { grid-template-columns:minmax(0,1.12fr) minmax(0,.82fr) minmax(0,.91fr) minmax(0,.84fr) minmax(0,1fr) minmax(122px,.7fr); }
  .status-row > .status-card:last-child { min-width:0; gap:3px; padding:3px 4px; overflow:hidden; }
  .status-row > .status-card:last-child .btn { min-width:29px; padding:5px 7px; }
}


/* ===========================================================
   0.67 TEST3.5 – Linke Navigation scrollt MIT dem Dokument.
   Bei wenig Bildschirmhoehe bekommt das Menue KEINEN eigenen
   Scrollcontainer. Die normale Browser-/Seitenscrollleiste
   erreicht alle Navigationseintraege.
   Interne Scrollbereiche von Dashboard und Dialogen bleiben.
   =========================================================== */
#sideMenu.side-menu,
#sideMenu.side-menu.panel-gold {
  position: static !important;        /* kein sticky/fixed Menu mehr */
  inset: auto !important;
  top: auto !important;
  bottom: auto !important;
  align-self: start;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  overflow: visible !important;       /* keine eigene Scrollleiste */
  overscroll-behavior: auto;
  scrollbar-width: none;
}
#sideMenu #eotMenuItems {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
/* Rahmen und Menueeintraege sollen nicht beschnitten werden. */
#sideMenu .eot-sidebar-actions { flex-shrink:0; }

/* 0.81: Abmelden direkt unter Premium */
#eotLogoutButton {border-color:rgba(215,156,79,.52);background:rgba(43,29,23,.95);color:#f4e5ca}
#eotLogoutButton:hover {background:rgba(91,51,31,.95);border-color:#dfab66}
#eotLogoutButton[hidden] {display:none}

/* 0.81 TEST4 – Firmen unter der gemeinsamen Startrohstoff-Verteilung */
.start-company-list{grid-column:2/-1;display:block;margin:.2rem 0 .35rem;color:#b9c7d4;line-height:1.35;font-size:.78rem}

/* 0.81 TEST6: anklickbare Ranglisten-Spieler und öffentliches Kurzprofil. */
.ranking-player-link{appearance:none;border:0;background:transparent;padding:0;color:#f2cf83;font:inherit;font-weight:700;text-decoration:underline;text-decoration-color:rgba(242,207,131,.45);text-underline-offset:3px;cursor:pointer}
.ranking-player-link:hover,.ranking-player-link:focus-visible{color:#fff0b7;text-decoration-color:#fff0b7;outline:2px solid rgba(240,193,92,.45);outline-offset:3px;border-radius:3px}
.public-profile-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,360px);gap:18px;align-items:stretch;margin-top:12px}
.public-profile-info,.public-profile-logo{border:1px solid rgba(184,132,50,.38);background:rgba(7,17,24,.62);padding:14px}
.public-profile-block{padding:12px 0;border-top:1px solid rgba(184,132,50,.22)}
.public-profile-block>span{display:block;color:#adb7b9;margin-bottom:9px}
.public-profile-resources{display:flex;flex-wrap:wrap;gap:8px}
.public-profile-resource{border:1px solid #856436;background:rgba(133,100,54,.15);padding:6px 10px;color:#f1dfac;border-radius:4px;font-weight:700}
.public-profile-message{margin-top:14px;opacity:.58;cursor:not-allowed}
.public-profile-logo{display:flex;align-items:center;justify-content:center;min-height:260px}
.public-profile-logo-placeholder{width:min(100%,300px);aspect-ratio:1;border:2px dashed #856436;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;color:#cbb88f;background:rgba(16,28,36,.75);padding:18px}
.public-profile-logo-placeholder strong{font-size:22px;color:#f0cd83}.public-profile-logo-placeholder span{font-size:14px}.public-profile-logo-placeholder small{color:#8f9a9d;line-height:1.4}
.public-profile-badges{margin-top:18px;border-top:1px solid rgba(184,132,50,.38);padding-top:14px}.public-profile-badges h3{margin:0 0 12px;color:#f0cd83}
.public-profile-badge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.public-profile-badge{border:1px solid #856436;background:rgba(7,17,24,.75);padding:10px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px}.public-profile-badge img{width:105px;max-width:100%;aspect-ratio:1;object-fit:contain}.public-profile-badge strong{font-size:12px;color:#efcb84}.public-profile-empty{color:#9aa4a6;margin:0}
@media(max-width:760px){.public-profile-grid{grid-template-columns:1fr}.public-profile-logo{min-height:220px}.public-profile-logo-placeholder{max-width:240px}}


/* 0.81 TEST8 – globaler Rundenabschluss */
.eot-round-summary-dialog{width:min(980px,calc(100vw - 24px));max-width:980px;}
.eot-round-summary-dialog h3{margin:22px 0 10px;color:#f0cd83;font-size:18px;}
.round-summary-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 20px;}
.round-summary-kpis>div{border:1px solid #75562d;background:#0d1b24;padding:14px;display:flex;flex-direction:column;gap:5px;}
.round-summary-kpis span{font-size:12px;color:#aebbc1;text-transform:uppercase;letter-spacing:.04em;}
.round-summary-kpis strong{font-size:20px;color:#f2d080;}
.round-summary-kpis small{color:#aab8bd;line-height:1.4;}
.round-summary-production{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.round-summary-production>div{border:1px solid #41515a;background:#10222d;padding:10px;display:flex;justify-content:space-between;gap:10px;}
.round-summary-production strong{color:#f0d08a;}
.round-summary-badges{display:flex;flex-wrap:wrap;gap:12px;}
.round-summary-badge{width:150px;border:1px solid #75562d;background:#0c1822;padding:10px;text-align:center;display:grid;gap:5px;justify-items:center;}
.round-summary-badge img{width:72px;height:72px;object-fit:contain;}
.round-summary-badge span{font-size:12px;color:#d4d9d7;}
.round-summary-badge strong{font-size:12px;color:#f0cd83;}
.round-summary-empty{color:#9facb2;font-style:italic;}
@media(max-width:760px){.round-summary-kpis{grid-template-columns:1fr}.round-summary-production{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* MPTEST4: weißer Discord-Button im Stil von 'Spiel unterstützen'. */
.eot-side-discord{background:#fff;color:#5865f2;border-color:#fff;text-decoration:none;}
.eot-side-discord:hover{background:#eef0ff;border-color:#adb6ff;color:#4752c4;}
.eot-side-discord img{width:25px;height:25px;object-fit:cover;object-position:center;flex-shrink:0;border-radius:50%;}

/* MPTEST6: getrennte Förderanlagen-Umstellung */
.factory-conversion-panel { margin-top:12px; padding:12px; }
.conversion-controls { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:12px 0; }
.conversion-controls label { display:flex; flex-direction:column; gap:5px; color:#e2bf73; font-size:13px; }
.conversion-controls select, .conversion-controls input { min-height:38px; min-width:110px; background:#0b1924; border:1px solid #aa7d31; border-radius:4px; color:#f1db98; padding:6px; font:inherit; }
.conversion-running { margin:8px 0; line-height:1.6; color:#f3cd82; }

/* Alpha 1.0: obere Informationsleiste beim Scrollen sichtbar */
.topbar { position: sticky !important; top: 0; z-index: 1000; }
.side-menu, .side-menu.panel-gold { top: calc(var(--top) + 4px); }
