/* Coordinates scale from the supplied 709px reference. */
body[data-screen=home] {
  background: radial-gradient(ellipse at 50% 0, #110b16 0, #09070c 62%) !important;
}
:root {
  --ast59-page-max: 690px;
  --ast59-page-gutter: clamp(16px, 4.65vw, 31px);
}
body[data-screen] {
  padding-inline: var(--mafia-safe-left, 0px) var(--mafia-safe-right, 0px);
}
#app {
  width: 100%;
  max-width: var(--ast59-page-max);
  margin-inline: auto;
}
#app #view {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: var(--ast59-page-gutter) !important;
}
#app > .topbar {
  width: calc(100% - 2 * var(--ast59-page-gutter));
  max-width: none;
  margin-inline: auto;
}
body[data-screen=home] #view {
  --ast56-view-top: clamp(8px, 2.12vw, 15px);
  padding-top: var(--ast56-view-top) !important;
}
.ast44-home { gap: clamp(7px, 2.1vw, 15px); }
.ast44-home .h37-profile {
  position: sticky;
  top: calc(var(--mafia-safe-top, 0px) + var(--ast56-view-top, 0px));
  z-index: 20;
  margin: 0 1.03cqw;
  height: 15.5cqw;
  box-sizing: border-box;
  padding: 1.6cqw 2.2cqw 1.6cqw 2.7cqw;
  gap: 2.9cqw;
  border: 0;
  box-shadow: none;
  background: url('assets/ast/reference/frame-header.svg') center / 100% 100% no-repeat;
}
.ast44-home .h37-person { gap: 2.8cqw; }
.ast44-home .h37-avatar { width: 11.2cqw; height: 11.2cqw; border-width: 1px; background: #442166; }
.ast44-header-mark { width: 4.5cqw; height: 5.7cqw; margin: 0; }
.ast44-home .h37-identity { padding-inline: 2.8cqw; border-inline: 1px solid #8e77a5; }
.ast44-home .h37-identity > b { font-size: 3.55cqw; line-height: 1.13; }
.ast44-home .h37-xp { margin-top: 2cqw; }
.ast44-home .h37-xp em { display: none; }
.ast44-home .h37-xp i { height: 1.92cqw; background: #2e2141; }
.ast44-home .h37-balances { width: 19.7cqw; gap: .77cqw; flex: none; }
.ast44-home .h37-balances b {
  display: grid;
  grid-template-columns: 1fr 4.7cqw;
  text-align: center;
  gap: 0;
  height: 4.82cqw;
  padding: 0 .45cqw;
  font-size: 2.95cqw;
  border: 1px solid #8c76a14f;
}
.ast44-home .h37-balances b + b { background: #241a31; border-color: #775692a8; }
.ast44-home .h37-balances img { width: 3.6cqw; height: 3.6cqw; justify-self: center; }
.ast44-home .h37-plus {
  width: 8.25cqw;
  height: 8.25cqw;
  flex: none;
  border: 0;
  background: url('assets/ast/reference/frame-button.svg') center / 100% 100% no-repeat;
}
.ast44-home .h37-plus svg { width: 4.6cqw; height: 4.6cqw; }
.ast44-home .ast44-banner {
  border: 0;
  border-radius: 3.65cqw;
  background: url('assets/ast/reference/frame-banner-v50.svg') center / 100% 100% no-repeat;
}
.ast44-home .ast44-slide {
  display: flex;
  align-items: center;
  min-height: calc(clamp(114px, 33.5cqw, 224px) + var(--ast59-banner-tail));
  padding: 3.7cqw 4cqw calc(3.7cqw + var(--ast59-banner-tail));
}
.ast44-carousel {
  /* Use the indicator band's space so the win feed keeps its original offset. */
  --ast59-banner-tail: clamp(4px, 1.5cqw, 8px);
}
.ast44-slide-spin > img {
  inset: calc(7% - .07 * var(--ast59-banner-tail)) 3% auto auto;
  height: calc(86% - .86 * var(--ast59-banner-tail));
}
.ast44-home .ast44-slide-daily { background: radial-gradient(ellipse at 31% 62%, #35134e, transparent 70%); }
.ast44-slide-daily::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 var(--ast59-banner-tail) 45%;
  background: url('assets/ast/reference/bonus.webp') right center / auto 100% no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 11%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 11%);
}
.ast44-banner-copy { max-width: 55%; }
.ast44-banner-copy h1, .ast44-banner-copy h2 { font-size: 4.85cqw; margin: 0; letter-spacing: -.09cqw; }
.ast44-banner-copy p { font-size: 3.18cqw; margin: 2.65cqw 0 3cqw; line-height: 1.15; }
.ast44-home .ast44-cta {
  border: 0;
  padding: 0 2.9cqw;
  min-height: 5.95cqw;
  font-size: 2.65cqw;
  line-height: 1;
  background: url('assets/ast/reference/frame-button.svg') center / 100% 100% no-repeat;
}
.ast44-banner-copy .ast44-cta { min-height: 7.8cqw; padding-inline: 3.4cqw; font-size: 3.1cqw; }
.ast44-home .ast44-wins h2 {
  padding-left: 1.47cqw;
  margin: 0 0 2.5cqw;
  font-size: 4.15cqw;
  line-height: 1.08;
  font-weight: 800;
}
.ast44-home #h37-feed {
  gap: 1.35cqw;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}
.ast44-home .ast44-sample, .ast44-home .h37-win {
  flex: 0 0 calc((100% - 5.4cqw) / 5);
  scroll-snap-align: start;
  box-sizing: border-box;
  min-width: 0;
  height: max(79px, 24cqw);
  padding: .4cqw .4cqw .95cqw;
  border: 0;
  border-radius: 2cqw;
  overflow: hidden;
  background: url('assets/ast/reference/frame-win.svg') center / 100% 100% no-repeat;
}
.ast44-home .ast44-sample img { width: 100%; height: max(54px, 18cqw); object-fit: cover; }
.ast44-home .h37-win img { height: max(39px, 14cqw); }
.ast44-sample .ast59-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38em;
  width: 80%;
  font-size: clamp(8px, 1.75cqw, 12px);
  padding: .7cqw 0;
  background: #352246;
}
.ast59-live::before {
  content: '';
  width: .55em;
  height: .55em;
  flex: none;
  border-radius: 50%;
  background: #ff435d;
}
.ast44-feature-grid { gap: 1.35cqw; }
.ast44-home .ast44-feature, .ast44-home .ast44-ranking {
  border: 0;
  border-radius: 2.95cqw;
  background: url('assets/ast/reference/frame-feature.svg') center / 100% 100% no-repeat;
}
.ast44-feature::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url('assets/ast/reference/frame-edge.svg') center / 100% 100% no-repeat;
}
.ast44-feature-button { height: 100%; min-height: 33cqw; padding: 3cqw 3.4cqw; }
.ast44-feature-copy { width: 52%; gap: 1.5cqw; }
.ast44-feature-copy strong { font-size: 4.68cqw; line-height: 1.08; letter-spacing: -.045cqw; }
.ast44-feature-copy small { font-size: 2.45cqw; line-height: 1.28; }
.ast44-feature-copy .ast44-cta { margin-top: 1.5cqw; min-height: 6.55cqw; min-width: 18.2cqw; padding-inline: 1.8cqw; }
.ast44-feature-button > img {
  inset: 50% 0 auto auto;
  width: 53%;
  height: auto;
  transform: translateY(-50%);
  filter: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%),
    linear-gradient(180deg, transparent, #000 9% 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%),
    linear-gradient(180deg, transparent, #000 9% 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.ast44-feature-plans .ast44-feature-copy strong { max-width: 19cqw; }
.ast44-home .ast44-ranking {
  margin-top: .45cqw;
  min-height: 31.5cqw;
  padding: 4.1cqw;
  background-image: url('assets/ast/reference/frame-rank.svg');
}
.ast44-ranking-copy { gap: 1.7cqw; }
.ast44-ranking-copy strong { font-size: 6.35cqw; line-height: 1; }
.ast44-ranking-copy small { font-size: 3.27cqw; }
.ast44-ranking-copy .ast44-cta { margin-top: 1.5cqw; min-height: 7.5cqw; min-width: 20.45cqw; font-size: 3.1cqw; }
.ast44-ranking > img {
  inset: 0 0 auto auto;
  width: 61.5%;
  height: 100%;
  object-fit: fill;
  filter: none;
  mask-image: linear-gradient(90deg, transparent, #000 10%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%);
}

/* The wins strip follows the wallet before the carousel. */
.ast44-home .ast44-wins { margin-top: 0; }
.ast44-home .ast44-wins h2 { margin-bottom: 1.95cqw; }


/* The artwork moves independently of the copy and controls. */
.ast44-slide-daily::before {
  transform-origin: 72% 55%;
  animation: ast48-portal-breathe 6s ease-in-out infinite;
}
.ast44-slide-daily::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 0 48%;
  pointer-events: none;
  background: radial-gradient(ellipse at 65% 50%, #b66cff66, transparent 64%);
  mix-blend-mode: screen;
  animation: ast48-portal-light 3.8s ease-in-out infinite alternate;
}
.ast44-slide-spin > img { animation: ast48-wheel-float 5s ease-in-out infinite; }
@keyframes ast48-portal-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.055); filter: brightness(1.16); }
}
@keyframes ast48-portal-light { from { opacity: .14; } to { opacity: .72; } }
@keyframes ast48-wheel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-.8cqw); }
}

