:root{
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --app-vh: 100vh;
  --kb: 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;}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
html,body{
  height:100%;
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
}
button,
a,
.tab,
.friends-tab,
.squads-tab,
.squads-back,
.seg__btn,
.filters-btn,
.filters-reset,
.filters-apply,
.search-clear,
.profile-btn,
.balance-pill__action,
.earn-btn,
.friends-cta,
.squad-btn,
.car-card,
.filter-chip,
.filter-chip-active,
.car-auction,
.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(120px + 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,
.squad-btn,
.squad-mine__manage,
.squads-tab,
.squads-back,
.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,
.squad-mine__manage.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-auction.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;
}

/* Squads */
.squad-card__pitch{
  color:var(--text-mid);
  font-weight:700;
  font-size:14px;
  line-height:1.4;
  margin-bottom:12px;
}
.squad-card__actions{
  display:grid;
  gap:10px;
}
.squad-card__name{
  font-weight:900;
  font-size:18px;
  letter-spacing:0.01em;
}
.squad-card__meta{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text-low);
  font-weight:800;
  font-size:12px;
  margin:6px 0 12px;
}
.squad-card__members{
  color:var(--text-strong);
  font-weight:900;
}
.squad-btn{
  width:100%;
  height:44px;
  border-radius:16px;
  border:0;
  font-weight:900;
  font-size:14px;
  letter-spacing:0.01em;
  cursor:pointer;
  transition:transform .08s ease, box-shadow .15s ease;
}
.squad-btn:disabled{
  opacity:0.6;
  cursor:default;
}
.squad-btn--primary{
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 8px 18px var(--shadow-sm);
}
.squad-btn--ghost{
  background:var(--overlay);
  color:var(--text-strong);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.squads{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.squads-head{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  column-gap:12px;
}
.squads-title{
  justify-self:center;
  text-align:center;
  font-weight:900;
  font-size:20px;
  letter-spacing:0.01em;
  line-height:1.1;
}
.squads-back{
  justify-self:start;
  width:40px;
  height:40px;
  border-radius:14px;
  border:0;
  background:var(--overlay);
  color:var(--text-strong);
  font-weight:900;
  font-size:18px;
  display:grid;
  place-items:center;
  box-shadow:
    0 10px 24px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.squads-create{
  justify-self:end;
  width:auto;
  min-width:40px;
  height:40px;
  padding:0 14px;
  font-size:13px;
  border-radius:14px;
  box-shadow:
    0 10px 24px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.squads-tabs{
  display:flex;
  gap:6px;
  padding:6px;
  border-radius:18px;
  background:var(--surface2);
  box-shadow:
    0 14px 34px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  border:1px solid var(--divider);
  position:relative;
  overflow:hidden;
}
.squads-tabs__highlight{
  position:absolute;
  top:0;
  left:0;
  height:0;
  width:0;
  border-radius:14px;
  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;
}
.squads-tab{
  flex:1 1 0;
  height:36px;
  border:1px solid transparent;
  border-radius:14px;
  background:transparent;
  color:var(--text-mid);
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  position:relative;
  z-index:1;
  white-space:nowrap;
}
.squads-tab.is-active{
  color:var(--text-strong);
}
.squads-find-card{
  padding:14px;
}
.squads-find__divider{
  height:1px;
  background:var(--divider);
  margin:12px 0;
  opacity:0.9;
  border-radius:1px;
}
.squads-metric-seg{
  margin-top:12px;
}
.squads-metric-seg .seg__btn{
  font-size:11px;
}
.squads-filters{
  margin-top:10px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px;
}
.squads-filters .filter-chip{
  width:100%;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
}
.squads-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:6px;
}
.squads-list--compact{
  gap:0;
  margin-top:0;
}
.squads-empty--in-card{
  margin-top:10px;
}
.squad-result{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 2px;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}
.squad-result + .squad-result{
  border-top:1px solid var(--divider);
}
.squad-result:focus-visible{
  outline:2px solid rgba(43,217,255,0.28);
  outline-offset:2px;
  border-radius:14px;
}
.squad-result__main{
  flex:1 1 auto;
  min-width:0;
}
.squad-result__top{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.squad-result__title{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:900;
  font-size:15px;
  letter-spacing:0.01em;
}
.squad-badge{
  display:inline-flex;
  align-items:center;
  height:20px;
  padding:0 8px;
  border-radius:999px;
  font-weight:900;
  font-size:10px;
  letter-spacing:0.02em;
  text-transform:uppercase;
  background:var(--overlay);
  color:var(--text-mid);
}
.squad-badge.is-open{
  background:rgba(46,255,146,0.12);
  color:rgba(46,255,146,0.95);
}
.squad-badge.is-request{
  background:rgba(255,196,46,0.12);
  color:rgba(255,196,46,0.95);
}
.squad-badge.is-mine{
  background:rgba(43,217,255,0.14);
  color:rgba(195,248,255,0.98);
}
.squad-result__meta{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--text-low);
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}
.squad-result__dot{
  opacity:0.75;
}
.squad-tag{
  padding:2px 8px;
  border-radius:999px;
  background:var(--overlay2);
  color:var(--text-mid);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.squad-result__side{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}
.squad-result__metric{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:4px;
  max-width:140px;
}
.squad-result__metric-value{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:900;
  font-size:14px;
  color:var(--text-strong);
}
.squad-result__metric-unit{
  flex:0 0 auto;
  white-space:nowrap;
  font-weight:900;
  font-size:11px;
  color:var(--text-mid);
}
.squad-btn--mini{
  width:auto;
  height:32px;
  padding:0 12px;
  border-radius:14px;
  font-size:12px;
}
.squads-empty,
.squad-mine-empty,
.leaderboard-empty,
.leaderboard-mine-empty{
  margin-top:14px;
  text-align:center;
  color:var(--text-low);
  font-weight:700;
  font-size:13px;
}
.squads-empty__media{
  position:relative;
  width:140px;
  height:140px;
  margin:0 auto 8px;
  display:grid;
  place-items:center;
}
.squads-empty__media--sm{
  width:120px;
  height:120px;
  margin-bottom:6px;
}
.squads-empty__glow{
  position:absolute;
  inset:-16px;
  border-radius:999px;
  background:radial-gradient(circle at 50% 45%, rgba(255,255,255,0.18), rgba(255,255,255,0) 62%);
  filter:blur(12px);
  opacity:0.7;
  pointer-events:none;
}
.squads-empty__sticker{
  width:128px;
  height:128px;
  display:block;
}
.squads-empty__media--sm .squads-empty__sticker{
  width:104px;
  height:104px;
}
.squads-empty__fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:40px;
  opacity:0.92;
  pointer-events:none;
}
.squads-empty__media--sm .squads-empty__fallback{
  font-size:34px;
}
.squads-empty__text{
  color:var(--text-low);
  font-weight:700;
  font-size:13px;
}
.squad-mine-empty__actions{
  margin-top:14px;
  display:grid;
  gap:10px;
}
.squad-mine-empty__pending{
  margin-top:10px;
}
.squad-mine__name{
  font-weight:900;
  font-size:20px;
  letter-spacing:0.01em;
  line-height:1.1;
  padding-right:52px;
  word-break:break-word;
}
.squad-mine__manage{
  position:absolute;
  top:12px;
  right:12px;
  width:40px;
  height:40px;
  border-radius:14px;
  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);
  cursor:pointer;
}
.squad-mine__manage-icon{
  width:20px;
  height:20px;
  display:block;
}
.squad-mine__meta{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text-low);
  font-weight:800;
  font-size:12px;
  margin:6px 0 10px;
}
.squad-mine__type{
  display:inline-flex;
  align-items:center;
  height:20px;
  padding:0 8px;
  border-radius:999px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.02em;
  white-space:nowrap;
}
.squad-mine__tag{
  padding:2px 8px;
  border-radius:999px;
  background:var(--overlay2);
  color:var(--text-mid);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.04em;
  text-transform:uppercase;
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.squad-mine__tag::after{
  content:"⧉";
  font-size:11px;
  opacity:0.7;
  transform: translateY(-0.5px);
}
.squad-mine__members{
  color:var(--text-strong);
  font-weight:900;
}
.squad-mine__desc{
  color:var(--text-mid);
  font-size:13px;
  line-height:1.4;
  margin-bottom:14px;
}
.squad-mine__pending{
  margin-bottom:14px;
  text-align:left;
  max-width:none;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.06);
}
.squad-preview__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.squad-preview__name{
  font-weight:900;
  font-size:18px;
  letter-spacing:0.01em;
  line-height:1.1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.squad-preview__meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  color:var(--text-low);
  font-weight:800;
  font-size:12px;
  margin:6px 0 2px;
}
.squad-preview__dot{
  opacity:0.75;
}
.squad-preview__desc{
  color:var(--text-mid);
  font-size:13px;
  line-height:1.4;
  white-space:pre-wrap;
}
.squad-preview__members-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.squad-member--static{
  cursor:default;
}
.squad-member--static:active{
  transform:none;
}
.squad-mine__divider{
  height:1px;
  background: var(--divider);
  margin: 0 -2px 14px;
}
.squad-mine__members-head{
  margin-bottom:10px;
}
.squad-members__count{
  color:var(--text-low);
  font-weight:800;
  font-size:12px;
}
.squad-members--in-card{
  padding-bottom:2px;
}
.squad-members{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.squad-member{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border-radius:14px;
  background:var(--overlay);
  border:1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--highlight);
  color:inherit;
  text-align:left;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease;
  will-change: transform;
}
.squad-member:active{
  transform: translateY(1px);
}
.squad-member.is-self{
  border-color: rgba(43,217,255,0.22);
}
.squad-member__avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--panel);
  border:1px solid var(--divider);
  display:grid;
  place-items:center;
  overflow:hidden;
  position:relative;
  font-weight:900;
  color:var(--muted);
  flex:0 0 auto;
}
.squad-member__avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.squad-member__avatar-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
}
.squad-member__main{
  min-width:0;
}
.squad-member__name{
  font-weight:800;
  font-size:14px;
  color:var(--text-strong);
}
.squad-member__id{
  font-size:11px;
  color:var(--text-low);
  font-weight:700;
}
.squad-member__role{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  background:var(--overlay2);
  font-weight:900;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:var(--text-mid);
  white-space:nowrap;
}
.squad-member__role.is-owner{
  background: rgba(255,196,36,0.18);
  border: 1px solid rgba(255,196,36,0.26);
  color: rgba(255,212,120,0.95);
}
.squad-member__role.is-admin{
  background: rgba(43,217,255,0.16);
  border: 1px solid rgba(43,217,255,0.26);
  color: rgba(195,248,255,0.95);
}
.squad-member.role-owner .squad-member__avatar{
  border-color: rgba(255,196,36,0.26);
  background: rgba(255,196,36,0.16);
  color: rgba(255,212,120,0.95);
}
.squad-member.role-admin .squad-member__avatar{
  border-color: rgba(43,217,255,0.26);
  background: rgba(43,217,255,0.14);
  color: rgba(195,248,255,0.95);
}
.squad-member__avatar.has-img{
  background:transparent;
}
.squad-member__avatar.has-img .squad-member__avatar-img{
  display:block;
}
.squad-member__avatar.has-img .squad-member__avatar-fallback{
  display:none;
}
.squad-member__actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.squad-member__chev{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  opacity:0.45;
  flex:0 0 auto;
}
.squad-member__chev::before{
  content:"›";
  font-size:22px;
  line-height:1;
  transform: translateY(-1px);
}
.squad-member__action{
  height:28px;
  padding:0 10px;
  border-radius:10px;
  border:0;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  background:rgba(255,100,100,0.14);
  color:rgba(255,120,120,0.95);
}
.squad-leave-btn{
  margin-top:0;
}
.squad-owner-note{
  margin-top:0;
  text-align:center;
  max-width:420px;
  margin-left:auto;
  margin-right:auto;
  padding:0 10px;
  font-size:12px;
  color:var(--text-low);
  font-weight:700;
}
.squad-manage__leave{
  padding-top:12px;
  border-top:1px solid var(--divider);
}
.squad-manage__leave .squad-owner-note{
  margin-top:10px;
}
.squad-member-modal__head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:18px;
  background:var(--overlay);
  border:1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.squad-member-modal__avatar{
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--panel);
  border:1px solid var(--divider);
  display:grid;
  place-items:center;
  overflow:hidden;
  position:relative;
  font-weight:900;
  color:var(--muted);
  flex:0 0 auto;
}
.squad-member-modal__avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.squad-member-modal__avatar-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
}
.squad-member-modal__avatar.has-img{
  background:transparent;
}
.squad-member-modal__avatar.has-img .squad-member-modal__avatar-img{
  display:block;
}
.squad-member-modal__avatar.has-img .squad-member-modal__avatar-fallback{
  display:none;
}
.squad-member-modal__info{
  flex:1 1 auto;
  min-width:0;
}
.squad-member-modal__name{
  font-weight:900;
  font-size:15px;
  color:var(--text-strong);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.squad-member-modal__id{
  margin-top:2px;
  font-size:12px;
  color:var(--text-low);
  font-weight:700;
}
.squad-member-modal__role{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 10px;
  border-radius:999px;
  background:var(--overlay2);
  font-weight:900;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:var(--text-mid);
  white-space:nowrap;
  flex:0 0 auto;
  border:1px solid transparent;
}
.squad-member-modal__role.is-owner{
  background: rgba(255,196,36,0.18);
  border-color: rgba(255,196,36,0.26);
  color: rgba(255,212,120,0.95);
}
.squad-member-modal__role.is-admin{
  background: rgba(43,217,255,0.16);
  border-color: rgba(43,217,255,0.26);
  color: rgba(195,248,255,0.95);
}
.squad-member-modal__actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.squad-member-modal__action{
  justify-content:center;
  background:rgba(255,100,100,0.12);
  color:rgba(255,120,120,0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.squad-input,
.squad-textarea{
  width:100%;
  border-radius:14px;
  border:0;
  background:var(--overlay);
  color:var(--text-strong);
  padding:12px 14px;
  font-weight:700;
  font-size:14px;
  outline:2px solid transparent;
  outline-offset:2px;
}
.squad-input:focus,
.squad-textarea:focus{
  outline-color:var(--overlay2);
}
.squad-input--tag{
  text-transform:uppercase;
  letter-spacing:0.08em;
}
.squad-textarea{
  resize:none;
  min-height:90px;
}
html.has-kb .modal__sheet--squad .squad-textarea{
  min-height:72px;
}
.squad-field-hint{
  margin-top:6px;
  font-size:11px;
  color:var(--text-low);
  font-weight:700;
}
.squad-input.is-invalid,
.squad-textarea.is-invalid{
  outline-color:rgba(255,120,120,0.55);
  background:rgba(255,120,120,0.1);
}
.squad-create-error{
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,120,120,0.12);
  color:rgba(255,120,120,0.95);
  font-weight:800;
  font-size:12px;
  line-height:1.3;
}
.squad-create-foot{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  position:sticky;
  bottom:0;
  padding-top:12px;
  padding-bottom: calc(8px + var(--safe-b));
  background: var(--surface2);
  border-top: 1px solid var(--divider);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
html.has-kb .modal__sheet--squad .squad-create-foot{
  margin-top:10px;
  padding-top:10px;
  padding-bottom: calc(6px + var(--safe-b));
  gap:8px;
}
.squad-create-actions{
  display:flex;
  gap:10px;
}
.squad-create-actions .squad-btn{
  flex:1 1 0;
}
.squad-type .seg__btn{
  font-size:11px;
  padding:0 6px;
}

/* Squad create modal polish (more compact + nicer) */
#squadCreateModal .modal__sheet::before{
  content:"";
  display:block;
  width:44px;
  height:4px;
  border-radius:999px;
  background:var(--overlay2);
  margin: -2px auto 10px;
}
#squadCreateModal .modal__title{
  font-size:18px;
  letter-spacing:0.01em;
}
#squadCreateModal .modal__close{
  width:32px;
  height:32px;
  font-size:18px;
}
#squadCreateModal .modal__section{
  margin-top:10px;
}
#squadCreateModal .modal__label{
  margin-bottom:6px;
}
#squadCreateModal .squad-input,
#squadCreateModal .squad-textarea{
  border-radius:12px;
  box-shadow: inset 0 0 0 1px var(--divider), inset 0 1px 0 var(--highlight);
}
#squadCreateModal .squad-textarea{
  min-height:78px;
  line-height:1.35;
}
#squadCreateModal .squad-field-hint{
  margin-top:4px;
  font-weight:800;
}
#squadCreateModal .seg{
  padding:6px;
  border-radius:14px;
}
#squadCreateModal .seg__btn{
  height:32px;
  border-radius:11px;
  font-size:12px;
}
#squadCreateModal .seg__highlight{
  border-radius:11px;
}
#squadCreateModal .squad-create-foot{
  margin-left:-16px;
  margin-right:-16px;
  padding-left:16px;
  padding-right:16px;
  border-bottom-left-radius:22px;
  border-bottom-right-radius:22px;
}
#squadCreateModal .squad-create-cost{
  align-self:flex-start;
  padding:6px 10px;
  border-radius:999px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:12px;
  color:var(--text-low);
  font-weight:900;
  letter-spacing:0.01em;
}
#squadCreateModal .squad-btn{
  height:40px;
  border-radius:14px;
}

