/* Arenyze — public profile (/u/:username). Prefix up-.
   Quiet surfaces, hairlines and one accent per game; no artwork behind text. */
.page-user {
  --up-cut: 14px;
}
.up-clip { clip-path: polygon(0 0, calc(100% - var(--up-cut)) 0, 100% var(--up-cut), 100% 100%, 0 100%); }

/* ---- hero ------------------------------------------------------------------ */
.up-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2, var(--bg)); }
.up-hero-bg { position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 420px at -5% -20%, rgb(var(--acc-rgb) / .14), transparent 70%),
    radial-gradient(700px 360px at 105% 0%, color-mix(in srgb, var(--up-a, var(--acc)) 9%, transparent), transparent 70%); }
/* fine grain so the gradient never bands */
.up-hero-bg::after { content: ''; position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.up-hero-cover { position: absolute; inset: 0; z-index: -2; }
.up-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.up-hero-cover::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg-2, var(--bg)) 0%, color-mix(in srgb, var(--bg-2, var(--bg)) 82%, transparent) 40%, color-mix(in srgb, var(--bg-2, var(--bg)) 35%, transparent) 100%),
    linear-gradient(0deg, var(--bg-2, var(--bg)) 0%, transparent 55%); }
/* the network mark as a large hairline watermark */
/* the network emblem, zoomed in and cropped by the hero's right/bottom edge */
.up-mark { position: absolute; right: max(-40px, calc((100vw - var(--maxw, 1380px)) / 2 - 120px)); top: 50%; z-index: -1; width: 440px; height: 440px; transform: translateY(-40%) rotate(-10deg); pointer-events: none;
  opacity: .5; filter: drop-shadow(0 0 40px rgb(245 166 35 / .28));
  -webkit-mask: linear-gradient(100deg, transparent 8%, #000 52%), linear-gradient(0deg, transparent 2%, #000 30%); -webkit-mask-composite: source-in;
  mask: linear-gradient(100deg, transparent 8%, #000 52%), linear-gradient(0deg, transparent 2%, #000 30%); mask-composite: intersect; }
.up-hero::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 60%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 80% 50%, rgb(245 166 35 / .12), transparent 70%); }
.has-cover .up-mark { display: none; }

.up-hero-in { padding-top: 30px; padding-bottom: 34px; }
.up-crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 28px; font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); }
.up-crumbs a { color: var(--ink-3); transition: color var(--t-fast); }
.up-crumbs a:hover { color: var(--acc); }
.up-crumbs .i { font-size: 13px; }

