:root{
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* Accents */
  --accent:#FF2A2A;
  --accent2:#2BD9FF;
  --neon:#2EFF92;

  /* Dark theme defaults */
  --bg:#0D0D0D;
  --panel:#1A1A1A;
  --text:#F5F5F5;
  --muted:#A0A0A0;
  --muted2:#7A7A7A;

  --text-strong: rgba(245,245,245,0.92);
  --text-mid: rgba(245,245,245,0.68);
  --text-low: rgba(245,245,245,0.55);

  --surface: rgba(26,26,26,0.92);
  --surface2: rgba(26,26,26,0.88);
  --overlay: rgba(255,255,255,0.06);
  --overlay2: rgba(255,255,255,0.10);
  --divider: rgba(255,255,255,0.04);

  --stroke: rgba(255,255,255,0.05);
  --stroke2: rgba(255,255,255,0.04);
  --highlight: rgba(255,255,255,0.05);
  --top-line: rgba(255,255,255,0.12);

  --shadow-xl: rgba(0,0,0,0.62);
  --shadow-lg: rgba(0,0,0,0.55);
  --shadow-md: rgba(0,0,0,0.45);
  --shadow-sm: rgba(0,0,0,0.30);

  --header-bg: rgba(13,13,13,0.80);
  --tabbar-bg: rgba(26,26,26,0.88);
  --tab-active-bg: rgba(255,255,255,0.08);
  --toast-bg: rgba(26,26,26,0.88);

  --cta-bg: #FFFFFF;
  --cta-text: #0D0D0D;

  --bg-top-glow: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.035), transparent 58%);
  --bg-vignette: radial-gradient(120% 120% at 50% 60%, rgba(0,0,0,0.00), rgba(0,0,0,0.85));
  --hero-glow: radial-gradient(circle, rgba(255,255,255,0.10), rgba(255,255,255,0.0) 70%);
}

