.screen-profile { padding-bottom: 60px; }
.pf-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.pf-tabs { justify-content: center; }
.pf { display: flex; flex-direction: column; gap: 14px; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 0 2px; }
.pf-head h3 { margin: 0; font-size: 18px; }
.pf-head .muted { font-size: 14px; }
.pf-bar { height: 14px; background: var(--bg); box-shadow: 0 0 0 3px var(--ink); overflow: hidden; }
.pf-bar > div { height: 100%; background: var(--accent); box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.25); }
.pf-bar.thin { height: 8px; box-shadow: 0 0 0 2px var(--ink); }

.pf-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 22px 26px; }
.pf-avatar { position: relative; width: 112px; height: 112px; display: grid; place-items: center; background: var(--bg); box-shadow: 0 0 0 3px var(--ink), 0 0 0 9px var(--rc), 0 0 0 12px var(--ink); margin: 12px; }
.pf-avatar canvas { image-rendering: pixelated; }
.pf-lv { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); min-width: 44px; padding: 4px 8px; text-align: center; font-size: 16px; font-weight: 700; background: var(--accent); color: var(--bg); box-shadow: 0 0 0 3px var(--ink); }
.pf-who { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pf-name { font-size: 30px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-title { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--accent); }
.pf-emblem canvas { display: block; }
.pf-xp { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pf-xprow { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.pf-rank { font-size: 15px; }
.pf-hero-side { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.pf-wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pf-wallet .k { font-size: 13px; color: var(--muted); }
.pf-wallet .coins { font-size: 22px; }
.pf-titles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 14px; border-top: 3px solid var(--ink); }

.pf-cab { padding: 12px; background: #2a1a10; box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 6px #4a2f1c, inset 0 0 0 9px var(--ink); }
.pf-cab-glass { display: grid; grid-template-columns: 1.6fr repeat(5, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 18px 14px 14px; background: linear-gradient(#141420, #0c0c14); box-shadow: inset 0 0 0 3px var(--ink), inset 0 6px 0 rgba(255,255,255,.06); }
.pf-trophy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.pf-spot { position: absolute; top: -18px; left: 50%; width: 80%; height: 70%; transform: translateX(-50%); background: radial-gradient(ellipse 50% 60% at 50% 0, color-mix(in srgb, var(--rc) 45%, transparent), transparent 80%); pointer-events: none; }
.pf-art { position: relative; display: grid; place-items: end center; min-height: 76px; }
.pf-trophy.top .pf-art { min-height: 108px; }
.pf-art canvas { filter: drop-shadow(0 4px 0 rgba(0,0,0,.6)); }
.pf-plinth { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px; background: #3a2616; box-shadow: 0 0 0 3px var(--ink), inset 0 3px 0 var(--rc), inset 0 -4px 0 rgba(0,0,0,.35); text-align: center; }
.pf-tname { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-rar { font-size: 13px; color: var(--rc); }
.pf-trophy:hover .pf-plinth, .pf-trophy:focus-visible .pf-plinth { background: #4a321e; }
.pf-trophy:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pf-cab.empty .pf-cab-glass { display: flex; justify-content: center; padding: 28px 16px; }
.pf-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pf-empty b { font-size: 18px; }

.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg2); box-shadow: 0 0 0 3px var(--ink); min-width: 0; }
.pf-stat > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-stat .v { font-size: 20px; line-height: 1.1; }
.pf-stat .k { font-size: 14px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.pf-glyph { flex: none; image-rendering: pixelated; }

.pf-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pf-cat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg2); color: inherit; border: 0; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 0 0 3px var(--ink); min-width: 0; }
.pf-cat:hover, .pf-cat:focus-visible { background: var(--bg3); }
.pf-cat:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pf-cat.locked .pf-cat-art { filter: grayscale(1) brightness(.55); }
.pf-cat.locked .pf-bar > div { background: var(--muted); }
.pf-cat.full .pf-bar > div { background: var(--good); }
.pf-cat-art { flex: none; width: 48px; height: 40px; display: grid; place-items: center; }
.pf-cat-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-cat-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.pf-cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-cat-sub { font-size: 13px; color: var(--muted); }

.pf-recent { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.pf-pull { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-height: 92px; padding: 10px 6px 8px; background: var(--bg2); color: inherit; border: 0; font: inherit; cursor: pointer; box-shadow: 0 0 0 3px var(--ink), inset 0 -4px 0 var(--rc); min-width: 0; }
.pf-pull:hover, .pf-pull:focus-visible { background: var(--bg3); }
.pf-pname { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-badge { display: grid; place-items: center; width: 60px; height: 60px; background: var(--bg2); box-shadow: 0 0 0 3px var(--ink); }
.pf-ach { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1100px) {
  .pf-cab-glass { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-trophy.top { grid-column: 1 / -1; }
  .pf-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
body.phone .pf-wrap { gap: 12px; }
body.phone .pf-hero { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 16px 14px 18px; }
body.phone .pf-avatar { width: 76px; height: 76px; margin: 9px; }
body.phone .pf-avatar canvas { width: 60px; height: auto; }
body.phone .pf-name { font-size: 22px; }
body.phone .pf-hero-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
body.phone .pf-wallet { align-items: flex-start; }
body.phone .pf-hero-side .btn { min-height: 44px; }
body.phone .pf-cab { padding: 8px; }
body.phone .pf-cab-glass { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 10px 10px; }
body.phone .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.phone .pf-stat { padding: 10px; gap: 10px; }
body.phone .pf-stat .v { font-size: 17px; }
body.phone .pf-cats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
body.phone .pf-cat { min-height: 56px; }
body.phone .pf-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
body.phone .pf-head h3 { font-size: 16px; }
body.phone .pf-trophy.top { grid-column: 1 / -1; }
body.phone .pf-trophy:nth-child(6) { display: none; }
@media (orientation: landscape) { body.phone .pf-cab-glass { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.phone .pf-trophy.top { grid-column: auto; } body.phone .pf-trophy:nth-child(6) { display: flex; } body.phone .pf-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-titles { align-items: center; }
.pf-tl { margin-right: 6px; }