.up-id { display: flex; align-items: center; gap: 24px; }
.up-av { flex: none; width: 112px; height: 112px; padding: 2px; background: var(--line-3);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
.up-av.is-premium { background: linear-gradient(140deg, #ffe08a, var(--acc) 55%, #b4631a); }
.up-av > * { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover;
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
  background: linear-gradient(160deg, var(--acc), var(--acc-lo)); color: var(--acc-ink, #111); font: 800 3rem/1 var(--f-display); }
.up-who { flex: 1; min-width: 0; }
.up-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.up-name { margin: 0; font: 800 clamp(2rem, 4.2vw, 3.2rem)/1 var(--f-display); font-stretch: var(--display-stretch, 112%); letter-spacing: -.005em; overflow-wrap: anywhere; }
.up-plan { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; font: 700 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: #2a1a04; background: linear-gradient(120deg, #ffe08a, #ffb648); box-shadow: 0 0 0 1px #ffd27a55, 0 6px 18px -8px #ffb648; }
.up-plan .i { font-size: 13px; }
.up-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; color: var(--ink-3); font-size: 13px; }
.up-meta span { display: inline-flex; align-items: center; gap: 6px; }
.up-meta .i { font-size: 15px; color: var(--ink-4); }
.up-meta .is-ok .i { color: var(--up); }

.up-soc-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.up-soc-btn { --b: var(--ink-2); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink-2); background: var(--s2); border: 1px solid var(--line-2);
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.up-soc-btn svg { width: 16px; height: 16px; fill: currentColor; }
.up-soc-btn:hover { color: var(--b); border-color: color-mix(in srgb, var(--b) 45%, transparent); background: color-mix(in srgb, var(--b) 10%, var(--s2)); transform: translateY(-1px); }

.up-actions { display: flex; gap: 8px; flex: none; align-self: flex-start; margin-top: 6px; }
.up-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--s2); border: 1px solid var(--line-2); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast); }
.up-btn:hover { background: var(--s3); border-color: var(--line-3); }
.up-btn .i { font-size: 16px; color: var(--ink-3); }
.up-btn.is-acc { color: var(--acc-ink, #111); background: var(--acc); border-color: transparent; }
.up-btn.is-acc .i { color: inherit; }
.up-btn.is-acc:hover { background: var(--acc-hi); }

/* brand colours */
[data-p="twitch"] { --b: #a970ff; } [data-p="youtube"] { --b: #ff4e45; } [data-p="x"] { --b: #f1f1f1; }
[data-p="tiktok"] { --b: #25f4ee; } [data-p="instagram"] { --b: #ff5c9a; } [data-p="kick"] { --b: #53fc18; } [data-p="discord"] { --b: #8b9bff; }
.page-user [data-game="r6"] { --g: #ff8a3d; } .page-user [data-game="thefinals"] { --g: #ff3b6b; }
.page-user [data-game="arknightsendfield"] { --g: #f5c400; } .page-user [data-game="deltaforce"] { --g: #9ef01a; }

/* ---- layout ------------------------------------------------------------------- */
.up-page { padding-top: 32px; padding-bottom: 64px; }
.up-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.up-aside { display: grid; gap: 14px; position: sticky; top: calc(var(--hdr-h) + 20px); }
.up-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.up-h h2 { margin: 0; font: 800 .95rem/1 var(--f-display); font-stretch: var(--display-stretch, 112%); letter-spacing: .08em; text-transform: uppercase; }
.up-h span { color: var(--ink-4); font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; }

/* ---- tracker cards -------------------------------------------------------------- */
.up-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.up-card { --g: var(--acc); position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--s1);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t); }
.up-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g) 30%, var(--line)); }
/* top accent + a quiet wash of the game colour behind the header */
.up-card::before { content: ''; position: absolute; left: 0; right: var(--up-cut); top: 0; height: 2px; z-index: 2; background: linear-gradient(90deg, var(--g), transparent); }
.up-card::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none;
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--g) 9%, transparent), transparent 70%); }
/* the cut corner gets a hairline in the game colour, as on the home cards */
.up-tick { position: absolute; top: -1px; left: calc(100% - var(--up-cut)); z-index: 2; width: calc(var(--up-cut) * 1.414 + 2px); height: 2px; background: var(--g); transform-origin: 0 50%; transform: rotate(45deg); }