html.has-kb #squadCreateModal .modal__title{
  font-size:16px;
}
html.has-kb #squadCreateModal .modal__section{
  margin-top:8px;
}
html.has-kb #squadCreateModal .squad-input,
html.has-kb #squadCreateModal .squad-textarea{
  padding:10px 12px;
}
html.has-kb #squadCreateModal .squad-textarea{
  min-height:62px;
}
html.has-kb #squadCreateModal .seg{
  padding:5px;
}
html.has-kb #squadCreateModal .seg__btn{
  height:30px;
}
html.has-kb #squadCreateModal .squad-btn{
  height:38px;
}
html.has-kb #squadCreateModal .squad-create-foot{
  margin-left:-12px;
  margin-right:-12px;
  padding-left:12px;
  padding-right:12px;
  border-bottom-left-radius:18px;
  border-bottom-right-radius:18px;
}

/* iOS Safari/WebView input focus zoom guard (font-size must be >= 16px) */
@media (max-width: 480px){
  .squad-input,
  .squad-textarea{
    font-size:16px;
  }
}

@media (max-height: 740px){
  html.has-kb .modal__sheet--squad{
    left:12px;
    right:12px;
  }
}
.squad-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.squad-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 12px;
  border:1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.squad-action__right{
  display:flex;
  align-items:center;
  gap:8px;
}
.squad-action__count{
  min-width:20px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--overlay2);
  color:var(--text-strong);
  font-size:11px;
  font-weight:900;
}
.squad-action__chev{
  width:18px;
  height:18px;
  display:block;
  opacity:0.72;
  transition: transform 180ms cubic-bezier(0.2,0.8,0.2,1), opacity 180ms ease;
}
.squad-action.is-open .squad-action__chev{
  transform: rotate(180deg);
  opacity:0.9;
}
.squad-action--danger{
  justify-content:center;
  background:rgba(255,100,100,0.10);
  border:1px solid rgba(255,100,100,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  color:rgba(255,120,120,0.95);
}
.squad-acc__body{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--divider);
}
.squad-requests--inline{
  margin-top:0;
}
.squad-requests,
.squad-admins,
.squad-transfer{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
}
.squad-request,
.squad-admin-row,
.squad-transfer-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:var(--overlay);
}
.squad-request__info,
.squad-admin-row__info,
.squad-transfer-row__info{
  flex:1 1 auto;
  min-width:0;
}
.squad-request__name,
.squad-admin-row__name,
.squad-transfer-row__name{
  font-weight:800;
  font-size:14px;
  color:var(--text-strong);
}
.squad-request__id,
.squad-admin-row__id,
.squad-transfer-row__id{
  font-size:11px;
  color:var(--text-low);
  font-weight:700;
}
.squad-request__actions{
  display:flex;
  gap:6px;
}
.squad-request__btn{
  height:30px;
  padding:0 10px;
  border-radius:10px;
  border:0;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  background:var(--overlay2);
  color:var(--text-strong);
}
.squad-request__btn--ok{
  background:rgba(46,255,146,0.14);
  color:rgba(46,255,146,0.95);
}
.squad-request__btn--no{
  background:rgba(255,100,100,0.14);
  color:rgba(255,120,120,0.95);
}
.squad-invite{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.squad-invite__code{
  font-size:20px;
  font-weight:900;
  text-align:center;
  letter-spacing:0.16em;
  padding:16px;
  border-radius:14px;
  background:var(--overlay);
}
.squad-invite__actions{
  display:flex;
  gap:10px;
}
.squad-invite__actions .squad-btn{
  flex:1 1 0;
}
.squad-empty{
  margin-top:8px;
  text-align:center;
  color:var(--text-low);
  font-weight:700;
  font-size:12px;
}
.squad-admin-row__action,
.squad-transfer-row__action{
  height:30px;
  padding:0 10px;
  border-radius:10px;
  border:0;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  background:var(--overlay2);
  color:var(--text-strong);
}
.squad-disband{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.squad-disband__text{
  font-size:13px;
  color:var(--text-low);
  font-weight:700;
  line-height:1.4;
}
.squad-disband__actions{
  display:flex;
  gap:10px;
}
.squad-disband__actions .squad-btn{
  flex:1 1 0;
}
.squad-leaderboard{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.leaderboard-seg .seg__btn{
  font-size:12px;
}
.leaderboard-hint{
  font-size:12px;
  font-weight:800;
  color:var(--text-low);
}
.leaderboard-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.leaderboard-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  background:var(--overlay);
}
.leaderboard-item.is-mine{
  outline:1px solid rgba(43,217,255,0.55);
  box-shadow:0 0 0 1px rgba(43,217,255,0.2);
}
.leaderboard-rank{
  width:32px;
  height:32px;
  border-radius:12px;
  background:var(--overlay2);
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:12px;
  color:var(--text-strong);
  flex:0 0 auto;
}
.leaderboard-main{
  min-width:0;
  flex:1 1 auto;
}
.leaderboard-name{
  font-weight:900;
  font-size:14px;
  color:var(--text-strong);
}
.leaderboard-meta{
  margin-top:4px;
  font-size:11px;
  color:var(--text-low);
  font-weight:700;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.leaderboard-tag{
  padding:2px 6px;
  border-radius:999px;
  background:var(--overlay2);
  color:var(--text-mid);
  font-size:9px;
  font-weight:900;
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.leaderboard-value{
  font-weight:900;
  font-size:13px;
  color:var(--text-strong);
  flex:0 0 auto;
}
.leaderboard-empty{
  margin-top:8px;
}
.leaderboard-mine{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.leaderboard-mine__title{
  font-size:12px;
  font-weight:800;
  color:var(--text-low);
}
.leaderboard-mine-empty{
  margin-top:6px;
}
.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(5, 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);
}

/* Auctions */
.auctions{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-bottom:20px;
}
.auctions-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.auctions-title{
  color:var(--text-strong);
  font-size:22px;
  font-weight:900;
  line-height:1.05;
}
.auctions-sub{
  margin-top:3px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
  line-height:1.25;
  max-width:190px;
}
.auctions-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.auction-notifications-btn{
  position:relative;
  width:38px;
  height:38px;
  border:1px solid var(--stroke);
  border-radius:13px;
  background:var(--overlay);
  color:var(--text-strong);
  display:grid;
  place-items:center;
  box-shadow:inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.auction-notifications-btn svg{
  width:18px;
  height:18px;
  display:block;
}
.auction-notifications-btn.has-unread{
  background:var(--surface);
}
.auction-notifications-count{
  position:absolute;
  right:-5px;
  top:-5px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:#fff;
  font-size:10px;
  font-weight:950;
  line-height:1;
  box-shadow:0 8px 14px rgba(0,0,0,0.24);
}
.auction-create-open,
.auction-primary,
.auction-secondary{
  border:0;
  border-radius:13px;
  min-height:38px;
  padding:0 13px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.auction-create-open,
.auction-primary{
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 8px 18px var(--shadow-sm);
}
.auction-secondary{
  width:100%;
  background:var(--overlay);
  color:var(--text-strong);
  border:1px solid var(--stroke);
}
.auction-primary:disabled,
.auction-create-open:disabled{
  opacity:0.55;
  box-shadow:none;
  cursor:default;
}
.auctions-tabs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:5px;
  padding:5px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auctions-tab{
  min-width:0;
  height:32px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:var(--text-low);
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.auctions-tab.is-active{
  background:var(--tab-active-bg);
  color:var(--text-strong);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-toolbar{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.auction-search{
  width:100%;
  min-height:46px;
  padding:10px 13px;
  border-radius:18px;
  box-shadow:
    0 10px 24px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
}
.auction-filter-bar{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:32px;
}
.auction-filters-open{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:86px;
  height:32px;
  padding:0 12px;
  background:var(--surface);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-filters-open.is-active{
  background:var(--cta-bg);
  color:var(--cta-text);
  border-color:transparent;
}
.auction-filters-icon{
  width:14px;
  height:14px;
  display:block;
  flex:0 0 auto;
}
.auction-filters-count{
  min-width:17px;
  height:17px;
  padding:0 5px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-size:9px;
  font-weight:950;
  line-height:1;
}
.auction-filters-open.is-active .auction-filters-count{
  background:rgba(255,255,255,0.18);
  color:currentColor;
}
.auction-filters-summary{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text-mid);
  font-size:11px;
  font-weight:850;
}
.auction-search[hidden],
.auction-filters-summary[hidden],
.auction-filters-count[hidden]{
  display:none;
}
.auction-search .search-input:disabled{
  opacity:0.58;
}
.auction-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
}
.auction-card{
  min-width:0;
  border:0;
  border-radius:18px;
  padding:0;
  background:var(--surface);
  color:var(--text);
  text-align:left;
  overflow:hidden;
  box-shadow:0 12px 28px var(--shadow-sm), inset 0 1px 0 var(--highlight);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  height:100%;
}
.auction-card__thumb{
  position:relative;
  aspect-ratio:1 / 1;
  background:var(--surface2);
  display:grid;
  place-items:center;
}
.auction-card__thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.auction-card__timer{
  position:absolute;
  left:8px;
  top:8px;
  max-width:calc(100% - 16px);
  padding:5px 8px;
  border-radius:999px;
  background:rgba(0,0,0,0.56);
  color:#fff;
  font-size:11px;
  font-weight:900;
  backdrop-filter:blur(8px);
}
.auction-card__body{
  padding:10px;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  min-width:0;
}
.auction-card__name{
  color:var(--text-strong);
  font-size:13px;
  font-weight:900;
  line-height:1.2;
  min-height:32px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.auction-card__meta,
.auction-card__price-row{
  margin-top:8px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:6px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
}
.auction-card__meta{
  min-height:0;
  flex-direction:column;
  align-items:flex-start;
}
.auction-card__meta-text{
  min-width:0;
  width:100%;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.auction-card__price{
  color:var(--text-strong);
  font-size:16px;
  line-height:1.08;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.auction-card__owner{
  min-width:0;
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
  line-height:1.2;
  white-space:normal;
}
.auction-card__price-row{
  flex:1 1 auto;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
.auction-card__status{
  margin-top:8px;
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:6px;
  min-height:0;
  padding:0;
  border-radius:12px;
  background:transparent;
  color:var(--text-mid);
  overflow:visible;
}
.auction-card__status[data-tone="success"]{
  background:transparent;
  color:var(--text-strong);
}
.auction-card__status[data-tone="warning"]{
  background:transparent;
  color:var(--text-strong);
}
.auction-card__status-label{
  flex:0 0 auto;
  max-width:100%;
  min-height:18px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:var(--surface);
  color:var(--text-strong);
  font-size:10px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.auction-card__status-hint{
  min-width:0;
  min-height:18px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:10px;
  line-height:1;
  font-weight:850;
  overflow:visible;
  white-space:normal;
}
.auction-card__status[data-tone="success"] .auction-card__status-hint,
.auction-card__status[data-tone="warning"] .auction-card__status-hint{
  color:var(--text-strong);
}
.auction-card--skeleton{
  pointer-events:none;
  cursor:default;
}
.auction-skeleton-block,
.auction-skeleton-line{
  position:relative;
  overflow:hidden;
  background:var(--overlay);
}
.auction-skeleton-block::after,
.auction-skeleton-line::after{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation:auctionSkeletonShimmer 1.25s ease-in-out infinite;
}
html[data-theme="light"] .auction-skeleton-block::after,
html[data-theme="light"] .auction-skeleton-line::after{
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
}
.auction-skeleton-line{
  height:12px;
  border-radius:999px;
  margin-top:9px;
}
.auction-skeleton-line--title{
  width:86%;
  height:15px;
  margin-top:0;
}
.auction-skeleton-line--short{
  width:58%;
}
.auction-skeleton-line--price{
  width:74%;
  height:17px;
  margin-top:14px;
}
@keyframes auctionSkeletonShimmer{
  100%{transform:translateX(100%)}
}
.auction-card__badge{
  flex:0 0 auto;
  width:auto;
  max-width:100%;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  background:var(--overlay);
  color:var(--text-mid);
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-align:center;
  line-height:1;
  overflow:hidden;
}
.auction-card__badge-count{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text-strong);
  font-size:11px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}
.auction-card__badge-label{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
  font-weight:900;
  letter-spacing:0;
}
.auction-empty{
  padding:20px 14px;
  border-radius:18px;
  background:var(--surface);
  color:var(--text-mid);
  font-size:13px;
  font-weight:800;
  text-align:center;
}
.auction-loader{
  min-height:90px;
}
.auction-group-sheet,
.auction-detail-sheet,
.auction-create-sheet,
.auction-notifications-sheet{
  max-height:86vh;
  overflow:auto;
}
.auction-detail__sub{
  margin-top:3px;
  color:var(--text-mid);
  font-size:12px;
  font-weight:800;
}
.auction-detail__media{
  width:100%;
  aspect-ratio:1 / 1;
  border-radius:18px;
  overflow:hidden;
  background:var(--surface2);
  display:grid;
  place-items:center;
  margin-top:12px;
}
.auction-detail__media img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.auction-group-head{
  display:grid;
  grid-template-columns:92px minmax(0, 1fr);
  gap:12px;
  align-items:center;
  margin-top:12px;
  padding:10px;
  border-radius:16px;
  background:var(--surface);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-group-head__media{
  width:92px;
  aspect-ratio:1 / 1;
  border-radius:14px;
  overflow:hidden;
  background:var(--surface2);
  display:grid;
  place-items:center;
}
.auction-group-head__media img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.auction-group-head__body{
  min-width:0;
}
.auction-group-hero__price{
  color:var(--text-strong);
  font-size:20px;
  line-height:1.08;
  font-weight:1000;
  font-variant-numeric:tabular-nums;
}
.auction-group-hero__stats{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.auction-group-hero__stats span,
.auction-group-hero__time{
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:0 8px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.auction-group-hero__time{
  margin-top:8px;
  color:var(--text-strong);
  font-variant-numeric:tabular-nums;
}
.auction-group-sort{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
  margin-top:12px;
  padding:1px 1px 2px;
}
.auction-group-sort::-webkit-scrollbar{
  display:none;
}
.auction-group-sort button{
  flex:0 0 auto;
  min-height:30px;
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:0 10px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.auction-group-sort button.is-active{
  background:var(--cta-bg);
  color:var(--cta-text);
  border-color:transparent;
}
.auction-group-lots{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.auction-group-lot{
  width:100%;
  min-width:0;
  border:1px solid var(--stroke);
  border-radius:16px;
  padding:10px;
  background:var(--surface);
  color:var(--text);
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
  text-align:left;
  box-shadow:inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.auction-group-lot__main{
  min-width:0;
}
.auction-group-lot__price{
  color:var(--text-strong);
  font-size:16px;
  font-weight:1000;
  font-variant-numeric:tabular-nums;
}
.auction-group-lot__meta{
  margin-top:4px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:850;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-group-lot__side{
  display:grid;
  justify-items:end;
  gap:5px;
}
.auction-group-lot__time,
.auction-group-lot__status{
  max-width:116px;
  min-height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:0 8px;
  background:var(--overlay);
  color:var(--text-strong);
  font-size:10px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.auction-group-lot__status{
  color:var(--text-mid);
}
.auction-group-lot__status[data-tone="success"]{
  background:rgba(49,196,141,0.13);
  color:var(--text-strong);
}
.auction-group-lot__status[data-tone="warning"]{
  background:rgba(255,184,77,0.15);
  color:var(--text-strong);
}
.auction-group-empty{
  margin-top:10px;
}
.auction-detail__hero{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:end;
  margin-top:12px;
  padding:13px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,0.68);
  box-shadow:inset 0 1px 0 var(--highlight);
}
html[data-theme="dark"] .auction-detail__hero{
  background:rgba(255,255,255,0.07);
}
.auction-detail__hero[data-tone="success"]{
  border-color:rgba(49,196,141,0.34);
  background:rgba(49,196,141,0.12);
}
.auction-detail__hero[data-tone="warning"]{
  border-color:rgba(255,184,77,0.34);
  background:rgba(255,184,77,0.14);
}
.auction-detail__hero[data-tone="locked"]{
  border-color:rgba(255,74,74,0.22);
  background:rgba(255,74,74,0.08);
}
.auction-detail__hero[data-tone="neutral"]{
  border-color:rgba(20,20,20,0.12);
}
.auction-detail__hero[data-tone="active"]{
  border-color:rgba(20,20,20,0.14);
}
.auction-detail-hero__main{
  min-width:0;
}
.auction-detail-hero__badge{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  max-width:100%;
  padding:0 10px;
  border-radius:999px;
  background:var(--surface);
  color:var(--text-strong);
  font-size:11px;
  font-weight:950;
  box-shadow:inset 0 1px 0 var(--highlight);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-detail-hero__label{
  margin-top:10px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
}
.auction-detail-hero__price{
  margin-top:2px;
  color:var(--text-strong);
  font-size:25px;
  line-height:1.05;
  font-weight:1000;
  font-variant-numeric:tabular-nums;
  letter-spacing:0;
}
.auction-detail-hero__side{
  display:grid;
  gap:6px;
  justify-items:end;
  min-width:94px;
}
.auction-detail-hero__time,
.auction-detail-hero__bids{
  max-width:132px;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 9px;
  border-radius:999px;
  background:var(--overlay);
  color:var(--text-strong);
  font-size:11px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.auction-detail-hero__bids{
  color:var(--text-mid);
}
.auction-detail__stats,
.auction-detail__facts{
  display:grid;
  gap:0;
  margin-top:10px;
  border-radius:14px;
  background:var(--overlay);
  overflow:hidden;
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-stat,
.auction-detail-fact{
  min-width:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:9px 11px;
  border-top:1px solid var(--stroke);
}
.auction-stat:first-child,
.auction-detail-fact:first-child{
  border-top:0;
}
.auction-stat__label{
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
}
.auction-stat__value{
  color:var(--text-strong);
  font-size:12px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:right;
}
.auction-detail-fact__main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.auction-detail-fact__main span{
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
  line-height:1.15;
}
.auction-detail-fact__main small{
  color:var(--text-low);
  font-size:9px;
  font-weight:800;
  line-height:1.2;
}
.auction-detail-fact strong{
  flex:0 0 auto;
  max-width:52%;
  color:var(--text-strong);
  font-size:12px;
  font-weight:950;
  line-height:1.18;
  text-align:right;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums;
}
.auction-detail__state{
  margin-top:10px;
  border-radius:14px;
  padding:11px 12px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:12px;
  font-weight:850;
  line-height:1.3;
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-detail__state[data-tone="success"]{
  color:var(--text-strong);
  background:rgba(49,196,141,0.14);
}
.auction-detail__state[data-tone="warning"]{
  color:var(--text-strong);
  background:rgba(255,184,77,0.16);
}
.auction-detail__state[data-tone="neutral"]{
  color:var(--text-strong);
  background:rgba(13,13,13,0.055);
}
.auction-detail__state[data-tone="locked"]{
  color:var(--text-strong);
  background:rgba(255,74,74,0.10);
}
.auction-detail-action__title{
  color:var(--text-strong);
  font-size:12px;
  font-weight:1000;
  line-height:1.15;
}
.auction-detail-action__text{
  margin-top:3px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:850;
  line-height:1.25;
}
.auction-detail-action__meta{
  margin-top:5px;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  line-height:1.22;
}
.auction-detail__bid,
.auction-create__form{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}
.auction-detail__bid{
  padding:11px;
  border-radius:15px;
  border:1px solid var(--stroke);
  background:var(--surface);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-detail__bid[data-tone="warning"]{
  border-color:rgba(255,184,77,0.34);
}
.auction-detail__bid[data-tone="locked"]{
  border-color:rgba(255,74,74,0.24);
}
.auction-detail-bid__hint{
  margin-top:-2px;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  line-height:1.25;
}
.auction-detail-bid__hint[data-tone="warning"]{
  color:var(--text-strong);
}
.auction-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--text-mid);
  font-size:12px;
  font-weight:900;
}
.auction-field__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.auction-field__range{
  flex:0 1 auto;
  min-width:0;
  max-width:58%;
  min-height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:4px 9px;
  background:rgba(13,13,13,0.06);
  color:var(--text-mid);
  font-size:10px;
  font-weight:950;
  line-height:1.15;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
html[data-theme="dark"] .auction-field__range{
  background:rgba(255,255,255,0.09);
}
.auction-field input,
.auction-field select{
  width:100%;
  height:44px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--overlay);
  color:var(--text-strong);
  padding:0 12px;
  font-size:15px;
  font-weight:900;
  outline:none;
  box-shadow:inset 0 1px 0 var(--highlight);
  -webkit-appearance:none;
  appearance:none;
}
.auction-field select{
  padding-right:40px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 18px,
    calc(100% - 16px) 18px;
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}
.auction-field input[type="number"]{
  -moz-appearance:textfield;
}
.auction-field input[type="number"]::-webkit-outer-spin-button,
.auction-field input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.auction-price-input{
  min-width:0;
  height:46px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--stroke);
  border-radius:15px;
  background:var(--overlay);
  box-shadow:inset 0 1px 0 var(--highlight);
  padding:0 12px;
}
.auction-price-input input{
  min-width:0;
  flex:1 1 auto;
  width:auto;
  height:100%;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  font-size:16px;
  font-weight:950;
}
.auction-price-input > span{
  flex:0 0 auto;
  color:var(--text-mid);
  font-size:12px;
  font-weight:950;
}
.auction-price-hint{
  margin-top:1px;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  line-height:1.25;
}
.auction-price-hint[data-tone="ok"]{
  color:var(--text-mid);
}
.auction-price-hint[data-tone="warning"]{
  color:var(--text-strong);
}
.auction-price-hint[data-tone="danger"]{
  color:#ff3b3b;
}
.auction-economy-summary{
  display:grid;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,0.54);
  color:var(--text-mid);
  font-size:12px;
  font-weight:850;
}
html[data-theme="dark"] .auction-economy-summary{
  background:rgba(255,255,255,0.06);
}
.auction-economy-summary__hero{
  min-width:0;
  padding:12px;
  border-radius:14px;
  background:var(--surface);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-economy-summary__hero[data-tone="danger"]{
  background:rgba(255,74,74,0.08);
}
.auction-economy-summary__hero-label{
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
}
.auction-economy-summary__hero-value{
  margin-top:3px;
  color:var(--text-strong);
  font-size:24px;
  line-height:1.05;
  font-weight:1000;
  font-variant-numeric:tabular-nums;
}
.auction-economy-summary__hero-sub{
  margin-top:4px;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  line-height:1.25;
}
.auction-economy-summary__cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.auction-economy-summary__card{
  min-width:0;
  min-height:70px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  border-radius:13px;
  padding:10px 11px;
  background:var(--overlay);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-economy-summary__card[data-tone="warning"]{
  background:rgba(255,184,77,0.13);
}
.auction-economy-summary__card-label{
  color:var(--text-low);
  font-size:10px;
  font-weight:950;
  line-height:1.15;
}
.auction-economy-summary__card-value{
  min-width:0;
  color:var(--text-strong);
  font-size:16px;
  font-weight:1000;
  line-height:1.1;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums;
}
.auction-economy-summary__card-hint{
  color:var(--text-low);
  font-size:9px;
  font-weight:850;
  line-height:1.2;
}
.auction-economy-summary__section{
  min-width:0;
  display:grid;
  gap:7px;
  padding:10px 0 0;
  border-top:1px solid var(--stroke);
}
.auction-economy-summary__section-title{
  color:var(--text-strong);
  font-size:11px;
  font-weight:1000;
  line-height:1.15;
}
.auction-economy-summary__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.auction-economy-summary__row[data-tone="warning"] strong{
  color:var(--text-strong);
}
.auction-economy-summary__row-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.auction-economy-summary__row-main span{
  color:var(--text-mid);
  font-size:11px;
  font-weight:950;
  line-height:1.12;
}
.auction-economy-summary__row-main small{
  color:var(--text-low);
  font-size:9px;
  font-weight:800;
  line-height:1.22;
}
.auction-economy-summary__row strong{
  flex:0 0 auto;
  max-width:48%;
  color:var(--text-strong);
  font-weight:950;
  font-size:12px;
  line-height:1.18;
  text-align:right;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums;
}
.auction-economy-summary__note{
  padding-top:6px;
  border-top:1px solid var(--stroke);
  color:var(--text-soft);
  line-height:1.25;
}
@media (max-width: 360px){
  .auction-field__range{
    max-width:52%;
    font-size:9px;
    padding-left:7px;
    padding-right:7px;
  }
  .auction-economy-summary__cards{
    grid-template-columns:minmax(0, 1fr);
  }
  .auction-economy-summary__row{
    gap:8px;
  }
  .auction-economy-summary__row strong{
    max-width:52%;
  }
}
.auction-create-warning{
  min-height:38px;
  border-radius:14px;
  padding:10px 12px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:12px;
  font-weight:850;
  line-height:1.3;
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-create-warning[data-tone="warning"]{
  background:rgba(255,184,77,0.15);
  color:var(--text-strong);
}
.auction-create-picker{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.auction-create-search{
  margin-top:0;
  min-height:44px;
  border-radius:16px;
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-create-search input{
  min-width:0;
  height:24px;
  border:0;
  outline:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  -webkit-appearance:none;
  appearance:none;
  font-size:14px;
  font-weight:850;
}
.auction-create-search input::-webkit-search-decoration,
.auction-create-search input::-webkit-search-cancel-button{
  display:none;
}
.auction-create-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:34px;
}
.auction-create-summary{
  min-width:0;
  color:var(--text-mid);
  font-size:11px;
  font-weight:850;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-create-filters-btn{
  flex:0 0 auto;
  min-width:88px;
  height:34px;
  border-radius:14px;
  font-size:12px;
}
.auction-create-filters-btn.is-active{
  background:var(--cta-bg);
  color:var(--cta-text);
  border-color:transparent;
}
.auction-create-loader{
  min-height:42px;
  display:grid;
  place-items:center;
  margin-top:8px;
  border-radius:16px;
  background:var(--surface);
  color:var(--text-mid);
  font-size:12px;
  font-weight:850;
}
.auction-create-loader[hidden]{
  display:none;
}
.auction-create-more{
  width:100%;
  margin-top:10px;
  min-height:40px;
  border-radius:14px;
}
.auction-create-more[hidden]{
  display:none;
}
.auction-cancel-lot{
  margin-top:10px;
}
.auction-bids{
  margin-top:12px;
}
.auction-bids__title{
  color:var(--text-strong);
  font-size:13px;
  font-weight:950;
}
.auction-bids__list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
}
.auction-bids__empty{
  margin-top:8px;
  border-radius:14px;
  padding:12px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:12px;
  font-weight:800;
  text-align:center;
}
.auction-bid-row{
  min-width:0;
  display:grid;
  grid-template-columns:30px minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:9px 10px;
  background:var(--surface);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-bid-row.is-leading{
  border-color:rgba(49,196,141,0.38);
  background:rgba(49,196,141,0.10);
}
.auction-bid-row.is-mine:not(.is-leading){
  border-color:rgba(20,20,20,0.16);
  background:rgba(13,13,13,0.045);
}
html[data-theme="dark"] .auction-bid-row.is-mine:not(.is-leading){
  border-color:rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.075);
}
.auction-bid-row__rank{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:11px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}
.auction-bid-row.is-leading .auction-bid-row__rank{
  background:rgba(49,196,141,0.18);
  color:var(--text-strong);
}
.auction-bid-row.is-mine:not(.is-leading) .auction-bid-row__rank{
  background:rgba(13,13,13,0.08);
  color:var(--text-strong);
}
.auction-bid-row__main{
  min-width:0;
}
.auction-bid-row__user{
  min-width:0;
  color:var(--text-strong);
  font-size:12px;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-bid-row__meta{
  margin-top:3px;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-bid-row__amount{
  color:var(--text-strong);
  font-size:12px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.auction-notifications-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}
.auction-notifications-mode{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:6px;
  margin-top:12px;
  padding:6px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-notifications-mode button{
  min-width:0;
  height:34px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:var(--text-low);
  font-size:12px;
  font-weight:950;
  cursor:pointer;
}
.auction-notifications-mode button.is-active{
  background:var(--tab-active-bg);
  color:var(--text-strong);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-notifications-filter{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
  margin-top:8px;
  padding:1px 1px 2px;
}
.auction-notifications-filter::-webkit-scrollbar{
  display:none;
}
.auction-notifications-filter button{
  flex:0 0 auto;
  min-height:28px;
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:0 10px;
  background:var(--overlay);
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.auction-notifications-filter button.is-active{
  background:var(--surface);
  color:var(--text-strong);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.auction-notification{
  width:100%;
  min-width:0;
  border:1px solid var(--stroke);
  border-radius:16px;
  padding:8px;
  background:var(--surface);
  color:var(--text);
  display:grid;
  grid-template-columns:48px minmax(0, 1fr);
  gap:10px;
  text-align:left;
  box-shadow:inset 0 1px 0 var(--highlight);
  cursor:pointer;
}
.auction-notification.is-read{
  opacity:0.72;
}
.auction-notification__media{
  width:48px;
  height:48px;
  border-radius:12px;
  background:var(--overlay);
  display:grid;
  place-items:center;
  overflow:hidden;
}
.auction-notification__media img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.auction-notification__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
}
.auction-notification__top{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.auction-notification__title{
  min-width:0;
  color:var(--text-strong);
  font-size:13px;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-notification__time{
  flex:0 0 auto;
  color:var(--text-low);
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
}
.auction-notification__text{
  min-width:0;
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.auction-notifications-empty{
  margin-top:12px;
}
.auction-notifications-read{
  margin-top:10px;
}
.auction-create__grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
  max-height:min(340px, 42vh);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:2px;
}
.auction-create-card{
  position:relative;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  padding:8px;
  text-align:left;
  cursor:pointer;
}
.auction-create-card.is-selected{
  border-color:rgba(43,217,255,0.72);
  box-shadow:0 0 0 2px rgba(43,217,255,0.16);
}
.auction-create-card__thumb{
  position:relative;
  aspect-ratio:1 / 1;
  border-radius:12px;
  overflow:hidden;
  background:var(--surface2);
  display:grid;
  place-items:center;
}
.auction-create-card__thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.auction-create-card__mark{
  position:absolute;
  right:7px;
  top:7px;
  width:24px;
  height:24px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-size:13px;
  font-weight:950;
  box-shadow:0 8px 14px var(--shadow-sm);
  opacity:0;
  transform:scale(0.82);
  transition:opacity 160ms ease, transform 160ms ease;
}
.auction-create-card.is-selected .auction-create-card__mark{
  opacity:1;
  transform:scale(1);
}
.auction-create-card__name{
  margin-top:8px;
  color:var(--text-strong);
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.auction-create-card__meta{
  margin-top:5px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
}
.auction-create-selected{
  min-width:0;
  display:grid;
  grid-template-columns:56px minmax(0, 1fr) 28px;
  gap:10px;
  align-items:center;
  margin-top:10px;
  padding:9px;
  border-radius:16px;
  background:var(--surface);
  box-shadow:0 10px 22px var(--shadow-sm), inset 0 1px 0 var(--highlight);
}
.auction-create-selected[hidden]{
  display:none;
}
.auction-create-selected__media{
  width:56px;
  height:56px;
  border-radius:12px;
  overflow:hidden;
  background:var(--surface2);
  display:grid;
  place-items:center;
}
.auction-create-selected__media img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.auction-create-selected__body{
  min-width:0;
}
.auction-create-selected__label{
  color:var(--text-low);
  font-size:10px;
  font-weight:900;
}
.auction-create-selected__name{
  margin-top:3px;
  color:var(--text-strong);
  font-size:13px;
  font-weight:950;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-create-selected__meta{
  margin-top:4px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auction-create-selected__check{
  width:28px;
  height:28px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-size:14px;
  font-weight:950;
}
@media (max-width: 380px){
  .auctions-tabs{gap:5px}
  .auctions-tab{font-size:11px}
  .auction-list,
  .auction-create__grid{gap:9px}
}
.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%);
  z-index:950;
  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) + var(--kb));
  max-height: calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 32px);
  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;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: calc(90px + var(--safe-b));
}
.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;
}
.roulette-wait-modal{
  z-index:980;
}
.roulette-wait-modal__sheet{
  top:50%;
  bottom:auto;
  transform:translateY(-50%);
  max-height:min(560px, calc(var(--app-vh) - var(--safe-t) - var(--safe-b) - 40px));
  overflow:hidden;
  padding:14px;
}
.roulette-wait{
  border-radius:20px;
  border:1px solid rgba(43,217,255,0.16);
  background:
    radial-gradient(80% 90% at 50% 0%, rgba(43,217,255,0.13), transparent 66%),
    var(--surface);
  box-shadow:
    inset 0 1px 0 var(--highlight),
    0 18px 42px var(--shadow-lg);
  padding:18px 14px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
}
.roulette-wait__anim{
  width:132px;
  height:132px;
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
  background: radial-gradient(circle, rgba(43,217,255,0.22), rgba(43,217,255,0.03) 68%);
}
.roulette-wait__ring{
  position:absolute;
  inset:9px;
  border-radius:50%;
  border:2px solid rgba(43,217,255,0.30);
  animation: rouletteWaitPulse 1.5s ease-in-out infinite;
}
.roulette-wait__core{
  width:66px;
  height:66px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:24px;
  font-weight:950;
  color:var(--text-strong);
  background:var(--surface2);
  box-shadow:
    inset 0 1px 0 var(--highlight),
    0 8px 20px var(--shadow-sm);
}
.roulette-wait__title{
  font-size:24px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:0.01em;
  color:var(--text-strong);
}
.roulette-wait__sub{
  max-width:34ch;
  font-size:14px;
  line-height:1.3;
  font-weight:760;
  color:var(--text-mid);
}
.roulette-wait__meta{
  min-height:18px;
  font-size:12px;
  font-weight:760;
  color:var(--text-low);
}
.roulette-wait__cancel{
  margin-top:2px;
}
.roulette-leave-modal{
  z-index:985;
}
.roulette-leave-modal__sheet{
  top:50%;
  bottom:auto;
  transform:translateY(-50%);
  max-height:min(420px, calc(var(--app-vh) - var(--safe-t) - var(--safe-b) - 40px));
  overflow:hidden;
  padding:14px;
}
.roulette-leave{
  border-radius:20px;
  border:1px solid var(--divider);
  background:var(--surface);
  box-shadow:
    inset 0 1px 0 var(--highlight),
    0 18px 42px var(--shadow-lg);
  padding:18px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  text-align:center;
}
.roulette-leave__title{
  font-size:22px;
  line-height:1.08;
  font-weight:950;
  color:var(--text-strong);
}
.roulette-leave__sub{
  font-size:13px;
  line-height:1.3;
  font-weight:760;
  color:var(--text-mid);
}
.roulette-leave__actions{
  margin-top:4px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
@keyframes rouletteWaitPulse{
  0%,100%{ transform:scale(0.96); opacity:0.55; }
  50%{ transform:scale(1.04); opacity:1; }
}

/* Compact mode when keyboard is visible (iOS Telegram WebView) */
html.has-kb .modal__sheet{
  padding:12px;
  border-radius:18px;
}
html.has-kb .modal__head{
  margin-bottom:6px;
}
html.has-kb .modal__title{
  font-size:15px;
}
html.has-kb .modal__section{
  margin-top:10px;
}
.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:disabled{
  opacity:0.45;
  cursor:default;
}
.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-racers{
  position:relative;
  width:224px;
  height:224px;
  display:grid;
  place-items:center;
  isolation:isolate;
}
.friends-racers img{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  transform-origin:50% 78%;
  will-change:transform;
  animation:friends-racers-sway 3.2s cubic-bezier(.45,0,.2,1) infinite;
}
.friends-racers__ring{
  position:absolute;
  z-index:0;
  width:126px;
  height:126px;
  border:2px solid currentColor;
  border-radius:50%;
  opacity:.48;
  filter:drop-shadow(0 0 12px currentColor);
}
.friends-racers__ring--blue{color:#2f74ff;left:12px;top:53px;animation:friends-ring-left 3.2s ease-in-out infinite}
.friends-racers__ring--red{color:#ff3e78;right:10px;top:58px;animation:friends-ring-right 3.2s ease-in-out infinite}
.friends-racers__spark{
  position:absolute;
  z-index:3;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#e9ff49;
  box-shadow:0 0 10px #e9ff49;
  opacity:0;
}
.friends-racers__spark--one{left:106px;top:18px;animation:friends-spark 3.2s ease-out infinite .3s}
.friends-racers__spark--two{left:129px;top:30px;animation:friends-spark 3.2s ease-out infinite .55s}
.friends-racers__spark--three{left:92px;top:35px;animation:friends-spark 3.2s ease-out infinite .8s}
@keyframes friends-racers-sway{
  0%,100%{transform:perspective(760px) translateX(0) rotateY(0deg)}
  25%{transform:perspective(760px) translateX(-3px) rotateY(-2.2deg)}
  50%{transform:perspective(760px) translateX(0) rotateY(0deg)}
  75%{transform:perspective(760px) translateX(3px) rotateY(2.2deg)}
}
@keyframes friends-ring-left{0%,100%{transform:scale(.88) rotate(-12deg);opacity:.26}50%{transform:scale(1.08) rotate(18deg);opacity:.58}}
@keyframes friends-ring-right{0%,100%{transform:scale(1.08) rotate(12deg);opacity:.52}50%{transform:scale(.88) rotate(-18deg);opacity:.24}}
@keyframes friends-spark{0%,52%{opacity:0;transform:translate(0,8px) scale(.35)}60%{opacity:1}82%,100%{opacity:0;transform:translate(var(--spark-x, 0),-24px) scale(1.15)}}
@media (prefers-reduced-motion:reduce){
  .friends-racers img,.friends-racers__ring,.friends-racers__spark{animation:none}
}
.friends-racers__ring,.friends-racers__spark{display:none}
.friends-racers__link{
  position:absolute;
  z-index:0;
  left:80px;
  top:105px;
  width:64px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,#4f8dff,#ff4aa2,transparent);
  background-size:180% 100%;
  filter:drop-shadow(0 0 7px rgba(249,83,176,.75));
  opacity:.72;
  animation:friends-team-link 1.8s ease-in-out infinite;
}
.friends-racers img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.friends-racers img.friends-racers__base{z-index:1;animation:none;transform:none}
.friends-racers img.friends-racers__arm{
  z-index:0;
  transform-origin:42% 82%;
  animation:friends-peace-wave 1.8s cubic-bezier(.45,0,.2,1) infinite;
}
.friends-racers img.friends-racers__arm--hand{
  z-index:3;
  clip-path:inset(0 0 52% 0);
  pointer-events:none;
}
@keyframes friends-peace-wave{
  0%,100%{transform:rotate(-3deg)}
  25%{transform:rotate(5deg)}
  50%{transform:rotate(-1deg)}
  75%{transform:rotate(6deg)}
}
@keyframes friends-team-link{
  0%,100%{background-position:110% 0;opacity:.18;transform:scaleX(.55)}
  45%{opacity:.94}
  60%{background-position:-60% 0;opacity:.68;transform:scaleX(1)}
}
.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 (stub) */
.games-stub__text{
  margin-top:10px;
  font-size:14px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.35;
}

/* Games → Roulette */
.games-home{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.game-entry{
  width:100%;
  border:1px solid var(--stroke);
  background:
    linear-gradient(165deg, rgba(43,217,255,0.12), transparent 52%),
    linear-gradient(180deg, var(--surface), var(--surface2));
  border-radius:24px;
  padding:20px 18px;
  position:relative;
  overflow:hidden;
  box-shadow:
    0 22px 48px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.game-entry--hero{
  min-height:332px;
}
html[data-theme="light"] .game-entry{
  background:
    linear-gradient(165deg, rgba(43,217,255,0.14), transparent 52%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88));
}
.game-entry::before{
  content:"";
  position:absolute;
  inset:-45% -30% auto;
  height:220px;
  background: radial-gradient(circle at center, rgba(43,217,255,0.24), transparent 64%);
  opacity:0.45;
  filter: blur(2px);
  pointer-events:none;
  animation: gameHeroGlow 3.2s ease-in-out infinite;
}
.game-entry__main{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.game-entry__topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.game-entry__kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
  letter-spacing:0.03em;
  text-transform:uppercase;
  color:var(--text-mid);
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.game-entry__live{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:900;
  letter-spacing:0.02em;
  text-transform:uppercase;
  color:var(--text-mid);
}
.game-entry__live-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 12px rgba(255,42,42,0.45);
  animation: gameLiveBlink 1.2s ease-in-out infinite;
}
.game-entry__hero{
  height:120px;
  border-radius:18px;
  border:1px solid var(--stroke2);
  background:
    radial-gradient(80% 120% at 50% 50%, rgba(43,217,255,0.14), transparent 66%),
    linear-gradient(180deg, var(--overlay), transparent);
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.game-entry__hero::before{
  content:"";
  position:absolute;
  inset:auto -10% 26px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--top-line), transparent);
  z-index:2;
}
.game-entry__hero-media{
  position:absolute;
  inset:0;
  z-index:1;
}
.game-entry__hero-img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  filter:saturate(1.03) contrast(1.02);
}
.game-entry__title{
  font-weight:900;
  font-size:15px;
  color:var(--text-strong);
  line-height:1.1;
}
.game-entry__title--hero{
  margin-top:2px;
  font-size:28px;
  line-height:1.02;
  letter-spacing:0.01em;
}
.game-entry__sub{
  margin-top:2px;
  font-weight:800;
  font-size:13px;
  color:var(--text-mid);
  line-height:1.25;
  max-width:44ch;
}
.game-entry__sub--hero{
  margin-top:0;
  font-size:15px;
  font-weight:700;
  line-height:1.24;
  max-width:36ch;
}
.game-entry__chips{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  justify-content:center;
  width:100%;
}
.game-entry__chip{
  display:inline-flex;
  align-items:center;
  height:30px;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
  color:var(--text-mid);
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.game-entry__quick{
  margin-top:2px;
  padding:11px;
  border-radius:18px;
  border:1px solid rgba(43,217,255,0.14);
  background:
    linear-gradient(180deg, rgba(43,217,255,0.06), transparent 34%),
    var(--surface2);
  box-shadow:
    inset 0 1px 0 var(--highlight),
    0 10px 22px var(--shadow-sm);
  display:flex;
  flex-direction:column;
  gap:9px;
}
.game-entry__quick-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.game-entry__quick-title{
  font-size:13px;
  font-weight:950;
  letter-spacing:0.02em;
  text-transform:uppercase;
  color:var(--text-strong);
}
.game-entry__quick-label{
  font-size:11px;
  font-weight:820;
  color:var(--text-mid);
  letter-spacing:0.01em;
  text-transform:uppercase;
}
.game-entry__seg{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.game-entry__seg--compact{
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:6px;
}
.game-entry__seg--compact#rouletteHomeScrapSeg{
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:5px;
}
.game-entry__seg--compact .game-entry__seg-btn{
  height:28px;
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
}
.game-entry__seg-btn{
  appearance:none;
  border:0;
  height:30px;
  border-radius:10px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  color:var(--text-mid);
  font-size:11px;
  font-weight:820;
  letter-spacing:0.01em;
  cursor:pointer;
  transition: transform .08s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.game-entry__seg-btn:active{
  transform:scale(0.985);
}
.game-entry__seg-btn.is-active{
  background:#0D0D0D;
  color:#FFFFFF;
  box-shadow:0 6px 14px var(--shadow-sm);
}
.game-entry__seg-btn:disabled{
  opacity:0.56;
  cursor:default;
}
.game-entry__quick-hint{
  font-size:12px;
  font-weight:760;
  color:var(--text-low);
  line-height:1.22;
}
.game-entry__session-lock{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:9px 10px;
  border-radius:14px;
  border:1px solid rgba(43,217,255,0.22);
  background:
    linear-gradient(135deg, rgba(43,217,255,0.10), rgba(255,42,42,0.04)),
    rgba(255,255,255,0.36);
  font-size:12px;
  font-weight:820;
  color:var(--text-mid);
  line-height:1.28;
  box-shadow:inset 0 1px 0 var(--highlight);
}
.game-entry__session-lock::before{
  content:"";
  flex:0 0 auto;
  width:7px;
  height:7px;
  margin-top:4px;
  border-radius:50%;
  background:#ff2a2a;
  box-shadow:0 0 0 4px rgba(255,42,42,0.08);
}
.game-entry__pane{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.game-entry__quick-state{
  min-height:18px;
  font-size:12px;
  font-weight:760;
  line-height:1.2;
  color:var(--text-low);
}
.game-entry__slotline{
  display:flex;
  align-items:center;
  gap:8px;
}
.game-entry__anim-slot{
  width:22px;
  height:22px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:12px;
}
.game-entry__anim-slot--searching{
  margin-left:auto;
}
.game-entry__slottext{
  font-size:12px;
  font-weight:820;
  color:var(--text-mid);
}
.game-entry__quick-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.game-entry__quick-meta-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:24px;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:var(--text-mid);
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.game-entry__quick-meta-item:first-child::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 10px rgba(255,42,42,0.34);
}
.game-entry__input-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--divider);
  background:var(--surface2);
  box-shadow: inset 0 1px 0 var(--highlight);
  padding:0 12px;
}
.game-entry__input-icon{
  font-size:13px;
  font-weight:900;
  color:var(--text-low);
}
.game-entry__input{
  flex:1 1 auto;
  min-width:0;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text-strong);
  font-size:12px;
  font-weight:760;
}
.game-entry__input::placeholder{
  color:var(--text-low);
  font-weight:760;
}
.game-entry__actions{
  margin-top:0;
  display:flex;
  width:100%;
}
.game-entry__actions--secondary{
  margin-top:2px;
}
.game-entry__cta{
  appearance:none;
  border:0;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 22px;
  border-radius:14px;
  font-size:16px;
  font-weight:850;
  letter-spacing:0.01em;
  white-space:nowrap;
  cursor:pointer;
  transition: transform .12s ease, opacity .14s ease, box-shadow .18s ease, background .18s ease;
}
.game-entry__cta:active{
  transform:scale(0.985);
}
.game-entry__cta--primary{
  width:100%;
  color:#FFFFFF;
  background:#0D0D0D;
  box-shadow:0 10px 20px var(--shadow-sm);
  animation:none;
}
.game-entry__cta--ghost{
  width:100%;
  color:var(--text-strong);
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.game-entry__cta:disabled{
  cursor:default;
}
html:not([data-theme="light"]) .game-entry__cta{
  border:1px solid rgba(255,255,255,0.12);
}
.game-entry__status{
  margin-top:2px;
  align-self:center;
  font-size:13px;
  font-weight:800;
  color:var(--text-mid);
}
.game-entry.is-disabled,
 .game-entry:disabled{
  opacity:0.76;
}
.game-entry.is-disabled .game-entry__cta,
.game-entry:disabled .game-entry__cta{
  cursor:default;
}
.game-entry.is-disabled .game-entry__cta--primary,
.game-entry:disabled .game-entry__cta--primary,
.game-entry.is-disabled .game-entry__cta--ghost,
.game-entry:disabled .game-entry__cta--ghost{
  background:var(--overlay2);
  color:var(--text-low);
  box-shadow: none;
  animation:none;
}
.game-entry.is-disabled::before,
.game-entry:disabled::before{
  animation:none;
  opacity:0.22;
}
@keyframes gameHeroGlow{
  0%,100%{ transform:translateY(0); opacity:0.38; }
  50%{ transform:translateY(-6px); opacity:0.56; }
}
@keyframes gameLiveBlink{
  0%,100%{ opacity:1; transform:scale(1); }
  50%{ opacity:0.45; transform:scale(0.86); }
}
@keyframes gameCtaPulse{
  0%,100%{ box-shadow:0 14px 30px var(--shadow-sm); }
  50%{ box-shadow:0 20px 38px rgba(43,217,255,0.24); }
}
@media (max-width: 390px){
  .game-entry__title--hero{ font-size:24px; }
  .game-entry__sub--hero{ font-size:14px; }
  .game-entry__chip{
    font-size:10px;
    padding:0 8px;
  }
}
@media (prefers-reduced-motion: reduce){
  .game-entry::before,
  .game-entry__live-dot,
  .game-entry__cta--primary{
    animation:none !important;
  }
  .roulette-wait__ring{
    animation:none !important;
  }
}

/* -------------------------------------------------------------------------
   UX/UI refresh — CARCASE Garage Arena foundation
   Keep mechanics untouched; consolidate surfaces and interaction hierarchy. */
:root{
  --brand:#ff4d45;
  --brand-strong:#ec3029;
  --brand-soft:rgba(255,77,69,.14);
  --surface-raised:color-mix(in srgb, var(--surface) 92%, var(--text) 8%);
  --focus-ring:0 0 0 3px color-mix(in srgb, var(--brand) 36%, transparent);
}

button:focus-visible,
input:focus-visible,
[role="tab"]:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
}

.top{
  border-bottom-color:var(--stroke);
  box-shadow:0 1px 0 var(--highlight);
}
.ttl__name{
  font-size:12px;
  font-weight:900;
  letter-spacing:.14em;
}
.card{
  border:1px solid var(--stroke2);
  box-shadow:0 12px 34px var(--shadow-md), inset 0 1px 0 var(--highlight);
}
.tabbar{
  border:1px solid var(--stroke);
  box-shadow:0 14px 34px var(--shadow-xl), inset 0 1px 0 var(--highlight);
}

/* Games are a single arena catalogue: neutral plates, red only as a signal. */
.game-entry{
  border-color:var(--stroke);
  background:linear-gradient(180deg, var(--surface-raised), var(--surface));
  box-shadow:0 16px 38px var(--shadow-md), inset 0 1px 0 var(--highlight);
}
html[data-theme="light"] .game-entry{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
}
.game-entry::before{
  background:radial-gradient(circle at 72% 4%, var(--brand-soft), transparent 56%);
  opacity:.55;
}
.game-entry__kicker,
.game-entry__quick-meta-item,
.game-entry__chip{
  border:1px solid var(--stroke2);
  background:var(--overlay);
}
.game-entry__quick{
  border-color:var(--stroke);
  background:linear-gradient(180deg, var(--overlay), transparent 52%), var(--surface2);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.game-entry__seg-btn.is-active{
  color:var(--cta-text);
  background:var(--cta-bg);
  box-shadow:0 6px 16px var(--shadow-sm);
}
.game-entry__cta--primary{
  color:var(--cta-text);
  background:var(--cta-bg);
  box-shadow:0 10px 20px var(--shadow-sm);
}
.game-entry__live-dot,
.game-entry__quick-meta-item:first-child::before{
  background:var(--brand);
  box-shadow:0 0 12px color-mix(in srgb, var(--brand) 44%, transparent);
}
.game-entry__session-lock{
  border-color:color-mix(in srgb, var(--brand) 28%, var(--stroke));
  background:linear-gradient(135deg, var(--brand-soft), transparent), var(--surface2);
}
.game-entry__session-lock::before{
  background:var(--brand);
  box-shadow:0 0 0 4px var(--brand-soft);
}

.games-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.games-head--roulette{
  justify-content:space-between;
  margin-bottom:10px;
}
.games-head--roulette .games-head__title{
  flex:1 1 auto;
  text-align:center;
}
.games-head--roulette .icon-btn{
  flex:0 0 40px;
}
.games-head__title{
  font-weight:900;
  font-size:18px;
  letter-spacing:0.01em;
  line-height:1.1;
}
.icon-btn{
  width:40px;
  height:40px;
  border-radius:14px;
  border:0;
  background:var(--overlay);
  color:var(--text-strong);
  font-weight:900;
  font-size:18px;
  display:grid;
  place-items:center;
  box-shadow:
    0 10px 24px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  cursor:pointer;
}

.games-roulette--hub{
  position:relative;
  overflow:hidden;
  padding-bottom:20px;
}

.roulette-icon{
  width:18px;
  height:18px;
  display:block;
}
.roulette-panel__icon .roulette-icon{
  width:20px;
  height:20px;
}
.roulette-hud{
  position:relative;
  z-index:1;
  border-radius:22px;
  padding:14px;
  background:var(--surface2);
  box-shadow:
    0 14px 34px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  overflow:hidden;
}
.roulette-hud__pattern{
  position:absolute;
  right:-46px;
  top:-36px;
  width:220px;
  height:auto;
  opacity:0.06;
  color:var(--text-strong);
  pointer-events:none;
}
.roulette-hud__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.roulette-hud__title-wrap{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.roulette-hud__title{
  font-weight:950;
  font-size:20px;
  letter-spacing:0.01em;
  line-height:1.05;
  color:var(--text-strong);
}
.roulette-hud__sub{
  font-weight:850;
  font-size:12px;
  color:var(--text-mid);
  letter-spacing:0.02em;
}
.roulette-hud__rules{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:16px;
}
.roulette-hud__chips{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.roulette-hud__desc{
  margin-top:8px;
  font-size:12px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.25;
  max-width:420px;
}
.roulette-progress{
  margin-top:12px;
  display:inline-flex;
  align-items:center;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(43,217,255,0.16);
  background:linear-gradient(135deg, rgba(43,217,255,0.08), rgba(255,255,255,0.04));
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:12px;
  font-weight:900;
  color:var(--text-mid);
  letter-spacing:0.02em;
}
.roulette-step{
  margin-top:14px;
}
.roulette-step:not([hidden]){
  animation: rouletteStepIn .2s ease both;
}
@keyframes rouletteStepIn{
  from{
    opacity:0;
    transform:translateY(6px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
.roulette-step__title{
  font-size:18px;
  font-weight:950;
  letter-spacing:0.01em;
  color:var(--text-strong);
}
.roulette-step__intro{
  margin-top:8px;
  font-size:13px;
  font-weight:750;
  color:var(--text-mid);
  line-height:1.28;
  max-width:45ch;
}
.roulette-step__chips{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.roulette-step-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.roulette-step--opponent{
  margin-top:12px;
}
.roulette-step--queue{
  margin-top:12px;
}
.roulette-step-head--opponent{
  align-items:center;
}
.roulette-step--queue .roulette-step-head{
  align-items:center;
}
.roulette-step-head__left{
  min-width:0;
}
.roulette-step-lock{
  margin-top:8px;
  padding:9px 11px;
  border-radius:12px;
  border:1px solid rgba(255,160,70,0.24);
  background:linear-gradient(135deg, rgba(255,160,70,0.12), rgba(255,255,255,0.04));
  font-size:12px;
  font-weight:850;
  line-height:1.3;
  color:var(--text-mid);
}
.roulette-mode-pill{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:12px;
  font-weight:850;
  color:var(--text-mid);
}
.roulette-mode-pill__label{
  color:var(--text-low);
}
.roulette-mode-pill--opponent{
  margin-top:0;
}
.roulette-opponent-hero{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.roulette-opponent-hero__sub{
  font-size:13px;
  font-weight:760;
  line-height:1.28;
  color:var(--text-mid);
  max-width:47ch;
}
.roulette-opponent-hero__mode{
  margin-top:2px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.roulette-link-btn{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text-mid);
  font-weight:900;
  font-size:12px;
  letter-spacing:0.02em;
  padding:0;
  cursor:pointer;
  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
}
.roulette-link-btn:disabled{
  opacity:0.5;
  cursor:default;
  text-decoration:none;
}
.roulette-mode-grid{
  margin-top:14px;
  display:grid;
  gap:10px;
}
.roulette-mode-card{
  width:100%;
  border:1px solid rgba(0,0,0,0.04);
  border-radius:20px;
  background:var(--surface2);
  box-shadow:
    0 12px 28px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  padding:13px;
  min-height:110px;
  text-align:left;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:
    "icon title"
    "icon desc"
    "icon meta";
  column-gap:12px;
  row-gap:5px;
  cursor:pointer;
  align-items:center;
  transition:transform .08s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, filter .16s ease;
}
.roulette-mode-card:active{
  transform:scale(0.99);
}
.roulette-mode-card.is-active{
  border-color: rgba(255,42,42,0.28);
  background: linear-gradient(135deg, rgba(255,42,42,0.06), var(--surface) 36%);
  box-shadow:
    0 16px 38px var(--shadow-lg),
    inset 0 0 0 1px rgba(255,42,42,0.18),
    inset 0 1px 0 var(--highlight);
}
html:not([data-theme="light"]) .roulette-mode-card.is-active{
  box-shadow:
    0 16px 38px var(--shadow-lg),
    inset 0 0 0 1px rgba(255,42,42,0.24),
    inset 0 1px 0 var(--highlight);
}
.roulette-mode-card__icon{
  grid-area:icon;
  width:36px;
  height:36px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-mode-card.is-active .roulette-mode-card__icon{
  background: rgba(255,42,42,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px rgba(255,42,42,0.12);
}
.roulette-mode-card__title-row{
  grid-area:title;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.roulette-mode-card__title{
  font-size:16px;
  font-weight:950;
  color:var(--text-strong);
}
.roulette-mode-card__tag{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 9px;
  border-radius:999px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.03em;
  text-transform:uppercase;
  color:var(--text-mid);
}
.roulette-mode-card__desc{
  grid-area:desc;
  font-size:12px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.25;
}
.roulette-mode-card__meta{
  grid-area:meta;
  font-size:11px;
  font-weight:850;
  color:var(--text-low);
  letter-spacing:0.01em;
}
.roulette-mode-card.is-active .roulette-mode-card__tag{
  color: rgba(255,42,42,0.94);
  background: rgba(255,42,42,0.12);
}
.roulette-mode-card.is-active .roulette-mode-card__meta{
  color: rgba(255,42,42,0.82);
}
.roulette-mode-card:disabled{
  cursor:default;
}
.roulette-mode-note{
  margin-top:11px;
  font-size:12px;
  font-weight:800;
  color:var(--text-low);
}
.roulette-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:11px;
  letter-spacing:0.02em;
  background:var(--overlay);
  border:1px solid transparent;
  color:var(--text-mid);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-badge--subtle{
  color:var(--text-strong);
}
.roulette-badge--risk{
  color: rgba(255,42,42,0.92);
  background: transparent;
  border-color: rgba(255,42,42,0.24);
}

.roulette-mode-seg{
  margin-top:14px;
}
.roulette-mode-seg .seg__highlight{
  background:var(--surface);
  box-shadow:
    0 10px 24px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.roulette-mode-seg .seg__btn{
  height:36px;
}
.roulette-mode-desc{
  margin-top:10px;
  font-weight:800;
  font-size:12px;
  color:var(--text-mid);
  line-height:1.25;
}

.roulette-section{
  margin-top:14px;
}
.roulette-section--in-panel{
  margin-top:12px;
}
.roulette-section--match{
  margin-top:12px;
  padding:14px;
  border-radius:20px;
  background:var(--surface2);
  box-shadow:
    0 14px 32px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.roulette-section__title{
  font-size:12px;
  font-weight:900;
  color:var(--text-mid);
  letter-spacing:0.02em;
  margin-bottom:10px;
}
.roulette-match-hud{
  margin-top:12px;
  padding:14px;
  border-radius:22px;
  background:var(--surface2);
  box-shadow:
    0 16px 36px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.roulette-match-hud--lobby{
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(43,217,255,0.11), transparent 70%),
    var(--surface2);
  border:1px solid rgba(43,217,255,0.16);
}
.roulette-match-hud__title{
  font-size:18px;
  font-weight:950;
  color:var(--text-strong);
  line-height:1.15;
}
.roulette-match-hud__meta{
  font-size:12px;
  font-weight:850;
  color:var(--text-mid);
}
.roulette-match-hud__meta-extra{
  display:flex;
  align-items:center;
  gap:8px;
}
.roulette-rarity-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(43,217,255,0.28);
  background:rgba(43,217,255,0.12);
  color:var(--text-strong);
  font-size:11px;
  font-weight:900;
  letter-spacing:.01em;
}
.roulette-rarity-chip--inline{
  min-height:22px;
  padding:3px 9px;
  font-size:10px;
}
.roulette-match-hud__timer{
  font-size:12px;
  font-weight:900;
  color:var(--text-mid);
}
.roulette-match-hud__timer.is-warning{
  color:rgba(255,72,72,0.9);
}
.roulette-match-hud__status{
  font-size:12px;
  font-weight:900;
  color:var(--text-mid);
  letter-spacing:.04em;
  text-transform:uppercase;
}
.roulette-match-hud__hint{
  font-size:12px;
  font-weight:800;
  color:var(--text-mid);
}
.roulette-phase{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:2px;
}
.roulette-phase__item{
  min-height:28px;
  border-radius:10px;
  border:1px solid var(--divider);
  background:var(--overlay);
  color:var(--text-low);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  transition:background .16s ease, color .16s ease, border-color .16s ease;
}
.roulette-phase__item.is-done{
  color:var(--text-mid);
  border-color:rgba(43,217,255,0.22);
}
.roulette-phase__item.is-active{
  background:rgba(43,217,255,0.16);
  color:var(--text-strong);
  border-color:rgba(43,217,255,0.34);
}
.roulette-spin-state{
  margin-top:0;
  font-size:13px;
  font-weight:900;
  color:var(--text-strong);
  transition:color .16s ease;
}
#rouletteSpinSection[data-state="my_turn"] .roulette-spin-state{
  color:var(--text-strong);
}
#rouletteSpinSection[data-state="opp_turn"] .roulette-spin-state,
#rouletteSpinSection[data-state="pending"] .roulette-spin-state{
  color:var(--text-mid);
}
#rouletteSpinSection[data-state="tie"] .roulette-spin-state{
  color:rgba(255,42,42,0.92);
}
.roulette-result-card{
  padding:12px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  gap:5px;
}
.roulette-result-card__title{
  font-size:16px;
  font-weight:950;
  color:var(--text-strong);
}
.roulette-result-card[data-result="win"] .roulette-result-card__title{
  color:rgba(46,238,146,0.92);
}
.roulette-result-card[data-result="lose"] .roulette-result-card__title{
  color:rgba(255,42,42,0.86);
}
.roulette-result-card__meta{
  font-size:12px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.35;
  white-space:pre-line;
}
.roulette-friend-wrap{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.roulette-friend{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.roulette-input{
  flex:1 1 auto;
  min-width:0;
  height:42px;
  border-radius:14px;
  border:1px solid var(--divider);
  background:var(--surface2);
  color:var(--text-strong);
  padding:0 12px;
  font-weight:800;
  font-size:13px;
  outline:none;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-input::placeholder{
  color:var(--text-low);
  font-weight:800;
}
.roulette-input--glow{
  background:var(--surface2);
}
.roulette-action{
  flex:0 0 auto;
  height:42px;
  padding:0 14px;
  border-radius:14px;
  border:0;
  background:var(--cta-bg);
  color:var(--cta-text);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 8px 18px var(--shadow-sm);
  transition:transform .08s ease;
}
.roulette-action--cta{
  background:var(--cta-bg);
}
.roulette-action--primary{
  height:52px;
  font-size:14px;
  border-radius:18px;
  background:#0D0D0D;
  color:#FFFFFF;
  box-shadow:0 16px 36px var(--shadow-md);
}
.roulette-action--inline{
  height:42px;
  border-radius:14px;
  font-size:13px;
  padding:0 14px;
  min-width:168px;
  box-shadow:0 10px 22px var(--shadow-md);
  white-space:nowrap;
}
.roulette-action--primary.is-soft-pulse:not(:disabled){
  animation: rouletteSoftPulse 2.2s ease-in-out infinite;
}
@keyframes rouletteSoftPulse{
  0%, 100%{ box-shadow:0 16px 36px var(--shadow-md); }
  50%{ box-shadow:0 18px 40px var(--shadow-md); }
}
html:not([data-theme="light"]) .roulette-action--primary{
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 18px 44px var(--shadow-lg),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.roulette-action:active{transform:scale(0.98)}
.roulette-action--ghost{
  background:var(--overlay);
  color:var(--text-strong);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-action--wide{
  width:100%;
  margin-top:10px;
}
.roulette-action--compact{
  margin-top:0;
  height:36px;
  border-radius:12px;
  padding:0 12px;
  font-size:12px;
  font-weight:850;
}
.roulette-queue{
  display:flex;
  gap:10px;
}
.roulette-queue--hub{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.roulette-queue--hub .roulette-action--wide{
  margin-top:0;
}
.roulette-hint{
  margin-top:8px;
  font-size:12px;
  color:var(--text-low);
  font-weight:800;
}
.roulette-hint--arena{
  margin-top:10px;
  color:var(--text-mid);
}

.roulette-panel{
  position:relative;
  z-index:1;
  margin-top:14px;
  padding:14px;
  border-radius:22px;
  background:var(--surface2);
  border:0;
  box-shadow:
    0 16px 36px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(10px);
}
.roulette-panel--find{
  box-shadow:
    0 18px 50px var(--shadow-lg),
    inset 0 1px 0 var(--highlight);
}
.roulette-step--opponent .roulette-panel{
  margin-top:10px;
  padding:12px;
}
.roulette-step--opponent .roulette-panel__head{
  margin-bottom:8px;
}
.roulette-step--opponent .roulette-action--wide{
  margin-top:10px;
}
.roulette-panel--opponent-main{
  border:1px solid rgba(43,217,255,0.16);
  background:
    radial-gradient(95% 120% at 10% 0%, rgba(43,217,255,0.12), transparent 70%),
    var(--surface2);
  box-shadow:
    0 20px 52px var(--shadow-lg),
    inset 0 1px 0 var(--highlight);
}
.roulette-panel--opponent-main[data-state="ready"]{
  box-shadow:
    0 22px 56px var(--shadow-lg),
    0 0 0 1px rgba(43,217,255,0.16),
    inset 0 1px 0 var(--highlight);
}
.roulette-panel--opponent-main[data-state="locked"]{
  border-color:rgba(255,160,70,0.22);
  background:
    radial-gradient(95% 120% at 10% 0%, rgba(255,160,70,0.12), transparent 74%),
    var(--surface2);
}
.roulette-panel--opponent-main[data-state="locked"] .roulette-opponent-meta__text{
  color:var(--text-low);
}
.roulette-panel--opponent-secondary{
  border:1px solid rgba(0,0,0,0.04);
  box-shadow:
    0 12px 26px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
}
.roulette-panel--opponent-secondary[data-state="waiting"]{
  border-color:rgba(43,217,255,0.20);
  box-shadow:
    0 14px 32px var(--shadow-md),
    0 0 0 1px rgba(43,217,255,0.12),
    inset 0 1px 0 var(--highlight);
}
.roulette-panel--opponent-secondary[data-state="waiting"] .roulette-opponent-meta__text{
  color:var(--text-strong);
}
.roulette-panel--friend{
  margin-top:12px;
  padding:14px;
}
.roulette-panel--queue{
  margin-top:12px;
  padding:16px 14px 14px;
  text-align:center;
}
.roulette-panel--queue[data-state="searching"]{
  box-shadow:
    0 20px 48px var(--shadow-lg),
    inset 0 1px 0 var(--highlight);
}
.roulette-panel--queue[data-state="canceling"]{
  box-shadow:
    0 14px 30px var(--shadow-md),
    inset 0 1px 0 var(--highlight);
  opacity:0.94;
}
.roulette-panel--queue .roulette-action--wide{
  margin-top:10px;
}
.roulette-panel.is-locked{
  opacity:0.82;
}
.roulette-panel.is-locked .roulette-action{
  pointer-events:none;
}
.roulette-panel__head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.roulette-opponent-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.roulette-opponent-chips--friend .roulette-badge{
  font-size:10px;
}
.roulette-opponent-meta{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.roulette-opponent-meta--friend{
  margin-top:8px;
  justify-content:flex-start;
}
.roulette-opponent-meta__text{
  min-width:0;
  font-size:12px;
  font-weight:830;
  color:var(--text-mid);
  line-height:1.25;
}
.roulette-opponent-online{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:900;
  letter-spacing:0.02em;
  text-transform:uppercase;
  color:var(--text-mid);
}
.roulette-opponent-online::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 10px rgba(255,42,42,0.34);
}
.roulette-panel__icon{
  width:42px;
  height:42px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background: var(--overlay);
  border:0;
  box-shadow: inset 0 1px 0 var(--highlight);
  color:var(--text-strong);
}
.roulette-panel__icon--accent{
  background: var(--overlay);
}
.roulette-panel__titles{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.roulette-panel__title{
  font-weight:950;
  font-size:14px;
  color:var(--text-strong);
  letter-spacing:0.01em;
}
.roulette-panel__sub{
  font-weight:850;
  font-size:12px;
  color:var(--text-mid);
  line-height:1.2;
}
.roulette-panel__title--center{
  text-align:center;
}

.roulette-vs{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text-low);
  font-weight:900;
  font-size:11px;
  letter-spacing:0.02em;
  white-space:nowrap;
}
.roulette-vs--queue{
  margin-left:0;
  padding:6px 9px;
  border-radius:999px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-vs__sep{
  opacity:0.55;
}
.roulette-vs__me,
.roulette-vs__opp{
  letter-spacing:0.02em;
  text-transform:none;
  font-weight:950;
  color:var(--text-mid);
}
.roulette-vs__opp{
  color:var(--text-strong);
}

@media (max-width: 420px){
  .roulette-step-head{
    flex-direction:column;
    align-items:stretch;
  }
  .roulette-step-head--opponent{
    align-items:flex-start;
  }
  .roulette-opponent-hero__mode{
    flex-direction:column;
    align-items:flex-start;
  }
  .roulette-action--compact{
    align-self:flex-start;
  }
  .roulette-opponent-meta{
    flex-direction:column;
    align-items:flex-start;
  }
  .roulette-vs--queue{
    margin-top:2px;
  }
}
.roulette-vs--friend{
  margin:8px 0 10px;
  margin-left:0;
  justify-content:flex-start;
  font-size:12px;
  letter-spacing:0.02em;
  text-transform:none;
}

.roulette-status{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text-mid);
  font-size:12px;
  font-weight:800;
}
.roulette-status--center{
  justify-content:center;
  margin-bottom:2px;
}
.roulette-status--friend{
  margin-top:10px;
}
.roulette-section--friend-list{
  margin-top:10px;
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(43,217,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.36), rgba(43,217,255,0.06)),
    var(--surface2);
  box-shadow:
    0 10px 22px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
}
.roulette-section--friend-list .roulette-section__title{
  margin-bottom:8px;
}
.roulette-status__dots{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-left:2px;
}
.roulette-status__dots i{
  width:4px;
  height:4px;
  border-radius:50%;
  background:currentColor;
  opacity:0.22;
  animation: rouletteDot 1.1s ease-in-out infinite;
}
.roulette-status__dots i:nth-child(2){ animation-delay: 0.18s; }
.roulette-status__dots i:nth-child(3){ animation-delay: 0.36s; }
@keyframes rouletteDot{
  0%, 100%{ opacity:0.22; transform: translateY(0px); }
  50%{ opacity:0.72; transform: translateY(-1px); }
}

@media (max-width: 420px){
  .roulette-friend{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }
  .roulette-action--inline{
    min-width:146px;
    padding:0 10px;
    font-size:12px;
  }
}

.roulette-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.roulette-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-item__main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.roulette-item__title{
  font-size:13px;
  font-weight:900;
  color:var(--text-strong);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.roulette-item__sub{
  font-size:11px;
  font-weight:800;
  color:var(--text-mid);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.roulette-item__actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.game-entry__friend-invite{
  width:100%;
}
.roulette-invite-card{
  width:100%;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:15px;
  border-radius:20px;
  background:
    radial-gradient(circle at 14% 0%, rgba(43,217,255,0.16), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.74), rgba(245,247,252,0.54)),
    var(--overlay);
  border:1px solid rgba(43,217,255,0.22);
  box-shadow:0 16px 34px var(--shadow-sm), inset 0 1px 0 var(--highlight);
}
.roulette-invite-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  z-index:0;
  background:linear-gradient(90deg, rgba(43,217,255,0.82), rgba(255,42,42,0.72));
}
.roulette-invite-card--compact,
.roulette-invite-card[data-direction="outgoing"]{
  background:
    radial-gradient(circle at 14% 0%, rgba(43,217,255,0.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.66), rgba(245,247,252,0.50)),
    var(--overlay);
}
.roulette-invite-card--compact{
  gap:10px;
  padding:13px;
  border-radius:18px;
}
html[data-theme="dark"] .roulette-invite-card{
  background:
    radial-gradient(circle at 14% 0%, rgba(43,217,255,0.12), transparent 34%),
    linear-gradient(135deg, rgba(43,217,255,0.08), rgba(255,42,42,0.06)),
    rgba(245,247,252,0.06);
  border-color:rgba(245,247,252,0.12);
}
.roulette-invite-card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.roulette-invite-card__kicker,
.roulette-invite-card__timer{
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:0 9px;
  font-size:10px;
  font-weight:950;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0;
  background:rgba(13,13,13,0.05);
}
.roulette-invite-card__timer{
  gap:6px;
  flex:0 0 auto;
  letter-spacing:0;
  text-transform:none;
  color:var(--text-mid);
  background:rgba(255,255,255,0.44);
  box-shadow:inset 0 1px 0 var(--highlight);
}
.roulette-invite-card__timer::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:#ff2a2a;
  box-shadow:0 0 0 4px rgba(255,42,42,0.08);
}
.roulette-invite-card__main{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  gap:11px;
}
.roulette-invite-card__avatar{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
  border-radius:16px;
  background:
    linear-gradient(135deg, rgba(43,217,255,0.22), rgba(255,255,255,0.58));
  border:1px solid rgba(43,217,255,0.26);
  color:var(--text-strong);
  font-size:17px;
  font-weight:1000;
  box-shadow:inset 0 1px 0 var(--highlight), 0 8px 18px var(--shadow-sm);
}
.roulette-invite-card__avatar-img{
  width:100%;
  height:100%;
  display:none;
  object-fit:cover;
}
.roulette-invite-card__avatar-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.roulette-invite-card__avatar.has-img .roulette-invite-card__avatar-img{
  display:block;
}
.roulette-invite-card__avatar.has-img .roulette-invite-card__avatar-fallback{
  display:none;
}
.roulette-invite-card__content{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
}
.roulette-invite-card__title{
  color:var(--text-strong);
  font-size:16px;
  font-weight:1000;
  line-height:1.14;
  overflow-wrap:anywhere;
}
.roulette-invite-card__chips{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.roulette-invite-card__chips span{
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:0 9px;
  background:rgba(43,217,255,0.10);
  border:1px solid rgba(43,217,255,0.18);
  color:var(--text-mid);
  font-size:11px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.roulette-invite-card__actions{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  align-items:center;
}
.roulette-invite-card[data-direction="outgoing"] .roulette-invite-card__actions{
  grid-template-columns:minmax(0, 1fr);
}
.roulette-invite-card__actions .roulette-action{
  width:100%;
  min-width:0;
  height:42px;
  border-radius:14px;
  font-size:13px;
  font-weight:950;
}
.roulette-invite-card__accept{
  box-shadow:0 12px 24px var(--shadow-md);
}
.roulette-invite-card__decline{
  background:rgba(13,13,13,0.06);
  color:var(--text-strong);
  border:1px solid rgba(13,13,13,0.04);
}
.roulette-invite-card--compact .roulette-invite-card__avatar{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:16px;
}
.roulette-invite-card--compact .roulette-invite-card__title{
  font-size:15px;
}
.roulette-invite-card--compact .roulette-invite-card__actions .roulette-action{
  height:40px;
}
.roulette-mini-btn{
  height:34px;
  padding:0 12px;
  border-radius:12px;
  border:0;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 6px 14px var(--shadow-sm);
}
.roulette-mini-btn--ghost{
  background:transparent;
  color:var(--text-strong);
  border:1px solid var(--divider);
  box-shadow:none;
}

.roulette-match{
  padding:12px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  font-size:12px;
  font-weight:800;
  color:var(--text-mid);
  line-height:1.35;
  white-space:pre-line;
}
#rouletteMatchWrap .roulette-match{
  cursor:pointer;
}
.roulette-match--hub{
  background:var(--overlay);
  border:0;
}

.modal__sheet--rules{
  max-width:520px;
}
.rules-kicker{
  font-weight:950;
  font-size:14px;
  color:var(--text-strong);
  margin-bottom:10px;
}
.rules-list{
  margin:0;
  padding-left:18px;
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--text-mid);
  font-weight:800;
  font-size:13px;
  line-height:1.25;
}
.roulette-stakes{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}
.roulette-stakes__meta{
  margin-bottom:8px;
}
.roulette-stake{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:6px;
  min-height:72px;
  border-radius:14px;
  padding:10px 12px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.roulette-stake__label{
  font-size:11px;
  font-weight:900;
  color:var(--text-mid);
}
.roulette-stake__value{
  font-size:13px;
  font-weight:900;
  color:var(--text-strong);
  min-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
}

.roulette-ready-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.roulette-ready-chip{
  min-height:30px;
  padding:6px 10px;
  border-radius:10px;
  background:var(--overlay);
  border:1px solid var(--divider);
  color:var(--text-mid);
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}
.roulette-ready-chip.is-ready{
  background:rgba(46,238,146,0.14);
  border-color:rgba(46,238,146,0.34);
  color:var(--text-strong);
}

.roulette-spin-anim{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.roulette-spin-anim__box{
  width:min(240px, 70vw);
  aspect-ratio:1 / 1;
  border-radius:18px;
  background:rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 var(--highlight);
  overflow:hidden;
  display:grid;
  place-items:center;
}
.roulette-spin-anim__box > svg{
  width:100%;
  height:100%;
}
.roulette-spin-anim__label{
  font-size:12px;
  font-weight:900;
  color:var(--text-strong);
  text-align:center;
}

.roulette-cinematic{
  position:fixed;
  inset:0;
  z-index:5000;
  padding: calc(14px + var(--safe-t)) 18px calc(18px + var(--safe-b));
  background:#fff;
  display:block;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
}
html[data-theme="dark"] .roulette-cinematic{
  background:#0D0D0D;
}
.roulette-cinematic__card{
  width:100%;
  min-height:100%;
  max-width:520px;
  margin:0 auto;
  padding:0;
  background: transparent;
  border:0;
  box-shadow:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  justify-content:safe center;
  gap:12px;
}
.roulette-cinematic[data-scene="result"] .roulette-cinematic__card{
  min-height:0;
  justify-content:flex-start;
  padding-bottom:10px;
}
html[data-theme="dark"] .roulette-cinematic__card{
  background: transparent;
  border-color: transparent;
}
.roulette-cinematic__kicker{
  font-size:11px;
  font-weight:950;
  letter-spacing:.16em;
  color:var(--muted2);
}
.roulette-cinematic__title{
  font-size:22px;
  font-weight:1000;
  color:var(--text-strong);
  text-align:center;
  line-height:1.12;
}
.roulette-cinematic__sub{
  font-size:13px;
  font-weight:850;
  color:var(--muted);
  text-align:center;
  line-height:1.35;
  max-width:32ch;
}
.roulette-cinematic__chip{
  margin-top:4px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(43,217,255,0.10);
  border:1px solid rgba(43,217,255,0.26);
  color:var(--text-strong);
  font-size:12px;
  font-weight:950;
}
.roulette-cinematic__score{
  width:100%;
  margin-top:6px;
  padding:14px 12px;
  border-radius:20px;
  background:var(--overlay);
  border:1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-align:center;
}
.roulette-cin-score__big{
  font-size:28px;
  font-weight:1000;
  color:var(--text-strong);
  letter-spacing:-.02em;
  line-height:1.05;
}
.roulette-cin-score__sep{
  display:inline-block;
  margin:0 10px;
  color:var(--muted2);
}
.roulette-cin-score__sub{
  font-size:12px;
  font-weight:950;
  color:var(--muted);
  letter-spacing:.02em;
}
.roulette-cin-score__bars{
  width:100%;
  display:grid;
  gap:8px;
  margin-top:4px;
}
.roulette-cin-score__bar-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.roulette-cin-score__mini{
  width:26px;
  height:26px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:1000;
  color:var(--text-strong);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.65), rgba(255,255,255,0.10) 55%),
    linear-gradient(135deg, rgba(43,217,255,0.18), rgba(255,255,255,0.00));
  border:1px solid rgba(43,217,255,0.22);
  box-shadow: 0 10px 18px var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.28);
  position:relative;
  overflow:hidden;
  flex:0 0 auto;
}
html[data-theme="dark"] .roulette-cin-score__mini{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), rgba(0,0,0,0.02) 55%),
    linear-gradient(135deg, rgba(43,217,255,0.14), rgba(0,0,0,0.00));
  box-shadow: 0 12px 22px var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06);
}
.roulette-cin-score__mini-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.roulette-cin-score__mini-fallback{
  position:relative;
  z-index:1;
}
.roulette-cin-score__mini.has-img .roulette-cin-score__mini-img{
  display:block;
}
.roulette-cin-score__mini.has-img .roulette-cin-score__mini-fallback{
  opacity:0;
}
.roulette-cin-score__bar{
  height:10px;
  border-radius:999px;
  background:rgba(43,217,255,0.10);
  border:1px solid rgba(43,217,255,0.18);
  overflow:hidden;
  flex:1 1 auto;
}
.roulette-cin-score__bar--opp{
  background:rgba(255,42,42,0.08);
  border-color:rgba(255,42,42,0.16);
}
.roulette-cin-score__bar-fill{
  display:block;
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(43,217,255,0.55), rgba(43,217,255,0.95));
  box-shadow:0 10px 18px rgba(43,217,255,0.18);
  transition:width .35s ease;
}
.roulette-cin-score__bar-fill--right{
  background:linear-gradient(90deg, rgba(255,42,42,0.45), rgba(255,42,42,0.92));
  box-shadow:0 10px 18px rgba(255,42,42,0.18);
}
.roulette-cinematic__turn-control{
  width:100%;
  margin-top:4px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
  padding:0;
  text-align:center;
}
html[data-theme="dark"] .roulette-cinematic__turn-control{
  color:var(--text-strong);
}
.roulette-cinematic__turn-label{
  min-height:16px;
  font-size:12px;
  font-weight:950;
  color:var(--muted);
  text-align:center;
}
.roulette-cinematic__spin-btn{
  --turn-progress:0;
  position:relative;
  width:100%;
  min-height:58px;
  border:0;
  border-radius:18px;
  overflow:hidden;
  display:grid;
  place-items:center;
  padding:0 20px;
  background:rgba(124,132,150,0.16);
  color:#fff;
  box-shadow:0 12px 26px rgba(255,42,42,0.14), inset 0 1px 0 rgba(255,255,255,0.24);
  font:inherit;
  cursor:pointer;
  touch-action:manipulation;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}
.roulette-cinematic__spin-btn:disabled{
  cursor:default;
  pointer-events:none;
}
.roulette-cinematic__spin-progress{
  position:absolute;
  inset:0;
  transform:scaleX(var(--turn-progress, 0));
  transform-origin:right center;
  background:linear-gradient(90deg, rgba(255,42,42,0.76), rgba(255,42,42,1));
  box-shadow:0 14px 28px rgba(255,42,42,0.22);
  transition:transform .08s linear, opacity .16s ease;
  opacity:1;
}
.roulette-cinematic__spin-text{
  position:relative;
  z-index:1;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
  font-weight:1000;
  letter-spacing:0;
}
.roulette-cinematic__setup-cancel{
  width:100%;
  min-height:44px;
  border:1px solid rgba(124,132,150,0.18);
  border-radius:16px;
  background:rgba(124,132,150,0.10);
  color:var(--text-mid);
  font:inherit;
  font-size:13px;
  font-weight:950;
  letter-spacing:0;
  cursor:pointer;
  touch-action:manipulation;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.24);
  transition:transform .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}
.roulette-cinematic__setup-cancel[hidden]{
  display:none;
}
.roulette-cinematic__setup-cancel:active{
  transform:scale(.985);
}
.roulette-cinematic__setup-cancel:disabled{
  cursor:default;
  opacity:.56;
}
html[data-theme="dark"] .roulette-cinematic__setup-cancel{
  border-color:rgba(245,247,252,0.12);
  background:rgba(245,247,252,0.07);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
}
.roulette-cinematic__turn-hint{
  min-height:15px;
  font-size:11px;
  font-weight:850;
  color:var(--muted2);
  line-height:1.25;
}
.roulette-cinematic__turn-control[data-state="my_turn"] .roulette-cinematic__spin-btn{
  color:#fff;
  background:rgba(255,42,42,0.18);
  box-shadow:
    0 14px 28px rgba(255,42,42,0.18),
    inset 0 1px 0 rgba(255,255,255,0.26);
  cursor:pointer;
}
.roulette-cinematic__turn-control[data-state="my_turn"] .roulette-cinematic__spin-btn:active{
  transform:scale(.985);
}
.roulette-cinematic__turn-control[data-state="my_turn"] .roulette-cinematic__spin-progress{
  opacity:1;
}
.roulette-cinematic__turn-control[data-setup="1"] .roulette-cinematic__spin-progress{
  transform:scaleX(var(--turn-progress, 0));
  transform-origin:left center;
}
.roulette-cinematic__turn-control[data-state="opponent_turn"] .roulette-cinematic__spin-btn{
  display:none;
}
.roulette-cinematic__turn-control[data-state="opponent_turn"] .roulette-cinematic__spin-progress{
  background:linear-gradient(90deg, rgba(124,132,150,0.22), rgba(124,132,150,0.38));
  box-shadow:none;
  opacity:1;
}
html[data-theme="dark"] .roulette-cinematic__turn-control[data-state="opponent_turn"] .roulette-cinematic__spin-btn{
  display:none;
}
html[data-theme="dark"] .roulette-cinematic__turn-control[data-state="opponent_turn"] .roulette-cinematic__spin-progress{
  background:linear-gradient(90deg, rgba(245,247,252,0.1), rgba(245,247,252,0.22));
}
.roulette-cinematic__turn-control[data-state="submitting"] .roulette-cinematic__spin-btn{
  color:#fff;
  background:rgba(255,42,42,0.22);
}
.roulette-cinematic__turn-control[data-state="submitting"] .roulette-cinematic__spin-progress{
  opacity:.62;
}
.roulette-cinematic__turn-control[data-state="auto_pending"] .roulette-cinematic__spin-btn{
  color:var(--muted);
  background:rgba(124,132,150,0.14);
}
.roulette-cinematic__turn-control[data-state="auto_pending"] .roulette-cinematic__spin-progress{
  opacity:0;
}
.roulette-cinematic__turn-control[data-state="waiting"]{
  padding:10px 12px;
  border-radius:18px;
  background:rgba(124,132,150,0.10);
  box-shadow:inset 0 0 0 1px rgba(124,132,150,0.14);
}
.roulette-cinematic__turn-control[data-state="waiting"] .roulette-cinematic__spin-btn{
  display:none;
}
.roulette-cinematic__turn-control[data-state="waiting"] .roulette-cinematic__turn-label{
  color:var(--text-strong);
}
.roulette-cinematic__turn-control[data-state="waiting"] .roulette-cinematic__turn-hint{
  color:var(--text-mid);
}
.roulette-cinematic__stakes{
  width:100%;
}
.roulette-cin-stakes-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  width:100%;
}
.roulette-cin-stakes-grid--single{
  grid-template-columns:minmax(0, min(340px, 100%));
  justify-content:center;
}
.roulette-cin-stake-slot{
  position:relative;
  min-width:0;
  padding:10px;
  border-radius:18px;
  background:rgba(245,247,252,0.54);
  border:1px solid rgba(124,132,150,0.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.48);
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
}
.roulette-cin-stakes-grid[data-result] .roulette-cin-stake-slot{
  border-radius:20px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid{
  gap:8px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single{
  width:100%;
  max-width:360px;
  margin:0 auto;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot{
  padding:8px;
  gap:6px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot{
  padding:10px;
  gap:8px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__media{
  border-radius:13px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__label{
  font-size:9px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__title{
  min-height:24px;
  font-size:11px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__meta{
  font-size:9px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__stats{
  font-size:8.5px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stake-slot__badge{
  padding:4px 8px;
  font-size:9px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot__label{
  font-size:10px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot__title{
  min-height:0;
  font-size:13px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot__meta{
  font-size:10px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot__stats{
  font-size:9px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-stakes-grid--single .roulette-cin-stake-slot__badge{
  padding:5px 10px;
  font-size:10px;
}
html[data-theme="dark"] .roulette-cin-stake-slot{
  background:rgba(245,247,252,0.06);
  border-color:rgba(245,247,252,0.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
}
.roulette-cin-stake-slot[data-state="empty"]{
  border-style:dashed;
  background:rgba(124,132,150,0.08);
}
.roulette-cin-stake-slot[data-state="empty"] .roulette-cin-stake-slot__media{
  background:
    linear-gradient(135deg, rgba(124,132,150,0.10), rgba(124,132,150,0.04));
  border:1px dashed rgba(124,132,150,0.22);
  color:var(--muted2);
}
.roulette-cin-stake-slot[data-state="selected"] .roulette-cin-stake-slot__media{
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(124,132,150,0.10));
  box-shadow:inset 0 0 0 1px rgba(124,132,150,0.10);
}
.roulette-cin-stake-slot[data-outcome="won"]{
  border-color:rgba(46,238,146,0.42);
  box-shadow:0 18px 34px rgba(46,238,146,0.12), inset 0 1px 0 rgba(255,255,255,0.58);
}
.roulette-cin-stake-slot[data-outcome="lost"]{
  border-color:rgba(255,42,42,0.34);
  background:rgba(255,42,42,0.06);
}
.roulette-cin-stake-slot[data-outcome="returned"]{
  border-color:rgba(124,132,150,0.22);
}
.roulette-cin-stake-slot__media{
  width:100%;
  aspect-ratio:1 / 1;
  border-radius:14px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:rgba(43,217,255,0.08);
  color:var(--muted);
  font-weight:1000;
}
.roulette-cin-stake-slot__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.roulette-cin-stake-slot__media-empty,
.roulette-cin-stake-slot__media-placeholder{
  max-width:86%;
  color:var(--muted2);
  font-size:11px;
  font-weight:900;
  line-height:1.22;
  text-align:center;
  opacity:.72;
}
.roulette-cin-stake-slot__media-placeholder{
  font-size:10px;
  opacity:.58;
}
.roulette-cin-stake-slot__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.roulette-cin-stake-slot__label{
  color:var(--muted);
  font-size:10px;
  font-weight:950;
}
.roulette-cin-stake-slot__title{
  color:var(--text-strong);
  font-size:12px;
  font-weight:1000;
  line-height:1.12;
  min-height:28px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.roulette-cin-stake-slot__meta{
  color:var(--text-mid);
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.roulette-cin-stake-slot__stats{
  color:var(--muted2);
  font-size:9px;
  font-weight:850;
  line-height:1.18;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.roulette-cin-stake-slot__badge{
  align-self:flex-start;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(43,217,255,0.12);
  border:1px solid rgba(43,217,255,0.22);
  color:var(--text-strong);
  font-size:10px;
  font-weight:950;
}
.roulette-cin-stake-slot[data-outcome="won"] .roulette-cin-stake-slot__badge{
  background:rgba(46,238,146,0.14);
  border-color:rgba(46,238,146,0.30);
}
.roulette-cin-stake-slot[data-outcome="lost"] .roulette-cin-stake-slot__badge{
  background:rgba(255,42,42,0.12);
  border-color:rgba(255,42,42,0.24);
}
.roulette-cinematic__players{
  width:100%;
  margin-top:4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.roulette-cin-player{
  flex:1 1 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  min-width:0;
}
.roulette-cin-player__rounds{
  width:100%;
  min-height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  margin-top:-2px;
}
.roulette-cin-round{
  width:20px;
  height:20px;
  border-radius:999px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-size:10px;
  font-weight:1000;
  line-height:1;
  letter-spacing:0;
  color:rgba(25,27,34,0.46);
  background:rgba(43,217,255,0.06);
  border:1px solid rgba(43,217,255,0.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.45);
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.roulette-cin-player__rounds--opp .roulette-cin-round{
  background:rgba(255,42,42,0.05);
  border-color:rgba(255,42,42,0.18);
}
.roulette-cin-round.is-filled{
  color:#071015;
  background:linear-gradient(135deg, rgba(43,217,255,0.72), rgba(43,217,255,0.96));
  border-color:rgba(43,217,255,0.72);
  box-shadow:0 8px 14px rgba(43,217,255,0.18), inset 0 1px 0 rgba(255,255,255,0.38);
}
.roulette-cin-player__rounds--opp .roulette-cin-round.is-filled{
  color:#fff;
  background:linear-gradient(135deg, rgba(255,66,72,0.82), rgba(255,42,42,0.98));
  border-color:rgba(255,42,42,0.70);
  box-shadow:0 8px 14px rgba(255,42,42,0.18), inset 0 1px 0 rgba(255,255,255,0.24);
}
.roulette-cin-round.is-current{
  transform:translateY(-1px);
  border-color:rgba(255,42,42,0.48);
  box-shadow:0 0 0 4px rgba(255,42,42,0.09), inset 0 1px 0 rgba(255,255,255,0.38);
}
.roulette-cin-round.is-overtime{
  width:22px;
  border-style:dashed;
}
html[data-theme="dark"] .roulette-cin-round{
  color:rgba(245,247,252,0.45);
  background:rgba(43,217,255,0.08);
  border-color:rgba(43,217,255,0.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.08);
}
html[data-theme="dark"] .roulette-cin-player__rounds--opp .roulette-cin-round{
  background:rgba(255,42,42,0.08);
  border-color:rgba(255,42,42,0.20);
}
html[data-theme="dark"] .roulette-cin-round.is-filled{
  color:#071015;
}
html[data-theme="dark"] .roulette-cin-player__rounds--opp .roulette-cin-round.is-filled{
  color:#fff;
}
.roulette-cin-player.is-active .roulette-cin-player__avatar{
  border-color: rgba(255,42,42,0.45);
  box-shadow:
    0 18px 36px rgba(255,42,42,0.16),
    0 0 0 6px rgba(255,42,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.55);
}
html[data-theme="dark"] .roulette-cin-player.is-active .roulette-cin-player__avatar{
  box-shadow:
    0 20px 42px rgba(255,42,42,0.18),
    0 0 0 6px rgba(255,42,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.roulette-cin-player.is-active .roulette-cin-player__name{
  color:var(--text-strong);
}
.roulette-cinematic__vs{
  flex:0 0 auto;
  font-size:12px;
  font-weight:1000;
  color:var(--muted2);
  letter-spacing:.12em;
}
.roulette-cin-player__avatar{
  width:52px;
  height:52px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-size:18px;
  font-weight:1000;
  color:var(--text-strong);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.65), rgba(255,255,255,0.10) 55%),
    linear-gradient(135deg, rgba(43,217,255,0.22), rgba(255,255,255,0.00));
  border:1px solid rgba(43,217,255,0.22);
  box-shadow: 0 16px 28px var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.35);
  position:relative;
  overflow:hidden;
}
html[data-theme="dark"] .roulette-cin-player__avatar{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), rgba(0,0,0,0.02) 55%),
    linear-gradient(135deg, rgba(43,217,255,0.16), rgba(0,0,0,0.00));
  box-shadow: 0 18px 34px var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06);
}
.roulette-cin-player__avatar-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.roulette-cin-player__avatar-fallback{
  position:relative;
  z-index:1;
}
.roulette-cin-player__avatar.has-img .roulette-cin-player__avatar-img{
  display:block;
}
.roulette-cin-player__avatar.has-img .roulette-cin-player__avatar-fallback{
  opacity:0;
}
.roulette-cin-player__name{
  font-size:12px;
  font-weight:950;
  color:var(--text-strong);
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.roulette-cinematic__anim{
  width:100%;
  margin-top:6px;
  padding:12px;
  border-radius:20px;
  background:var(--overlay);
  box-shadow: inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.roulette-cinematic__anim-box{
  width:min(340px, 92vw);
  aspect-ratio:1 / 1;
  border-radius:22px;
  background:rgba(255,255,255,.38);
  box-shadow: inset 0 1px 0 var(--highlight);
  overflow:hidden;
  display:grid;
  place-items:center;
}
.roulette-cinematic__anim-box > svg{
  width:100%;
  height:100%;
}
.roulette-cinematic__anim-label{
  font-size:12px;
  font-weight:950;
  color:var(--text-strong);
  text-align:center;
}
.roulette-cinematic__result{
  width:100%;
  margin-top:6px;
  padding:14px 12px;
  border-radius:20px;
  background:var(--overlay);
  border:1px solid var(--divider);
  box-shadow: inset 0 1px 0 var(--highlight);
  display:flex;
  flex-direction:column;
  gap:6px;
  text-align:center;
}
.roulette-cinematic__result[data-result="win"]{
  border-color:rgba(46,238,146,0.22);
  background:linear-gradient(180deg, rgba(46,238,146,0.09), rgba(124,132,150,0.08));
}
.roulette-cinematic__result[data-result="lose"]{
  border-color:rgba(255,42,42,0.18);
  background:linear-gradient(180deg, rgba(255,42,42,0.08), rgba(124,132,150,0.08));
}
.roulette-cinematic__result[data-result="canceled"]{
  border-color:rgba(124,132,150,0.18);
  background:rgba(124,132,150,0.08);
}
.roulette-cinematic__result-title{
  font-size:16px;
  font-weight:1000;
  color:var(--text-strong);
}
.roulette-cinematic__result-meta{
  font-size:12px;
  font-weight:850;
  color:var(--muted);
  line-height:1.35;
}
.roulette-cinematic[data-scene="result"] .roulette-cinematic__score{
  margin-top:4px;
  padding:12px;
  border-radius:18px;
}
.roulette-cinematic[data-scene="result"] .roulette-cin-score__big{
  font-size:24px;
}
.roulette-cinematic[data-scene="result"] .roulette-cinematic__result{
  margin-top:4px;
  padding:13px 12px;
}
.roulette-cinematic[data-scene="result"] #rouletteCinematicToLobbyBtn{
  position:sticky;
  bottom:10px;
  z-index:2;
  width:100%;
  margin-top:8px;
  min-height:52px;
  box-shadow:
    0 -12px 28px rgba(255,255,255,0.78),
    0 16px 36px var(--shadow-md);
}
html[data-theme="dark"] .roulette-cinematic[data-scene="result"] #rouletteCinematicToLobbyBtn{
  box-shadow:
    0 -12px 28px rgba(13,13,13,0.78),
    0 18px 44px var(--shadow-lg),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
#rouletteMatchPrimaryBtn{
  margin-top:14px;
}

/* 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}
.collection-carcase-idle{
  position:relative;
  display:grid;
  place-items:center;
  isolation:isolate;
}
.collection-carcase-idle::after{
  content:"";
  position:absolute;
  z-index:-1;
  left:19%;
  right:16%;
  bottom:15%;
  height:8%;
  border-radius:50%;
  background:rgba(0,0,0,.3);
  filter:blur(9px);
  opacity:.82;
}
.collection-carcase-idle__fallback{
  display:block;
  width:112%;
  max-width:none;
  height:auto;
  transform-origin:50% 88%;
  will-change:transform;
}
.collection-carcase-idle.is-css-idle .collection-carcase-idle__fallback{
  animation:collection-carcase-idle-sway 2.8s cubic-bezier(.45,0,.2,1) infinite;
}
.collection-carcase-sequence{
  position:absolute;
  width:112%;
  aspect-ratio:1;
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%);
}
.collection-carcase-sequence__frame{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  opacity:0;
  /* Only one painted frame at a time: blending two different 3D renders
     produces the bright, doubled outline seen in Telegram WebView. */
  transition:none;
}
.collection-carcase-sequence__frame.is-active{opacity:1}
.collection-carcase-idle.is-ready .collection-carcase-idle__fallback{display:none}
@keyframes collection-carcase-idle-sway{
  0%,100%{transform:perspective(760px) translateX(0) rotateY(0deg)}
  24%{transform:perspective(760px) translateX(-4px) rotateY(-4deg)}
  50%{transform:perspective(760px) translateX(0) rotateY(0deg)}
  76%{transform:perspective(760px) translateX(4px) rotateY(4deg)}
}
@media (prefers-reduced-motion:reduce){
  .collection-carcase-idle__fallback,
  .collection-carcase-sequence__frame{animation:none;transition:none}
}
.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;
}
#roulettePickerModal{
  z-index:7600;
}
#roulettePickerFiltersModal{
  z-index:7700;
}
#roulettePickerModal .modal__overlay{
  background:rgba(13,13,13,0.34);
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
}
.modal__sheet--roulette-picker{
  height:min(82vh, calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 28px));
  max-height:calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 28px);
  display:flex;
  flex-direction:column;
  padding:0;
  overflow:hidden;
  border-radius:28px;
}
.modal__sheet--roulette-picker .modal__head{
  flex:0 0 auto;
  padding-left:18px;
  padding-right:18px;
}
html.has-kb .modal__sheet--roulette-picker{
  left:10px;
  right:10px;
  bottom:calc(8px + var(--safe-b) + var(--kb));
  height:calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 18px);
  max-height:calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 18px);
  border-radius:22px;
}
.modal__sheet--roulette-picker-filters{
  z-index:1;
}
.roulette-picker__subtitle{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.roulette-picker__toolbar{
  position:relative;
  z-index:2;
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 18px 12px;
  background:linear-gradient(180deg, var(--surface) 0%, rgba(255,255,255,0) 100%);
}
.roulette-picker__search-box{
  margin-top:0;
  box-shadow:
    0 12px 28px var(--shadow-sm),
    inset 0 1px 0 var(--highlight);
}
.roulette-picker__search{
  width:100%;
}
.roulette-picker__hint-row{
  margin-top:2px;
}
.roulette-picker__summary{
  min-height:16px;
  color:var(--text-mid);
  font-size:11px;
  font-weight:800;
}
.roulette-picker__chips{
  margin-top:0;
}
.roulette-picker__chip.is-locked{
  cursor:default;
}
.roulette-picker__loader{
  height:3px;
  margin:0 18px 12px;
  border-radius:999px;
  background:var(--divider);
  overflow:hidden;
  position:relative;
}
.roulette-picker__loader::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:-40%;
  width:40%;
  background:var(--cta-bg);
  opacity:0.55;
  animation: roulettePickerLoad 1.1s ease-in-out infinite;
}
@keyframes roulettePickerLoad{
  0%{transform:translateX(0)}
  100%{transform:translateX(260%)}
}
.roulette-picker__grid{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:0 18px calc(18px + var(--safe-b));
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-content:start;
  -webkit-overflow-scrolling:touch;
}
.roulette-picker__grid:empty{
  flex:0 0 auto;
  padding-bottom:0;
}
.roulette-picker__empty{
  padding:18px;
  color:var(--text-mid);
  font-size:13px;
  font-weight:800;
  text-align:center;
}
.roulette-picker-card{
  border:0;
  font:inherit;
  text-align:left;
  color:inherit;
  position:relative;
  min-width:0;
  gap:6px;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}
.roulette-picker-card:disabled{
  cursor:default;
}
.roulette-picker-card__thumb{
  background:var(--surface2);
}
.roulette-picker-card__thumb[data-empty="1"]{
  display:grid;
  place-items:center;
  color:var(--muted);
  font-weight:1000;
  font-size:18px;
}
.roulette-picker-card__name{
  font-size:13px;
}
.roulette-picker-card__stats{
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.roulette-picker-card__selecting{
  position:absolute;
  inset:8px;
  border-radius:16px;
  display:none;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  background:rgba(255,255,255,0.72);
  color:var(--text-strong);
  font-size:12px;
  font-weight:900;
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
}
html[data-theme="dark"] .roulette-picker-card__selecting{
  background:rgba(18,18,20,0.72);
}
.roulette-picker-card.is-selecting .roulette-picker-card__selecting{
  display:flex;
}
.roulette-picker-card:disabled:not(.is-selecting){
  opacity:0.56;
}
@media (max-width:360px){
  .roulette-picker__grid{
    gap:9px;
    padding-left:14px;
    padding-right:14px;
  }
  .roulette-picker__toolbar,
  .modal__sheet--roulette-picker .modal__head{
    padding-left:14px;
    padding-right:14px;
  }
  .roulette-picker-card{
    padding:8px;
  }
  .roulette-picker-card__name{
    font-size:12px;
  }
}
.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);
}
.check-pill:has(input:disabled),
.check-pill--locked{
  opacity:0.74;
  cursor:default;
}
.check-pill--locked{
  background:rgba(43,217,255,0.10);
  border-color:rgba(43,217,255,0.24);
}
.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;
}
.auction-filters-modal{
  z-index:920;
}
.auction-create-filters-modal{
  z-index:930;
}
.auction-filters-sheet{
  height:min(74vh, calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 34px));
  max-height:calc(var(--app-vh) - var(--kb) - var(--safe-t) - var(--safe-b) - 34px);
}
.auction-filters-body{
  padding-right:1px;
}
.auction-filters-section{
  margin-top:13px;
}
.auction-filter-options{
  gap:7px;
}
.auction-filter-pill{
  min-height:34px;
  padding:8px 11px;
}
.auction-filter-pill input[type="radio"]{
  accent-color:currentColor;
}
.auction-filter-range{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.auction-filter-range label{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  height:42px;
  padding:0 11px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--overlay);
}
.auction-filter-range span{
  flex:0 0 auto;
  color:var(--text-low);
  font-size:11px;
  font-weight:900;
}
.auction-filter-range input{
  min-width:0;
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text-strong);
  font:inherit;
  font-size:13px;
  font-weight:900;
}
.auction-filter-range input::placeholder{
  color:var(--text-low);
}
.auction-filter-note{
  margin-top:7px;
  color:var(--text-low);
  font-size:11px;
  font-weight:800;
  line-height:1.25;
}

/* 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-auction,
.car-dismantle{
  flex:1 1 0;
  height:44px;
  border-radius:14px;
  border:0;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
}
.car-auction{
  background:var(--cta-bg);
  color:var(--cta-text);
  box-shadow:0 8px 18px var(--shadow-sm);
}
.car-auction: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(120px + 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}
}

/* Final palette cleanup for legacy profile affordances. */
.profile-btn--help{
  border:1px solid var(--stroke);
  box-shadow:0 10px 24px var(--shadow-md), inset 0 1px 0 var(--highlight);
}
