/* ═══════════════════════════════════════════════════════════
   Twitch stats: a folded panel inside the PepeLand card.
   stats.js fills it and draws the chart once it is opened.
   ═══════════════════════════════════════════════════════════ */
.tt{ color:#fff; }
.tt-sum{ cursor:pointer; list-style:none; user-select:none; }
.tt-sum::-webkit-details-marker{ display:none; }
.tt-sum:focus-visible{ outline:2px solid var(--teal); outline-offset:4px; border-radius:6px; }
.tt-more{ display:inline-flex; align-items:center; gap:6px; font-size:.8rem; font-weight:700; color:var(--w-mute); }
.tt-more::after{
  content:""; width:7px; height:7px; margin-top:-3px;
  border-right:2px solid currentColor; border-bottom:2px solid currentColor; rotate:45deg;
  transition:rotate .3s var(--ease-out), margin .3s var(--ease-out);
}
.tt-sum:hover .tt-more{ color:#fff; }
.tt[open] .tt-more::after{ rotate:225deg; margin-top:3px; }
.tt-body{ padding-top:6px; }
.tt-who{ display:flex; align-items:center; gap:12px; margin:0 0 14px; }
.tt-id{ display:grid; justify-items:start; gap:5px; min-width:0; }
.tt-who img{ width:44px; height:44px; border-radius:50%; object-fit:cover; object-position:56% 26%; box-shadow:0 0 0 2px #00D5BE, 0 0 14px rgba(0,213,190,.45); }
.tt-nick{ font-weight:800; font-size:1.05rem; color:#fff; text-decoration:none; letter-spacing:-.01em; }
.tt-nick:hover{ color:#7AF5E6; }
.tt-rank{
  padding:3px 10px; border-radius:999px; font-size:.8rem; font-weight:800; font-variant-numeric:tabular-nums;
  color:var(--w-mute); background:var(--w-soft); box-shadow:inset 0 0 0 1px var(--w-ring);
}
/* the channel's own place: one purple gradient, whatever TwitchTracker's tier */
.tt-rank.is-ranked{ color:#fff; background:linear-gradient(135deg, #7A3CFF, #B57BFF 55%, #E2A6FF); box-shadow:0 0 14px rgba(160,100,255,.45); text-shadow:0 1px 2px rgba(40,0,90,.45); }
.tt-kpis{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; margin:0 0 18px; }
@media (max-width:560px){ .tt-kpis{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.tt-kpis > div{ padding:12px 14px; border-radius:12px; background:var(--w-soft); box-shadow:inset 0 0 0 1px var(--w-ring); }
.tt-kpis dt{ font-size:.78rem; font-weight:600; color:var(--w-mute); }
.tt-kpis dd{
  margin:4px 0 0; font-size:clamp(1.25rem, 3vw, 1.6rem); font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums;
  width:fit-content; background:linear-gradient(90deg, #00D5BE, #7AF5E6); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.tt-kpis > div:nth-child(2) dd{ background-image:linear-gradient(90deg, #2FB8D6, #8CEBFA); }
.tt-kpis > div:nth-child(3) dd{ background-image:linear-gradient(90deg, #D04FC2, #F4A3EA); }
.tt-kpis > div:nth-child(4) dd{ background-image:linear-gradient(90deg, #8E6CF0, #C7B2FF); }
.tt-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; margin-bottom:10px; }
.tt-title{ margin:0; font-weight:700; display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; }
.tt-key{ display:inline-flex; align-items:center; gap:6px; font-size:.8rem; font-weight:600; color:var(--w-mute); }
.tt-key i{ display:inline-block; width:14px; height:3px; border-radius:2px; }
.tt-key i + i, .tt-key .k-max{ margin-left:8px; }
.tt-key .k-avg{ background:linear-gradient(90deg, #00A894, #3FF0DA); box-shadow:0 0 8px rgba(0,213,190,.7); }
.tt-key .k-max{ background:linear-gradient(90deg, #B83DAA, #F28BE6); box-shadow:0 0 8px rgba(232,111,220,.6); }
.tt-tabs{ display:inline-flex; padding:3px; border-radius:10px; background:var(--w-soft); box-shadow:inset 0 0 0 1px var(--w-ring); }
.tt-tabs button{ padding:6px 12px; border-radius:8px; font-size:.82rem; font-weight:700; color:var(--w-mute); cursor:pointer; }
.tt-tabs button[aria-pressed="true"]{ background:var(--teal); color:var(--on-teal); }
.tt-tabs button:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
.tt-chart{ position:relative; min-height:190px; }
.tt-chart svg{ display:block; width:100%; height:auto; touch-action:pan-y; overflow:visible; }
.tt-empty{ margin:0; min-height:190px; display:grid; place-items:center; color:var(--w-mute); font-size:.9rem; }
.tt-grid{ stroke:rgba(255,255,255,.07); }
.tt-axis{ fill:var(--w-mute); font-size:11px; font-family:var(--text-font); }
.tt-area{ fill:url(#tt-g-fill-avg); }
.tt-area-max{ fill:url(#tt-g-fill-max); }
.tt-avg{ fill:none; stroke:url(#tt-g-avg); stroke-width:2.4; stroke-linejoin:round; stroke-linecap:round; filter:url(#tt-glow); }
.tt-max{ fill:none; stroke:url(#tt-g-max); stroke-width:1.8; stroke-linejoin:round; stroke-linecap:round; filter:url(#tt-glow); opacity:.9; }
/* the lines draw themselves in once, when the panel opens or the view switches */
.tt-avg, .tt-max{ stroke-dasharray:1; animation:tt-draw 1.1s var(--ease-out) both; }
.tt-max{ animation-delay:.12s; }
@keyframes tt-draw{ from{ stroke-dashoffset:1; } to{ stroke-dashoffset:0; } }
@media (prefers-reduced-motion: reduce){ .tt-avg, .tt-max{ animation:none; } }
.lite .tt-avg, .lite .tt-max{ animation:none; }
.tt-guide{ stroke:rgba(255,255,255,.25); }
.tt-dot-avg{ fill:#3FF0DA; stroke:#09090B; stroke-width:2; }
.tt-dot-max{ fill:#F28BE6; stroke:#09090B; stroke-width:2; }
.tt-tip{
  position:absolute; top:0; display:grid; gap:1px; pointer-events:none; white-space:nowrap;
  padding:8px 10px; border-radius:10px; background:#18181B; box-shadow:inset 0 0 0 1px var(--w-ring), 0 10px 24px rgba(0,0,0,.4);
  font-size:.78rem; color:var(--w-mute);
}
.tt-tip[hidden]{ display:none; }
.tt-tip b{ color:#fff; font-size:.82rem; }
.tt-foot{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; margin:12px 0 0; font-size:.8rem; color:var(--w-mute); }
.tt-foot a{ color:var(--teal); font-weight:700; text-decoration:none; }
.tt-foot a:hover{ text-decoration:underline; }

/* ───────── friend streamers: plates on their Twitch banners, sliding by in a loop ─────────
   friends.js clones the row once so the loop is seamless and pauses it off screen; the
   slide is one transform on one layer. Under reduced motion it is a row you scroll. */
.tt-friends{ margin:20px 0 0; }
.tt-friends .tt-title{ margin-bottom:10px; }
.fr-view{
  contain:inline-size;   /* the long row must not widen the card */
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none; margin:0 -16px; padding:4px 16px;
  -webkit-mask:linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask:linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.fr-view::-webkit-scrollbar{ display:none; }
.fr-track{ display:flex; gap:10px; width:max-content; margin:0; padding:0; list-style:none; }
.fr-view.loop{ overflow:hidden; }
.fr-view.loop .fr-track{ animation:fr-loop var(--fr-t, 36s) linear infinite; }
.fr-view.loop:hover .fr-track, .fr-view.loop:focus-within .fr-track, .fr-view.paused .fr-track{ animation-play-state:paused; }
@keyframes fr-loop{ to{ transform:translateX(calc(-50% - 5px)); } }
@media (prefers-reduced-motion: reduce){ .fr-view.loop .fr-track{ animation:none; } .fr-view.loop{ overflow-x:auto; } }

.fr a{
  position:relative; isolation:isolate; overflow:hidden;
  display:flex; align-items:center; gap:12px; width:228px; height:92px; padding:0 14px;
  border-radius:12px; background:#18181B; color:#fff; text-decoration:none;
  box-shadow:inset 0 0 0 1px var(--w-ring);
  transition:box-shadow .3s ease, translate .3s var(--ease-out);
}
.fr-bg{ position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; opacity:.75; transition:opacity .3s ease, scale .6s var(--ease-out); }
.fr a::before{ content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg, rgba(9,9,11,.88), rgba(9,9,11,.55) 60%, rgba(9,9,11,.2)); }
.fr a:hover, .fr a:focus-visible{ translate:0 -2px; box-shadow:inset 0 0 0 1px rgba(0,213,190,.6), 0 8px 22px rgba(0,213,190,.18); }
.fr a:hover .fr-bg, .fr a:focus-visible .fr-bg{ opacity:1; scale:1.05; }
.fr a:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
.fr-av{ flex:none; width:52px; height:52px; border-radius:50%; object-fit:cover; background:#27272A; box-shadow:0 0 0 2px #9146FF, 0 0 12px rgba(145,70,255,.5); }
.fr-id{ display:grid; justify-items:start; gap:5px; min-width:0; }
.fr-nick{ display:flex; align-items:center; gap:4px; max-width:140px; font-weight:800; font-size:.98rem; text-shadow:0 1px 6px rgba(0,0,0,.8); }
.fr-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Twitch's verified-partner mark, same shape and dark-theme colour as on twitch.tv */
.fr-ok{ flex:none; width:16px; height:16px; fill:#BF94FF; filter:drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
/* rank badges in TwitchTracker's colours: black monospace digits on a tier colour, with their crown */
.fr-rank{
  display:inline-flex; align-items:center; gap:3px; padding:3px 7px; border-radius:7px;
  font:700 .78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric:tabular-nums;
  color:#000; background:#FFFF78; box-shadow:0 0 0 2px rgba(0,0,0,.4);
}
.fr-rank.r4{ background:#64EAFF; }
.fr-rank.r3{ background:linear-gradient(to bottom right, #21FF5A, #60FFF8); }
.fr-rank.r2{ background:linear-gradient(to bottom right, #A763FF, #FF6DF4); }
.fr-rank.r1{ background:linear-gradient(to bottom right, #FF8A11, gold); }
.fr-rank.r0{ background:#E4E4E4; font-family:inherit; font-weight:800; }
.fr-crown{
  width:1.15em; height:1.15em; background:currentColor;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg viewBox="2 6 21 14" xmlns="http://www.w3.org/2000/svg"><path d="M5.5 19h13l3-9-6 3-3-6-3 6-6-3 2 9Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>') no-repeat center / contain;
  mask:url('data:image/svg+xml;utf8,<svg viewBox="2 6 21 14" xmlns="http://www.w3.org/2000/svg"><path d="M5.5 19h13l3-9-6 3-3-6-3 6-6-3 2 9Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>') no-repeat center / contain;
}
@media (prefers-reduced-motion: reduce){ .fr a, .fr-bg{ transition:none; } }