/* Single dock for every route. Reset the older left:50% / translateX pair. */
:root {
  --ast48-dock-gap: clamp(14px, 4vw, 30px);
  --ast48-dock-height: clamp(59px, 16vw, 102px);
  --ast48-dock-bottom: calc(clamp(7px, 2.2vw, 16px) + max(env(safe-area-inset-bottom), var(--mafia-safe-bottom, 0px)));
}
#tabbar:not([hidden]) {
  position: fixed;
  left: max(var(--ast48-dock-gap), var(--mafia-safe-left, 0px), env(safe-area-inset-left)) !important;
  right: max(var(--ast48-dock-gap), var(--mafia-safe-right, 0px), env(safe-area-inset-right)) !important;
  width: auto !important;
  transform: none !important;
  translate: none;
  max-width: 610px;
  bottom: var(--ast48-dock-bottom) !important;
  margin-inline: auto;
  display: grid !important;
  --ast54-tab-count: 5;
  grid-template-columns: repeat(var(--ast54-tab-count), minmax(0, 1fr)) !important;
  gap: 0;
  box-sizing: border-box;
  min-height: 0;
  height: var(--ast48-dock-height);
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: linear-gradient(104deg, #251634, #0b0811 45%, #07070e) !important;
  box-shadow: inset 0 0 0 1px #8e72b051, 0 10px 28px #0006;
}
body[data-screen=spin]:not(.spin-open) #tabbar { pointer-events: auto; }
#tabbar[hidden], #tabbar::before { display: none !important; }
#tabbar .tab {
  height: 100%;
  min-height: 0 !important;
  min-width: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}
