/* Scoped profile surfaces; shared screens retain their existing design. */
body #more .menu-grid { grid-auto-rows:1fr; }
body #more .menu-grid button.premium-service {
  --service-accent:#edc96d;--service-glow:#dba942;
  position:relative;isolation:isolate;display:grid!important;
  grid-template-rows:72px minmax(38px,auto) minmax(34px,1fr) minmax(20px,auto);
  align-items:start!important;justify-content:stretch!important;gap:6px!important;
  min-width:0;min-height:240px;height:100%;padding:14px!important;
  border:1px solid #655637;border-radius:17px;
  background:radial-gradient(ellipse at 25% 0%,color-mix(in srgb,var(--service-glow) 16%,transparent),transparent 65%),linear-gradient(145deg,#18191e,#090b0f 70%);
  box-shadow:inset 0 1px #fff2,0 5px 12px #0003;text-align:center;color:#f6f3ed;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
body #more .menu-grid button[data-service-tone="violet"] { --service-accent:#d1a4fc;--service-glow:#a363e5;border-color:#544262; }
body #more .menu-grid button.premium-service::before { content:'';position:absolute;z-index:-1;top:12px;left:50%;transform:translateX(-50%);width:76px;height:76px;border-radius:20px;background:radial-gradient(ellipse,color-mix(in srgb,var(--service-glow) 18%,transparent),transparent 70%); }
body #more .menu-grid button.premium-service::after { content:none;display:none; }
body #more .menu-grid .service-emblem { display:block;justify-self:center;width:70px;height:70px;padding:0;margin:0;filter:drop-shadow(0 3px 3px #0009); }
body #more .menu-grid .service-emblem svg { display:block;width:100%;height:100%; }
body #more .menu-grid button.premium-service>b { display:block;align-self:center;width:100%;margin:0;padding:0;font-size:14px;line-height:1.35;font-weight:700;overflow-wrap:anywhere; }
body #more .menu-grid button.premium-service>span,body #more .menu-grid button.premium-service>small { display:block;margin:0;padding:0;font-size:12px;line-height:1.45;color:#bcb7c4;font-weight:400;overflow-wrap:anywhere; }
body #more .menu-grid button.premium-service>.service-status { align-self:end;color:var(--service-accent);font-size:11px;line-height:1.4; }
body #more .menu-grid button.premium-service>.service-status[hidden] { display:block!important;visibility:hidden; }
body #more .menu-grid button.premium-service:active { border-color:var(--service-accent);box-shadow:inset 0 0 22px color-mix(in srgb,var(--service-glow) 24%,transparent),0 0 12px color-mix(in srgb,var(--service-glow) 12%,transparent); }
body #more .menu-grid button.premium-service:focus-visible { outline:2px solid var(--service-accent);outline-offset:3px; }
body #more .menu-grid button.premium-service:disabled { opacity:.6;filter:saturate(.45);cursor:not-allowed; }
body #more .menu-grid button.service-live { border-color:var(--service-accent);box-shadow:inset 0 0 20px #dfb34812,0 0 12px #dfb34816; }
body #more .menu-grid button[data-service-notice="Есть награда"] .service-status::before { content:'';display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:5px;background:#ffe08d;box-shadow:0 0 6px #edc96d; }
body.on-profile-tab .topbar { display:none!important; }
body.on-profile-tab { background:radial-gradient(ellipse at 100% 35%,#331b3a26,transparent 55%),#06080a; }
#more { --pp-gold:#f5ce67; --pp-muted:#aaa9b3; }
#more .pp-title { display:flex;align-items:center;justify-content:center;position:relative;min-height:58px;margin-bottom:14px; }
#more .pp-title h1 { font-size:26px;margin:0;color:#f9f9fb; }
#more .pp-title button { position:absolute;right:0;background:none;border:0;width:44px;height:44px;padding:8px; }
#more [data-emblem] { display:inline-flex;flex:none;width:32px;height:32px; }
#more svg { width:100%;height:100%;filter:drop-shadow(0 2px 3px #0009); }
#more button { color:inherit;font-family:inherit;cursor:pointer; }
#more button:focus-visible,#more summary:focus-visible { outline:2px solid var(--pp-gold);outline-offset:3px; }
#more button:disabled { cursor:default;opacity:.45; }
#more .pp-hero { display:grid;grid-template-columns:88px minmax(0,1fr);gap:15px 13px;align-items:center;margin-bottom:22px; }
#more .pp-avatar { position:relative;aspect-ratio:1;border:3px solid #ffe497;border-radius:50%;background:radial-gradient(circle at 30% 20%,#64616c,#15151e 45%,#020303 75%);box-shadow:0 0 0 3px #74551c,0 0 0 6px #d49b2845,0 0 22px #e4b54355; }
#more .pp-avatar [data-emblem] { width:100%;height:100%;padding:6px; }
#more .pp-avatar b { position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);padding:3px 9px;background:linear-gradient(130deg,#292719,#080a0c);border:2px solid #f1d270;border-radius:8px;color:white;font-size:17px;box-shadow:0 2px 7px #000; }
#more .pp-identity { min-width:0; }
#more .pp-identity h2 { margin:0 0 4px; }
#more .pp-identity>small { color:var(--pp-gold);font-size:11px; }
#more .pp-identity>small:empty { display:none; }
#more #ppCopy { display:block;background:none;border:0;padding:5px 0;min-height:36px;color:var(--pp-muted);font-size:13px;text-align:left; }
#more #profileStats { font-size:11px;color:var(--pp-muted);margin:2px 0;line-height:1.5; }
#more .pp-balances { grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px; }
#more .pp-balances button { display:flex;align-items:center;gap:6px;min-width:0;min-height:48px;padding:7px;border:1px solid #9c875257;border-radius:11px;background:linear-gradient(140deg,#1c1b14,#07090c 70%); }
#more .pp-balances button:nth-child(2) { border-color:#9668b66b;background:linear-gradient(140deg,#22162d,#08090d 70%); }
#more .pp-balances b { flex:1;min-width:0;font-size:clamp(11px,3.2vw,16px);overflow-wrap:anywhere; }
#more .pp-balances [data-emblem],#more .pp-coin { width:24px;height:24px; }
#more .pp-coin { display:grid;place-items:center;flex:none;border:2px solid #ffe591;border-radius:50%;background:linear-gradient(130deg,#fff0ad,#eaaa24,#7e4c0c);color:#fff8d8;box-shadow:0 0 8px #e2a82b44;font-weight:800; }
#more .pp-balances i { font-style:normal;color:var(--pp-gold);font-size:22px;line-height:25px;text-align:center;width:23px;border:1px solid #c69d41;border-radius:5px;flex:none; }
#more .pp-balances button:nth-child(2) i { color:#c780ff;border-color:#ad50ed; }
#more .pp-panel { border:1px solid #71634b80;border-radius:15px;background:radial-gradient(ellipse at 100% 0,#34313b35,transparent 65%),linear-gradient(125deg,#111415,#080a0c 65%);margin-bottom:12px;min-width:0;overflow:hidden; }
#more .pp-rank { display:grid;grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 10px;align-items:center;gap:8px;padding:10px;width:100%;text-align:left; }
#more .pp-rank>[data-emblem] { width:44px;height:52px; }
#more .pp-rank strong { color:var(--pp-gold);font-size:11px;letter-spacing:.4px; }
#more .pp-rank small { display:block;font-size:10px;color:var(--pp-muted);margin-top:4px; }
#more .pp-xp b { font-size:12px; }
#more .pp-xp i,#more .pp-medal i { display:block;height:5px;background:#292932;border-radius:8px;margin-top:8px;overflow:hidden; }
#more .pp-xp em,#more .pp-medal em { display:block;height:100%;background:linear-gradient(90deg,#edae37,#ffe38b);border-radius:inherit; }
#more .pp-shortcuts { display:flex;gap:8px;overflow-x:auto;padding:4px 3px 12px;margin:0 -3px 3px;scrollbar-width:thin;scrollbar-color:#6d5732 transparent; }
#more .pp-shortcuts button { display:flex;flex:0 0 70px;min-height:83px;align-items:center;justify-content:center;flex-direction:column;gap:6px;border:1px solid #65616e88;border-radius:12px;background:linear-gradient(150deg,#24242e,#080b0e 75%);padding:9px 3px;font-size:11px; }
#more .pp-shortcuts [data-emblem] { width:35px;height:35px; }
#more .pp-shortcuts small { font-size:8px;margin-top:-4px; }
#more .pp-shortcuts .pp-highlight { border-color:#ffe49b;background:radial-gradient(ellipse at top,#68501c60,#10110e 80%);box-shadow:0 0 8px #ecc35a55,inset 0 0 9px #d5a54620; }
#more .pp-collection-grid { display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px;width:100%; }
#more .pp-heading { display:flex;align-items:center;gap:6px;width:100%;padding:10px;border:0;border-bottom:1px solid #ffffff09;background:none;text-align:left;min-height:44px; }
#more .pp-heading b { flex:1;min-width:0;font-size:10px;line-height:1.3;font-weight:650; }
#more .pp-heading [data-emblem] { width:20px;height:20px; }
#more .pp-heading strong { font-size:13px;color:var(--pp-gold); }
#more .pp-heading small { font-size:10px;color:var(--pp-muted); }
#more .pp-heart { color:#ff646c;font-size:21px; }
#more .pp-collection { padding:12px 9px;display:flex;flex-wrap:wrap;justify-content:center;gap:12px; }
#more .pp-ring { width:115px;aspect-ratio:1;flex:none;border-radius:50%;padding:7px;background:conic-gradient(from -90deg,#f7cf6c 0%,#ffe69d calc(var(--progress)*.7),#a553ff var(--progress),#292333 var(--progress),#292333 100%);box-shadow:0 0 15px #f4cf6520; }
#more .pp-ring>div { display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(circle,#171717,#080a0b 75%);border-radius:50%;height:100%;text-align:center; }
#more .pp-ring strong { color:#fff;font-size:31px;line-height:1.1; }
#more .pp-ring span { font-size:10px;line-height:1.5;color:#d9d8de; }
#more .pp-rarities { width:100%;display:grid;gap:4px; }
#more .pp-rarities>div { display:flex;align-items:center;gap:4px;min-width:0; }
#more .pp-rarities>div>span { width:22px;height:22px;flex:none;border:1px solid currentColor;border-radius:5px; }
#more .pp-rarities small { flex:1;font-size:10px; }
#more .pp-rarities b { font-size:10px;white-space:nowrap;color:#eeedf0; }
#more .pp-rarities b span { color:#a6a5ae; }
#more .pp-favorite { border-color:#88559e77;background:radial-gradient(ellipse at 60% 30%,#62397844,transparent 70%),#090b0e; }
#more .pp-favorite-car { width:100%;display:flex;flex-direction:column;gap:9px;background:none;border:0;padding:0 9px 13px;text-align:left; }
#more .pp-favorite-car img { width:100%;height:clamp(150px,48vw,240px);object-fit:contain;filter:drop-shadow(0 9px 12px #000); }
#more .pp-favorite-car strong { font-size:13px;line-height:1.4;overflow-wrap:anywhere; }
#more .pp-favorite-car>span,#more .pp-favorite-car>small { align-self:flex-start;border:1px solid currentColor;border-radius:5px;padding:3px 6px;font-size:10px;max-width:100%;overflow-wrap:anywhere; }
#more .pp-achievements { display:flex;gap:12px;overflow-x:auto;padding:12px;scrollbar-width:thin;scrollbar-color:#665333 transparent; }
#more .pp-medal { display:flex;flex:0 0 90px;flex-direction:column;align-items:center;text-align:center;background:none;border:0;padding:2px; }
#more .pp-medal svg { width:78px;height:84px; }
#more .pp-medal.is-earned svg { filter:drop-shadow(0 0 6px #d6ac4d40); }
#more .pp-medal b { font-size:11px;line-height:1.3;min-height:30px;margin-top:5px; }
#more .pp-medal i { width:100%; }
#more .pp-medal small { font-size:10px;margin-top:4px;color:#ddd0b4; }
#more .pp-medal>span { font-size:9px;color:var(--pp-muted);margin-top:3px; }
#more .pp-medal { --medal:#9198a4;--medal-glow:transparent;--medal-progress:#78818d;--medal-name:#c6c8ce; }
#more .pp-medal[data-tier="2"] { --medal:#edc75e;--medal-glow:#dda92a50;--medal-progress:#edc75e;--medal-name:#f4d882; }
#more .pp-medal[data-tier="3"] { --medal:#c26bff;--medal-glow:#ac43ff70;--medal-progress:#b94fff;--medal-name:#dfa6ff; }
#more .pp-medal[data-tier="4"] { --medal:#fa6570;--medal-glow:#f13c4d55;--medal-progress:#e84e58;--medal-name:#ffafb4; }
#more .pp-medal[data-tier="5"] { --medal:#fff1c2;--medal-glow:#fff2ce70;--medal-progress:#f8dc91;--medal-name:#fff0c0; }
#more .pp-medal:not(.is-earned) { --medal:#858b95;--medal-glow:transparent;--medal-progress:#69727d;--medal-name:#a0a4ac; }
#more .pp-medal:not(.is-earned) svg { filter:grayscale(.8) saturate(.3);opacity:.72; }
#more .pp-medal.is-earned svg { filter:drop-shadow(0 0 7px var(--medal-glow)); }
#more .pp-medal.is-earned:not([data-tier]) { --medal:#edc75e;--medal-glow:#dda92a50;--medal-progress:#edc75e;--medal-name:#f4d882; }
#more .pp-medal svg defs linearGradient stop:nth-child(2) { stop-color:var(--medal)!important; }
#more .pp-medal svg defs linearGradient stop:nth-child(3) { stop-color:color-mix(in srgb,var(--medal) 45%,#16151d)!important; }
#more .pp-medal[data-tier="1"] svg { filter:grayscale(.8) saturate(.35); }
#more .pp-medal.is-earned[data-tier="1"] svg { filter:grayscale(.65) saturate(.5) drop-shadow(0 0 5px #c6d0df44); }
#more .pp-medal b { color:var(--medal-name); }
#more .pp-medal i em { background:linear-gradient(90deg,var(--medal-progress),color-mix(in srgb,var(--medal-progress) 65%,white)); }
#more .pp-medal .pp-tier { min-height:0;margin:4px 0 0;padding:2px 7px;border:1px solid color-mix(in srgb,var(--medal) 72%,transparent);border-radius:999px;color:var(--medal);background:color-mix(in srgb,var(--medal) 10%,transparent);font-size:8px;letter-spacing:.08em; }
#more .pp-medal:not(.is-earned) .pp-tier { filter:grayscale(.8);opacity:.65; }
#more .pp-source { margin:0 12px 4px;color:var(--pp-muted);font-size:10px; }
#more .pp-event { display:flex;align-items:center;gap:9px;padding:10px 0;margin:0 12px;border-top:1px solid #ffffff0a; }
#more .pp-event>span { width:42px;height:36px;flex:none;border:1px solid #ae64d9;border-radius:9px;background:radial-gradient(ellipse,#6b23994d,#08090d);padding:4px; }
#more .pp-event>div { flex:1;min-width:0; }
#more .pp-event b { font-size:12px;display:block; }
#more .pp-event small { font-size:11px;color:var(--pp-muted); }
#more .pp-event time { font-size:10px;color:var(--pp-muted);max-width:70px;text-align:right; }
#more .pp-empty { display:block;margin:0;width:100%;padding:20px 10px;font-size:12px;line-height:1.6;color:var(--pp-muted);background:none;border:0;text-align:center; }
#more .pp-extras { border:1px solid #393630;border-radius:13px;margin:16px 0;padding:0 12px; }
#more .pp-extras summary { padding:14px 0;font-size:12px;cursor:pointer;color:var(--pp-gold); }
.pp-capital { display:grid;gap:8px;padding:12px;overflow-wrap:anywhere; }
body.on-profile-tab .bottom-nav.premium-nav { border-color:#ad873b80!important;box-shadow:0 -4px 22px #b38a1b12!important; }
body.on-profile-tab .bottom-nav.premium-nav button[data-tab="more"] { border:1px solid #b38c3955!important;border-radius:17px;background:linear-gradient(135deg,#5a451c50,#090b0c)!important; }
@media(min-width:650px) {
  #more .pp-hero { grid-template-columns:105px minmax(0,1fr) minmax(190px,.7fr); }
  #more .pp-balances { grid-column:auto;grid-template-columns:1fr; }
  #more .pp-shortcuts button { flex:1;min-height:92px;font-size:13px; }
  #more .pp-collection { flex-wrap:nowrap;align-items:center; }
  #more .pp-rarities { flex:1; }
  #more .pp-favorite-car img { height:210px; }
  #more .pp-heading b { font-size:13px; }
  #more .pp-rank strong { font-size:15px; }
  #more .pp-medal { flex:1;min-width:95px;max-width:150px; }
}
@media(max-width:350px) { #more .pp-collection-grid { grid-template-columns:1fr; } #more .pp-collection { flex-wrap:nowrap;align-items:center; } #more .pp-favorite-car img { height:160px; } }
/* Full-width native Codex modal and balanced rarity tiles. */
#modal .sheet.codex-sheet { width:100%!important;max-width:min(720px,100vw)!important;padding-inline:clamp(10px,3vw,22px)!important;overflow-x:hidden; }
#modal .codex-sheet #modalBody,#modal .codex-shell { width:100%;max-width:none;min-width:0; }
#modal .codex-shell { padding-top:32px; }
#modal .codex-rarity-stats { width:100%;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px; }
#modal .codex-rarity-stats button { min-width:0;width:100%;min-height:56px;padding:8px 4px; }
#modal .codex-rarity-stats span { white-space:normal;overflow-wrap:anywhere;font-size:clamp(9px,2.8vw,12px);line-height:1.2; }
#modal .codex-rarity-stats b { font-size:11px; }
#modal .codex-rarity-stats button:last-child:nth-child(3n + 1) { grid-column:span 3; }
#modal .codex-tools,#modal .codex-tools .garage-search,#modal .codex-tools input,#modal .codex-tools .garage-filter-row,#modal .codex-tools select { width:100%;min-width:0;max-width:100%; }
#modal .codex-tools .garage-filter-row { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
#modal .codex-grid { width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(min-width:360px) { #modal .codex-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } #modal .codex-card:last-child:nth-child(3n + 1) { grid-column:span 3; } }
@media(max-width:359px) { #modal .codex-card:last-child:nth-child(2n + 1) { grid-column:span 2; } }
@media(prefers-reduced-motion:reduce) { #more *,#more *::before,#more *::after { animation:none!important;transition:none!important; } }

#more .pp-medal.is-claimed{opacity:.66}
#more .pp-medal.is-available{filter:drop-shadow(0 0 6px #d6ac4d25)}
#more .pp-medal.is-available>span:last-child{color:#ffdc79}
#more .pp-medal.is-progress>span:last-child{color:var(--pp-muted)}
