
  :root {
    --night: #10160f; --panel: #182117; --panel-2: #1f2b1d; --line: #2c3b29;
    --ink: #eef3ea; --dim: #9aab94;
    --grass: #6cc644; --dirt: #a0764f; --diamond: #4fd1d9; --gold: #f2c14e;
    --redstone: #ff5a4f; --nether: #e0603a; --end: #b48cf2; --xp: #9be15d;
    --radius: 14px;
  }
  * { box-sizing: border-box; }
  html { color-scheme: dark; }
  body {
    margin: 0; padding: 26px 18px 48px; color: var(--ink);
    background: radial-gradient(1200px 520px at 50% -160px, #24361f 0%, var(--night) 62%) fixed var(--night);
    font-family: "Nunito Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  }
  .wrap { max-width: 1120px; margin: 0 auto; }
  .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86em; }

  header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
  .logo { width: 46px; height: 46px; flex: none; image-rendering: pixelated; border-radius: 6px;
          box-shadow: 0 6px 18px rgba(0,0,0,.35); }
  h1 { font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0; }
  h1 span { color: var(--grass); }
  .sub { color: var(--dim); font-size: 0.84rem; }
  .spacer { flex: 1 1 auto; }
  .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
          background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 0.85rem; }
  .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
  .on .dot { background: var(--grass); box-shadow: 0 0 0 0 rgba(108,198,68,.6); animation: ping 2.2s infinite; }
  .off .dot { background: var(--redstone); }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(108,198,68,.55); } 70%,100% { box-shadow: 0 0 0 10px rgba(108,198,68,0); } }

  .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
  .strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .stat .k { font-size: 0.7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
  .stat .v { font-family: Fredoka, sans-serif; font-size: 1.3rem; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
  button { font: 700 0.75rem "Nunito Sans", sans-serif; color: var(--ink); background: var(--panel-2);
           border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
  button:hover { border-color: var(--grass); }

  .eyebrow { display: flex; align-items: baseline; gap: 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: .15em;
             text-transform: uppercase; color: var(--dim); margin: 28px 2px 10px; }
  .eyebrow a { color: var(--grass); text-decoration: none; letter-spacing: .05em; text-transform: none; font-size: .8rem; }

  /* Online-Spieler */
  .online { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .pcard { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; transition: border-color .15s, transform .15s; }
  .pcard:hover { border-color: var(--grass); transform: translateY(-1px); }
  .head { width: 48px; height: 48px; border-radius: 8px; image-rendering: pixelated; background: var(--panel-2); flex: none; }
  .head.sm { width: 26px; height: 26px; border-radius: 5px; }
  .pname { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 1.08rem; }
  .dim { color: var(--dim); }
  .badge { display: inline-block; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 999px;
           border: 1px solid currentColor; margin-left: 4px; vertical-align: 2px; }
  .d-overworld { color: var(--grass); } .d-the_nether { color: var(--nether); } .d-the_end { color: var(--end); }
  .bars { display: flex; gap: 10px; margin-top: 6px; font-size: .82rem; color: var(--dim); flex-wrap: wrap; }
  .bar { height: 6px; width: 70px; border-radius: 4px; background: var(--panel-2); overflow: hidden; display: inline-block; vertical-align: middle; }
  .bar i { display: block; height: 100%; }
  .empty { color: var(--dim); text-align: center; padding: 22px; }

  /* Karte */
  .map { padding: 0; overflow: hidden; height: min(62vh, 560px); position: relative; }
  .map iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

  /* Kennzahlen */
  .tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
  .tile .k { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
  .tile .v { font-family: Fredoka, sans-serif; font-size: 1.45rem; margin-top: 3px; }
  .tile .v small { font-family: "Nunito Sans"; font-size: .8rem; color: var(--dim); }

  /* Bestenlisten */
  .boards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .board h3 { margin: 0 0 8px; font-family: Fredoka, sans-serif; font-weight: 500; font-size: 1rem; display: flex; gap: 8px; align-items: center; }
  .board ol { list-style: none; margin: 0; padding: 0; }
  .board li { display: flex; align-items: center; gap: 9px; padding: 5px 0; border-top: 1px solid var(--line); cursor: pointer; }
  .board li:first-child { border-top: 0; }
  .board .rank { width: 18px; text-align: center; font-weight: 800; color: var(--dim); font-size: .8rem; }
  .board li:nth-child(1) .rank { color: var(--gold); }
  .board .val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

  /* Tabelle */
  .tablewrap { overflow-x: auto; padding: 4px 6px; }
  table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 760px; }
  th, td { padding: 9px 10px; text-align: right; white-space: nowrap; }
  th { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 800; cursor: pointer; user-select: none; }
  th:first-child, td:first-child { text-align: left; }
  tbody tr { border-top: 1px solid var(--line); cursor: pointer; }
  tbody tr:hover { background: var(--panel-2); }
  .who { display: flex; align-items: center; gap: 9px; font-weight: 700; }
  .odot { width: 8px; height: 8px; border-radius: 50%; background: var(--grass); display: inline-block; }

  /* Ereignisse */
  .chips { display: flex; gap: 6px; margin-left: auto; }
  .chips button.active { border-color: var(--grass); color: var(--grass); }
  .feed { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
  .feed li { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); }
  .feed li:first-child { border-top: 0; }
  .feed .ic { width: 26px; text-align: center; flex: none; font-size: 1.05rem; }
  .feed time { margin-left: auto; color: var(--dim); font-size: .8rem; white-space: nowrap; padding-left: 10px; }
  .k-death { color: #ffb3ad; } .k-advancement { color: #d9f5b8; }

  /* Detail-Dialog */
  dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
           padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
  dialog::backdrop { background: rgba(5,8,5,.7); backdrop-filter: blur(3px); }
  .dhead { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line);
           background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
  .dhead img.body { height: 110px; image-rendering: pixelated; }
  .dbody { padding: 16px 20px 22px; overflow-y: auto; }
  .kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .kv div { background: var(--panel-2); border-radius: 10px; padding: 9px 11px; }
  .kv b { display: block; font-family: Fredoka, sans-serif; font-weight: 500; font-size: 1.12rem; }
  .kv span { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
  .cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 16px; }
  .cols h4 { margin: 0 0 6px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
  .cols ul { list-style: none; margin: 0; padding: 0; }
  .cols li { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--line); font-size: .9rem; }
  .cols li:first-child { border-top: 0; }
  .close { position: absolute; right: 14px; top: 14px; }
  footer { color: var(--dim); font-size: .78rem; text-align: center; margin-top: 30px; }
  /* Navigation zwischen den Seiten */
  .nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .nav a { color: var(--dim); text-decoration: none; font-weight: 700; font-size: .85rem; padding: 6px 12px;
           border-radius: 999px; border: 1px solid transparent; }
  .nav a:hover { color: var(--ink); border-color: var(--line); }
  .nav a.cur { color: var(--grass); border-color: color-mix(in srgb, var(--grass) 40%, var(--line)); background: var(--panel); }
