:root { color-scheme: light dark; }
html, body { margin: 0; height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f4f6; color: #111; }
@media (prefers-color-scheme: dark) { html, body { background: #0c0c0d; color: #eee; } }
#wrap { position: fixed; inset: 0; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }
#bar { position: fixed; top: 0; left: 0; right: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; pointer-events: none; }
#bar h1 { font-size: 17px; margin: 0; font-weight: 800; font-style: italic; pointer-events: none; }
#season { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,138,30,.9); }
#status { font-size: 13px; opacity: .65; }
#hint { position: fixed; left: 0; right: 0; text-align: center;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  font-size: 11px; opacity: .45; pointer-events: none; }

/* ── Profile sheet ─────────────────────────────────────────────────────────
   An iOS-style bottom card shown when a graph node is tapped. The whole
   element is created/owned by assets/graph/sheet.js; these are just its looks.
   Colors are driven by [data-theme] (set by the page from ?dark/?light/OS). */
#profileSheet { position: fixed; inset: 0; z-index: 50; }
#profileSheet[hidden] { display: none; }

#profileSheet .ps-backdrop { position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background .2s ease; }
#profileSheet.ps-open .ps-backdrop { background: rgba(0,0,0,.45); }

#profileSheet .ps-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0 auto; max-width: 440px;
  padding: 8px 22px calc(26px + env(safe-area-inset-bottom, 0px));
  background: #ffffff; color: #111;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.25);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.32,.72,0,1);
  touch-action: none; }
#profileSheet.ps-open .ps-card { transform: translateY(0); }

#profileSheet .ps-grab { width: 38px; height: 5px; border-radius: 3px;
  background: rgba(0,0,0,.18); margin: 0 auto 14px; }

#profileSheet .ps-close { position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.06); color: inherit; font-size: 14px; line-height: 1;
  cursor: pointer; opacity: .7; }
#profileSheet .ps-close:active { opacity: 1; }

#profileSheet .ps-name { font-size: 22px; font-weight: 800; margin: 2px 0 4px;
  text-align: center; }
#profileSheet .ps-tier { text-align: center; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(255,138,30,.95);
  margin-bottom: 18px; }

#profileSheet .ps-stats { display: flex; justify-content: space-around;
  gap: 10px; margin-bottom: 6px; }
#profileSheet .ps-stat { display: flex; flex-direction: column; align-items: center;
  flex: 1; gap: 3px; }
#profileSheet .ps-num { font-size: 21px; font-weight: 800; }
#profileSheet .ps-lbl { font-size: 11px; opacity: .55; text-transform: uppercase;
  letter-spacing: .04em; }

#profileSheet .ps-prov { margin-top: 16px; text-align: center; font-size: 12px;
  opacity: .6; }
#profileSheet .ps-prov[hidden] { display: none; }

/* Dark theme overrides (page sets data-theme to honor ?dark/?light + OS) */
[data-theme="dark"] #profileSheet .ps-card { background: #1d1d1f; color: #fff;
  box-shadow: 0 -8px 40px rgba(0,0,0,.6); }
[data-theme="dark"] #profileSheet .ps-grab { background: rgba(255,255,255,.22); }
[data-theme="dark"] #profileSheet .ps-close { background: rgba(255,255,255,.1); }
