@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(/fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/fonts/montserrat-latin-800-normal.woff2) format("woff2"); }

:root {
  --bg: #191b1d;
  --surface: #232527;
  --raised: #2f3236;
  --line: #3b3e43;
  --text: #ffffff;
  --muted: #a7abb1;
  --blue: #335fff; --blue-d: #1d3fc4;
  --green: #00b06f; --green-d: #007a4d;
  --red: #e5372c; --red-d: #a41f17;
  --gold: #ffc21a; --silver: #c9ced6; --bronze: #d98a4e;
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  --r: 10px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 500 16px/1.45 Montserrat, system-ui, sans-serif; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 6px; }
main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; }
h1 { font-size: 1.6rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 36px 0 12px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: #111214; border-bottom: 1px solid #000; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo.big { font-size: 1.7rem; margin-bottom: 6px; gap: 10px; }
.logo img { display: block; }
.tools { display: flex; align-items: center; gap: 8px; }
.tools form { margin: 0; }

/* app switcher */
.switch { display: flex; background: var(--surface); border-radius: 10px; padding: 3px; margin-right: auto; margin-left: 18px; }
.switch a { padding: 6px 14px; border-radius: 7px; font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--muted); }
.switch a:hover { color: var(--text); }
.switch a.on { background: var(--raised); color: var(--text); box-shadow: 0 2px 0 #0b0c0d; }

/* account menu */
.menu { position: relative; }
.menu summary { list-style: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(160deg, #7b4dff, #335fff); font-weight: 800; box-shadow: 0 2px 0 #1d3fc4; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--raised); border-radius: 10px; padding: 6px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5); animation: drop .2s var(--pop); z-index: 20; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: none; font-weight: 700; text-decoration: none; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--line); }
.menu-pop form { margin: 0; }
.menu-mail { margin: 0; padding: 8px 12px 10px; color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }

/* ---------- Buttons ---------- */
[hidden] { display: none !important; } /* .btn, .banner etc. set display and would beat the attribute */
.btn {
  --b: var(--raised); --bd: #1c1e21;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; font-size: .95rem; text-decoration: none;
  background: var(--b); box-shadow: 0 3px 0 var(--bd);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--bd); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { --b: var(--blue); --bd: var(--blue-d); }
.btn.green { --b: var(--green); --bd: var(--green-d); }
.btn.red { --b: var(--red); --bd: var(--red-d); }
.btn.ghost { --b: transparent; --bd: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raised); filter: none; }
.btn.big { width: 100%; padding: 13px 18px; font-size: 1.05rem; }
.linkish { border: 0; background: none; padding: 0; margin-top: 14px; color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }

/* ---------- Wall ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; background: var(--surface); border-radius: 10px; padding: 4px; }
.tab { padding: 7px 18px; border-radius: 7px; text-decoration: none; font-weight: 700; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.on { background: var(--raised); color: var(--text); box-shadow: 0 2px 0 #15171a; }
.toast { background: var(--green); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: var(--r); margin: 0 0 18px; animation: drop .35s var(--pop); }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.tile {
  background: var(--surface); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s var(--pop), box-shadow .18s;
  animation: tile-in .4s var(--pop) backwards; animation-delay: calc(var(--i, 0) * 35ms);
}
.tile:hover, .tile:focus-within { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0, 0, 0, .45); }
@keyframes tile-in { from { opacity: 0; transform: scale(.92) translateY(8px); } }

.thumb {
  --c: var(--blue);
  position: relative; min-height: 190px; padding: 22px 18px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), transparent 55%), var(--c);
}
.thumb::before { /* big quote glyph watermark */
  content: "”"; position: absolute; right: 12px; bottom: -58px; font: 800 7rem/1 Georgia, serif; color: rgba(0, 0, 0, .14); pointer-events: none;
}
.blue { --c: #335fff; } .purple { --c: #7b4dff; } .green { --c: #00a866; }
.orange { --c: #f0711a; } .pink { --c: #e13f7d; } .teal { --c: #0b9aa8; }
.quote { position: relative; margin: 0; font-weight: 800; font-size: 1.12rem; line-height: 1.3; text-align: center; text-wrap: balance; overflow-wrap: anywhere; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #1a1a1a; background: var(--m);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.badge svg { width: 15px; height: 15px; fill: currentColor; }
.rank-1 { --m: var(--gold); } .rank-2 { --m: var(--silver); } .rank-3 { --m: var(--bronze); }
.rank-1 { box-shadow: 0 0 0 2px var(--gold); }
.rank-1 .badge { animation: shine 2.4s ease-in-out 1s 2; }
@keyframes shine { 50% { transform: scale(1.12) rotate(-4deg); } }

.meta { padding: 12px 14px 12px; display: flex; flex-direction: column; flex: 1; }
.who { margin: 0; font-weight: 700; }
.ctx { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.actions form { margin: 0; }
.like {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
  border: 0; border-radius: 8px; padding: 6px 12px; background: var(--raised); color: var(--muted); font-weight: 800;
  box-shadow: 0 2px 0 #15171a; transition: background .15s, color .15s;
}
.like svg { width: 18px; height: 18px; fill: currentColor; }
.like:hover { color: var(--text); }
.like.on { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-d); }
.like.pop svg { animation: pop .45s var(--pop); }
@keyframes pop { 40% { transform: scale(1.45) rotate(-14deg); } }
.plus-one { position: absolute; left: 50%; top: -4px; font-weight: 800; color: var(--green); pointer-events: none; animation: float-up .7s ease-out forwards; }
@keyframes float-up { to { transform: translate(-50%, -26px); opacity: 0; } from { transform: translate(-50%, 0); } }
.icon-btn { border: 0; background: none; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; opacity: .7; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--raised); color: var(--text); opacity: 1; }

/* ---------- Panels & forms ---------- */
.panel { background: var(--surface); border-radius: 12px; padding: 24px; }
.solo { max-width: 440px; margin: 40px auto; text-align: center; }
.solo p { margin: 0 0 14px; font-weight: 700; }
.form { max-width: 560px; margin: 8px auto; }
.form h1 { margin-bottom: 6px; }
.stack label { display: block; margin: 16px 0 6px; font-weight: 700; font-size: .92rem; }
.opt { color: var(--muted); font-weight: 500; }
.field {
  display: block; width: 100%; padding: 11px 13px; border-radius: 8px; font: inherit; color: var(--text);
  background: #121315; border: 2px solid var(--line); transition: border-color .15s;
}
.field:focus { outline: none; border-color: var(--blue); }
.field::placeholder { color: #6c7178; }
textarea.field { resize: vertical; }
.field.code { font-size: 1.8rem; font-weight: 800; letter-spacing: .4em; text-align: center; }
.stack .btn.big { margin-top: 20px; }
.fine { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
.sub { color: var(--muted); margin: 4px 0 0; }
.alert { background: rgba(229, 55, 44, .15); color: #ff8a82; border: 1px solid rgba(229, 55, 44, .5); padding: 10px 12px; border-radius: 8px; font-weight: 700; margin: 14px 0 0; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Login ---------- */
.login { min-height: calc(100vh - 88px); display: grid; grid-template-columns: 1fr minmax(320px, 420px); gap: 48px; align-items: center; max-width: 980px; margin: 0 auto; }
.login-box { animation: tile-in .45s var(--pop) backwards; }
.login-art { position: relative; height: 360px; }
.login-art .t {
  position: absolute; width: 230px; padding: 26px 20px; border-radius: 12px; font-weight: 800; font-size: 1.1rem; line-height: 1.3; text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), transparent 55%), var(--c);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45); animation: bob 6s ease-in-out infinite;
}
.login-art .t:nth-child(1) { left: 0; top: 10px; transform: rotate(-7deg); }
.login-art .t:nth-child(2) { left: 210px; top: 90px; transform: rotate(5deg); animation-delay: -2s; }
.login-art .t:nth-child(3) { left: 50px; top: 220px; transform: rotate(-2deg); animation-delay: -4s; }
@keyframes bob { 50% { translate: 0 -10px; } }

/* ---------- Admin ---------- */
.admin { max-width: 820px; margin: 0 auto; }
.num { display: inline-block; min-width: 26px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: var(--raised); font-size: .85rem; text-align: center; }
.admin-q { margin-bottom: 14px; padding: 16px; }
.admin-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-head .fine { margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--raised); }
.pill.pending { background: var(--gold); color: #1a1a1a; }
.pill.approved { background: var(--green); }
.pill.rejected { background: var(--raised); color: var(--muted); }
.pill.warn { background: var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.row .field { flex: 1 1 200px; width: auto; }
.users { list-style: none; margin: 0; padding: 6px 16px; }
.users li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; overflow-wrap: anywhere; }
.users li:last-child { border-bottom: 0; }

@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding-top: 8px; }
  .login-art { height: 120px; overflow: hidden; margin: 0 -20px; }
  .login-art .t { width: 190px; padding: 16px 14px; font-size: .9rem; }
  .login-art .t:nth-child(1) { left: 4%; top: 18px; }
  .login-art .t:nth-child(2) { left: 52%; top: 8px; }
  .login-art .t:nth-child(3) { display: none; }
}
@media (max-width: 520px) {
  main { padding: 16px 16px 48px; }
  .topbar-in { padding: 8px 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .thumb { min-height: 150px; padding: 18px 10px; }
  .quote { font-size: .95rem; }
  .meta { padding: 10px; }
  h1 { font-size: 1.3rem; }
  .panel { padding: 18px; }
}
@media (max-width: 600px) { .logo-text { display: none; } .switch { margin-left: 10px; } }
@media (max-width: 380px) { .tools .lbl { display: none; } .switch a { padding: 6px 10px; } }
@media (max-width: 340px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= Schach ================= */
.cm-chessboard.deinstein .board .square.white { fill: #e4e8f1; }
.cm-chessboard.deinstein .board .square.black { fill: #7f8fb3; }
.cm-chessboard.deinstein.border-type-none .board .border { fill: #7f8fb3; stroke-width: 0; }
.cm-chessboard.deinstein .coordinates { pointer-events: none; user-select: none; }
.cm-chessboard.deinstein .coordinates .coordinate { font-size: 7px; font-weight: 700; }
.cm-chessboard.deinstein .coordinates .coordinate.black { fill: #e4e8f1; }
.cm-chessboard.deinstein .coordinates .coordinate.white { fill: #7f8fb3; }
.cm-chessboard .markers .marker.marker-square { fill: #ffc21a; opacity: .45; }
.cm-chessboard .markers .marker.marker-frame-danger { stroke: var(--red); stroke-width: 3px; opacity: .9; }
.cm-chessboard .markers .marker.marker-dot, .cm-chessboard .markers .marker.marker-bevel { fill: #191b1d; opacity: .28; }

/* lobby */
.chess-lobby { max-width: 1000px; margin: 0 auto; }
.hero-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  background: linear-gradient(135deg, rgba(123, 77, 255, .35), transparent 60%), var(--surface); }
.hero-icon { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; background: #7b4dff; box-shadow: 0 4px 0 #4b2bb0; rotate: -6deg; }
.hero-icon svg { width: 46px; height: 46px; fill: #fff; }
.new-game { display: grid; gap: 10px; min-width: min(240px, 100%); }
.new-game .btn.big { margin: 0; }
.lobby-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.games, .ranking { list-style: none; margin: 0; padding: 6px 16px; }
.game-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.game-row:last-child { border-bottom: 0; }
.game-row a { font-weight: 700; text-decoration: none; }
.game-row a:hover { text-decoration: underline; }
.game-row form { margin: 0; }
.vs { color: var(--muted); font-weight: 500; margin: 0 4px; }
.ranking li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ranking li:last-child { border-bottom: 0; }
.ranking li.me .nm::after { content: " (du)"; color: var(--muted); font-weight: 500; }
.pos { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: var(--raised); font-size: .85rem; }
.pos.p1 { background: var(--gold); color: #1a1a1a; } .pos.p2 { background: var(--silver); color: #1a1a1a; } .pos.p3 { background: var(--bronze); color: #1a1a1a; }
.nm { flex: 1; font-weight: 700; }
.elo { font-weight: 800; color: var(--muted); }

/* game */
.chess-game { display: grid; grid-template-columns: minmax(0, 620px) minmax(260px, 340px); gap: 24px; justify-content: center; align-items: start; }
.board-col { display: grid; gap: 10px; width: 100%; max-width: max(320px, calc(100vh - 210px)); justify-self: end; }
.board-wrap { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 0 #0e0f10, 0 16px 30px rgba(0, 0, 0, .45); }
.board { width: 100%; aspect-ratio: 1; }
.player { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-weight: 700; transition: box-shadow .2s, background .2s; }
.player .dot { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35); }
.player .dot.w { background: #f4f4f4; } .player .dot.b { background: #1b1b1b; box-shadow: inset 0 0 0 2px #555; }
.player .p-elo { color: var(--muted); font-weight: 500; }
.player .you { margin-left: auto; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--blue); }
.player.turn { background: var(--raised); box-shadow: 0 0 0 2px var(--green); }
.player.turn::after { content: "am Zug"; margin-left: auto; color: var(--green); font-size: .8rem; font-weight: 800; }
.player.turn .you { margin-left: 8px; order: 2; }
.side { position: sticky; top: 76px; display: grid; gap: 14px; }
.status { margin: 0; font-weight: 800; font-size: 1.15rem; }
.status.alert-check { color: #ff8a82; animation: shake .35s; }
.copy { display: flex; gap: 8px; }
.copy .field { font-size: .8rem; padding: 8px 10px; }
.moves { margin: 0; padding: 0 0 0 2.4em; max-height: 340px; overflow-y: auto; font-weight: 700; font-size: .92rem; }
.moves li { padding: 2px 4px; border-radius: 4px; break-inside: avoid; }
.moves li span { display: inline-block; min-width: 3.6em; }
.moves li span:last-child { color: var(--muted); }
.moves li:last-child { background: var(--raised); }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.side-actions form { margin: 0; }
.banner { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; background: rgba(17, 18, 20, .72); backdrop-filter: blur(2px); animation: drop .4s var(--pop); }
.banner[hidden] { display: none; }
.banner b { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.02em; animation: tile-in .5s var(--pop) backwards .1s; }
.banner span { color: var(--muted); font-weight: 700; }
.banner.win b { color: var(--gold); }
.confetti { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(700px) rotate(720deg); opacity: .2; } }

@media (max-width: 900px) {
  .chess-game { grid-template-columns: 1fr; }
  .side { position: static; }
  .lobby-cols { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: auto 1fr; }
  .new-game { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .chess-game { margin: 0 -8px; }
  .moves { max-height: 180px; }
  .hero-icon { width: 56px; height: 56px; } .hero-icon svg { width: 36px; height: 36px; }
}

/* ---------- Analyse ---------- */
.btn.alt { --b: #7b4dff; --bd: #4b2bb0; }
.banner .btn { margin-top: 10px; }
.board-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.evalbar { position: relative; border-radius: 6px; overflow: hidden; background: #2a2c30; box-shadow: inset 0 0 0 2px #0e0f10; display: flex; flex-direction: column-reverse; }
.evalbar.flip { flex-direction: column; }
.evalbar-w { background: #f1f1f1; height: 50%; transition: height .35s var(--pop); }
.evalbar span { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: .62rem; font-weight: 800; color: #191b1d; writing-mode: vertical-rl; transform: rotate(180deg); }
.evalbar.flip span { bottom: auto; top: 6px; }
.nav { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr; gap: 8px; }
.nav .btn { font-size: 1rem; }
.engine-box { display: grid; gap: 10px; }
.engine-box .btn.big { margin: 0; }
.progress { height: 8px; border-radius: 999px; background: #121315; overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #7b4dff); transition: width .2s; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; animation: tile-in .4s var(--pop); }
.sum-col { background: var(--raised); border-radius: 10px; padding: 12px; }
.sum-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .9rem; }
.sum-head .dot { width: 16px; height: 16px; border-radius: 5px; }
.dot.w { background: #f4f4f4; } .dot.b { background: #1b1b1b; box-shadow: inset 0 0 0 2px #555; }
.acc { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.acc small { font-size: 1rem; color: var(--muted); }
.kinds { list-style: none; margin: 8px 0 0; padding: 0; font-size: .78rem; font-weight: 700; display: grid; gap: 2px; }
.k-best { color: #3ddc97; } .k-inaccuracy { color: #f6d155; } .k-mistake { color: #ff9b42; } .k-blunder { color: #ff5c52; }
.graph { width: 100%; height: 90px; border-radius: 8px; cursor: pointer; display: block; }
.g-bg { fill: #2a2c30; } .g-area { fill: #f1f1f1; } .g-line { fill: none; stroke: #fff; stroke-width: .6; vector-effect: non-scaling-stroke; }
.g-mid { stroke: var(--muted); stroke-width: .3; stroke-dasharray: 1 1; vector-effect: non-scaling-stroke; }
.g-cur { stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
.g-blunder { fill: #ff5c52; } .g-mistake { fill: #ff9b42; }
.hint-line { margin: 0; font-weight: 700; min-height: 1.5em; }
.moves.clickable li { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: none; }
.moves.clickable .mv { text-align: left; border: 0; background: none; border-radius: 6px; padding: 3px 6px; font-weight: 700; color: var(--text); }
.moves.clickable .mv:hover { background: var(--raised); }
.moves.clickable .mv.on { background: var(--blue); color: #fff; }
.moves.clickable .mv i { font-style: normal; margin-left: 3px; }
.moves.clickable .mv.on i { color: #fff; }
.cm-chessboard .arrow-success { opacity: .85; }

/* bot, draw offers, game history */
.bot-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.bot-card h2 { margin: 0 0 4px; }
.bot-card .fine { margin: 0; }
.bot-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bot-levels { align-items: center; gap: 14px; }
.bot-elo { display: grid; gap: 6px; font-weight: 800; min-width: min(260px, 100%); }
.bot-elo output { color: var(--gold); font-size: 1.3rem; }
.bot-elo input[type=range] { width: 100%; accent-color: var(--blue); height: 28px; }
.draw-box { padding: 12px; border-radius: 12px; background: var(--raised); border: 2px solid var(--gold); animation: drop .3s var(--pop); }
.draw-box p { margin: 0 0 8px; }
.history .game-row a { flex: 1; }
.history .meta { color: var(--muted); font-size: .85rem; font-weight: 600; }
@media (max-width: 600px) { .history .meta { display: none; } }
.kind-jump { all: unset; cursor: pointer; border-radius: 6px; padding: 1px 6px; margin-left: -6px; }
.kind-jump:hover:not(:disabled), .kind-jump:focus-visible { background: var(--raised); text-decoration: underline; }
.kind-jump:focus-visible { outline: 2px solid var(--blue); }
.kind-jump:disabled { cursor: default; opacity: .45; }
.hint-line .cmp { display: grid; gap: 4px; margin-top: 8px; font-weight: 600; font-size: .92rem; }
.hint-line .cmp > span { padding: 6px 10px; border-radius: 8px; background: var(--raised); border-left: 4px solid; }
.hint-line .played { border-color: #ff9b42; color: var(--text); }
.hint-line .better { border-color: #3ddc97; color: var(--text); }

/* Microsoft school login */
.btn.ms { --b: #fff; --bd: #c9ccd3; color: #1a1a1a; width: 100%; gap: 10px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; font-weight: 700; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* ---------- Börse ---------- */
.boerse { max-width: 1100px; margin: 0 auto; display: grid; gap: 18px; }
.boerse h2 { margin: 0 0 6px; }
.wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  background: linear-gradient(135deg, rgba(255, 194, 26, .22), transparent 60%), var(--surface); }
.wallet > div { display: grid; }
.wallet b { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.wallet b.small { font-size: .95rem; line-height: 1.3; }
.wallet form { margin-left: auto; }
.btn.gold { --b: var(--gold); --bd: #b07d00; color: #1a1a1a; }
.alert.ok { background: rgba(0, 176, 111, .18); border-color: var(--green); color: var(--text); }
.news ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 600; }
.news li span { display: inline-block; min-width: 76px; font-weight: 800; font-variant-numeric: tabular-nums; }
.up { color: #3ddc97; } .down { color: #ff5c52; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.market { width: 100%; border-collapse: collapse; font-size: .92rem; }
.market th { text-align: left; color: var(--muted); font-size: .78rem; font-weight: 700; padding: 6px; border-bottom: 2px solid var(--line); }
.market td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.market .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.market .sym { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; }
.market .qtext { display: block; max-width: 34ch; }
.market .px { font-weight: 800; border-radius: 6px; padding: 2px 4px; }
.flash-up { animation: flash-up .8s; } .flash-down { animation: flash-down .8s; }
@keyframes flash-up { from { background: rgba(0, 176, 111, .45); } }
@keyframes flash-down { from { background: rgba(229, 55, 44, .45); } }
.sparkcell { width: 110px; }
.spark { width: 100px; height: 30px; display: block; }
.spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark.up polyline { stroke: #3ddc97; } .spark.down polyline { stroke: #ff5c52; }
.trade { display: flex; gap: 6px; align-items: center; margin: 0; }
.trade .qty { width: 76px; padding: 7px 8px; }
.trade .btn { padding: 7px 10px; font-size: .85rem; }
.menu-coins { margin: 0 0 6px; font-weight: 800; color: var(--gold); }
@media (max-width: 600px) { .sparkcell, .market th:nth-child(4) { display: none; } .wallet form { margin-left: 0; width: 100%; } }

/* ---------- Kampagnen ---------- */
.kampagnen .stack { max-width: 560px; }
.campaign { display: grid; gap: 10px; }
.campaign-img { width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 10px; background: var(--raised); display: block; }
.campaign-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.campaign-head h3 { margin: 0; }
.campaign .fine { margin: 0; overflow-wrap: anywhere; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.kpis div { display: grid; padding: 10px; border-radius: 10px; background: var(--raised); }
.kpis b { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpis span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.days summary { cursor: pointer; font-weight: 700; }
.days table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 8px; }
.days th, .days td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.days .n { text-align: right; font-variant-numeric: tabular-nums; }

/* campaign slot under the topbar */
.spot { max-width: 760px; margin: 0 auto 18px; }
.spot-link { display: block; text-decoration: none; color: var(--text); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 4px 0 #111214; }
.spot-link img { width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; display: block; }
.spot-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 8px 12px; font-size: .88rem; }
.spot-by { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 700; }
.spot-link:hover .spot-meta b { text-decoration: underline; }
.alert.ok { animation: none; margin: 0; }
.campaign .campaign-img, #img-preview { max-width: 480px; }
.boerse > *, .boerse .lobby-cols > * { min-width: 0; } /* let wide tables scroll inside .table-wrap instead of widening the page */
@media (max-width: 420px) { .tools .lbl { display: none; } .switch a { padding-left: 9px; padding-right: 9px; } }