#tabbar .tab .ic {
  position: relative;
  z-index: 1;
  width: clamp(25px, 6.4vw, 44px);
  height: clamp(25px, 6.4vw, 44px);
  color: #c8bfce;
  stroke-width: 1.55;
}
#tabbar .tab.is-on .ic { color: #d0a1ff; transform: none; filter: none; }
#tabbar .ast54-nav-bag-active,
#tabbar [aria-current="page"] .ast54-nav-bag-outline { display: none; }
#tabbar [aria-current="page"] .ast54-nav-bag-active { display: inline; }
#tabbar .tab.is-on::before, #tabbar .tab.is-on::after { display: none; }
.ast54-tab-indicator {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% / var(--ast54-tab-count));
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateX(calc(var(--active-tab) * 100%));
  transition: transform .56s cubic-bezier(.23, 1, .32, 1);
}
.ast54-tab-indicator::before {
  content: '';
  width: min(84%, calc(var(--ast48-dock-height) - 8px));
  aspect-ratio: 1;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid transparent;
  background: radial-gradient(ellipse at 42% 23%, #21162c, #080711 72%) padding-box,
    linear-gradient(145deg, #5c4b72, #231b35 48%, #4b365d) border-box;
  box-shadow: inset 0 1px 2px #b8a1db25, 0 3px 12px #0006;
}
@media (prefers-reduced-motion: reduce) {
  .ast54-tab-indicator { transition: none; }
}
body[data-screen] #view {
  padding-bottom: calc(var(--ast48-dock-height) + var(--ast48-dock-bottom) + 7px) !important;
}
@media (prefers-reduced-motion: reduce) {
  .ast44-slide-daily::before, .ast44-slide-daily::after, .ast44-slide-spin > img { animation: none; }
}

.ast44-home { gap: clamp(6px, 1.8vw, 13px); }
.ast49-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.ast49-track::-webkit-scrollbar { display: none; }
.ast49-track > .ast44-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}
.ast49-track > .ast49-slide-admin { padding: 0; background: #201130; }
.ast49-slide-admin > img,
.ast49-banner-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ast49-banner-link {
  display: block;
  padding: 0;
  border: 0;
  text-decoration: none;
  background: transparent;
  color: inherit;
}
.ast49-slide-admin img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ast49-banner-text {
  display: flex;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 3.8cqw;
  color: #f8f0ff;
  overflow: hidden;
}
.ast49-banner-text strong, .ast49-banner-text small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ast49-banner-text strong { font-size: clamp(16px, 4.6cqw, 28px); -webkit-line-clamp: 2; }
.ast49-banner-text small { font-size: clamp(11px, 2.9cqw, 18px); -webkit-line-clamp: 3; }
.ast49-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2px, .8cqw, 5px);
  height: calc(clamp(16px, 3.5cqw, 23px) - var(--ast59-banner-tail));
}
.ast49-indicators button {
  display: grid;
  place-items: center;
  width: clamp(16px, 4.75cqw, 29px);
  height: 100%;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: none;
}
.ast49-indicators span {
  display: block;
  height: clamp(3px, .7cqw, 5px);
  width: 44%;
  border-radius: 999px;
  background: #533a6f;
  transition: width .24s ease, background .24s ease;
}
.ast49-indicators button[aria-pressed=true] span {
  width: 100%;
  background: linear-gradient(105deg, #ad48f1, #198cf3);
}
@media (prefers-reduced-motion: reduce) {
  .ast49-indicators span { transition: none; }
}
