/* My stats page (/me/). Uses shell.css tokens. */
.doc.me{max-width:860px}
#me{display:grid;gap:16px;margin-top:14px}
.me-mode{display:inline-flex;justify-self:start;border:1px solid var(--line);border-radius:999px;padding:3px;background:var(--card);gap:2px}
.me-mode button{border:0;background:transparent;color:var(--ink);font:500 14px var(--body);padding:7px 14px;border-radius:999px;cursor:pointer}
.me-mode button[aria-pressed="true"]{background:var(--brand);color:var(--bg)}
.me-top{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.me-top>div{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px 10px;text-align:center;min-width:0}
.me-top b{display:block;font:700 30px/1.1 var(--title);color:var(--brand)}
.me-top span{display:block;margin-top:4px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.doc .me-quip{margin:-6px 0 0;color:var(--muted);font-size:14px}
.me-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px 14px 16px;min-width:0}
.me-h{display:flex;justify-content:space-between;align-items:baseline;gap:4px 12px;flex-wrap:wrap;margin-bottom:10px}
.doc .me-h h2{font:700 21px var(--title);margin:0}
.me-h>span{font-size:13px;color:var(--muted)}

/* heatmap */
.hm-wrap{display:grid;grid-template-columns:auto 1fr;gap:6px;max-width:520px}
.hm-days{display:grid;grid-template-rows:auto repeat(7,minmax(0,1fr));gap:3px;font-size:10px;color:var(--muted);align-items:center}
.hm-days::before{content:"";height:14px}
.hm-main{min-width:0}
.hm-months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px;font-size:10px;color:var(--muted);height:14px;white-space:nowrap}
.hm{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:repeat(7,auto);grid-auto-flow:column;gap:3px}
.hm i,.hm-key i{display:block;aspect-ratio:1;border-radius:4px;background:var(--line)}
.hm .hm-f{background:transparent;border:1px dashed var(--line)}
.hm .hm-t{outline:2px solid var(--ink);outline-offset:-1px}
.hm .hm-1,.hm-key .hm-1{background:color-mix(in srgb,var(--brand) 30%,var(--line))}
.hm .hm-2,.hm-key .hm-2{background:color-mix(in srgb,var(--brand) 55%,var(--line))}
.hm .hm-3,.hm-key .hm-3{background:color-mix(in srgb,var(--brand) 78%,var(--line))}
.hm .hm-4,.hm-key .hm-4{background:var(--brand)}
.hm-key{display:flex;align-items:center;gap:3px;justify-content:flex-end;max-width:520px;margin-top:8px;font-size:11px;color:var(--muted)}
.hm-key i{width:12px;height:12px;border-radius:3px}

/* per-game rows */
.me-games{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:8px}
.doc a.me-g{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;min-width:0}
.doc a.me-g:hover{border-color:var(--ga)}
.me-g.none{opacity:.7}
.me-ic{flex:none;width:42px;height:42px;border-radius:10px;background:var(--ga);display:grid;place-items:center}
.me-ic svg{width:26px;height:26px}
.me-gm{display:grid;gap:3px;min-width:0;flex:1}
.me-gn{font-weight:600;font-size:15px}
.me-gn small{font-size:11px;font-weight:500;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:1px 6px;margin-left:2px}
.me-tick{font-style:normal;font-size:12px;font-weight:600;color:#2E7D6B}
:root[data-theme="dark"] .me-tick{color:#4FB39C}
.me-gs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;font-size:11px;color:var(--muted);max-width:300px}
.me-gs>span{display:grid;line-height:1.25}
.me-gs b{color:var(--ink);font-size:15px}
.me-gs.none{display:block;font-size:13px}

/* badges */
.doc ul.me-badges{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.doc .me-b{display:grid;justify-items:center;text-align:center;gap:4px;padding:12px 8px;border:1px dashed var(--line);border-radius:14px;line-height:1.3}
.me-b .me-bi{font-size:30px;line-height:1;width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:var(--line);filter:grayscale(1);opacity:.45}
.me-b b{font-size:14px;color:var(--muted)}
.doc .me-b .me-bh{font-size:12px;color:var(--muted)}
.me-bh em{font-style:normal;opacity:.8}
.doc .me-b.got{border:1px solid color-mix(in srgb,var(--brand) 45%,var(--line));background:color-mix(in srgb,var(--brand) 7%,var(--card))}
.me-b.got .me-bi{filter:none;opacity:1;background:linear-gradient(135deg,#F2D36B,#E9A23B);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 25%,transparent)}
.me-b.got b{color:var(--brand)}

/* save / export */
.doc .me-save p{margin:0 0 10px;font-size:14px}
.me-btns{display:flex;flex-wrap:wrap;gap:8px}
.me-btn{display:inline-flex;align-items:center;gap:6px;cursor:pointer;padding:10px 18px;border-radius:999px;border:1px solid var(--brand);background:var(--brand);color:var(--bg);font:600 14px var(--body)}
.me-btn.ghost{background:transparent;color:var(--brand);position:relative}
.me-btn:focus-within{outline:2px solid var(--brand);outline-offset:2px}
.doc .me-msg{margin:8px 0 0;color:var(--muted);font-size:13px;min-height:1em}

@media (max-width:560px){
  .me-top{grid-template-columns:repeat(2,minmax(0,1fr))}
  .me-games{grid-template-columns:1fr}
  .doc ul.me-badges{grid-template-columns:repeat(2,minmax(0,1fr))}
}
