/* ── 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: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); 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: 10px; }

/* Linked Instagram handle — hidden unless the player set one in their profile */
#profileSheet .ps-ig { text-align: center; margin-bottom: 16px; }
#profileSheet .ps-ig[hidden] { display: none; }
#profileSheet .ps-ig a { font-size: 14px; font-weight: 600; color: inherit;
  text-decoration: none; opacity: .7; }
#profileSheet .ps-ig a:active { opacity: 1; }

#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-stat[hidden] { display: none; }
#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); }

/* Cup mode (/cup/<code>): this cup's matches under the stats */
#profileSheet .ps-rows { list-style: none; margin: 16px 0 0; padding: 0;
  border-top: 1px solid rgba(0,0,0,.08); }
#profileSheet .ps-rows[hidden] { display: none; }
#profileSheet .ps-row { display: flex; gap: 12px; align-items: baseline;
  padding: 10px 2px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
#profileSheet .ps-row-round { flex: 0 0 96px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; opacity: .55; }
#profileSheet .ps-row-text { flex: 1; min-width: 0; font-weight: 600; }
#profileSheet .ps-win .ps-row-text { color: #b35400; }
#profileSheet .ps-loss .ps-row-text,
#profileSheet .ps-muted .ps-row-text { opacity: .6; font-weight: 500; }
#profileSheet .ps-live .ps-row-text::before { content: ""; display: inline-block; width: 8px; height: 8px;
  margin-right: 6px; border-radius: 50%; background: rgb(255,138,30); vertical-align: 1px; }
[data-theme="dark"] #profileSheet .ps-rows { border-top-color: rgba(255,255,255,.1); }
[data-theme="dark"] #profileSheet .ps-win .ps-row-text { color: rgb(255,138,30); }
[data-theme="dark"] #profileSheet .ps-row { border-bottom-color: rgba(255,255,255,.07); }

/* Section titles inside the rows (League hub player sheet), and linked rows */
#profileSheet .ps-row-head { padding: 16px 2px 6px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; opacity: .5; }
#profileSheet .ps-rows .ps-row-head:first-child { padding-top: 10px; }
#profileSheet a.ps-row-text { color: inherit; text-decoration: none; }
#profileSheet a.ps-row-text::after { content: " ›"; opacity: .45; }
