:root { --bg: #101418; --panel: #181e24; --panel2: #1f262e; --line: rgba(255, 255, 255, 0.09); --ink: #eef2f5; --muted: #8b97a3; --gold: #f2c14e; --good: #5fd27a; --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
button { font: inherit; color: inherit; }
.hub { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr; height: 100%; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; padding: 14px 20px; background: linear-gradient(90deg, #1b2530, #141a20 60%); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .medal { font-size: 30px; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.brand small, .me small, .score small { display: block; color: var(--muted); font-size: 12px; }
.me { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #2a3440; font-size: 22px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.score { text-align: right; }
.score b { font-size: 24px; color: var(--gold); }
.ring { --p: 0; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--p) * 1%), #2a3440 0); }
.ring span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #141a20; font: 700 13px var(--font); }
.games { overflow: auto; padding: 12px 10px; border-right: 1px solid var(--line); background: var(--panel); }
.games button { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; width: 100%; padding: 9px 10px; margin-bottom: 4px; text-align: left; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.games button:hover { background: rgba(255, 255, 255, 0.05); }
.games button.sel { background: rgba(255, 255, 255, 0.09); box-shadow: inset 3px 0 0 var(--c, var(--gold)); }
.games .gi { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--c, #555) 35%, #1a1f25); font-size: 18px; }
.games b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.games small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.bar { flex: 1; height: 4px; border-radius: 2px; background: #2a3440; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--good)); }
.main { overflow: auto; padding: 18px 22px 40px; outline: none; }
.banner { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 45%, #1a2028), #161b21 70%); border: 1px solid var(--line); }
.banner .bi { font-size: 44px; }
.banner h2 { margin: 0; font-size: 22px; }
.banner p { margin: 2px 0 0; color: #c5ced6; font-size: 13px; }
.banner a { margin-left: auto; padding: 9px 16px; border-radius: 8px; background: var(--c); color: #111; font-weight: 700; text-decoration: none; white-space: nowrap; }
.chips { display: flex; gap: 6px; margin-bottom: 12px; }
.chips button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.chips button.sel { background: var(--ink); border-color: var(--ink); color: #111; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.ach { display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.ach .badge { grid-row: 1 / 4; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 80%, #fff 20%), color-mix(in srgb, var(--c) 70%, #000 30%)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent); }
.ach.locked .badge { background: #262e36; box-shadow: none; filter: grayscale(1); opacity: 0.55; }
.ach h3 { margin: 0; font-size: 14px; }
.ach p { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: 12.5px; }
.ach .pts { font: 700 13px var(--font); color: var(--gold); }
.ach.locked .pts { color: var(--muted); }
.ach .meta { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.ach .meta .bar { max-width: 160px; }
.ach .game-tag { color: var(--c); font-weight: 600; }
h4 { margin: 22px 0 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.empty { color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; }
.stat small { color: var(--muted); font-size: 12px; }
html.embed .top { padding: 10px 14px; }
@media (max-width: 760px) {
  .hub { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .top { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .me { margin-left: 0; order: 3; width: 100%; }
  .score { margin-left: auto; }
  .games { display: flex; gap: 6px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .games button { flex: 0 0 auto; width: auto; grid-template-columns: 26px auto; padding: 6px 10px; margin: 0; }
  .games .gi { width: 26px; height: 26px; font-size: 15px; }
  .games small { display: none; }
  .main { padding: 14px 16px 30px; }
  .banner { flex-wrap: wrap; }
  .banner a { margin-left: 0; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Rewards ---------- */
.games .ready { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: #e8a33d; color: #1b1300; font: 700 11px/1 system-ui, sans-serif; vertical-align: 2px; }
.rw-track { height: 8px; margin-top: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.rw-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2c14e, #e8a33d); }
.rw-note { margin: 0 0 14px; font-size: 13px; opacity: 0.7; }
.ach.rw.can { box-shadow: 0 0 0 2px #e8a33d, 0 0 24px rgba(232, 163, 61, 0.35); }
.ach.rw.claimed .meta { color: #7ce08a; }
.rw-claim { padding: 5px 16px; border: 0; border-radius: 6px; background: linear-gradient(#f7cf6a, #e0a02a); color: #2a1a00; font: 700 13px system-ui, sans-serif; cursor: pointer; }
.rw-claim:hover { filter: brightness(1.08); }
.rw-teaser { display: block; width: 100%; margin: 0 0 14px; padding: 10px 14px; border: 1px solid #e8a33d; border-radius: 10px; background: rgba(232, 163, 61, 0.12); color: inherit; font: 600 14px system-ui, sans-serif; text-align: left; cursor: pointer; }
