/* v2.9.43 — illustrated trainer profile scenes, owner/visitor modes and gifts */
.game-screen .side-panel.is-social-profile {
  width:min(760px,calc(100vw - 120px));
  max-height:min(84vh,790px);
}
.game-screen .side-panel.is-social-profile #sidePanelContent {
  max-height:calc(min(84vh,790px) - 32px);
}
.profile-v80 {
  --profile-blue:#218cf0;
  --profile-ink:#173d57;
  --profile-muted:#688396;
  --profile-line:rgba(74,135,171,.2);
  --profile-card:rgba(255,255,255,.86);
  position:relative;
  display:grid;
  gap:11px;
  color:var(--theme-text,var(--profile-ink));
}
.profile-v80-icon { width:20px; height:20px; flex:0 0 auto; }
.profile-v80-hero {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 255px;
  min-height:248px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.78);
  border-radius:24px;
  background-color:#328bcc;
  background-image:var(--profile-scene,url('/assets/v2.9.60/maps/kanto/oak-lab-district.webp'));
  background-position:center;
  background-size:100% 100%;
  background-repeat:no-repeat;
  box-shadow:inset 0 -68px 70px rgba(8,65,84,.34),0 12px 28px rgba(28,89,119,.16);
}
.profile-v80-hero::before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(5,35,61,.82),rgba(7,48,72,.28) 48%,rgba(9,43,55,.04) 72%);
  pointer-events:none;
}
.profile-v80-identity {
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:96px minmax(0,1fr);
  gap:15px;
  align-items:end;
  align-self:end;
  padding:24px;
  color:#fff;
}
.profile-v80-identity > .social-profile-trainer,
.profile-v80-identity > .social-profile-avatar-button { align-self:end; }
.profile-v80 .social-profile-trainer {
  width:92px;
  height:92px;
  border:4px solid rgba(255,255,255,.92);
  border-radius:50%;
  box-shadow:0 10px 28px rgba(0,36,58,.34),0 0 0 2px rgba(26,139,221,.28);
}
.profile-v80 .social-profile-avatar-button {
  position:relative;
  width:96px;
  height:116px;
  border:0;
  background:none;
  color:#fff;
}
.profile-v80 .social-profile-avatar-button .social-profile-trainer { display:block; }
.profile-v80 .social-profile-avatar-button > i {
  position:absolute;
  left:50%;
  bottom:0;
  display:flex;
  align-items:center;
  gap:4px;
  min-width:76px;
  height:24px;
  padding:0 8px;
  transform:translateX(-50%);
  border:1px solid rgba(255,255,255,.65);
  border-radius:999px;
  background:rgba(8,59,79,.82);
  font:800 9px/1 system-ui;
  font-style:normal;
  white-space:nowrap;
}
.profile-v80 .social-profile-avatar-button > i svg { width:12px; height:12px; }
.profile-v80-identity small { display:block; color:#d9f4ff; font-size:10px; font-weight:900; letter-spacing:.1em; }
.profile-v80-identity h2 { margin:5px 0 9px; color:#fff; font-size:clamp(28px,3.2vw,39px); line-height:.96; letter-spacing:-.045em; text-shadow:0 2px 8px rgba(0,40,63,.3); }
.profile-v80-identity p { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
.profile-v80-identity p span {
  display:flex;
  align-items:center;
  gap:5px;
  min-height:28px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:999px;
  background:rgba(5,53,70,.58);
  color:#f5fcff;
  font-size:11px;
  font-weight:800;
  backdrop-filter:blur(5px);
}
.profile-v80-identity p svg { width:14px; height:14px; }
.profile-v80-relation {
  display:inline-flex;
  align-items:center;
  min-height:23px;
  margin-top:7px;
  padding:0 9px;
  border-radius:999px;
  background:#38c97a;
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:900;
}
.profile-v80-relation.is-friend { background:#e8b62c; }
.profile-v80-relation.is-party { background:#9863e9; }
.profile-v80-stage { position:relative; z-index:2; align-self:end; height:238px; pointer-events:none; }
.profile-v80-trainer-stage {
  display:none;
}
.profile-v80-stage-pokemon {
  position:absolute;
  right:3px;
  bottom:12px;
  display:grid;
  place-items:center;
  width:126px;
  height:126px;
  transform-origin:50% 100%;
  animation:profile-v80-companion-idle 3.4s ease-in-out infinite;
  filter:drop-shadow(0 11px 6px rgba(0,31,45,.38));
}
.profile-v80-stage-pokemon img { width:100%; height:100%; object-fit:contain; }
.profile-v80-stage-empty { position:absolute; right:31px; bottom:36px; display:grid; place-items:center; width:68px; height:68px; border:2px dashed rgba(255,255,255,.65); border-radius:50%; background:rgba(7,43,61,.2); color:#fff; font:700 30px/1 system-ui; font-style:normal; backdrop-filter:blur(4px); }
@keyframes profile-v80-companion-idle { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-5px) rotate(1deg); } }
.profile-v80-edit {
  position:absolute;
  z-index:4;
  top:14px;
  right:14px;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:6px 13px;
  border:1px solid rgba(255,255,255,.7);
  border-radius:14px;
  background:rgba(255,255,255,.9);
  color:#1769b1;
  box-shadow:0 8px 18px rgba(20,70,96,.16);
  text-align:left;
}
.profile-v80-edit svg { width:17px; height:17px; }
.profile-v80-edit b,.profile-v80-edit small { display:block; }
.profile-v80-edit b { font-size:10px; }
.profile-v80-edit small { margin-top:2px; color:#66879a; font-size:8px; }
.profile-v80-actions {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  overflow:hidden;
  border:1px solid var(--profile-line);
  border-radius:17px;
  background:var(--profile-card);
}
.profile-v80-actions button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:52px;
  padding:6px 8px;
  border:0;
  border-right:1px solid var(--profile-line);
  background:transparent;
  color:#315a71;
  text-align:left;
}
.profile-v80-actions button:last-child { border-right:0; }
.profile-v80-actions button:hover { background:#eef8ff; color:#1786e9; }
.profile-v80-actions button.is-gift { color:#8c52d8; }
.profile-v80-actions button.is-battle { color:#df5a58; }
.profile-v80-actions svg { width:21px; height:21px; }
.profile-v80-actions b,.profile-v80-actions small { display:block; }
.profile-v80-actions b { font-size:10.5px; }
.profile-v80-actions small { margin-top:2px; color:#7890a0; font-size:8px; }
.profile-v80-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.profile-v80--visitor .profile-v80-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-v80-tabs button { min-height:44px; gap:7px; border:1px solid var(--profile-line); border-radius:13px; background:rgba(255,255,255,.82); color:#4e6d81; font-size:11px; }
.profile-v80-tabs button svg { width:18px; height:18px; }
.profile-v80-tabs button b { font-size:10px; }
.profile-v80-tabs button.is-active { border-color:#58aaf0; background:#eaf6ff; color:#137dcc; box-shadow:inset 0 -2px #2c91eb; }
.profile-v80-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.profile-v80-stats article {
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:9px;
  align-items:center;
  min-height:82px;
  padding:11px;
  border:1px solid var(--profile-line);
  border-radius:17px;
  background:var(--profile-card);
  box-shadow:0 7px 18px rgba(38,90,120,.06);
}
.profile-v80-stats article > svg { width:38px; height:38px; padding:7px; border-radius:13px; background:#edf7ff; color:#2f91e5; }
.profile-v80-stats article > span.is-level { display:grid; place-items:center; width:42px; height:42px; clip-path:polygon(25% 7%,75% 7%,100% 50%,75% 93%,25% 93%,0 50%); background:linear-gradient(145deg,#65cf82,#2ba861); color:#fff; font:900 18px/1 system-ui; }
.profile-v80-stats small,.profile-v80-stats b,.profile-v80-stats em { display:block; }
.profile-v80-stats small { color:var(--profile-muted); font-size:8.5px; font-weight:900; letter-spacing:.06em; }
.profile-v80-stats b { margin-top:3px; color:var(--profile-ink); font-size:21px; line-height:1; }
.profile-v80-stats b i { color:#7890a0; font-size:9px; font-style:normal; }
.profile-v80-stats em { margin-top:5px; overflow:hidden; color:#7890a0; font-size:8px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.profile-v80-overview-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:9px; }
.profile-v80-lead,
.profile-v80-progress,
.profile-v80-achievement-panel,
.profile-v80-showcase,
.profile-v80-code {
  border:1px solid var(--profile-line);
  border-radius:18px;
  background:var(--profile-card);
  box-shadow:0 7px 18px rgba(38,90,120,.05);
}
.profile-v80-lead {
  display:grid;
  grid-template-columns:104px minmax(0,1fr);
  grid-template-rows:1fr auto;
  gap:8px 13px;
  min-height:176px;
  padding:13px;
}
.profile-v80-lead-art { grid-row:1/3; display:grid; place-items:center; overflow:hidden; border-radius:18px; background:radial-gradient(circle at 50% 40%,#fff,#dff2ff); }
.profile-v80-lead-emoji,.profile-v80-lead-emoji img { width:94px; height:94px; object-fit:contain; }
.profile-v80-lead small { color:var(--profile-muted); font-size:8.5px; font-weight:900; letter-spacing:.08em; }
.profile-v80-lead h3 { margin:4px 0; color:var(--profile-ink); font-size:18px; }
.profile-v80-lead h3 i { color:#f0bd2e; font-style:normal; }
.profile-v80-lead p { margin:0 0 10px; color:var(--profile-muted); font-size:10.5px; }
.profile-v80-lead label span { display:flex; justify-content:space-between; color:#607c8f; font-size:9px; }
.profile-v80-lead label > i { display:block; height:7px; margin-top:5px; overflow:hidden; border-radius:999px; background:#dce8ef; }
.profile-v80-lead label em { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#ff5c87,#fa9cbd); }
.profile-v80-lead > button { min-height:33px; border:1px solid #b9ddf7; border-radius:10px; background:#f5fbff; color:#187fd2; font-size:9px; font-weight:850; }
.profile-v80-progress { min-height:176px; padding:14px; }
.profile-v80-progress header small,.profile-v80-progress header b { display:block; }
.profile-v80-progress header small { color:var(--profile-muted); font-size:8.5px; font-weight:900; letter-spacing:.08em; }
.profile-v80-progress header b { margin-top:3px; color:var(--profile-ink); font-size:14px; }
.profile-v80-progress > div { display:grid; gap:0; margin-top:9px; }
.profile-v80-progress > div span { display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:8px; align-items:center; min-height:29px; border-top:1px solid rgba(90,136,164,.13); color:#55758a; }
.profile-v80-progress > div span:first-child { border-top:0; }
.profile-v80-progress span svg { width:16px; height:16px; color:#5c9ecf; }
.profile-v80-progress span b { overflow:hidden; font-size:9.5px; text-overflow:ellipsis; white-space:nowrap; }
.profile-v80-progress span em { color:var(--profile-ink); font-size:11px; font-style:normal; font-weight:900; }
.profile-v80-achievement-panel { display:grid; gap:10px; padding:14px; }
.profile-v80-achievement-panel > header,.profile-v80-showcase > header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.profile-v80-achievement-panel > header small,.profile-v80-achievement-panel > header b,.profile-v80-showcase > header small,.profile-v80-showcase > header b { display:block; }
.profile-v80-achievement-panel > header small,.profile-v80-showcase > header small { color:var(--profile-muted); font-size:8.5px; font-weight:900; letter-spacing:.08em; }
.profile-v80-achievement-panel > header b,.profile-v80-showcase > header b { margin-top:3px; color:var(--profile-ink); font-size:14px; }
.profile-v80-achievement-panel > header em { color:#7c92a0; font-size:7px; font-style:normal; }
.profile-v80-achievement-panel > header button { border:0; background:none; color:#218cf0; font-size:9px; font-weight:850; }
.profile-v80-achievements { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.profile-v80-achievement {
  position:relative;
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:9px;
  align-items:center;
  min-height:73px;
  padding:9px;
  border:1px solid rgba(86,132,160,.18);
  border-radius:15px;
  background:#fbfdff;
}
.profile-v80-achievement.is-locked { opacity:.52; filter:grayscale(.75); }
.profile-v80-achievement > span { display:grid; place-items:center; width:46px; height:52px; clip-path:polygon(50% 0,90% 18%,100% 62%,50% 100%,0 62%,10% 18%); color:#fff; filter:drop-shadow(0 4px 5px rgba(45,74,94,.16)); }
.profile-v80-achievement.is-gold > span { background:linear-gradient(145deg,#ffd966,#e9a313); }
.profile-v80-achievement.is-blue > span { background:linear-gradient(145deg,#79c8ff,#3881cc); }
.profile-v80-achievement.is-violet > span { background:linear-gradient(145deg,#c590ff,#7245ba); }
.profile-v80-achievement.is-green > span { background:linear-gradient(145deg,#7ee195,#35a564); }
.profile-v80-achievement > span svg { width:25px; height:25px; }
.profile-v80-achievement b,.profile-v80-achievement small { display:block; }
.profile-v80-achievement b { color:var(--profile-ink); font-size:9.5px; line-height:1.2; }
.profile-v80-achievement small { margin-top:4px; color:#718999; font-size:7.5px; line-height:1.25; }
.profile-v80-achievement > i { position:absolute; top:5px; right:6px; color:#eeb82c; font-size:8px; font-style:normal; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievement:nth-child(4) { display:none; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievements { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-v80-showcase { display:grid; gap:10px; padding:14px; }
.profile-v80-showcase > header > em { color:#7b92a1; font-size:7px; font-style:normal; }
.profile-v80-showcase > header > button { display:flex; align-items:center; gap:5px; min-height:31px; padding:0 10px; border:1px solid #c9b4ee; border-radius:10px; background:#f8f2ff; color:#8653c8; font-size:8px; font-weight:850; }
.profile-v80-showcase > header > button svg { width:15px; height:15px; }
.profile-v80-showcase > div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.profile-v80-gift {
  position:relative;
  display:grid;
  grid-template-rows:minmax(86px,1fr) auto;
  overflow:hidden;
  min-width:0;
  border:1px solid rgba(82,135,165,.16);
  border-radius:15px;
  background:#f5fbff;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s,filter .22s;
}
.profile-v80-gift:hover { transform:translateY(-4px) rotate(-1deg); filter:saturate(1.08); box-shadow:0 12px 22px rgba(52,104,135,.15); }
.profile-v80-gift:nth-child(even):hover { transform:translateY(-4px) rotate(1deg); }
.profile-v80-gift img { width:100%; height:94px; object-fit:cover; transition:transform .28s cubic-bezier(.2,.8,.2,1); }
.profile-v80-gift:hover img { transform:scale(1.07); }
.profile-v80-gift > span { min-width:0; padding:7px 8px 8px; background:rgba(255,255,255,.9); }
.profile-v80-gift b,.profile-v80-gift small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-v80-gift b { color:var(--profile-ink); font-size:9.5px; }
.profile-v80-gift small { margin-top:3px; color:#718999; font-size:8px; }
.profile-v80-gift-empty { grid-column:1/-1; display:grid; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:2px 10px; min-height:72px; padding:10px; border:1px dashed #a9cfe8; border-radius:14px; color:#648398; }
.profile-v80-gift-empty span { grid-row:1/3; display:grid; place-items:center; width:34px; height:34px; border-radius:11px; background:#e9f6ff; color:#368fd2; }
.profile-v80-gift-empty b { font-size:9px; }
.profile-v80-gift-empty small { font-size:7px; }
.profile-v80-code { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:62px; padding:12px 15px; }
.profile-v80-code small,.profile-v80-code b { display:block; }
.profile-v80-code small { color:var(--profile-muted); font-size:7px; font-weight:900; letter-spacing:.08em; }
.profile-v80-code b { margin-top:3px; color:var(--profile-ink); font:900 17px/1.1 system-ui; letter-spacing:.06em; }
.profile-v80-code button { display:flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; border:1px solid #b7ddf7; border-radius:11px; background:#f3faff; color:#187fd2; font-size:8px; font-weight:850; }
.profile-v80-code button svg { width:16px; height:16px; }
.profile-v80-team .social-team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-v80-team .social-team-pokemon { min-height:66px; grid-template-columns:54px minmax(0,1fr); }
.profile-v80-team .social-team-pokemon > span { width:54px; height:54px; }
.profile-v80-team .social-team-pokemon b { font-size:10px; }
.profile-v80-team .social-team-pokemon em { font-size:7px; }
.profile-v80-social-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.profile-v80-invite { display:grid; gap:10px; }
.profile-v80-invite > header { padding:15px 16px; border:1px solid var(--profile-line); border-radius:18px; background:linear-gradient(135deg,#f4fbff,#f8f5ff); }
.profile-v80-invite > header small,.profile-v80-invite > header b { display:block; }
.profile-v80-invite > header small { color:#6b70c8; font-size:7px; font-weight:900; letter-spacing:.09em; }
.profile-v80-invite > header b { margin-top:4px; color:var(--profile-ink); font-size:15px; }
.profile-v80-invite > header p { margin:5px 0 0; color:var(--profile-muted); font-size:8px; }
.profile-v80-social-card { align-content:start; }
.profile-v80 .trainer-avatar-picker { z-index:25; }
.profile-v80-appearance-picker { display:grid; gap:14px; margin-top:-3px; padding:17px; }
.profile-v80-appearance-picker > header { margin-bottom:0; }
.profile-v80-appearance-picker > div { display:block; }
.profile-v80-appearance-picker > div > small { display:block; margin:0 0 7px 2px; color:#638398; font-size:8px; font-weight:900; letter-spacing:.09em; }
.profile-v80-scene-picker > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.profile-v80-scene-picker button { position:relative; overflow:hidden; padding:0; border:2px solid transparent; border-radius:15px; background:#eaf4fa; text-align:left; }
.profile-v80-scene-picker button:hover { transform:translateY(-2px); border-color:#8ecdf3; }
.profile-v80-scene-picker button.is-selected { border-color:#168fe0; box-shadow:0 0 0 3px rgba(22,143,224,.12); }
.profile-v80-scene-picker img { display:block; width:100%; aspect-ratio:2.15; object-fit:cover; }
.profile-v80-scene-picker button > span { display:block; min-height:45px; padding:7px 9px; background:#fff; }
.profile-v80-scene-picker button b,.profile-v80-scene-picker button small { display:block; }
.profile-v80-scene-picker button b { color:var(--profile-ink); font-size:9px; }
.profile-v80-scene-picker button small { margin-top:2px; overflow:hidden; color:#718999; font-size:6.5px; text-overflow:ellipsis; white-space:nowrap; }
.profile-v80-scene-picker button > i { display:none; position:absolute; top:7px; right:7px; width:23px; height:23px; place-items:center; border:2px solid #fff; border-radius:50%; background:#168fe0; color:#fff; font:900 12px/1 system-ui; font-style:normal; }
.profile-v80-scene-picker button.is-selected > i { display:grid; }
.profile-v80-avatar-picker > div { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:6px; }
.profile-v80-avatar-picker button { position:relative; aspect-ratio:1; padding:2px; border:2px solid transparent; border-radius:13px; background:#eaf6fc; }
.profile-v80-avatar-picker button.is-selected { border-color:#168fe0; }
.profile-v80-avatar-picker button > i { display:none; position:absolute; right:-2px; bottom:-2px; width:18px; height:18px; place-items:center; border:2px solid #fff; border-radius:50%; background:#168fe0; color:#fff; font:900 10px/1 system-ui; font-style:normal; }
.profile-v80-avatar-picker button.is-selected > i { display:grid; }
.profile-v80-gift-picker {
  position:fixed;
  z-index:300;
  inset:0;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(10,41,58,.43);
  backdrop-filter:blur(7px);
}
.profile-v80-gift-picker[hidden] { display:none; }
.profile-v80-gift-picker-card { width:min(530px,100%); max-height:100%; overflow:auto; padding:16px; border:1px solid rgba(255,255,255,.9); border-radius:22px; background:#f8fcff; box-shadow:0 22px 50px rgba(8,43,61,.3); }
.profile-v80-gift-picker-card > header { display:flex; justify-content:space-between; gap:16px; padding:2px 2px 12px; }
.profile-v80-gift-picker-card > header small,.profile-v80-gift-picker-card > header b { display:block; }
.profile-v80-gift-picker-card > header small { color:#7a5db1; font-size:7px; font-weight:900; letter-spacing:.08em; }
.profile-v80-gift-picker-card > header b { margin-top:4px; color:var(--profile-ink); font-size:18px; }
.profile-v80-gift-picker-card > header p { margin:5px 0 0; color:#718999; font-size:8px; }
.profile-v80-gift-picker-card > header button { width:36px; height:36px; border:1px solid #c9dce8; border-radius:12px; background:#fff; color:#47677b; font-size:20px; }
.profile-v80-gift-picker-card > div { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.profile-v80-gift-choice { display:grid; grid-template-columns:86px minmax(0,1fr); gap:10px; align-items:center; min-height:96px; overflow:hidden; padding:7px; border:1px solid #c9dce8; border-radius:16px; background:#fff; color:var(--profile-ink); text-align:left; }
.profile-v80-gift-choice:hover { transform:translateY(-2px); border-color:#9d7ed1; box-shadow:0 9px 18px rgba(76,87,137,.11); }
.profile-v80-gift-choice img { width:82px; height:82px; border-radius:12px; object-fit:cover; }
.profile-v80-gift-choice b,.profile-v80-gift-choice small { display:block; }
.profile-v80-gift-choice b { font-size:10px; }
.profile-v80-gift-choice small { margin-top:5px; color:#718999; font-size:7px; line-height:1.3; }
.profile-v80-gift-picker-card > footer { margin-top:12px; color:#718999; font-size:8px; text-align:center; }
.profile-v80-gift-picker-card > footer b { color:#8354c6; }

html[data-game-theme="dark"] .profile-v80 { --profile-ink:#e7f5ff; --profile-muted:#8caabb; --profile-line:rgba(110,180,211,.2); --profile-card:rgba(12,42,57,.88); }
html[data-game-theme="dark"] .profile-v80 :is(.profile-v80-achievement,.profile-v80-gift,.profile-v80-gift-choice) { background:#12394d; }
html[data-game-theme="dark"] .profile-v80 :is(.profile-v80-gift > span,.profile-v80-gift-picker-card) { background:#0f3346; }
html[data-game-theme="dark"] .profile-v80-tabs button.is-active { background:#163f57; color:#7bc4ff; }
html[data-game-theme="dark"] .profile-v80-stats article > svg { background:#173e52; }

@media (max-width:800px) {
  .game-screen .side-panel.is-social-profile { width:auto; max-height:none; }
  .game-screen .side-panel.is-social-profile #sidePanelContent { max-height:100%; }
  .profile-v80 { gap:9px; }
  .profile-v80-hero { grid-template-columns:minmax(0,1fr) 154px; min-height:214px; border-radius:19px; }
  .profile-v80-identity { grid-template-columns:70px minmax(0,1fr); gap:10px; padding:15px 10px 15px 14px; }
  .profile-v80 .social-profile-trainer { width:68px; height:68px; border-width:3px; }
  .profile-v80 .social-profile-avatar-button { width:70px; height:91px; }
  .profile-v80 .social-profile-avatar-button > i { min-width:62px; height:21px; font-size:7px; }
  .profile-v80-identity small { font-size:8.5px; }
  .profile-v80-identity h2 { margin:4px 0 6px; font-size:25px; }
  .profile-v80-identity p { display:grid; gap:4px; }
  .profile-v80-identity p span { width:max-content; max-width:100%; min-height:24px; padding:0 7px; font-size:9px; }
  .profile-v80-stage { height:204px; }
  .profile-v80-stage-pokemon { right:0; bottom:9px; width:90px; height:90px; }
  .profile-v80-edit { top:8px; right:8px; min-height:34px; padding:5px 8px; }
  .profile-v80-edit span { display:none; }
  .profile-v80-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profile-v80-actions button { min-height:48px; border-bottom:1px solid var(--profile-line); }
  .profile-v80-actions button:nth-child(3) { border-right:0; }
  .profile-v80-actions button:nth-last-child(-n+2) { border-bottom:0; }
  .profile-v80-actions small { display:none; }
  .profile-v80-tabs,.profile-v80--visitor .profile-v80-tabs { grid-template-columns:repeat(5,minmax(86px,1fr)); overflow:auto; }
  .profile-v80--visitor .profile-v80-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profile-v80-tabs button { min-width:86px; min-height:40px; }
  .profile-v80-stats { grid-template-columns:1fr 1fr; }
  .profile-v80-stats article { min-height:70px; }
  .profile-v80-overview-grid,.profile-v80-social-grid { grid-template-columns:1fr; }
  .profile-v80-lead,.profile-v80-progress { min-height:160px; }
  .profile-v80-achievements { grid-template-columns:1fr 1fr; }
  .profile-v80-achievement-panel.is-compact .profile-v80-achievements { grid-template-columns:1fr; }
  .profile-v80-achievement-panel.is-compact .profile-v80-achievement:nth-child(4) { display:grid; }
  .profile-v80-showcase > div { grid-template-columns:1fr 1fr; }
  .profile-v80-gift img { height:112px; }
  .profile-v80-team .social-team-grid { grid-template-columns:1fr 1fr; }
  .profile-v80-code { min-height:58px; }
  .profile-v80-code b { font-size:15px; }
  .profile-v80-gift-picker { padding:8px; }
  .profile-v80-gift-picker-card { padding:12px; border-radius:18px; }
  .profile-v80-gift-picker-card > div { grid-template-columns:1fr; }
  .profile-v80-avatar-picker > div { grid-template-columns:repeat(6,minmax(0,1fr)); }
}

@media (max-width:410px) {
  .profile-v80-hero { grid-template-columns:minmax(0,1fr) 125px; min-height:196px; }
  .profile-v80-identity { grid-template-columns:60px minmax(0,1fr); }
  .profile-v80 .social-profile-trainer { width:58px; height:58px; }
  .profile-v80 .social-profile-avatar-button { width:60px; }
  .profile-v80-identity h2 { font-size:21px; }
  .profile-v80-stage { height:186px; }
  .profile-v80-stage-pokemon { width:76px; height:76px; }
  .profile-v80-scene-picker > div { grid-template-columns:1fr; }
  .profile-v80-achievements,.profile-v80-team .social-team-grid { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce) {
  .profile-v80-gift,.profile-v80-gift img,.profile-v80-gift-choice { transition:none!important; }
  .profile-v80-gift:hover,.profile-v80-gift:nth-child(even):hover,.profile-v80-gift-choice:hover { transform:none!important; }
}

/* v2.9.44 — separate profile scene layers, Pokedex companion art and raster icon system */
.game-screen .side-panel.is-social-profile {
  width:min(980px,calc(100vw - 72px));
  max-height:min(88vh,880px);
}
.game-screen .side-panel.is-social-profile #sidePanelContent {
  max-height:calc(min(88vh,880px) - 32px);
}
.profile-v80 { gap:9px; }
.profile-v80-icon {
  display:block;
  width:24px;
  height:24px;
  flex:0 0 auto;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 2px 7px rgba(29,76,111,.14);
}
.profile-v80-hero {
  grid-template-columns:minmax(0,1fr) 280px;
  min-height:216px;
  border-radius:22px;
  background-image:var(--profile-scene,url('/assets/v2.9.60/maps/kanto/oak-lab-district.webp'));
  background-position:center 58%;
  background-size:cover;
  box-shadow:inset 0 -58px 70px rgba(8,52,72,.28),0 10px 25px rgba(28,89,119,.14);
}
.profile-v80-hero::before { background:linear-gradient(90deg,rgba(5,35,61,.84),rgba(7,48,72,.34) 45%,rgba(9,43,55,.03) 73%); }
.profile-v80-identity { grid-template-columns:88px minmax(0,1fr); gap:13px; padding:18px 20px; }
.profile-v80 .social-profile-trainer { width:84px; height:84px; }
.profile-v80 .social-profile-avatar-button { width:88px; height:106px; }
.profile-v80 .social-profile-avatar-button > i { min-width:72px; height:23px; font-size:8px; }
.profile-v80 .social-profile-avatar-button > i .profile-v80-icon { width:14px; height:14px; }
.profile-v80-identity small { font-size:9px; }
.profile-v80-identity h2 { margin:4px 0 7px; font-size:clamp(27px,3vw,36px); }
.profile-v80-identity p span { min-height:26px; font-size:10px; }
.profile-v80-identity p .profile-v80-icon { width:17px; height:17px; }
.profile-v80-stage { height:210px; }
.profile-v82-trainer {
  position:absolute;
  right:78px;
  bottom:25px;
  width:124px;
  height:124px;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 9px 5px rgba(0,31,45,.25));
}
.profile-v80-stage-pokemon {
  right:2px;
  bottom:10px;
  width:78px;
  height:78px;
  overflow:visible;
  background:transparent;
  filter:drop-shadow(0 8px 5px rgba(0,31,45,.34));
}
.profile-v80-stage-pokemon img { transform:none!important; }
.profile-v80-stage-empty { right:10px; bottom:22px; }
.profile-v80-edit { top:10px; right:10px; min-height:38px; padding:5px 10px; }
.game-screen .side-panel.is-social-profile .profile-v80-edit { position:absolute; z-index:4; }
.profile-v80-edit > .profile-v80-icon { width:23px; height:23px; }
.profile-v80-actions button { min-height:50px; }
.profile-v80-actions button > .profile-v80-icon { width:30px; height:30px; }
.profile-v80-actions b { font-size:11px; }
.profile-v80-tabs { gap:6px; }
.profile-v80-tabs button { min-height:42px; }
.profile-v80-tabs button > .profile-v80-icon { width:28px; height:28px; }
.profile-v80-tabs button b { font-size:10.5px; }
.profile-v80-stats article {
  grid-template-columns:40px minmax(0,1fr);
  min-height:68px;
  padding:9px 10px;
  border-radius:15px;
}
.profile-v80-stats article > .profile-v80-icon { width:38px; height:38px; padding:0; border-radius:12px; }
.profile-v80-stats article > span.is-level { width:38px; height:38px; font-size:17px; }
.profile-v80-stats small { font-size:8px; }
.profile-v80-stats b { font-size:19px; }
.profile-v80-stats em { margin-top:3px; font-size:7.5px; }
.profile-v80-showcase { gap:7px; padding:11px 12px; }
.profile-v80-showcase > header small { font-size:8px; }
.profile-v80-showcase > header b { font-size:13px; }
.profile-v80-showcase > header > button { min-height:30px; font-size:8px; }
.profile-v80-showcase > header > button .profile-v80-icon { width:20px; height:20px; }
.profile-v80-gift { grid-template-columns:64px minmax(0,1fr); grid-template-rows:1fr; align-items:center; min-height:70px; }
.profile-v80-gift img { width:64px; height:68px; object-fit:cover; }
.profile-v80-gift > span { align-self:stretch; display:grid; align-content:center; padding:6px 7px; }
.profile-v80-gift b { font-size:9px; }
.profile-v80-overview-grid { grid-template-columns:1.02fr .9fr 1.08fr; gap:8px; align-items:stretch; }
.profile-v80-lead {
  grid-template-columns:78px minmax(0,1fr);
  gap:7px 10px;
  min-height:148px;
  padding:10px;
}
.profile-v80-lead-art { border-radius:15px; }
.profile-v80-lead-emoji,.profile-v80-lead-emoji img { width:72px; height:72px; }
.profile-v80-lead-emoji { overflow:visible; background:transparent; }
.profile-v80-lead-emoji img { transform:none!important; }
.profile-v80-lead small { font-size:7.5px; }
.profile-v80-lead h3 { font-size:15px; }
.profile-v80-lead p { margin-bottom:7px; font-size:9px; }
.profile-v80-lead > button { min-height:29px; font-size:8px; }
.profile-v80-progress { min-height:148px; padding:11px; }
.profile-v80-progress header small { font-size:7.5px; }
.profile-v80-progress header b { font-size:13px; }
.profile-v80-progress > div { margin-top:6px; }
.profile-v80-progress > div span { grid-template-columns:22px minmax(0,1fr) auto; min-height:25px; gap:6px; }
.profile-v80-progress span > .profile-v80-icon { width:20px; height:20px; }
.profile-v80-progress span b { font-size:8.5px; }
.profile-v80-progress span em { font-size:10px; }
.profile-v80-achievement-panel { padding:11px; }
.profile-v80-achievement-panel > header small { font-size:7.5px; }
.profile-v80-achievement-panel > header b { font-size:13px; }
.profile-v80-achievements { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.profile-v80-achievement { grid-template-columns:44px minmax(0,1fr); min-height:64px; padding:7px; border-radius:14px; }
.profile-v80-achievement > span {
  width:42px;
  height:42px;
  clip-path:none;
  border-radius:13px;
  background:transparent!important;
  filter:none;
}
.profile-v80-achievement > span .profile-v80-icon { width:42px; height:42px; border-radius:13px; }
.profile-v80-achievement b { font-size:9px; }
.profile-v80-achievement small { margin-top:2px; font-size:7px; }
.profile-v80-achievement-panel.is-compact { min-height:148px; gap:6px; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievements { grid-template-columns:1fr; gap:3px; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievement { grid-template-columns:34px minmax(0,1fr); min-height:33px; padding:3px 5px; border-radius:10px; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievement:nth-child(n+4) { display:none; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievement > span,
.profile-v80-achievement-panel.is-compact .profile-v80-achievement > span .profile-v80-icon { width:32px; height:32px; border-radius:9px; }
.profile-v80-achievement-panel.is-compact .profile-v80-achievement small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-v80-achievement.is-rose,.profile-v80-achievement.is-amber,.profile-v80-achievement.is-aqua,.profile-v80-achievement.is-red { background:#fbfdff; }
.profile-v80-code { min-height:54px; padding:9px 13px; }
.profile-v80-code button .profile-v80-icon { width:22px; height:22px; }
.profile-v80-code b { font-size:16px; }
.profile-v80-appearance-picker { gap:11px; padding:14px; }
.profile-v80-scene-picker img { aspect-ratio:2.4; }

@media (max-width:800px) {
  .game-screen .side-panel.is-social-profile { width:auto; max-height:none; }
  .game-screen .side-panel.is-social-profile #sidePanelContent { max-height:100%; }
  .profile-v80-hero { grid-template-columns:minmax(0,1fr) 164px; min-height:196px; }
  .profile-v80-stage { height:190px; }
  .profile-v82-trainer { right:55px; bottom:30px; width:104px; height:104px; }
  .profile-v80-stage-pokemon { width:68px; height:68px; }
  .profile-v80-overview-grid { grid-template-columns:1fr; }
  .profile-v80-achievement-panel.is-compact .profile-v80-achievements { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profile-v80-achievement-panel.is-compact .profile-v80-achievement { grid-template-columns:32px minmax(0,1fr); }
  .profile-v80-showcase > div { display:flex; overflow-x:auto; scrollbar-width:none; scroll-snap-type:x mandatory; padding-bottom:3px; }
  .profile-v80-showcase > div::-webkit-scrollbar { display:none; }
  .profile-v80-gift { flex:0 0 150px; scroll-snap-align:start; }
}

@media (max-width:470px) {
  .profile-v80-hero { grid-template-columns:minmax(0,1fr) 128px; min-height:184px; }
  .profile-v80-identity { grid-template-columns:62px minmax(0,1fr); gap:8px; padding:12px 8px 12px 12px; }
  .profile-v80 .social-profile-trainer { width:58px; height:58px; }
  .profile-v80 .social-profile-avatar-button { width:62px; height:79px; }
  .profile-v80-identity h2 { font-size:21px; }
  .profile-v80-identity p span { min-height:23px; font-size:8px; }
  .profile-v80-stage { height:178px; }
  .profile-v82-trainer { right:44px; bottom:43px; width:78px; height:78px; }
  .profile-v80-stage-pokemon { right:-3px; width:56px; height:56px; }
  .profile-v80-edit { top:7px; right:7px; }
  .profile-v80-stats article { grid-template-columns:36px minmax(0,1fr); }
  .profile-v80-stats article > .profile-v80-icon { width:34px; height:34px; }
  .profile-v80-achievement-panel.is-compact .profile-v80-achievements { grid-template-columns:1fr; }
  .profile-v80-achievements { grid-template-columns:1fr 1fr; }
}

/* v2.9.45 profile navigation and Pokedex team polish */
.profile-v80-tabs {
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
}
.profile-v80-tabs::-webkit-scrollbar { display:none; }
.profile-v80-tabs button { scroll-snap-align:center; }
.profile-v80-tabs button:focus-visible {
  outline:3px solid rgba(37,147,229,.28);
  outline-offset:2px;
}
.profile-v80-team .social-team-pokemon > span {
  overflow:hidden;
  border:1px solid rgba(96,151,183,.18);
  background:radial-gradient(circle at 50% 42%,#fff 0 28%,#e8f6ff 72%,#d6ebf7 100%);
}
.profile-v80-team-art,
.profile-v80-team-art img {
  display:block;
  width:52px;
  height:52px;
  object-fit:contain;
}
.profile-v80-team-art img { transform:scale(var(--profile-scale,1)); }
.profile-v80-team .social-team-pokemon.is-lead {
  border-color:#6db8ec;
  background:linear-gradient(135deg,#f8fdff,#eef8ff);
  box-shadow:inset 3px 0 #2f9ce9;
}
.profile-v80-team .social-team-pokemon small { font-size:7px; letter-spacing:.06em; }
.profile-v80-team .social-team-pokemon b { font-size:11px; }
.profile-v80-team .social-team-pokemon em { font-size:8px; }
.profile-v80-team > header p { margin:3px 0 0; color:var(--profile-muted); font-size:8px; }
.profile-v80-team .social-team-grid { margin-top:4px; }
.profile-v80 .social-profile-tab-card,
.profile-v80 .profile-v80-social-card,
.profile-v80 .referral-program-card {
  border-color:var(--profile-line);
  border-radius:18px;
  background:var(--profile-card);
  box-shadow:0 7px 18px rgba(38,90,120,.05);
}

@media (max-width:470px) {
  .profile-v80-tabs,
  .profile-v80--visitor .profile-v80-tabs {
    grid-template-columns:repeat(5,minmax(94px,1fr));
    padding-bottom:0;
  }
  .profile-v80--visitor .profile-v80-tabs { grid-template-columns:repeat(3,minmax(108px,1fr)); }
  .profile-v80-team .social-team-grid { grid-template-columns:1fr 1fr; }
  .profile-v80-team .social-team-pokemon { grid-template-columns:48px minmax(0,1fr); min-height:60px; }
  .profile-v80-team .social-team-pokemon > span,
  .profile-v80-team-art,
  .profile-v80-team-art img { width:46px; height:46px; }
}

@media (max-width:360px) {
  .profile-v80-team .social-team-grid { grid-template-columns:1fr; }
}