html[data-theme="light"]{
  --bg:#F5F6F8;
  --panel: rgba(255,255,255,0.92);
  --text:#0D0D0D;
  --muted: rgba(13,13,13,0.60);
  --muted2: rgba(13,13,13,0.42);

  --text-strong: rgba(13,13,13,0.92);
  --text-mid: rgba(13,13,13,0.68);
  --text-low: rgba(13,13,13,0.55);

  --surface: rgba(255,255,255,0.92);
  --surface2: rgba(255,255,255,0.86);
  --overlay: rgba(13,13,13,0.06);
  --overlay2: rgba(13,13,13,0.10);
  --divider: rgba(13,13,13,0.06);

  --stroke: rgba(13,13,13,0.08);
  --stroke2: rgba(13,13,13,0.06);
  --highlight: rgba(255,255,255,0.70);
  --top-line: rgba(13,13,13,0.10);

  --shadow-xl: rgba(13,13,13,0.18);
  --shadow-lg: rgba(13,13,13,0.12);
  --shadow-md: rgba(13,13,13,0.10);
  --shadow-sm: rgba(13,13,13,0.08);

  --header-bg: rgba(245,246,248,0.80);
  --tabbar-bg: rgba(255,255,255,0.86);
  --tab-active-bg: rgba(13,13,13,0.08);
  --toast-bg: rgba(255,255,255,0.86);

  --cta-bg: #0D0D0D;
  --cta-text: #FFFFFF;

  --bg-top-glow: radial-gradient(120% 80% at 50% 0%, rgba(13,13,13,0.04), transparent 58%);
  --bg-vignette: radial-gradient(120% 120% at 50% 60%, rgba(0,0,0,0.00), rgba(13,13,13,0.08));
  --hero-glow: radial-gradient(circle, rgba(13,13,13,0.08), rgba(13,13,13,0.0) 70%);
}
*{box-sizing:border-box}
[hidden]{display:none !important;}
[hidden]{display:none !important;}
html,body{
  height:100%;
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
}
button,
a,
.tab,
.friends-tab,
.seg__btn,
.filters-btn,
.filters-reset,
.filters-apply,
.search-clear,
.profile-btn,
.balance-pill__action,
.earn-btn,
.friends-cta,
.car-card,
.filter-chip,
.filter-chip-active,
.car-fav,
.car-dismantle,
.modal__close{
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html{-webkit-text-size-adjust:100%;color-scheme:dark}
html[data-theme="light"]{color-scheme:light}
body{
  margin:0;
  background-color:var(--bg);
  color:var(--text);
  font: 15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
body.is-modal-open{overflow:hidden}
body.theme-transition,
body.theme-transition *{
  transition:
    background-color 220ms cubic-bezier(0.2,0.8,0.2,1),
    color 220ms cubic-bezier(0.2,0.8,0.2,1),
    border-color 220ms cubic-bezier(0.2,0.8,0.2,1),
    box-shadow 220ms cubic-bezier(0.2,0.8,0.2,1),
    fill 220ms cubic-bezier(0.2,0.8,0.2,1),
    stroke 220ms cubic-bezier(0.2,0.8,0.2,1);
}
body.theme-transition .bg,
body.theme-transition .top,
body.theme-transition .boot{
  transition:
    background 220ms cubic-bezier(0.2,0.8,0.2,1),
    border-color 220ms cubic-bezier(0.2,0.8,0.2,1),
    color 220ms cubic-bezier(0.2,0.8,0.2,1);
}
.theme-fade{
  position:fixed;
  inset:0;
  background: var(--bg);
  opacity:0;
  pointer-events:none;
  transition: opacity 220ms cubic-bezier(0.2,0.8,0.2,1);
  z-index:2000;
}
.theme-fade.is-on{
  opacity:1;
}
img{display:block;max-width:100%}

.boot{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  background: var(--bg-top-glow), var(--bg-vignette), var(--bg);
  padding:24px 16px;
  transition: opacity .22s ease, transform .22s ease, filter .22s ease;
}
.boot.is-hidden{
  opacity:0;
  transform:scale(1.01);
  filter: blur(2px);
  pointer-events:none;
}
.boot__inner{
  width:min(380px, 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.boot__sticker{
  width:150px;
  height:150px;
  filter: drop-shadow(0 14px 40px var(--shadow-lg));
}
.boot__sticker svg{width:100%;height:100%;display:block}
.boot__title{
  margin-top:14px;
  font-weight:900;
  letter-spacing:.10em;
}
.boot__sub{
  margin-top:8px;
  color:var(--muted);
  font-weight:800;
  font-size:13px;
  line-height:1.3;
  min-height:18px;
}
.boot__bar{
  margin-top:16px;
  width:min(240px, 100%);
  height:2px;
  border-radius:999px;
  background:var(--overlay2);
  overflow:hidden;
}
.boot__bar > span{
  display:block;
  width:44%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, transparent, var(--text-strong), transparent);
  transform: translateX(-120%);
  animation: bootShimmer 1.15s ease-in-out infinite;
  opacity:0.75;
}
@keyframes bootShimmer{
  0%{ transform: translateX(-120%); }
  100%{ transform: translateX(240%); }
}

.bg{
  position:fixed;
  inset:0;
  background: var(--bg-top-glow), var(--bg-vignette), var(--bg);
  z-index:-1;
}
.bg::before{
  content:none;
}

.top{
  position:sticky;
  top:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 14px;
  padding-top: calc(12px + var(--safe-t));
  border-bottom:1px solid var(--stroke2);
  background:var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index:5;
}
.ttl{flex:1;min-width:0}
.ttl__name{font-weight:800;letter-spacing:.08em;text-align:center}

.wrap{
  max-width:720px;
  margin:0 auto;
  padding:16px 16px calc(90px + var(--safe-b));
}

.screen[hidden]{
  display:none;
}

.profile{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:6px 0 16px;
  position:relative;
}
.profile-actions{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 2px;
  margin-bottom:10px;
}
.profile-btn{
  width:40px;
  height:40px;
  border-radius:999px;
  border:0;
  padding:0;
  display:grid;
  place-items:center;
  background:var(--overlay);
  color:var(--text-strong);
  box-shadow:
    0 10px 24px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.profile-btn:disabled{
  opacity:1;
}
.profile-btn--help{
  background:var(--overlay);
  border:2px solid rgba(46,255,146,0.95);
  box-shadow:
    0 10px 24px var(--shadow-md),
    0 0 18px rgba(46,255,146,0.22),
    inset 0 1px 0 var(--highlight);
}
.profile-btn__q{
  font-weight:900;
  font-size:18px;
  line-height:1;
  color:var(--text-strong);
  transform:translateY(-0.5px);
}
.profile-btn--settings{
  background:var(--overlay);
}
.profile-btn__icon{
  width:22px;
  height:22px;
  display:block;
  color:var(--text-strong);
}
.avatar{
  width:110px;height:110px;
  border-radius:50%;
  border:0;
  background:var(--panel);
  overflow:hidden;
  display:grid;place-items:center;
  position:relative;
}
.avatar img{
  width:100%;height:100%;
  object-fit:cover;
  display:none;
}
.avatar span{
  font-size:36px;
  font-weight:800;
  color:var(--muted);
}
.name{
  font-size:26px;
  font-weight:800;
}
.username{
  color:var(--muted);
  font-size:14px;
}



.card{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  padding:18px;
  margin:0 0 14px;

  /* Minimal premium plates like reference */
  border:none;
  background: var(--surface);

  box-shadow:
    0 18px 50px var(--shadow-lg),
    inset 0 1px 0 var(--highlight);

  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.card::after{
  /* тонкий верхний highlight (чтобы не было ощущения "рамки") */
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  top:0;
  height:1px;
  background: linear-gradient(90deg, transparent, var(--top-line), transparent);
  opacity:0.8;
  pointer-events:none;
}
.card > *{position:relative}

.card--primary{
  border-radius:24px;
  background: var(--surface);
}
.card--secondary{
  background: var(--surface);
  box-shadow:
    0 16px 46px var(--shadow-lg),
    inset 0 1px 0 var(--highlight);
}

.card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
}
.card__title{
  font-weight:800;
  font-size:16px;
  letter-spacing:0.02em;
  margin:0;
}

/* Press feedback */
.tab,
.modal__close,
.car-fav-icon-btn,
.search-clear,
.profile-btn{
  transition: transform 120ms ease;
  will-change: transform;
}
.tab.is-pressed,
.modal__close.is-pressed,
.car-fav-icon-btn.is-pressed,
.search-clear.is-pressed,
.profile-btn.is-pressed{
  transform: scale(0.93);
  transition-duration: 90ms;
}

.balance-pill__action,
.earn-btn,
.friends-cta,
.filters-btn,
.filters-reset,
.filters-apply,
.seg__btn,
.friends-tab,
.filter-chip-active,
.car-fav,
.car-dismantle,
.collection-more{
  transition: transform 120ms ease;
  will-change: transform;
}
.balance-pill__action.is-pressed,
.earn-btn.is-pressed,
.friends-cta.is-pressed,
.filters-btn.is-pressed,
.filters-reset.is-pressed,
.filters-apply.is-pressed,
.seg__btn.is-pressed,
.friends-tab.is-pressed,
.filter-chip-active.is-pressed,
.car-fav.is-pressed,
.car-dismantle.is-pressed,
.collection-more.is-pressed{
  transform: scale(0.98);
  transition-duration: 90ms;
}

.car-card{
  transition: transform 120ms ease;
  will-change: transform;
}
.car-card.is-pressed{
  transform: scale(0.99);
  transition-duration: 90ms;
}

.balance-pill{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:48px;
}
.balance-pill__badge{
  width:44px;
  height:44px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:transparent;
  color: var(--text-strong);
  font-weight:900;
  letter-spacing:0.02em;
  flex:0 0 auto;
  overflow:visible;
}
.balance-pill__sticker{
  width:44px;
  height:44px;
  display:block;
}
.balance-pill__sticker svg{
  width:100%;
  height:100%;
  display:block;
}
.balance-pill__fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:1;
  font-weight:900;
  opacity:0.92;
  user-select:none;
}
.balance-pill__badge{
  position:relative;
}
.balance-pill__main{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  flex:1 1 auto;
}
.balance-pill__value{
  color: var(--text-strong);
  font-size:22px;
  font-weight:800;
  font-variant-numeric: tabular-nums;
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.balance-pill__sub{
  margin-top:2px;
  color: var(--text-low);
  font-size:12px;
  font-weight:700;
  letter-spacing:0.02em;
}
.balance-pill__action{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  background: var(--overlay2);
  color: var(--text-strong);
  font-weight:800;
  font-size:13px;
  letter-spacing:0.01em;
  box-shadow: inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.balance-pill__action:disabled{
  opacity:0.40;
  cursor:default;
}

.earn-card{
  padding:18px;
}

.profile-hub{
  padding:18px;
}
.profile-hub__divider{
  height:1px;
  margin:14px 0;
  background: var(--divider);
}
.profile-hub__earn .earn-btn{
  margin-top:12px;
}
.earn-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.earn-text{
  flex:1 1 auto;
  min-width:0;
}
.earn-title{
  font-size:20px;
  font-weight:900;
  letter-spacing:0.01em;
  line-height:1.15;
}
.earn-sub{
  margin-top:6px;
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.earn-sticker-wrap{
  width:56px;
  height:56px;
  flex:0 0 auto;
  position:relative;
  display:grid;
  place-items:center;
}
.earn-sticker{
  width:56px;
  height:56px;
}
.earn-sticker svg{
  width:100%;
  height:100%;
  display:block;
}
.earn-sticker__fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:16px;
  font-weight:900;
  opacity:0.85;
  user-select:none;
}
.earn-box{
  margin-top:14px;
  padding:0;
  border-radius:18px;
  background: var(--overlay);
  display:grid;
  grid-template-rows: 1fr 1fr;
  min-height:108px;
  overflow:hidden;
}
.earn-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:center;
  padding:0 16px;
}
.earn-row + .earn-row{
  border-top:1px solid var(--divider);
}
.earn-label{
  color:var(--text-mid);
  font-weight:800;
  font-size:13px;
  text-align:left;
  justify-self:start;
}
.earn-value{
  color:var(--text-strong);
  font-weight:900;
  font-size:18px;
  font-variant-numeric: tabular-nums;
  text-align:right;
  justify-self:end;
}
.earn-btn{
  width:100%;
  margin-top:14px;
  height:52px;
  border-radius:18px;
  border:0;
  background: var(--overlay2);
  color: var(--text-strong);
  font-weight:900;
  font-size:16px;
  letter-spacing:0.01em;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.earn-btn:disabled{
  opacity:0.45;
}

.tiles{
  display:grid;
  gap:10px;
}
.tiles--3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tiles--2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 380px){
  .tiles--3{grid-template-columns: repeat(2, minmax(0, 1fr))}
}
.tile{
  background:var(--overlay);
  border:none;
  border-radius:18px;
  padding:12px 12px 10px;
  box-shadow: none;
}
.tile__label{
  color: var(--text-low);
  font-size:12px;
  font-weight:700;
}
.tile__value{
  margin-top:6px;
  font-size:16px;
  font-weight:800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tabbar{
  position:fixed;
  left:10px;
  right:10px;
  bottom: calc(10px + var(--safe-b));
  background:var(--tabbar-bg);
  border:none;
  border-radius:22px;
  overflow:hidden;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  padding:10px;
  gap:8px;
  box-shadow:
    0 18px 44px var(--shadow-xl),
    inset 0 1px 0 var(--highlight);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.tabbar-highlight{
  position:absolute;
  top:0;
  left:0;
  height:0;
  width:0;
  border-radius:16px;
  background:var(--tab-active-bg);
  box-shadow:
    0 10px 26px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
  transform: translate3d(0, 0, 0);
  transition: transform 280ms cubic-bezier(0.2,0.9,0.2,1), width 280ms cubic-bezier(0.2,0.9,0.2,1);
  z-index:0;
  opacity:0;
  pointer-events:none;
}
.tab{
  height:42px;
  border-radius:16px;
  border:none;
  background:transparent;
  color:var(--text-low);
  font-weight:700;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:1;
}
.tab.is-active{
  color:var(--text-strong);
}
.tab__icon{
  width:18px;
  height:18px;
  stroke:currentColor;
  stroke-width:1.6;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tab__icon--profile{
  width:19px;
  height:19px;
  fill:currentColor;
  stroke:none;
}
.tabIcon{
  width:20px;
  height:20px;
  display:block;
  opacity:0.96;
}
.tab svg{
  width:20px;
  height:20px;
}

.toast{
  position:fixed;
  left:50%;
  bottom: calc(84px + var(--safe-b));
  transform:translateX(-50%);
  background:var(--toast-bg);
  border:none;
  border-radius:12px;
  padding:10px 12px;
  color:var(--muted);
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.toast.is-success{
  color:var(--text-strong);
}
.toast.is-error{
  color:#fff;
  background: rgba(255,42,42,0.85);
}
.toast.is-reward{
  color:var(--text);
  font-weight:700;
  font-size:14px;
  padding:12px 14px;
  background: rgba(46,255,146,0.16);
  border:1px solid rgba(46,255,146,0.35);
  box-shadow: 0 10px 28px rgba(46,255,146,0.18);
}
.toast.is-on{
  opacity:1;
  transform:translateX(-50%) translateY(-4px);
}

/* Settings modal */
.modal[hidden]{
  display:none;
}
.modal{
  position:fixed;
  inset:0;
  z-index:900;
}
.modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.45);
}
html[data-theme="light"] .modal__overlay{
  background: rgba(13,13,13,0.25);
}
.modal__sheet{
  position:absolute;
  left:16px;
  right:16px;
  bottom: calc(16px + var(--safe-b));
  border-radius:22px;
  background: var(--surface2);
  box-shadow:
    0 22px 60px var(--shadow-xl),
    inset 0 1px 0 var(--highlight);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding:16px;
}
.modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.modal__title{
  font-weight:900;
  font-size:16px;
}
.modal__close{
  width:34px;
  height:34px;
  border-radius:999px;
  border:0;
  background: var(--overlay);
  color: var(--text-strong);
  font-weight:900;
  font-size:18px;
  line-height:1;
  display:grid;
  place-items:center;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.modal__section{
  margin-top:12px;
}
.modal__label{
  color: var(--muted);
  font-weight:800;
  font-size:12px;
  letter-spacing:0.02em;
  margin-bottom:8px;
}
.seg{
  display:flex;
  gap:8px;
  padding:8px;
  border-radius:16px;
  background: var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  position:relative;
  overflow:hidden;
}
.seg__highlight{
  position:absolute;
  top:0;
  left:0;
  height:0;
  width:0;
  border-radius:12px;
  background: var(--tab-active-bg);
  box-shadow: inset 0 1px 0 var(--highlight);
  transform: translate3d(0, 0, 0);
  transition: transform 260ms cubic-bezier(0.2,0.9,0.2,1), width 260ms cubic-bezier(0.2,0.9,0.2,1);
  z-index:0;
  opacity:0;
  pointer-events:none;
}
.seg__btn{
  flex:1 1 0;
  height:34px;
  border-radius:12px;
  border:1px solid transparent;
  background: transparent;
  color: var(--text-mid);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  position:relative;
  z-index:1;
}
.seg__btn.is-active{
  color: var(--text-strong);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.modal__foot{
  margin-top:12px;
  text-align:center;
  color: var(--muted2);
  font-weight:800;
  font-size:12px;
}

/* Friends screen */
.friends{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.friends-tabs{
  display:flex;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface2);
  box-shadow:
    0 16px 36px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  margin-bottom:0;
  position:relative;
  overflow:hidden;
}
.friends-tabs__highlight{
  position:absolute;
  top:0;
  left:0;
  height:0;
  width:0;
  border-radius:12px;
  background:var(--tab-active-bg);
  box-shadow: inset 0 1px 0 var(--highlight);
  transform: translate3d(0, 0, 0);
  transition: transform 280ms cubic-bezier(0.2,0.9,0.2,1), width 280ms cubic-bezier(0.2,0.9,0.2,1);
  z-index:0;
  opacity:0;
  pointer-events:none;
}
.friends-tab{
  flex:1 1 0;
  height:30px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--text-mid);
  font-weight:800;
  font-size:12px;
  letter-spacing:0.01em;
  cursor:pointer;
  position:relative;
  z-index:1;
}
.friends-tab.is-active{
  color:var(--text-strong);
}
.friends-view[hidden]{display:none}
.friends-hero{
  position:relative;
  display:grid;
  place-items:center;
  margin-top:0;
  margin-bottom:12px;
}
.friends-hero::before{
  content:"";
  position:absolute;
  width:200px;
  height:200px;
  border-radius:50%;
  background:var(--hero-glow);
  filter: blur(18px);
  opacity:0.55;
  pointer-events:none;
}
.friends-sticker{
  width:210px;
  height:210px;
}
.friends-sticker svg{
  width:100%;
  height:100%;
  display:block;
}
.friends-sticker__fallback{
  position:absolute;
  width:210px;
  height:210px;
  display:grid;
  place-items:center;
  font-size:30px;
  font-weight:900;
  color:var(--text-mid);
}
.friends-title{
  font-size:17px;
  font-weight:800;
  text-align:center;
  letter-spacing:0.01em;
  margin-top:0;
}
.friends-sub{
  margin-top:8px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  line-height:1.3;
}
.friends-rule{
  padding:18px;
  margin-top:22px;
  margin-bottom:30px;
}
.friends-rule__text{
  font-size:16px;
  font-weight:900;
  line-height:1.35;
  text-align:center;
}
.friends-rule__sub{
  margin-top:8px;
  font-size:12px;
  color:var(--text-low);
  font-weight:700;
  line-height:1.4;
  text-align:center;
}
.friends-cta{
  width:100%;
  height:48px;
  border-radius:16px;
  border:0;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-weight:900;
  font-size:15px;
  letter-spacing:0.01em;
  box-shadow:0 8px 18px var(--shadow-sm);
  cursor:pointer;
  transition:transform .08s ease, box-shadow .15s ease;
  margin-bottom:30px;
}
.friends-cta:disabled{
  opacity:0.55;
  cursor:default;
}
.friends-cta:active{
  transform:scale(0.98);
}
.friends-stats{
  border-radius:18px;
  background:var(--overlay);
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.friends-stat-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:2px 0;
}
.friends-stat-label{
  color:var(--text-low);
  font-weight:800;
  font-size:13px;
}
.friends-stat-value{
  color:var(--text-strong);
  font-weight:900;
  font-size:19px;
  font-variant-numeric: tabular-nums;
}
.friends-note{
  margin-top:10px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  line-height:1.35;
  opacity:0.9;
}
.friends-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 2px 2px;
}
.friends-list-title{
  font-size:18px;
  font-weight:900;
}
.friends-list-count{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.friends-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.friend-pill{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:18px;
  background:var(--surface);
  box-shadow:
    0 12px 30px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.friend-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:var(--overlay);
  color:var(--text-mid);
  font-weight:800;
  font-size:14px;
  flex:0 0 auto;
  position:relative;
}
.friend-avatar__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.friend-avatar.has-img{
  background:transparent;
}
.friend-avatar.has-img .friend-avatar__img{
  display:block;
}
.friend-avatar__fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
}
.friend-avatar.has-img .friend-avatar__fallback{
  display:none;
}
.friend-name{
  font-weight:800;
  color:var(--text-strong);
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.friend-status{
  margin-left:auto;
  font-size:12px;
  font-weight:800;
  color:var(--text-low);
}
.friend-status.is-active{
  color:var(--text-strong);
}
.friends-empty{
  margin-top:8px;
  padding:14px;
  border-radius:18px;
  background:var(--overlay);
  text-align:center;
}
.friends-empty__media{
  position:relative;
  width:144px;
  height:144px;
  margin:0 auto 10px;
  display:grid;
  place-items:center;
}
.friends-empty__glow{
  position:absolute;
  inset:-18px;
  border-radius:999px;
  background:radial-gradient(circle at 50% 45%, rgba(255,255,255,0.18), rgba(255,255,255,0) 62%);
  filter:blur(14px);
  opacity:0.7;
  pointer-events:none;
}
.friends-empty__sticker{
  width:132px;
  height:132px;
  display:block;
}
.friends-empty__fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:44px;
  opacity:0.92;
  pointer-events:none;
}
.friends-empty__text{
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  margin-bottom:12px;
}

/* Games screen */
.games{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.games-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.game-card{
  width:100%;
  margin:0;
  padding:18px;
  border:0;
  text-align:left;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}
.game-card:focus-visible{
  outline:2px solid rgba(255,255,255,0.18);
  outline-offset:2px;
}
.game-card__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.game-badge{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  font-weight:900;
  font-size:11px;
  letter-spacing:0.02em;
}
.game-badge.is-new{
  background: rgba(147, 51, 234, 0.18);
  color: rgba(233, 213, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.game-online{
  color:var(--text-mid);
  font-weight:800;
  font-size:12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.game-online::after{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background: rgba(46,255,146,0.9);
  box-shadow: 0 0 10px rgba(46,255,146,0.32);
}
.game-card__body{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}
.game-card__text{
  min-width:0;
  flex:1 1 auto;
}
.game-card__title{
  font-size:22px;
  font-weight:900;
  letter-spacing:0.01em;
  color:var(--text-strong);
}
.game-card__sub{
  margin-top:8px;
  font-size:13px;
  font-weight:700;
  color:var(--text-low);
  max-width:34ch;
}
.game-card__art{
  position:relative;
  flex:0 0 auto;
  width:132px;
  height:74px;
}
.orb{
  position:absolute;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-weight:900;
  color:#fff;
  box-shadow: 0 16px 30px rgba(0,0,0,0.35);
}
.orb__txt{
  font-size:14px;
  letter-spacing:0.02em;
  transform: translateY(0.5px);
}
.orb--blue{
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.28), rgba(0,212,255,0.75));
}
.orb--red{
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), rgba(255,42,42,0.92));
}
.orb--lg{
  width:64px;
  height:64px;
  right:0;
  bottom:0;
}
.orb--sm{
  width:42px;
  height:42px;
  right:64px;
  top:2px;
  opacity:0.92;
}
.orb:not(.orb--lg):not(.orb--sm){
  width:46px;
  height:46px;
  left:0;
  top:10px;
  opacity:0.95;
}
.game-soon{
  position:absolute;
  top:14px;
  right:14px;
  height:22px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color:var(--text-mid);
  font-weight:900;
  font-size:11px;
  letter-spacing:0.02em;
}
.game-card__art--tile{
  width:92px;
  height:74px;
}
.tile{
  position:absolute;
  right:0;
  top:0;
  width:74px;
  height:74px;
  border-radius:20px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.22), rgba(255,255,255,0) 52%),
    linear-gradient(140deg, rgba(147, 51, 234, 0.22), rgba(147, 51, 234, 0.08));
  box-shadow:
    0 18px 40px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.game-card__art--play{
  width:92px;
  height:74px;
}
.play{
  position:absolute;
  right:6px;
  top:8px;
  width:64px;
  height:64px;
  border-radius:20px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), rgba(255,255,255,0) 56%),
    linear-gradient(140deg, rgba(46,255,146,0.22), rgba(46,255,146,0.08));
  box-shadow:
    0 18px 40px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.play::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:0;
  height:0;
  border-left:16px solid rgba(255,255,255,0.92);
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}
.games-detail[hidden]{display:none}
.games-detail__head{
  display:flex;
  align-items:center;
  gap:12px;
  margin:6px 0 14px;
}
.games-back{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.games-detail__title{
  font-size:18px;
  font-weight:900;
  letter-spacing:0.02em;
  color:var(--text-strong);
}
.games-detail__card{
  margin:0;
}
.games-detail__badge{
  font-weight:900;
  font-size:11px;
  letter-spacing:0.12em;
  color:var(--text-low);
}
.games-detail__desc{
  margin-top:10px;
  font-size:14px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.35;
}
.games-detail__cta{
  margin-top:16px;
  width:100%;
  height:44px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--surface2);
  color:var(--text-mid);
  font-weight:900;
  font-size:13px;
  cursor:not-allowed;
}

/* Collection screen */
.collection{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.collection-tabs{
  display:flex;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface2);
  box-shadow:
    0 16px 36px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.collection-tab{
  flex:1 1 0;
  height:30px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--text-mid);
  font-weight:800;
  font-size:12px;
  letter-spacing:0.01em;
  cursor:pointer;
}
.collection-tab.is-active{
  background:var(--tab-active-bg);
  color:var(--text-strong);
  border-color:var(--stroke);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.collection-view[hidden]{display:none}
.collection-toolbar{
  margin-top:2px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.search-box{
  margin-top:2px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:18px;
  background:var(--surface);
  box-shadow:
    0 14px 32px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.search-icon{
  width:20px;
  height:20px;
  color:var(--text-mid);
  flex:0 0 auto;
}
.search-input{
  border:0;
  outline:none;
  background:transparent;
  color:var(--text-strong);
  font-size:15px;
  font-weight:700;
  width:100%;
}
.search-clear{
  width:24px;
  height:24px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--overlay2);
  color:var(--text-mid);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  line-height:0;
  cursor:pointer;
  flex:0 0 auto;
  -webkit-appearance:none;
  appearance:none;
}
.search-clear svg{
  width:12px;
  height:12px;
  display:block;
}
.search-clear:active{
  transform:scale(0.96);
}
.filters-btn{
  height:30px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  flex:0 0 auto;
  white-space:nowrap;
}
.filters-btn:active{
  transform:scale(0.98);
}
.search-input::placeholder{
  color:var(--text-low);
}
.search-hint-row{
  margin-top:6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.search-hint{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.search-sort{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.sort-chip{
  height:26px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--overlay2);
  color:var(--text-strong);
  font-weight:800;
  font-size:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  cursor:pointer;
}
.sort-chip.is-active{
  background:var(--surface);
  border-color:var(--stroke);
}
.sort-chip:active{
  transform:scale(0.98);
}
.search-loading{
  margin-top:14px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.search-idle{
  margin-top:36px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:14px;
}
.search-idle__sticker{
  width:min(360px, 82vw);
  height:min(360px, 82vw);
  margin-top:16px;
}
.search-idle__sticker svg{width:100%;height:100%;display:block}
.search-idle__title{
  font-size:14px;
  font-weight:800;
}
.search-idle__sub{
  color:var(--text-low);
  font-size:12px;
  font-weight:700;
}
.search-results{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.search-actions{
  margin-top:12px;
  display:flex;
}
.filter-chips{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.filter-chip-active{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--surface);
  color:var(--text-strong);
  font-weight:800;
  font-size:12px;
}
.filter-chip-active__close{
  width:16px;
  height:16px;
  border-radius:999px;
  border:0;
  background:var(--overlay2);
  color:var(--text-strong);
  display:grid;
  place-items:center;
  font-size:12px;
  line-height:1;
}
.search-more{
  width:100%;
  height:44px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--surface);
  color:var(--text-strong);
  font-weight:800;
  font-size:13px;
  box-shadow:
    0 10px 24px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
  transition: transform 0.12s ease;
}
.search-more:active{
  transform: scale(0.98);
}
.search-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface);
  box-shadow:
    0 12px 30px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.search-thumb{
  width:46px;
  height:46px;
  border-radius:12px;
  overflow:hidden;
  background:var(--surface2);
  flex:0 0 auto;
  display:grid;
  place-items:center;
}
.search-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.search-body{
  min-width:0;
  flex:1 1 auto;
}
.search-name{
  font-size:14px;
  font-weight:800;
  color:var(--text-strong);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.search-meta{
  margin-top:2px;
  font-size:11px;
  color:var(--text-low);
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.search-owned{
  font-size:11px;
  font-weight:800;
  color:var(--text-mid);
  background:var(--overlay);
  padding:4px 8px;
  border-radius:999px;
  flex:0 0 auto;
}
.search-empty{
  margin-top:14px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.collection-mode{
  margin-top:6px;
  display:flex;
  gap:8px;
  padding:8px;
  border-radius:16px;
  background:var(--surface2);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.collection-mode__btn{
  flex:1 1 0;
  height:34px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text-mid);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
}
.collection-mode__btn.is-active{
  background:var(--tab-active-bg);
  color:var(--text-strong);
  border-color:var(--stroke);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.collection-filters{
  margin-top:10px;
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:2px;
}
.collection-filters::-webkit-scrollbar{display:none}
.filter-chip{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid transparent;
  background:var(--overlay);
  color:var(--text-mid);
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
  cursor:pointer;
}
.filter-chip.is-active{
  border-color:var(--stroke);
  background:var(--tab-active-bg);
  color:var(--text-strong);
}
.filter-chip.is-disabled{
  opacity:0.45;
  cursor:default;
}
.filter-chip__value{
  color:var(--text-strong);
  font-weight:900;
}
.collection-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
.collection-hint{
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  background:var(--overlay);
  text-align:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.collection-more{
  margin-top:14px;
  width:100%;
  height:44px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--surface);
  color:var(--text-strong);
  font-weight:800;
  font-size:13px;
  box-shadow:
    0 10px 24px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
  transition: transform 0.12s ease;
}
.collection-more:active{
  transform: scale(0.98);
}
.collection-more.is-loading{
  opacity:0.6;
  cursor:default;
  transform:none;
}
.car-card{
  background:var(--surface);
  border-radius:18px;
  padding:9px;
  display:flex;
  flex-direction:column;
  gap:5px;
  box-shadow:
    0 12px 30px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.car-card__thumb{
  position:relative;
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius:14px;
  overflow:hidden;
  background:var(--surface2);
}
.car-card__thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.car-card__meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  margin-top:1px;
}
.car-card__badge,
.car-card__rarity,
.car-card__dup,
.car-card__fav{
  position:static;
  background:var(--overlay);
  color:var(--text-low);
  font-size:9px;
  font-weight:800;
  padding:2px 5px;
  border-radius:8px;
  border:1px solid var(--stroke2);
  line-height:1.1;
}
.car-card__rarity{
  text-transform:uppercase;
  letter-spacing:0.02em;
}
.car-card__name{
  font-size:13px;
  font-weight:900;
  color:var(--text-strong);
  line-height:1.2;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.collection-empty{
  margin-top:16px;
  padding:16px;
  border-radius:18px;
  background:var(--overlay);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-align:center;
}
.collection-empty__text{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.collection-loader{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:22px;
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
html[data-theme="light"] .collection-loader{
  background: rgba(255,255,255,0.6);
}
.collection-loader[hidden]{display:none}
.collection-loader__sticker{
  width:130px;
  height:130px;
}
.collection-loader__text{
  color:var(--text-strong);
  font-size:13px;
  font-weight:800;
}

.modal__sheet--filters{
  height:82vh;
  display:flex;
  flex-direction:column;
}
.filters-body{
  overflow:auto;
  padding-bottom:12px;
}
.filters-section{
  margin-top:14px;
}
.filters-title{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
  letter-spacing:0.02em;
}
.filters-options{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.check-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
  font-weight:800;
  font-size:12px;
  cursor:pointer;
}
.check-pill input{
  width:14px;
  height:14px;
  margin:0;
}
.check-pill input:checked + span{
  color:var(--text-strong);
}
.filters-footer{
  display:flex;
  gap:10px;
  margin-top:auto;
  padding-top:10px;
  position:sticky;
  bottom:0;
  background:var(--surface2);
}
.filters-reset{
  flex:1 1 0;
  height:44px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
  font-weight:900;
  font-size:13px;
}
.filters-apply{
  flex:1 1 0;
  height:44px;
  border-radius:14px;
  border:0;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-weight:900;
  font-size:13px;
}

/* Car detail modal */
.car-modal[hidden]{display:none}
.car-sheet{
  max-height:80vh;
  overflow:auto;
}
.car-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.car-title{
  font-weight:900;
  font-size:16px;
  line-height:1.2;
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.car-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
.car-fav-icon-btn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:0;
  background: var(--overlay);
  color: var(--text-strong);
  display:grid;
  place-items:center;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.car-fav-icon-btn:disabled{
  opacity:0.35;
}
.car-fav-icon{
  width:18px;
  height:18px;
  display:block;
  stroke:currentColor;
  stroke-width:1.8;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.car-fav-icon-btn.is-active .car-fav-icon{
  fill:currentColor;
}
.car-preview{
  position:relative;
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius:18px;
  overflow:hidden;
  background:var(--surface2);
  display:grid;
  place-items:center;
  margin-bottom:10px;
}
.car-preview__img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:none;
}
.car-preview__loader{
  width:120px;
  height:120px;
}
.car-preview__loader svg{width:100%;height:100%;display:block}
.car-meta{
  color:var(--text-mid);
  font-size:12px;
  font-weight:800;
}
.car-owned{
  margin-top:6px;
  color:var(--text-strong);
  font-size:13px;
  font-weight:900;
}
.car-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
}
.car-fav,
.car-dismantle{
  flex:1 1 0;
  height:44px;
  border-radius:14px;
  border:0;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
}
.car-fav{
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 8px 18px var(--shadow-sm);
}
.car-fav:disabled{
  opacity:0.5;
  cursor:default;
  box-shadow:none;
}
.car-dismantle{
  background:var(--overlay2);
  color:var(--text-strong);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.car-dismantle.is-locked{
  opacity:0.55;
}
.car-dismantle:disabled{
  opacity:0.45;
  cursor:default;
}

/* Dismantle confirm modal */
.modal__sheet--dismantle{
  max-height:70vh;
}
.modal__sheet--limit{
  top:50%;
  left:20px;
  right:20px;
  bottom:auto;
  transform:translateY(-50%);
  text-align:center;
  padding:20px 18px 18px;
}
.limit-icon{
  width:48px;
  height:48px;
  margin:0 auto 12px;
  border-radius:50%;
  border:2px solid rgba(255,42,42,0.55);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:24px;
  background:rgba(255,42,42,0.12);
  box-shadow:0 12px 28px rgba(255,42,42,0.2);
}
.limit-title{
  font-size:16px;
  font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}
.limit-text{
  font-size:13px;
  color:var(--text-mid);
  line-height:1.4;
  margin-bottom:14px;
}
.limit-ok{
  width:100%;
  height:44px;
  border-radius:999px;
  border:1px solid var(--overlay2);
  background:var(--panel);
  color:var(--text);
  font-weight:700;
  font-size:14px;
}
.dismantle-text{
  color:var(--text-mid);
  font-size:13px;
  font-weight:800;
  line-height:1.45;
}
.dismantle-reward{
  margin-top:10px;
  font-size:18px;
  font-weight:900;
  color:var(--text-strong);
}
.dismantle-limit{
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  color:var(--muted2);
}
.dismantle-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
}
.dismantle-cancel,
.dismantle-confirm{
  flex:1 1 0;
  height:44px;
  border-radius:14px;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
}
.dismantle-cancel{
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
}
.dismantle-confirm{
  border:0;
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 8px 18px var(--shadow-sm);
}
.dismantle-confirm:disabled{
  opacity:0.5;
  box-shadow:none;
  cursor:default;
}

@media (max-width: 420px){
  .boot__sticker{width:140px;height:140px}
  .boot__title{font-size:14px}
  .boot__sub{font-size:12px}
  .wrap{padding:14px 14px calc(90px + var(--safe-b))}
  .avatar{width:102px;height:102px}
  .name{font-size:24px}
  .earn-title{font-size:18px}
  .earn-sticker-wrap,.earn-sticker{width:48px;height:48px}
  .earn-btn{height:50px;border-radius:16px}
  .friends{gap:10px}
  .friends-tabs{padding:9px 10px;margin-bottom:0}
  .friends-tab{height:28px}
  .friends-hero{margin-top:0;margin-bottom:10px}
  .friends-sticker,.friends-sticker__fallback{width:178px;height:178px}
  .friends-hero::before{width:168px;height:168px;filter: blur(14px)}
  .friends-title{font-size:16px}
  .friends-sub{font-size:12px}
  .friends-rule{margin-top:20px;margin-bottom:28px}
  .friends-cta{height:44px;border-radius:15px;margin-bottom:28px}
  .friends-stats{gap:10px;padding:12px 14px}
  .collection-tabs{padding:9px 10px}
  .collection-tab{height:28px}
  .filters-btn{height:28px;padding:0 10px;font-size:11px}
  .search-idle__sticker{width:260px;height:260px}
  .collection-loader__sticker{width:120px;height:120px}
  .collection-empty__sticker{width:110px;height:110px}
  .collection-grid{gap:10px}
  .car-card{border-radius:16px}
  .car-preview__loader{width:110px;height:110px}
}