.up-card-h { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px; }
.up-logo { width: 42px; height: 42px; flex: none; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); object-fit: cover; }
.up-card-id { flex: 1; min-width: 0; }
.up-game { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--g); font: 700 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.up-ver { display: inline-flex; align-items: center; gap: 3px; color: var(--up); letter-spacing: .08em; }
.up-ver .i { font-size: 12px; }
.up-pname { display: block; margin-top: 6px; font: 800 1.3rem/1.1 var(--f-display); font-stretch: var(--display-stretch, 112%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-psub { display: block; margin-top: 3px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-rank { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 12px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
.up-rank img { width: 38px; height: 38px; object-fit: contain; }
.up-rank small { display: block; color: var(--ink-4); font: 600 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.up-rank b { display: block; margin-top: 4px; font: 700 13px/1 var(--f-display); white-space: nowrap; }

.up-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.up-stat { padding: 13px 20px 14px; min-width: 0; border-top: 1px solid var(--line); margin-top: -1px; }
.up-stat:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }
.up-stat:last-child:nth-child(3n + 1) { grid-column: span 3; }
.up-stat:last-child:nth-child(3n + 2) { grid-column: span 2; }
.up-stat small { display: block; color: var(--ink-3); font: 600 10px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-stat b { display: block; margin-top: 7px; font: 700 1.2rem/1 var(--f-display); font-stretch: var(--num-stretch, 100%); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.up-more { position: relative; z-index: 1; padding: 14px 20px 6px; border-top: 1px solid var(--line); }
.up-more h3 { margin: 0 0 10px; color: var(--ink-4); font: 600 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; gap: 12px; align-items: center; padding: 8px 0; font-size: 13px; border-top: 1px dashed var(--line); }
.up-row:first-of-type { border-top: 0; padding-top: 0; }
.up-row b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row span { color: var(--ink-3); font: 500 12px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.up-row i { font-style: normal; text-align: right; color: var(--ink); font: 600 12px/1 var(--f-mono); }
.up-ops { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; }
.up-op { width: 52px; }
.up-op img { display: block; width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--s2); box-shadow: inset 0 -2px 0 var(--rc, var(--line-3)), 0 0 0 1px var(--line); }
.up-op[data-r="6"] { --rc: #ff9d2e; } .up-op[data-r="5"] { --rc: #f5c400; } .up-op[data-r="4"] { --rc: #a678ff; }
.up-op span { display: block; margin-top: 5px; color: var(--ink-3); font-size: 10.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.up-card-f { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding: 12px 20px; border-top: 1px solid var(--line); }
.up-when { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-4); font-size: 12px; }
.up-when .i { font-size: 14px; }
.up-go { display: inline-flex; align-items: center; gap: 5px; color: var(--g); font-size: 13px; font-weight: 650; }
.up-go .i { font-size: 15px; transition: transform var(--t) var(--ease); }
.up-go:hover .i { transform: translate(2px, -2px); }
.up-none { position: relative; z-index: 1; padding: 16px 20px 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; line-height: 1.5; }

/* ---- aside panels --------------------------------------------------------------- */
.up-panel { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.up-panel-h { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); color: var(--ink-3); font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.up-kv, .up-hl, .up-link { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); }
.up-panel-h + * { border-top: 0; }
.up-kv { justify-content: space-between; font-size: 13px; }
.up-kv span { color: var(--ink-3); }
.up-kv b { font-weight: 600; text-align: right; }
.up-kv b.is-gold { color: #ffcf6a; }
.up-hl img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.up-hl div, .up-link div { flex: 1; min-width: 0; }
.up-hl small, .up-link small { display: block; color: var(--ink-4); font: 600 9.5px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.up-hl b { display: block; margin-top: 3px; font: 700 14px/1.15 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-hl em { flex: none; color: var(--ink-3); font: 500 11.5px/1 var(--f-mono); font-style: normal; }
.up-link { transition: background var(--t-fast); }
.up-link:hover { background: var(--s2); }
.up-link > svg { width: 18px; height: 18px; flex: none; fill: var(--b); }
.up-link b { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-link > .i { color: var(--ink-4); font-size: 15px; transition: color var(--t-fast), transform var(--t) var(--ease); }
.up-link:hover > .i { color: var(--b); transform: translate(2px, -2px); }
.up-panel-empty { padding: 16px 18px; color: var(--ink-4); font-size: 12.5px; }

.up-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px; text-align: center; color: var(--ink-3); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.up-empty .i { font-size: 28px; color: var(--ink-4); }
.up-empty b { color: var(--ink); font-size: 15px; }
.up-note { margin: 28px 0 0; color: var(--ink-4); font-size: 12px; }
.up-note a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.up-note a:hover { color: var(--acc); }

/* ---- loading + motion ----------------------------------------------------------- */
.up-sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--s2) 0%, var(--s3) 50%, var(--s2) 100%); background-size: 200% 100%; animation: up-sk 1.4s linear infinite; }
@keyframes up-sk { to { background-position: -200% 0; } }
.up-in { animation: up-in .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes up-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .up-sk, .up-in { animation: none; } }

/* ---- responsive ----------------------------------------------------------------- */
@media (max-width: 1180px) { .up-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) {
  .up-layout { grid-template-columns: minmax(0, 1fr); }
  .up-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .up-mark { width: 380px; height: 380px; right: -90px; opacity: .4; }
}
@media (max-width: 640px) {
  .up-hero-in { padding-top: 22px; padding-bottom: 26px; }
  .up-crumbs { margin-bottom: 20px; }
  .up-id { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .up-av { width: 84px; height: 84px; }
  .up-av > * { font-size: 2.2rem; }
  .up-actions { width: 100%; margin-top: 0; }
  .up-actions .up-btn { flex: 1; }
  .up-mark { width: 300px; height: 300px; right: -120px; top: 28%; opacity: .26; }
  .up-card-h { padding: 16px; }
  .up-rank { padding: 4px 10px 4px 4px; }
  .up-rank img { width: 32px; height: 32px; }
  .up-rank small { display: none; }
  .up-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .up-stat { padding: 12px 16px; }
  .up-stat:not(:nth-child(3n + 1)) { border-left: 0; }
  .up-stat:nth-child(even) { border-left: 1px solid var(--line); }
  .up-stat:last-child:nth-child(n) { grid-column: auto; }
  .up-stat:last-child:nth-child(odd) { grid-column: span 2; }
  .up-game { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .up-ver { margin-left: 6px; }
  .up-more, .up-card-f, .up-none { padding-left: 16px; padding-right: 16px; }
}
