/* Notebook internal pages override. Loaded after styles.css on purpose. */
@media (min-width: 900px) {
  .screen--topup,
  .screen--promo,
  .screen--settings,
  .screen--edit,
  .screen--ach,
  .screen--myblanks,
  .screen--blankview,
  .screen--stats,
  .screen--hist,
  .screen--fri,
  .screen--sup,
  .screen--doc,
  .screen--gift,
  .screen--mafia,
  .screen--mafia-sub,
  .screen--auth,
  .screen--status {
    padding: 28px 62px 52px;
    background: var(--fig-paper);
    color: var(--fig-black);
  }

  .screen--topup .gametop,
  .screen--promo .gametop,
  .screen--settings .gametop,
  .screen--edit .gametop,
  .screen--ach .gametop,
  .screen--myblanks .gametop,
  .screen--blankview .gametop,
  .screen--stats .gametop,
  .screen--hist .gametop,
  .screen--fri .gametop,
  .screen--sup .gametop,
  .screen--doc .gametop,
  .screen--gift .gametop,
  .screen--mafia .gametop,
  .screen--mafia-sub .gametop,
  .screen--auth .gametop,
  .screen--status .gametop {
    width: min(100%, 1000px);
    max-width: 1000px;
    height: 60px;
    min-height: 60px;
    margin-bottom: 18px;
  }

  .screen--topup .topup,
  .screen--promo .promo,
  .screen--settings .settings,
  .screen--edit .editp,
  .screen--ach .ach,
  .screen--myblanks .myblanks,
  .screen--blankview .blankview,
  .screen--stats .statspg,
  .screen--hist .history,
  .screen--fri .friends,
  .screen--sup .support,
  .screen--doc .docpage,
  .screen--gift .giftpage,
  .screen--mafia .mafiapage,
  .screen--mafia-sub .mafiaflow,
  .screen--auth .authpage,
  .screen--status .statuspage {
    width: min(100%, 1240px);
    max-width: 1240px;
    min-height: 0;
    height: auto;
    margin-inline: auto;
    border-radius: 34px;
    background: var(--fig-white);
    box-shadow: 0 24px 72px rgba(22, 22, 22, 0.08);
  }

  .screen--settings .settings,
  .screen--edit .editp,
  .screen--ach .ach,
  .screen--myblanks .myblanks,
  .screen--blankview .blankview,
  .screen--stats .statspg,
  .screen--hist .history,
  .screen--fri .friends,
  .screen--doc .docpage {
    padding: 28px;
  }

  .screen--topup .topup,
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage,
  .screen--status .statuspage,
  .screen--mafia .mafiapage,
  .screen--mafia-sub .mafiaflow {
    padding: 22px;
    gap: 18px;
  }

  .screen--settings .settings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    margin: 0 8px;
    padding: 0;
    font-size: 14px;
    letter-spacing: 2px;
  }

  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    min-height: 88px;
    padding: 18px;
    border-radius: 20px;
  }

  .screen--settings .row-switch {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .screen--edit .editp {
    grid-template-columns: minmax(260px, 0.4fr) minmax(0, 1fr);
    gap: 18px 24px;
  }

  .screen--edit .editp__avatar {
    grid-row: 1 / span 6;
    min-height: 276px;
    border-radius: 28px;
  }

  .screen--edit .editp > label,
  .screen--edit .editp > input {
    grid-column: 2;
  }

  .screen--ach .ach,
  .screen--stats .statspg {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
  }

  .screen--ach .ach__item,
  .screen--stats .statcard {
    min-height: 132px;
    padding: 18px;
    border-radius: 22px;
  }

  .screen--ach .ach__name {
    font-size: 16px;
    line-height: 1.12;
  }

  .screen--stats .statcard b {
    font-size: clamp(32px, 3vw, 44px);
    font-variant-numeric: tabular-nums;
  }

  .screen--myblanks .myblanks,
  .screen--hist .history,
  .screen--fri .friends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-height: none;
    overflow: visible;
  }

  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow,
  .screen--myblanks .empty,
  .screen--hist .empty,
  .screen--fri .empty {
    min-height: 92px;
    padding: 16px;
    border-radius: 22px;
  }

  .screen--hist .historow {
    grid-template-columns: 44px minmax(0, 1fr) minmax(84px, auto);
  }

  .screen--fri .frirow {
    grid-template-columns: 44px minmax(0, 1fr) 14px;
  }

  .screen--myblanks .blankrow__main b,
  .screen--myblanks .blankrow__main small,
  .screen--hist .historow b,
  .screen--hist .historow small,
  .screen--fri .frirow b,
  .screen--fri .frirow small,
  .screen--hist .historow__prize {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.9fr);
    gap: 18px;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 360px;
    padding: 28px;
    border-radius: 28px;
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply {
    min-height: 76px;
  }

  .screen--sup .support .row-link {
    min-height: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--blankview .blankview {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.32fr);
    gap: 20px;
    overflow: visible;
  }

  .screen--blankview .lot-preview {
    min-height: 520px;
    border-radius: 24px;
  }

  .screen--doc .docpage {
    gap: 18px;
  }

  .screen--doc .docpage h2,
  .screen--status .statuspage h2 {
    line-height: 1.02;
    overflow: hidden;
  }

  .screen--doc .docpage__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--doc .docpage__card,
  .screen--doc .docpage__note {
    min-height: 132px;
    border-radius: 22px;
  }

  .screen--status .statuspage {
    width: min(100%, 760px);
    padding: 46px 52px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    text-align: center;
  }

  .screen--status .statuspage__actions {
    width: min(100%, 420px);
    display: grid;
    gap: 12px;
  }

  .screen--mafia .mafiapage {
    grid-template-columns: minmax(0, 1.12fr) minmax(410px, 0.8fr);
    gap: 18px;
  }

  .screen--mafia .mafiapage__hero {
    grid-row: 1 / span 2;
    min-height: 420px;
    border-radius: 24px;
  }

  .screen--mafia .mafiapage__panel,
  .screen--mafia .mafiapage__list button {
    border-radius: 24px;
  }

  .screen--mafia .mafiapage__list {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--mafia .mafiapage__list button {
    min-height: 112px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 14px;
    align-content: center;
  }

  .screen--mafia .mafiapage__list button span {
    grid-row: 1 / span 2;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 146px;
    padding: 26px;
    border-radius: 24px;
  }

  .screen--mafia-sub .mafiaflow__hero h2 {
    font-size: clamp(48px, 4.6vw, 72px);
    line-height: 1.08;
    padding-bottom: 0.12em;
  }

  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card,
  .screen--mafia-sub .mafiarounds li {
    min-height: 136px;
    border-radius: 22px;
  }

  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: minmax(360px, 0.76fr) minmax(0, 1fr);
  }

  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds {
    min-height: 420px;
  }
}

/* Final28: Figma-derived laptop pages after home baseline approval. */
@media (min-width: 900px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop {
    width: min(100%, 1160px) !important;
    max-width: 1160px !important;
  }

  .screen--mafia .mafiapage--figma {
    width: min(100%, 1160px) !important;
    max-width: 1160px !important;
    min-height: 1380px !important;
    margin-inline: auto !important;
    padding: 0 0 70px !important;
    display: grid !important;
    grid-template-columns: minmax(390px, 460px) minmax(0, 1fr) !important;
    grid-template-areas:
      "intro intro"
      "rounds how"
      "rounds teams"
      "list list" !important;
    gap: 54px 36px !important;
    align-items: start !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .screen--mafia .mafiapage__intro {
    grid-area: intro !important;
    position: relative !important;
    min-height: 368px !important;
    display: grid !important;
    grid-template-columns: minmax(390px, 460px) minmax(260px, 1fr) 168px !important;
    gap: 28px !important;
    align-items: center !important;
  }

  .screen--mafia .mafiapage__titlepack {
    display: grid !important;
    gap: 26px !important;
    align-content: center !important;
    min-width: 0 !important;
  }

  .screen--mafia .mafiapage__mark,
  .screen--mafia-sub .mafiaflow__mark {
    display: grid !important;
    place-items: center !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
    background: var(--fig-red) !important;
    color: var(--fig-white) !important;
    font-family: var(--font-display) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .screen--mafia .mafiapage__titlepack h2 {
    margin: 0 !important;
    max-width: 430px !important;
    color: var(--fig-black) !important;
    font-family: var(--font-display) !important;
    font-size: clamp(78px, 7vw, 118px) !important;
    font-weight: 900 !important;
    line-height: 0.84 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    overflow: visible !important;
  }

  .screen--mafia .mafiapage__titlepack p {
    margin: 0 !important;
    max-width: 448px !important;
    color: #646464 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
  }

  .screen--mafia .mafiapage__cover {
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: min(330px, 100%) !important;
    max-width: 330px !important;
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    filter: drop-shadow(0 20px 34px rgba(22, 22, 22, 0.16)) !important;
  }

  .screen--mafia .mafiapage__play {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    width: 148px !important;
    min-width: 148px !important;
    min-height: 69px !important;
    border-radius: 0 34px 0 34px !important;
    padding: 0 18px !important;
    font-family: var(--font-display) !important;
    font-size: 28px !important;
    line-height: 1 !important;
  }

  .screen--mafia .mafiapage__rounds {
    grid-area: rounds !important;
  }

  .screen--mafia .mafiapage__how {
    grid-area: how !important;
  }

  .screen--mafia .mafiapage__teams {
    grid-area: teams !important;
  }

  .screen--mafia .mafiapage__list {
    grid-area: list !important;
  }

  .screen--mafia .mafiapage__rounds,
  .screen--mafia .mafiapage__how,
  .screen--mafia .mafiapage__teams,
  .screen--mafia .mafiapage__list {
    display: grid !important;
    gap: 22px !important;
    min-width: 0 !important;
  }

  .screen--mafia .mafiapage__rounds h3,
  .screen--mafia .mafiapage__how h3,
  .screen--mafia .mafiapage__list h3 {
    margin: 0 !important;
    color: var(--fig-black) !important;
    font-family: var(--font-display) !important;
    font-size: clamp(42px, 4.1vw, 66px) !important;
    font-weight: 900 !important;
    line-height: 0.88 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  .screen--mafia .mafiapage__rounds ol {
    display: grid !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .screen--mafia .mafiapage__rounds li,
  .screen--mafia .mafiapage__rules article {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 20px !important;
    align-items: start !important;
    min-height: 40px !important;
  }

  .screen--mafia .mafiapage__rounds li span,
  .screen--mafia .mafiapage__rules article span {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--fig-red) !important;
    color: var(--fig-white) !important;
    font-family: var(--font-display) !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .screen--mafia .mafiapage__rounds p,
  .screen--mafia .mafiapage__rules p,
  .screen--mafia .mafiapage__note small,
  .screen--mafia .mafiapage__teamgrid p,
  .screen--mafia .mafiapage__list small {
    margin: 0 !important;
    color: #6f6f6f !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
  }

  .screen--mafia .mafiapage__note,
  .screen--mafia .mafiapage__teams,
  .screen--mafia .mafiapage__list button {
    border: 0 !important;
    background: var(--fig-white) !important;
    box-shadow: 0 18px 42px rgba(22, 22, 22, 0.08) !important;
  }

  .screen--mafia .mafiapage__note {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px 20px !important;
    align-items: start !important;
    min-height: 94px !important;
    padding: 18px !important;
    border-radius: 24px !important;
    text-align: left !important;
  }

  .screen--mafia .mafiapage__note > span,
  .screen--mafia .mafiapage__list button > span {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    background: #fee0b8 !important;
    color: var(--fig-black) !important;
    font-family: var(--font-display) !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .screen--mafia .mafiapage__note b,
  .screen--mafia .mafiapage__list b {
    color: var(--fig-black) !important;
    font-size: 20px !important;
    font-weight: 950 !important;
    line-height: 1.12 !important;
  }

  .screen--mafia .mafiapage__note b,
  .screen--mafia .mafiapage__note small {
    grid-column: 2 !important;
  }

  .screen--mafia .mafiapage__rules,
  .screen--mafia .mafiapage__teamgrid {
    display: grid !important;
    gap: 22px !important;
  }

  .screen--mafia .mafiapage__how > .btn {
    width: 100% !important;
    min-height: 54px !important;
    margin-top: 16px !important;
    border-radius: 0 27px 0 27px !important;
    font-family: var(--font-display) !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .screen--mafia .mafiapage__teams {
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .screen--mafia .mafiapage__teams > button {
    justify-self: start !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 0 24px 0 24px !important;
    background: var(--fig-red) !important;
    color: var(--fig-white) !important;
    font-family: var(--font-body) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  .screen--mafia .mafiapage__teamgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 30px !important;
  }

  .screen--mafia .mafiapage__teamgrid article {
    position: relative !important;
    min-height: 75px !important;
    padding-left: 28px !important;
  }

  .screen--mafia .mafiapage__teamgrid article::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: var(--fig-red) !important;
  }

  .screen--mafia .mafiapage__teamgrid b {
    display: block !important;
    margin-bottom: 6px !important;
    color: var(--fig-black) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
  }

  .screen--mafia .mafiapage__list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin-top: 12px !important;
  }

  .screen--mafia .mafiapage__list h3 {
    grid-column: 1 / -1 !important;
  }

  .screen--mafia .mafiapage__list button {
    min-height: 176px !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 8px 16px !important;
    align-content: center !important;
    padding: 24px !important;
    border-radius: 0 32px 0 32px !important;
    text-align: left !important;
  }

  .screen--mafia .mafiapage__list button > span {
    grid-row: 1 / span 2 !important;
    width: 48px !important;
    height: 48px !important;
  }

  .screen--mafia .mafiapage__list small,
  .screen--mafia .mafiapage__list b {
    grid-column: 2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .screen--mafia-sub .mafiaflow {
    width: min(100%, 1160px) !important;
    max-width: 1160px !important;
  }

  .screen--mafia-sub .mafiaflow__hero {
    background: #171717 !important;
    border-radius: 0 34px 0 34px !important;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card,
  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds article {
    border-radius: 0 28px 0 28px !important;
  }

  .gametop__balance-value,
  [data-live],
  [data-mafia-role-count],
  #mafiaPlayers,
  #mafiaTimerClock {
    font-variant-numeric: tabular-nums !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--mafia .mafiapage--figma {
    grid-template-columns: minmax(350px, 420px) minmax(0, 1fr) !important;
    gap: 42px 28px !important;
  }

  .screen--mafia .mafiapage__intro {
    grid-template-columns: minmax(350px, 420px) minmax(220px, 1fr) 132px !important;
    min-height: 330px !important;
  }

  .screen--mafia .mafiapage__titlepack h2 {
    font-size: clamp(68px, 7vw, 92px) !important;
  }

  .screen--mafia .mafiapage__titlepack p,
  .screen--mafia .mafiapage__rounds p,
  .screen--mafia .mafiapage__rules p,
  .screen--mafia .mafiapage__teamgrid p,
  .screen--mafia .mafiapage__list small {
    font-size: 15px !important;
  }

  .screen--mafia .mafiapage__cover {
    width: min(260px, 100%) !important;
  }

  .screen--mafia .mafiapage__play {
    width: 132px !important;
    min-width: 132px !important;
    min-height: 60px !important;
    font-size: 24px !important;
  }
}

@media (min-width: 900px) and (max-height: 720px) {
  .screen--mafia .mafiapage--figma {
    min-height: 1280px !important;
    gap: 44px 30px !important;
  }

  .screen--mafia .mafiapage__intro {
    min-height: 324px !important;
  }

  .screen--mafia .mafiapage__rounds ol {
    gap: 24px !important;
  }
}

@media (min-width: 900px) and (max-height: 850px) {
  .screen--topup,
  .screen--promo,
  .screen--settings,
  .screen--edit,
  .screen--ach,
  .screen--myblanks,
  .screen--blankview,
  .screen--stats,
  .screen--hist,
  .screen--fri,
  .screen--sup,
  .screen--doc,
  .screen--gift,
  .screen--mafia,
  .screen--mafia-sub,
  .screen--auth,
  .screen--status {
    padding: 24px 62px 42px;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 330px;
  }

  .screen--mafia .mafiapage__hero,
  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds {
    min-height: 360px;
  }
}

.screen--ach .ach__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-content: start;
}

.screen--ach .ach__ico {
  position: static;
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1;
  transform: none;
}

.screen--ach .ach__name,
.screen--ach .ach__desc {
  grid-column: 2;
  min-width: 0;
}

.screen--ach .ach__name {
  align-self: start;
}

.screen--ach .ach__desc {
  align-self: end;
}

@media (max-width: 899px) {
  .screen--ach .ach__item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 7px 10px;
  }

  .screen--ach .ach__ico {
    width: 28px;
    height: 28px;
    border-radius: 11px;
  }
}

/* Final18 desktop shell: internal pages use the same wide Figma system as the launcher/profile. */
@media (min-width: 900px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1280px;
    padding: 30px max(28px, calc((100vw - var(--inner-max)) / 2)) 76px;
    background: var(--fig-paper);
    color: var(--fig-black);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    position: relative;
    display: grid;
    grid-template-columns: 54px 136px minmax(220px, 1fr) 250px 58px;
    gap: 12px;
    align-items: center;
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    height: 76px;
    min-height: 76px;
    margin: 0 auto 58px;
    padding: 10px 14px;
    overflow: visible;
    border-radius: 26px;
    background: var(--fig-white);
    box-shadow: 0 15px 36px rgba(22, 22, 22, 0.1);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop > div[style*="width:36px"] {
    display: none;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__back,
  .screen:not(.screen--launcher):not(.screen--fig-export) .iconbtn-round {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border: 0;
    border-radius: 50%;
    background: #efefef;
    color: var(--fig-black);
    font-size: 25px;
    font-weight: 900;
    box-shadow: none;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop .iconbtn-round {
    position: absolute;
    top: 11px;
    right: 348px;
    z-index: 3;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__title {
    position: absolute;
    left: 2px;
    top: calc(100% + 13px);
    max-width: min(680px, 64%);
    min-width: 0;
    color: #8c8c8c;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    min-width: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand {
    width: 136px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand img {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search {
    width: min(100%, 560px);
    height: 54px;
    justify-self: center;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    padding: 0 22px 0 14px;
    border-radius: 999px;
    background: #efefef;
    color: #9f9f9f;
    font-size: 17px;
    font-weight: 600;
    text-align: left;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search::before {
    content: "";
    width: 22px;
    height: 22px;
    justify-self: center;
    border: 3px solid #a3a3a3;
    border-radius: 50%;
    box-shadow: 11px 11px 0 -8px #a3a3a3;
    transform: rotate(-7deg);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance {
    width: 250px;
    height: 54px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    padding: 0 16px 0 8px;
    border-radius: 999px;
    background: #242424;
    color: var(--fig-paper);
    font-size: 18px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__coin {
    width: 38px;
    height: 38px;
    display: block;
    border-radius: 50%;
    background: url("assets/figma-exact/balance-coin-mobile.png") center / contain no-repeat;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance b {
    display: block;
    min-width: 0;
    overflow: hidden;
    line-height: 1;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    justify-self: end;
    border-radius: 50%;
    background: var(--fig-red);
    color: var(--fig-paper);
    font-size: 31px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup, .promo, .settings, .ach, .myblanks, .statspg, .history, .friends, .support, .giftpage, .authpage, .mafiapage, .mafiaflow) {
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    margin-inline: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .screen--edit .editp,
  .screen--blankview .blankview,
  .screen--doc .docpage,
  .screen--status .statuspage {
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    margin-inline: auto;
    border-radius: 28px;
    background: var(--fig-white);
    box-shadow: 0 22px 58px rgba(22, 22, 22, 0.08);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup__custom, .topup__methods, .topup__summary, .promo__input, .promo__result, .promo__hint, .row-switch, .row-action, .row-info, .ach__item, .statcard, .blankrow, .historow, .frirow, .docpage__card, .docpage__note, .giftpage__panel, .authpage__panel, .mafiapage__panel, .mafiapage__list button, .mafiaflow__panel, .mafiarole, .mafiaflow__card, .mafiarounds li, .mafiatimer) {
    border: 1px solid rgba(22, 22, 22, 0.055);
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup__input, .promo__input, .input, .giftpage__field input, .giftpage__field select, .giftpage__field textarea, .authpage__field input, .method, .amt) {
    min-width: 0;
  }

  .screen--topup .topup {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.82fr) minmax(0, 0.82fr);
    grid-template-areas:
      "hero amounts amounts"
      "hero custom methods"
      "summary summary pay"
      "hint hint hint";
    gap: 18px;
    align-items: stretch;
  }

  .screen--topup .topup__hero {
    grid-area: hero;
    min-height: 492px;
    display: grid;
    align-content: end;
    padding: 42px;
    overflow: hidden;
    border-radius: 28px;
    background:
      radial-gradient(circle at 86% 14%, rgba(255, 222, 191, 0.34), transparent 32%),
      linear-gradient(135deg, var(--fig-red), #ff8b1e);
    color: var(--fig-paper);
    box-shadow: 0 20px 46px rgba(254, 57, 31, 0.22);
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: 470px;
    color: currentColor;
    font-size: clamp(60px, 5.8vw, 88px);
    line-height: 0.84;
    letter-spacing: 0;
    padding-bottom: 0.12em;
    overflow: hidden;
    text-wrap: balance;
    -webkit-text-fill-color: currentColor;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
  }

  .screen--topup .topup__emoji,
  .screen--promo .topup__emoji,
  .screen--sup .topup__emoji,
  .screen--gift .giftpage__mark,
  .screen--auth .authpage__mark {
    width: 62px;
    height: 62px;
    margin-bottom: 28px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--fig-paper);
  }

  .screen--topup .topup__amounts {
    grid-area: amounts;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--topup .topup__hero {
    grid-area: hero;
  }

  .screen--topup .topup__custom {
    grid-area: custom;
  }

  .screen--topup .amt {
    min-height: 146px;
    padding: 18px 14px;
    border-radius: 22px;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--topup .amt b {
    display: block;
    overflow: hidden;
    color: var(--fig-red);
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 0.95;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--topup .amt small {
    display: block;
    margin-top: 10px;
    color: #7a7a7a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
  }

  .screen--topup .amt.is-active {
    background: var(--fig-red);
    color: var(--fig-paper);
  }

  .screen--topup .amt.is-active b,
  .screen--topup .amt.is-active small,
  .screen--topup .amt.is-active i {
    color: var(--fig-paper);
  }

  .screen--topup .topup__custom {
    grid-area: custom;
  }

  .screen--topup .topup__methods {
    grid-area: methods;
  }

  .screen--topup .topup__summary {
    grid-area: summary;
  }

  .screen--topup #btnPay {
    grid-area: pay;
  }

  .screen--topup .topup__hint {
    grid-area: hint;
    max-width: 920px;
    margin: 0;
    color: #8a8a8a;
    text-align: left;
  }

  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__result,
  .screen--promo .promo__hint {
    min-height: 112px;
    padding: 22px;
    border-radius: 24px;
  }

  .screen--topup .methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .screen--topup .method {
    min-height: 58px;
    border-radius: 18px;
  }

  .screen--topup .topup__input,
  .screen--promo .promo__input {
    min-height: 64px;
    border-radius: 20px;
  }

  .screen--topup .topup__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
  }

  .screen--topup .topup__summary b,
  .screen--topup #payAmount,
  .screen--topup #payCoins {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--topup #btnPay {
    min-height: 112px;
    border-radius: 24px;
    font-size: 17px;
    box-shadow: 0 18px 34px rgba(254, 57, 31, 0.2);
  }

  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    grid-column: 1;
    grid-row: 1 / span 5;
    min-height: 430px;
    display: grid;
    align-content: end;
    padding: 40px;
    border-radius: 28px;
    background:
      radial-gradient(circle at 86% 16%, rgba(255, 222, 191, 0.34), transparent 32%),
      linear-gradient(135deg, var(--fig-red), #ff8b1e);
    color: var(--fig-paper);
    box-shadow: 0 20px 46px rgba(254, 57, 31, 0.18);
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply,
  .screen--promo .promo__result,
  .screen--promo .promo__hint,
  .screen--sup .support .row-link {
    grid-column: 2;
  }

  .screen--promo #btnPromoApply {
    min-height: 72px;
    border-radius: 22px;
  }

  .screen--promo .promo__result {
    min-height: 76px;
  }

  .screen--promo .promo__hint {
    min-height: 190px;
  }

  .screen--sup .support .row-link {
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--fig-white);
    color: var(--fig-black);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--settings .settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    grid-column: 1 / -1;
    min-height: 0;
    margin: 8px 0 -4px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: #777;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0;
  }

  .screen--settings .settings__group:first-child,
  .screen--settings h3.settings__group:first-child {
    margin-top: 0;
  }

  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    min-height: 126px;
    padding: 20px;
    border-radius: 24px;
    background: var(--fig-white);
  }

  .screen--settings .row-switch {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .screen--settings .row-switch b,
  .screen--settings .row-action,
  .screen--settings .row-info b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--fig-black);
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--settings .row-switch small {
    display: -webkit-box;
    overflow: hidden;
    color: #777;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .screen--ach .ach,
  .screen--stats .statspg {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
  }

  .screen--ach .ach__item,
  .screen--stats .statcard {
    min-height: 154px;
    padding: 20px;
    border-radius: 24px;
  }

  .screen--ach .ach__name,
  .screen--ach .ach__desc,
  .screen--stats .statcard small,
  .screen--stats .statcard p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen--stats .statcard b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--fig-red);
    font-size: clamp(30px, 3vw, 46px);
    line-height: 0.94;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--myblanks .myblanks,
  .screen--hist .history,
  .screen--fri .friends {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
  }

  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow {
    min-height: 104px;
    padding: 18px 20px;
    border-radius: 24px;
  }

  .screen--myblanks .blankrow__main b,
  .screen--myblanks .blankrow__main small,
  .screen--hist .historow b,
  .screen--hist .historow small,
  .screen--fri .frirow b,
  .screen--fri .frirow small,
  .screen--hist .historow__prize {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--edit .editp {
    display: grid;
    grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
    gap: 18px 24px;
    padding: 28px;
  }

  .screen--edit .editp__avatar {
    grid-row: 1 / span 6;
    min-height: 328px;
    border-radius: 26px;
  }

  .screen--blankview .blankview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    padding: 24px;
  }

  .screen--blankview .lot-preview {
    margin: 0;
    border-radius: 24px;
  }

  .screen--doc .docpage {
    display: grid;
    gap: 18px;
    padding: 28px;
  }

  .screen--doc .docpage__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--doc .docpage__card,
  .screen--doc .docpage__note {
    min-height: 138px;
    padding: 22px;
    border-radius: 24px;
  }

  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    padding: 24px;
    border-radius: 26px;
  }

  .screen--status .statuspage {
    width: min(100%, 760px);
    min-height: 420px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    padding: 48px;
    text-align: center;
  }

  .screen--mafia .mafiapage {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    grid-template-areas:
      "hero panel"
      "list list";
    gap: 18px;
  }

  .screen--mafia .mafiapage__hero {
    grid-area: hero;
    min-height: 520px;
    display: grid;
    align-content: end;
    padding: 42px;
    overflow: hidden;
    border-radius: 30px;
    background: #141414;
    color: var(--fig-paper);
    box-shadow: 0 20px 46px rgba(22, 22, 22, 0.16);
  }

  .screen--mafia .mafiapage__cover {
    width: min(52%, 440px);
    opacity: 0.8;
  }

  .screen--mafia .mafiapage__hero h2,
  .screen--mafia .mafiapage__panel h3,
  .screen--mafia-sub .mafiaflow__hero h2 {
    max-width: 560px;
    font-size: clamp(64px, 5.8vw, 92px);
    line-height: 0.84;
    letter-spacing: 0;
    padding-bottom: 0.12em;
    overflow: hidden;
  }

  .screen--mafia .mafiapage__hero p {
    max-width: 550px;
    font-size: 17px;
    line-height: 1.35;
  }

  .screen--mafia .mafiapage__panel {
    grid-area: panel;
    min-height: 520px;
    display: grid;
    align-content: center;
    padding: 34px;
    border-radius: 30px;
  }

  .screen--mafia .mafiapage__panel p {
    max-width: 520px;
    color: #666;
    font-size: 16px;
    line-height: 1.4;
  }

  .screen--mafia .mafiapage__actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .screen--mafia .mafiapage__list {
    grid-area: list;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--mafia .mafiapage__list button {
    min-height: 138px;
    padding: 22px;
    border-radius: 26px;
  }

  .screen--mafia-sub .mafiaflow {
    display: grid;
    gap: 18px;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 210px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: end;
    gap: 22px;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #171717, #282828);
    color: var(--fig-paper);
    box-shadow: 0 20px 46px rgba(22, 22, 22, 0.16);
  }

  .screen--mafia-sub .mafiaflow__mark {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .screen--mafia-sub .mafiaflow__hero p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.35;
  }

  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card {
    min-height: 170px;
    padding: 22px;
    border-radius: 26px;
  }

  .screen--mafia-sub .mafiaflow__panel--wide {
    grid-column: 1 / -1;
  }

  .screen--mafia-sub .mafiaflow__stepper strong,
  .screen--mafia-sub [data-mafia-role-count],
  .screen--mafia-rounds #mafiaTimerClock {
    display: block;
    min-width: 74px;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: minmax(400px, 0.72fr) minmax(0, 1fr);
  }

  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds {
    min-height: 500px;
    border-radius: 30px;
  }

  .screen--mafia-rounds .mafiarounds {
    display: grid;
    gap: 12px;
  }

  .screen--mafia-rounds .mafiarounds li {
    min-height: 82px;
    padding: 16px 18px;
    border-radius: 22px;
  }
}

.fig-search-panel--floating {
  position: fixed;
  left: 50%;
  top: 118px;
  z-index: 10050;
  width: min(680px, calc(100vw - 64px));
  transform: translateX(-50%);
  pointer-events: auto;
}

.fig-search-panel--floating[hidden] {
  display: none !important;
}

.fig-search-panel--floating .fig-search-panel__form {
  height: 62px;
  box-shadow: 0 18px 42px rgba(22, 22, 22, 0.18);
}

.fig-search-panel--floating .fig-search-results {
  width: 100%;
  max-height: min(430px, calc(100dvh - 210px));
  margin: 10px 0 0;
  border-radius: 22px;
}

@media (max-width: 899px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    display: none !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1040px;
    padding-inline: 28px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    grid-template-columns: 54px 116px minmax(160px, 1fr) 214px 58px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand {
    width: 116px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand img {
    width: 106px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance {
    width: 214px;
    font-size: 16px;
  }

  .screen--topup .topup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hero hero"
      "amounts amounts"
      "custom methods"
      "summary pay"
      "hint hint";
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero,
  .screen--mafia .mafiapage__hero,
  .screen--mafia .mafiapage__panel {
    min-height: 360px;
  }

  .screen--settings .settings,
  .screen--ach .ach,
  .screen--stats .statspg,
  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen--mafia .mafiapage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "panel"
      "list";
  }

  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: 1fr;
  }
}

/* Final19 notebook tightening: keep 1181-1320px laptops from getting squeezed layouts. */
@media (min-width: 1181px) and (max-width: 1320px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1184px;
    padding-inline: 24px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    grid-template-columns: 50px 112px minmax(210px, 1fr) 232px 56px;
    gap: 10px;
    height: 70px;
    min-height: 70px;
    margin-bottom: 44px;
    padding: 9px 12px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__back,
  .screen:not(.screen--launcher):not(.screen--fig-export) .iconbtn-round {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand img {
    width: 108px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search {
    height: 50px;
    grid-template-columns: 46px minmax(0, 1fr);
    font-size: 15px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance {
    width: 232px;
    height: 50px;
    grid-template-columns: 34px minmax(0, 1fr);
    font-size: 15px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__coin {
    width: 34px;
    height: 34px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    width: 56px;
    height: 56px;
    font-size: 29px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop .iconbtn-round {
    top: 10px;
    right: 306px;
  }

  .screen--topup .topup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hero hero"
      "amounts amounts"
      "custom methods"
      "summary pay"
      "hint hint";
  }

  .screen--topup .topup__hero {
    min-height: 330px;
    padding: 34px;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    font-size: clamp(48px, 5vw, 68px);
    line-height: 0.88;
  }

  .screen--topup .amt {
    min-height: 116px;
  }

  .screen--mafia .mafiapage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "panel"
      "list";
  }

  .screen--mafia .mafiapage__hero,
  .screen--mafia .mafiapage__panel {
    min-height: 350px;
  }
}

@media (min-width: 900px) and (max-height: 820px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    padding-top: 22px;
    padding-bottom: 44px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    margin-bottom: 38px;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 320px;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 174px;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card {
    min-height: 142px;
  }
}

/* Final22: repair notebook topup after old desktop grid areas leaked into Final21. */
@media (min-width: 900px) {
  .screen--topup {
    --inner-max: 640px;
  }

  .screen--topup .topup {
    display: grid !important;
    grid-template: none !important;
    grid-template-areas: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
  }

  .screen--topup :is(.topup__hero, .topup__amounts, .topup__custom, .topup__methods, .topup__summary, .topup__hint, #btnPay) {
    grid-area: auto !important;
    min-width: 0;
    width: 100%;
  }

  .screen--topup .topup__hero {
    display: block;
    padding: 8px 8px 4px;
  }

  .screen--topup .topup__hero h2 {
    width: auto;
    max-width: 540px;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }

  .screen--topup .topup__amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen--topup .amt {
    min-height: 112px;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
  }

  .screen--topup .amt b,
  .screen--topup .amt small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--topup .topup__summary {
    overflow: hidden;
  }

  .screen--topup .topup__summary > div {
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  }

  .screen--topup .topup__summary span,
  .screen--topup .topup__summary b {
    min-width: 0;
  }

  .screen--topup .topup__summary b,
  .screen--topup #payAmount,
  .screen--topup #payCoins {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--mafia-setup :is(.mafiaflow__stepper, .mafiaflow__segmented, .mafiaflow__chips, .mafiaflow__actions) {
    min-width: 0;
  }

  .screen--mafia-setup .mafiaflow__chips span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--topup {
    --inner-max: 620px;
  }

  .screen--topup .topup__hero h2 {
    max-width: 520px;
  }
}

/* Final23: make inner page width tokens win over the high-specificity base shell. */
@media (min-width: 900px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 640px;
  }

  .screen.screen--edit:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--ach:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--myblanks:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--blankview:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--stats:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--hist:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--fri:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--doc:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--status:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia-sub:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 880px;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 620px;
  }

  .screen.screen--edit:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--ach:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--myblanks:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--blankview:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--stats:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--hist:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--fri:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--doc:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--status:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia-sub:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 760px;
  }
}

/* Final20 laptop text guard: give dynamic desktop values and display headings a real glyph buffer. */
@media (min-width: 900px) {
  .screen--profile .fig-live-profile-nav-balance {
    width: 5.4%;
    height: 1.24%;
    line-height: 1.25;
  }

  .screen--profile .fig-live-profile-avatar {
    width: 5.1%;
    height: 5.14%;
    line-height: 1.05;
  }

  .screen--profile .fig-live-profile-name {
    width: 22.2%;
    height: 3.4%;
    line-height: 1.18;
  }

  .screen--profile .fig-live-profile-meta {
    width: 22.6%;
    height: 2.1%;
    line-height: 1.18;
  }

  .screen--profile .fig-live-profile-level {
    width: 14.2%;
    height: 2.1%;
    line-height: 1.22;
  }

  .screen--profile .fig-live-profile-xp-left {
    width: 13.4%;
    height: 1.96%;
    line-height: 1.2;
  }

  .screen--profile .fig-live-profile-xp {
    width: 7.8%;
    height: 1.6%;
    line-height: 1.18;
  }

  .screen--profile .fig-live-profile-balance-main {
    width: 31.5%;
    height: 5.15%;
    line-height: 1.08;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2,
  .screen--mafia .mafiapage__hero h2,
  .screen--mafia .mafiapage__panel h3,
  .screen--mafia-sub .mafiaflow__hero h2 {
    line-height: 1.04;
    padding-block: 0.02em 0.12em;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    line-height: 1.2;
    min-height: 1.35em;
  }

  .screen--edit .editp__avatar {
    align-content: start;
    gap: 16px;
    padding-bottom: 22px;
  }
}

/* Final21: notebook inner pages should follow the Figma app layout, not stretch like a dashboard. */
@media (min-width: 900px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 560px;
    padding: 30px max(26px, calc((100vw - var(--inner-max)) / 2)) 72px;
    background: var(--fig-paper);
  }

  .screen--edit,
  .screen--ach,
  .screen--myblanks,
  .screen--blankview,
  .screen--stats,
  .screen--hist,
  .screen--fri,
  .screen--doc,
  .screen--gift,
  .screen--auth,
  .screen--status,
  .screen--mafia,
  .screen--mafia-sub {
    --inner-max: 880px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    height: 74px;
    min-height: 74px;
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    gap: 8px;
    margin: 0 auto 28px;
    padding: 8px;
    border-radius: 999px;
    background: var(--fig-white);
    box-shadow: none;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    display: none !important;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__back,
  .screen:not(.screen--launcher):not(.screen--fig-export) .iconbtn-round {
    position: static;
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 50%;
    background: #ececec;
    color: var(--fig-black);
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 900;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop .iconbtn-round {
    position: static;
    grid-column: 3;
    justify-self: end;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__title {
    position: static;
    grid-column: 2;
    max-width: none;
    color: #332426;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup, .promo, .settings, .editp, .ach, .myblanks, .blankview, .statspg, .history, .friends, .support, .docpage, .giftpage, .authpage, .statuspage, .mafiapage, .mafiaflow) {
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    margin-inline: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .screen--topup .topup,
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .screen--topup :is(.topup__hero, .topup__amounts, .topup__custom, .topup__methods, .topup__summary, .topup__hint, #btnPay),
  .screen--promo :is(.topup__hero, .promo__input, #btnPromoApply, .promo__result, .promo__hint),
  .screen--sup :is(.topup__hero, .row-link),
  .screen--gift :is(.giftpage__hero, .giftpage__panel),
  .screen--auth :is(.authpage__hero, .authpage__panel) {
    grid-area: auto !important;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 0;
    padding: 10px 8px 6px;
    align-content: start;
    border-radius: 0;
    background: transparent;
    color: var(--fig-black);
    box-shadow: none;
  }

  .screen--topup .topup__emoji,
  .screen--promo .topup__emoji,
  .screen--sup .topup__emoji,
  .screen--gift .giftpage__mark,
  .screen--auth .authpage__mark {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin: 0 0 14px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ff391f 0%, #ff8b42 100%);
    color: var(--fig-white);
    font-size: 32px;
    line-height: 1;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: 100%;
    color: #202326;
    font-family: var(--font-display);
    font-size: 70px;
    font-weight: 900;
    line-height: 0.84;
    padding: 0.02em 0 0.12em;
    text-transform: uppercase;
    text-align: left;
    -webkit-text-fill-color: currentColor;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    max-width: 440px;
    margin: 0;
    color: #8b8b8b;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.32;
  }

  .screen--topup .topup__amounts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .screen--topup .amt,
  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__result,
  .screen--promo .promo__hint,
  .screen--sup .support .row-link,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel,
  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info,
  .screen--ach .ach__item,
  .screen--stats .statcard,
  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow,
  .screen--doc .docpage__card,
  .screen--doc .docpage__note,
  .screen--mafia .mafiapage__panel,
  .screen--mafia .mafiapage__list button,
  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card,
  .screen--mafia-sub .mafiarounds li,
  .screen--mafia-rounds .mafiatimer {
    border: 0;
    border-radius: 24px;
    background: var(--fig-white);
    box-shadow: none;
  }

  .screen--topup .amt {
    min-height: 98px;
    padding: 18px 12px;
  }

  .screen--topup .amt b {
    font-size: 25px;
    line-height: 1;
  }

  .screen--topup .amt small {
    margin-top: 9px;
    font-size: 14px;
    font-weight: 800;
  }

  .screen--topup .amt.is-active {
    background: var(--fig-red);
    color: var(--fig-white);
    outline: 4px solid rgba(255, 57, 31, 0.16);
  }

  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__hint,
  .screen--promo .promo__result,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    padding: 18px;
  }

  .screen--topup .topup__input,
  .screen--promo .promo__input {
    height: 68px;
    border-radius: 22px;
    background: #efefef;
  }

  .screen--topup .topup__input input,
  .screen--promo .promo__input input {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .screen--topup .methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .screen--topup .method {
    min-height: 62px;
    border-radius: 20px;
    font-weight: 900;
  }

  .screen--topup .topup__summary {
    display: grid;
    gap: 12px;
  }

  .screen--topup .topup__summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 16px;
  }

  .screen--topup .topup__summary b {
    min-width: 0;
    color: var(--fig-red);
    font-size: 38px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .screen--topup #btnPay,
  .screen--promo #btnPromoApply,
  .screen--gift #btnGiftCreate,
  .screen--auth #btnAuthSubmit {
    min-height: 68px;
    border-radius: 22px;
    font-size: 17px;
    font-weight: 900;
    box-shadow: none;
  }

  .screen--topup .topup__hint {
    padding-inline: 8px;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
  }

  .screen--settings .settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    margin: 32px 0 4px;
    color: #202326;
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 900;
    line-height: 0.86;
    letter-spacing: 0;
  }

  .screen--settings .settings__group:first-child,
  .screen--settings h3.settings__group:first-child {
    margin-top: 0;
  }

  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    min-height: 86px;
    padding: 18px 22px;
  }

  .screen--settings .row-switch {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .screen--settings .row-switch b,
  .screen--settings .row-action,
  .screen--settings .row-info b {
    color: #202326;
    font-size: 17px;
    font-weight: 900;
  }

  .screen--settings .row-switch small,
  .screen--settings .row-info span {
    color: #8c8c8c;
    font-size: 14px;
    font-weight: 600;
  }

  .screen--settings .switch {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: var(--fig-red);
  }

  .screen--settings .switch::after {
    width: 24px;
    height: 24px;
    top: 7px;
    left: 23px;
    background: var(--fig-white);
  }

  .screen--settings input:not(:checked) + .switch {
    background: #dedede;
  }

  .screen--settings input:not(:checked) + .switch::after {
    left: 7px;
  }

  .screen--promo .promo__hint,
  .screen--sup .support .row-link {
    min-height: 72px;
  }

  .screen--sup .support .row-link {
    display: flex;
    align-items: center;
    padding: 0 22px;
    color: #202326;
    font-size: 18px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .screen--ach .ach,
  .screen--stats .statspg,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--myblanks .myblanks,
  .screen--hist .history,
  .screen--fri .friends {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--ach .ach__item,
  .screen--stats .statcard {
    min-height: 132px;
    padding: 18px;
  }

  .screen--stats .statcard b,
  .screen--ach .ach__name {
    overflow-wrap: anywhere;
  }

  .screen--doc .docpage {
    padding: 24px;
    border-radius: 28px;
    background: var(--fig-white);
  }

  .screen--doc .docpage h2 {
    font-size: 58px;
  }

  .screen--mafia .mafiapage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
    gap: 16px;
  }

  .screen--mafia .mafiapage__list {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--mafia .mafiapage__hero {
    min-height: 430px;
  }

  .screen--mafia-sub .mafiaflow {
    display: grid;
    gap: 16px;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 190px;
    padding: 28px;
  }

  .screen--mafia-sub .mafiaflow__hero h2 {
    font-size: 58px;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--edit,
  .screen--ach,
  .screen--myblanks,
  .screen--blankview,
  .screen--stats,
  .screen--hist,
  .screen--fri,
  .screen--doc,
  .screen--gift,
  .screen--auth,
  .screen--status,
  .screen--mafia,
  .screen--mafia-sub {
    --inner-max: 760px;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    font-size: 62px;
  }

  .screen--mafia .mafiapage,
  .screen--mafia .mafiapage__list,
  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) and (max-height: 820px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    padding-top: 22px;
    padding-bottom: 52px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop {
    margin-bottom: 22px;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    font-size: 58px;
  }

  .screen--topup .amt {
    min-height: 84px;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    margin-top: 24px;
    font-size: 48px;
  }
}

/* Final24: desktop inner pages use the same site-scale shell as the Figma-backed pages. */
@media (min-width: 900px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--edit:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--ach:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--myblanks:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--blankview:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--stats:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--hist:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--fri:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--doc:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--status:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia-sub:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1160px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1160px;
    min-height: 100dvh;
    padding: 54px max(48px, calc((100vw - var(--inner-max)) / 2)) 104px;
    background: var(--fig-paper);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop {
    position: relative;
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    min-height: 82px;
    display: grid;
    grid-template-columns: 58px 150px minmax(240px, 1fr) 226px 64px;
    align-items: center;
    gap: 12px;
    margin: 0 auto 66px;
    padding: 10px 12px;
    overflow: visible;
    border-radius: 42px;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.08);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop > div[style*="width:36px"] {
    display: none !important;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__back,
  .screen:not(.screen--launcher):not(.screen--fig-export) .iconbtn-round {
    grid-column: 1;
    grid-row: 1;
    position: static;
    width: 58px;
    height: 58px;
    min-width: 58px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #ececec;
    color: var(--fig-black);
    font-family: var(--font-body);
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop .iconbtn-round {
    grid-column: 5;
    justify-self: end;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop:has(.iconbtn-round) .gametop__avatar {
    display: none !important;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__title {
    position: absolute;
    left: 2px;
    top: calc(100% + 20px);
    max-width: min(760px, 70%);
    min-width: 0;
    color: #8b8b8b;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    position: static;
    min-width: 0;
    border: 0;
    font-family: var(--font-body);
    box-shadow: none;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand {
    grid-column: 2;
    grid-row: 1;
    width: 150px;
    height: 58px;
    display: grid !important;
    place-items: center;
    padding: 0;
    background: transparent;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand img {
    display: block;
    width: 128px;
    max-width: 100%;
    height: auto;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    height: 58px;
    justify-self: stretch;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    padding: 0 22px 0 13px;
    border-radius: 999px;
    background: #efefef;
    color: #a3a3a3;
    font-size: 17px;
    font-weight: 600;
    text-align: left;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__search::before {
    content: "";
    width: 22px;
    height: 22px;
    justify-self: center;
    border: 3px solid #a3a3a3;
    border-radius: 50%;
    box-shadow: 10px 10px 0 -8px #a3a3a3;
    transform: rotate(-7deg);
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance {
    grid-column: 4;
    grid-row: 1;
    width: 226px;
    height: 58px;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    padding: 0 18px 0 8px;
    border-radius: 999px;
    background: #242424;
    color: var(--fig-paper);
    font-size: 19px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__coin {
    width: 42px;
    height: 42px;
    display: block;
    border-radius: 50%;
    background: url("assets/figma-exact/balance-coin-mobile.png") center / contain no-repeat;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance b {
    display: block;
    min-width: 0;
    overflow: hidden;
    line-height: 1;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__avatar {
    grid-column: 5;
    grid-row: 1;
    width: 62px;
    height: 62px;
    display: grid !important;
    place-items: center;
    justify-self: end;
    border-radius: 50%;
    background: var(--fig-red);
    color: var(--fig-paper);
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup, .promo, .settings, .editp, .ach, .myblanks, .blankview, .statspg, .history, .friends, .support, .docpage, .giftpage, .authpage, .statuspage, .mafiapage, .mafiaflow) {
    width: min(100%, var(--inner-max));
    max-width: var(--inner-max);
    margin-inline: auto;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup__custom, .topup__methods, .topup__summary, .promo__input, .promo__result, .promo__hint, .row-switch, .row-action, .row-info, .ach__item, .statcard, .blankrow, .historow, .frirow, .docpage__card, .docpage__note, .giftpage__panel, .authpage__panel, .mafiapage__panel, .mafiapage__list button, .mafiaflow__panel, .mafiarole, .mafiaflow__card, .mafiarounds li, .mafiatimer) {
    border: 0;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--topup .topup {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    grid-template-areas:
      "hero amounts"
      "custom methods"
      "summary methods"
      "pay pay"
      "hint hint";
    gap: 18px 22px;
    align-items: stretch;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 300px;
    display: grid;
    align-content: end;
    padding: 34px;
    border-radius: 30px;
    background: var(--fig-white);
    color: var(--fig-black);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: 680px;
    color: #202326;
    font-family: var(--font-display);
    font-size: clamp(64px, 5.5vw, 86px);
    font-weight: 900;
    line-height: 0.84;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: left;
    -webkit-text-fill-color: currentColor;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    max-width: 560px;
    margin: 16px 0 0;
    color: #878787;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
  }

  .screen--topup .topup__emoji,
  .screen--promo .topup__emoji,
  .screen--sup .topup__emoji,
  .screen--gift .giftpage__mark,
  .screen--auth .authpage__mark {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 0 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ff391f 0%, #ff8b42 100%);
    color: var(--fig-white);
    font-size: 34px;
    line-height: 1;
  }

  .screen--topup .topup__amounts {
    grid-area: amounts;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .screen--topup .amt {
    min-height: 132px;
    padding: 20px;
    border-radius: 24px;
  }

  .screen--topup .amt b {
    font-size: 26px;
    line-height: 1;
    white-space: nowrap;
  }

  .screen--topup .amt small {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
  }

  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__hint,
  .screen--promo .promo__result,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    padding: 22px;
    border-radius: 26px;
  }

  .screen--topup .topup__methods {
    grid-area: methods;
  }

  .screen--topup .methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .screen--topup .method {
    min-height: 66px;
    justify-content: start;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 900;
  }

  .screen--topup .topup__input,
  .screen--promo .promo__input {
    min-height: 68px;
    border-radius: 22px;
    background: #efefef;
  }

  .screen--topup .topup__input input,
  .screen--promo .promo__input input {
    min-width: 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .screen--topup .topup__summary {
    grid-area: summary;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 16px;
  }

  .screen--topup .topup__summary > div {
    min-width: 0;
    display: grid;
    gap: 8px;
  }

  .screen--topup .topup__summary b,
  .screen--topup #payAmount,
  .screen--topup #payCoins {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--fig-red);
    font-family: var(--font-display);
    font-size: clamp(34px, 3.6vw, 54px);
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--topup #btnPay {
    grid-area: pay;
  }

  .screen--topup #btnPay,
  .screen--promo #btnPromoApply,
  .screen--gift #btnGiftCreate,
  .screen--auth #btnAuthSubmit {
    min-height: 74px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 900;
    box-shadow: none;
  }

  .screen--topup .topup__hint {
    grid-area: hint;
    max-width: 780px;
    margin-inline: auto;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
  }

  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.86fr);
    gap: 22px;
    align-items: stretch;
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply,
  .screen--promo .promo__result,
  .screen--promo .promo__hint {
    grid-column: 2;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    grid-row: 1 / span 4;
    min-height: 430px;
  }

  .screen--promo .promo__hint {
    font-size: 15px;
    line-height: 1.4;
  }

  .screen--settings .settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    grid-column: 1 / -1;
    margin: 16px 0 -2px;
    color: #202326;
    font-family: var(--font-display);
    font-size: clamp(42px, 4vw, 62px);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: 0;
  }

  .screen--settings .settings__group:first-child,
  .screen--settings h3.settings__group:first-child {
    margin-top: 0;
  }

  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    min-height: 138px;
    padding: 22px;
    border-radius: 26px;
  }

  .screen--settings .row-switch {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .screen--settings .row-switch b,
  .screen--settings .row-action,
  .screen--settings .row-info b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #202326;
    font-size: 17px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--settings .row-switch small,
  .screen--settings .row-info span {
    display: -webkit-box;
    overflow: hidden;
    color: #8c8c8c;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .screen--settings .switch {
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }

  .screen--ach .ach,
  .screen--stats .statspg {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
  }

  .screen--ach .ach__item,
  .screen--stats .statcard {
    min-height: 172px;
    display: grid;
    align-content: space-between;
    gap: 14px;
    padding: 22px;
    border-radius: 26px;
  }

  .screen--ach .ach__ico {
    position: static;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #ffe0bd;
    color: var(--fig-red);
    font-size: 26px;
  }

  .screen--ach .ach__name,
  .screen--ach .ach__desc,
  .screen--stats .statcard small,
  .screen--stats .statcard p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen--ach .ach__name {
    color: #202326;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
  }

  .screen--ach .ach__desc {
    color: #8c8c8c;
    font-size: 14px;
    font-weight: 700;
  }

  .screen--stats .statcard small {
    color: #8c8c8c;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .screen--stats .statcard b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--fig-red);
    font-family: var(--font-display);
    font-size: clamp(38px, 4.4vw, 66px);
    line-height: 0.88;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--myblanks .myblanks,
  .screen--hist .history,
  .screen--fri .friends {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
  }

  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow {
    min-height: 116px;
    padding: 20px 22px;
    border-radius: 26px;
  }

  .screen--hist .historow {
    grid-template-columns: 54px minmax(0, 1fr) minmax(92px, auto);
  }

  .screen--fri .frirow {
    grid-template-columns: 54px minmax(0, 1fr) 18px;
  }

  .screen--myblanks .blankrow__main b,
  .screen--myblanks .blankrow__main small,
  .screen--hist .historow b,
  .screen--hist .historow small,
  .screen--fri .frirow b,
  .screen--fri .frirow small,
  .screen--hist .historow__prize {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--edit .editp {
    display: grid;
    grid-template-columns: minmax(280px, 0.35fr) minmax(0, 1fr);
    gap: 18px 24px;
    padding: 28px;
    border-radius: 30px;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--edit .editp__avatar {
    grid-row: 1 / span 6;
    min-height: 340px;
    align-content: start;
    border-radius: 26px;
  }

  .screen--blankview .blankview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    padding: 28px;
    border-radius: 30px;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--blankview .lot-preview {
    margin: 0;
    border-radius: 24px;
  }

  .screen--doc .docpage {
    display: grid;
    gap: 22px;
    padding: 34px;
    border-radius: 30px;
    background: var(--fig-white);
    box-shadow: 0 14px 34px rgba(22, 22, 22, 0.055);
  }

  .screen--doc .docpage h2 {
    max-width: 820px;
    color: #202326;
    font-family: var(--font-display);
    font-size: clamp(56px, 5vw, 84px);
    line-height: 0.84;
    letter-spacing: 0;
  }

  .screen--doc .docpage > p {
    max-width: 820px;
    color: #777;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.34;
  }

  .screen--doc .docpage__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--doc .docpage__card,
  .screen--doc .docpage__note {
    min-height: 150px;
    padding: 24px;
    border-radius: 26px;
    background: #f7f7f7;
  }

  .screen--sup .support .row-link {
    min-height: 78px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow: hidden;
    border-radius: 26px;
    color: #202326;
    font-size: 18px;
    font-weight: 900;
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    display: grid;
    gap: 16px;
    align-content: center;
    padding: 26px;
    border-radius: 30px;
  }

  .giftpage__field input,
  .giftpage__field select,
  .giftpage__field textarea,
  .authpage__field input {
    min-height: 54px;
    border-radius: 16px;
  }

  .giftpage__field textarea {
    min-height: 110px;
  }

  .screen--status .statuspage {
    width: min(100%, 780px);
    min-height: 460px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    padding: 54px;
    border-radius: 30px;
    text-align: center;
  }

  .screen--status .statuspage h2 {
    color: #202326;
    font-family: var(--font-display);
    font-size: clamp(54px, 5vw, 82px);
    line-height: 0.84;
    letter-spacing: 0;
  }

  .screen--mafia .mafiapage {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    grid-template-areas:
      "hero panel"
      "list list";
    gap: 22px;
  }

  .screen--mafia .mafiapage__hero {
    grid-area: hero;
    min-height: 560px;
    display: grid;
    align-content: end;
    padding: 42px;
    overflow: hidden;
    border-radius: 32px;
    background: #141414;
    color: var(--fig-paper);
    box-shadow: 0 22px 52px rgba(22, 22, 22, 0.18);
  }

  .screen--mafia .mafiapage__cover {
    right: 22px;
    bottom: 16px;
    width: min(24%, 180px);
    height: auto;
    max-height: 88%;
    object-fit: contain;
    opacity: 0.82;
    mask-image: none;
  }

  .screen--mafia .mafiapage__panel {
    grid-area: panel;
    min-height: 560px;
    display: grid;
    align-content: center;
    padding: 38px;
    border-radius: 32px;
  }

  .screen--mafia .mafiapage__hero h2,
  .screen--mafia .mafiapage__panel h3,
  .screen--mafia-sub .mafiaflow__hero h2 {
    max-width: 620px;
    font-size: clamp(70px, 6.3vw, 104px);
    line-height: 0.84;
    letter-spacing: 0;
    padding-bottom: 0.12em;
    overflow: hidden;
  }

  .screen--mafia .mafiapage__hero p,
  .screen--mafia .mafiapage__panel p {
    max-width: 400px;
    font-size: 17px;
    line-height: 1.38;
  }

  .screen--mafia .mafiapage__actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .screen--mafia .mafiapage__list {
    grid-area: list;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--mafia .mafiapage__list button {
    min-height: 146px;
    padding: 24px;
    border-radius: 28px;
  }

  .screen--mafia-sub .mafiaflow {
    display: grid;
    gap: 20px;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 230px;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: end;
    gap: 24px;
    padding: 38px;
    border-radius: 32px;
    background: linear-gradient(135deg, #171717, #292929);
    color: var(--fig-paper);
    box-shadow: 0 22px 52px rgba(22, 22, 22, 0.16);
  }

  .screen--mafia-sub .mafiaflow__mark {
    width: 78px;
    height: 78px;
    border-radius: 24px;
  }

  .screen--mafia-sub .mafiaflow__hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
    line-height: 1.36;
  }

  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card {
    min-height: 184px;
    padding: 24px;
    border-radius: 28px;
  }

  .screen--mafia-sub .mafiaflow__panel--wide {
    grid-column: 1 / -1;
  }

  .screen--mafia-sub .mafiaflow__stepper strong,
  .screen--mafia-sub [data-mafia-role-count],
  .screen--mafia-rounds #mafiaTimerClock {
    display: block;
    min-width: 78px;
    max-width: 100%;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: minmax(420px, 0.76fr) minmax(0, 1fr);
  }

  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds {
    min-height: 520px;
    border-radius: 32px;
  }

  .screen--mafia-rounds .mafiarounds {
    display: grid;
    gap: 12px;
  }

  .screen--mafia-rounds .mafiarounds li {
    min-height: 84px;
    padding: 16px 18px;
    border-radius: 24px;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--edit:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--ach:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--myblanks:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--blankview:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--stats:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--hist:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--fri:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--doc:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--status:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--mafia-sub:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1040px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1040px;
    padding-inline: 28px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop {
    grid-template-columns: 56px 126px minmax(180px, 1fr) 202px 60px;
    gap: 10px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand {
    width: 126px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__brand img {
    width: 112px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__balance {
    width: 202px;
    font-size: 17px;
  }

  .screen--topup .topup,
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage,
  .screen--mafia .mafiapage {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
    gap: 18px;
  }

  .screen--mafia .mafiapage__cover {
    right: 18px;
    bottom: 16px;
    width: min(24%, 150px);
    opacity: 0.78;
  }

  .screen--mafia .mafiapage__chips {
    max-width: 74%;
  }

  .screen--settings .settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen--ach .ach,
  .screen--stats .statspg {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screen--mafia-sub .mafiaflow__grid--setup,
  .screen--mafia-sub .mafiaroles,
  .screen--mafia-sub .mafiaflow__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) and (max-height: 820px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    padding-top: 34px;
    padding-bottom: 72px;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop {
    margin-bottom: 54px;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 260px;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    font-size: clamp(54px, 4.9vw, 72px);
  }
}

/* Final24b: restore the desktop payment grid after older stress guards. */
@media (min-width: 900px) {
  .screen--topup .topup {
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr) !important;
    grid-template-areas:
      "hero amounts"
      "custom methods"
      "summary methods"
      "pay pay"
      "hint hint" !important;
    gap: 18px 22px !important;
    align-items: stretch !important;
  }

  .screen--topup .topup__hero {
    grid-area: hero !important;
  }

  .screen--topup :is(#_topupHeroArea, .topup__hero) {
    grid-area: hero !important;
  }

  .screen--topup .topup__amounts {
    grid-area: amounts !important;
  }

  .screen--topup :is(#_topupAmountsArea, .topup__amounts) {
    grid-area: amounts !important;
  }

  .screen--topup .topup__custom {
    grid-area: custom !important;
  }

  .screen--topup :is(#_topupCustomArea, .topup__custom) {
    grid-area: custom !important;
  }

  .screen--topup .topup__methods {
    grid-area: methods !important;
  }

  .screen--topup :is(#_topupMethodsArea, .topup__methods) {
    grid-area: methods !important;
  }

  .screen--topup .topup__summary {
    grid-area: summary !important;
  }

  .screen--topup :is(#_topupSummaryArea, .topup__summary) {
    grid-area: summary !important;
  }

  .screen--topup #btnPay {
    grid-area: pay !important;
  }

  .screen--topup .topup__hint {
    grid-area: hint !important;
  }

  .screen--topup :is(#_topupHintArea, .topup__hint) {
    grid-area: hint !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--topup .topup {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr) !important;
  }
}

/* Final25: keep mutable laptop values inside their own visual zones. */
@media (min-width: 900px) {
  .screen--ach .ach__item {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    grid-template-rows: minmax(54px, auto) 1fr auto !important;
    align-items: start !important;
    align-content: stretch !important;
    gap: 12px 14px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .screen--ach .ach__ico {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .screen--ach .ach__name {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: -webkit-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-overflow: clip !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .screen--ach .ach__desc {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    align-self: end !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-variant-numeric: tabular-nums !important;
  }

  .screen--hist .historow {
    grid-template-columns: 54px minmax(0, 1fr) minmax(120px, 132px) !important;
    gap: 16px !important;
    overflow: hidden !important;
  }

  .screen--hist .historow > div:nth-child(2) {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .screen--hist .historow small {
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .screen--hist .historow__prize {
    justify-self: end !important;
    min-width: 0 !important;
    max-width: 132px !important;
    overflow: hidden !important;
    text-align: right !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums !important;
  }

  .screen--blankview .bv-shareurl {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    display: flex !important;
    align-items: center !important;
    max-width: 100% !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 16px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .screen--blankview .blankview {
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .screen--blankview .lot-preview {
    grid-column: 1 !important;
    grid-row: 1 / 4 !important;
  }

  .screen--blankview .bv-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    margin-bottom: 12px !important;
  }

  .screen--blankview .lot-cell span {
    display: -webkit-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    text-overflow: clip !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .screen--blankview .lot-banner__text {
    min-width: 0 !important;
    max-width: calc(100% - 56px) !important;
    overflow: hidden !important;
  }

  .screen--blankview .lot-banner__text b,
  .screen--blankview .lot-banner__text small {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
}

/* Final26: laptop utility pages should read as finished Figma-style screens. */
@media (min-width: 900px) {
  .screen--edit .editp {
    display: grid !important;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) !important;
    gap: 14px 28px !important;
    align-items: start !important;
    align-content: start !important;
    width: min(100%, 920px) !important;
    max-width: 920px !important;
    min-height: 430px !important;
    padding: 28px !important;
    border-radius: 30px !important;
    background: var(--fig-white) !important;
    box-shadow: 0 22px 58px rgba(22, 22, 22, 0.08) !important;
  }

  .screen--edit .editp__avatar {
    grid-column: 1 !important;
    grid-row: 1 / span 6 !important;
    min-height: 374px !important;
    display: grid !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 20px !important;
    padding: 28px 22px !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, var(--fig-red), var(--fig-orange)) !important;
    box-shadow: none !important;
  }

  .screen--edit .editp__preview {
    width: 92px !important;
    height: 92px !important;
    margin: 0 !important;
    border-radius: 24px !important;
    color: var(--fig-black) !important;
    font-family: var(--font-display) !important;
    font-size: 34px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .screen--edit .editp__colors {
    gap: 9px !important;
  }

  .screen--edit .editp__colors button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border: 2px solid rgba(255, 255, 255, 0.74) !important;
  }

  .screen--edit .editp__colors button.is-active {
    border-color: var(--fig-white) !important;
    transform: none !important;
    box-shadow: 0 0 0 3px rgba(22, 22, 22, 0.18) !important;
  }

  .screen--edit .editp__avatar label,
  .screen--edit .editp > label {
    margin: 0 !important;
    color: #777 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
  }

  .screen--edit .editp > label,
  .screen--edit .editp > input {
    grid-column: 2 !important;
  }

  .screen--edit .input {
    width: 100% !important;
    min-height: 58px !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: var(--fig-paper) !important;
    color: var(--fig-black) !important;
    font-family: var(--font-body) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
  }

  .screen--edit .input:focus {
    outline: 3px solid rgba(254, 57, 31, 0.22) !important;
  }

  .screen--status .statuspage {
    width: min(100%, 560px) !important;
    max-width: 560px !important;
    min-height: 0 !important;
    padding: 52px 46px !important;
    border-radius: 32px !important;
    background: var(--fig-white) !important;
    box-shadow: 0 22px 58px rgba(22, 22, 22, 0.08) !important;
  }

  .screen--status .statuspage__actions {
    display: grid !important;
    gap: 12px !important;
    width: min(100%, 280px) !important;
    margin-inline: auto !important;
  }

  .screen--status .statuspage__actions .btn {
    width: 100% !important;
  }
}

/* Final27: compact laptop polish for real browser heights around 650-720px. */
@media (min-width: 900px) and (max-height: 720px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) {
    padding-top: 30px !important;
    padding-bottom: 50px !important;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) > .gametop {
    min-height: 70px !important;
    margin-bottom: 34px !important;
    padding: 0 14px !important;
  }

  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__back,
  .screen:not(.screen--launcher):not(.screen--fig-export) .gametop__profile,
  .screen:not(.screen--launcher):not(.screen--fig-export) .iconbtn-round {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 220px !important;
    padding: 26px !important;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2,
  .screen--doc .docpage h2 {
    font-size: clamp(42px, 4.2vw, 62px) !important;
    line-height: 0.86 !important;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p,
  .screen--doc .docpage > p {
    font-size: 15px !important;
    line-height: 1.28 !important;
  }

  .screen--topup .topup__emoji,
  .screen--promo .topup__emoji,
  .screen--sup .topup__emoji,
  .screen--gift .giftpage__mark,
  .screen--auth .authpage__mark {
    width: 62px !important;
    height: 62px !important;
    border-radius: 20px !important;
  }

  .screen--topup .topup {
    gap: 14px 18px !important;
  }

  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__result,
  .screen--promo .promo__hint,
  .screen--sup .support .row-link,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel,
  .screen--doc .docpage__card,
  .screen--doc .docpage__note,
  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info,
  .screen--ach .ach__item,
  .screen--stats .statcard,
  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow,
  .screen--mafia .mafiapage__panel,
  .screen--mafia .mafiapage__list button,
  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card,
  .screen--mafia-rounds .mafiarounds li,
  .screen--mafia-rounds .mafiatimer {
    border-radius: 22px !important;
  }

  .screen--settings .settings {
    gap: 14px !important;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    margin: 12px 0 -2px !important;
    font-size: clamp(34px, 3.2vw, 48px) !important;
    line-height: 0.88 !important;
  }

  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    min-height: 104px !important;
    padding: 18px 20px !important;
  }

  .screen--settings .row-switch {
    grid-template-columns: minmax(0, 1fr) 50px !important;
  }

  .screen--settings .switch {
    width: 50px !important;
    height: 50px !important;
    border-radius: 17px !important;
  }

  .screen--settings .row-switch b,
  .screen--settings .row-action,
  .screen--settings .row-info b {
    font-size: 15px !important;
  }

  .screen--settings .row-switch small,
  .screen--settings .row-info span {
    font-size: 12px !important;
  }

  .screen--ach .ach,
  .screen--stats .statspg {
    gap: 14px !important;
  }

  .screen--ach .ach__item,
  .screen--stats .statcard {
    min-height: 126px !important;
    padding: 18px !important;
  }

  .screen--stats .statcard b {
    font-size: clamp(32px, 3.6vw, 50px) !important;
  }

  .screen--myblanks .blankrow,
  .screen--hist .historow,
  .screen--fri .frirow {
    min-height: 86px !important;
    padding: 16px 18px !important;
  }

  .screen--blankview .blankview {
    grid-template-columns: minmax(0, 1fr) 330px !important;
    gap: 18px !important;
    padding: 22px !important;
  }

  .screen--blankview .lot-preview {
    height: min(456px, calc(100dvh - 194px)) !important;
    max-height: min(456px, calc(100dvh - 194px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .screen--blankview .bv-actions {
    gap: 10px !important;
  }

  .screen--blankview .bv-actions .btn {
    min-height: 54px !important;
  }

  .screen--blankview .bv-shareurl {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    display: block !important;
    box-sizing: border-box !important;
    padding: 0 14px !important;
    overflow: hidden !important;
    line-height: 48px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .screen--doc .docpage {
    gap: 16px !important;
    padding: 28px !important;
  }

  .screen--doc .docpage__grid {
    gap: 14px !important;
  }

  .screen--doc .docpage__card,
  .screen--doc .docpage__note {
    min-height: 118px !important;
    padding: 20px !important;
  }

  .screen--edit .editp {
    width: min(100%, 820px) !important;
    min-height: 340px !important;
    padding: 24px !important;
  }

  .screen--edit .editp__avatar {
    min-height: 292px !important;
    padding: 22px 18px !important;
  }

  .screen--mafia .mafiapage {
    gap: 18px !important;
  }

  .screen--mafia .mafiapage__hero,
  .screen--mafia .mafiapage__panel {
    min-height: 420px !important;
    padding: 30px !important;
    border-radius: 28px !important;
  }

  .screen--mafia .mafiapage__hero h2,
  .screen--mafia .mafiapage__panel h3,
  .screen--mafia-sub .mafiaflow__hero h2 {
    font-size: clamp(54px, 5vw, 76px) !important;
    line-height: 0.84 !important;
  }

  .screen--mafia .mafiapage__hero p,
  .screen--mafia .mafiapage__panel p,
  .screen--mafia-sub .mafiaflow__hero p {
    font-size: 15px !important;
    line-height: 1.32 !important;
  }

  .screen--mafia .mafiapage__list button {
    min-height: 112px !important;
    padding: 18px !important;
  }

  .screen--mafia-sub .mafiaflow {
    gap: 16px !important;
  }

  .screen--mafia-sub .mafiaflow__hero {
    min-height: 172px !important;
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 28px !important;
    border-radius: 28px !important;
  }

  .screen--mafia-sub .mafiaflow__mark {
    width: 62px !important;
    height: 62px !important;
    border-radius: 20px !important;
  }

  .screen--mafia-sub .mafiaflow__panel,
  .screen--mafia-sub .mafiarole,
  .screen--mafia-sub .mafiaflow__card {
    min-height: 138px !important;
    padding: 20px !important;
  }

  .screen--mafia-rounds .mafiaflow--rounds {
    grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1fr) !important;
  }

  .screen--mafia-rounds .mafiatimer,
  .screen--mafia-rounds .mafiarounds {
    min-height: 400px !important;
  }

  .screen--mafia-rounds .mafiarounds li {
    min-height: 64px !important;
    padding: 12px 16px !important;
  }

  .screen--status .statuspage {
    padding: 42px 40px !important;
  }
}

/* Final28 tail lock: keep new Mafia Figma layout after older laptop overrides. */
@media (min-width: 900px) {
  .screen--mafia .mafiapage.mafiapage--figma {
    width: min(100%, 1160px) !important;
    max-width: 1160px !important;
    min-height: 1380px !important;
    margin-inline: auto !important;
    padding: 0 0 70px !important;
    display: grid !important;
    grid-template-columns: minmax(390px, 460px) minmax(0, 1fr) !important;
    grid-template-areas:
      "intro intro"
      "rounds how"
      "rounds teams"
      "list list" !important;
    gap: 54px 36px !important;
    align-items: start !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .screen--mafia .mafiapage__intro {
    grid-area: intro !important;
    display: grid !important;
    grid-template-columns: minmax(390px, 460px) minmax(260px, 1fr) 168px !important;
    gap: 28px !important;
    align-items: center !important;
    min-height: 368px !important;
  }

  .screen--mafia .mafiapage__rounds { grid-area: rounds !important; }
  .screen--mafia .mafiapage__how { grid-area: how !important; }
  .screen--mafia .mafiapage__teams { grid-area: teams !important; }
  .screen--mafia .mafiapage__list { grid-area: list !important; }

  .screen--mafia .mafiapage__titlepack h2 {
    font-size: clamp(78px, 7vw, 118px) !important;
    line-height: 1 !important;
    overflow: hidden !important;
  }

  .screen--mafia .mafiapage__titlepack p,
  .screen--mafia .mafiapage__rounds p,
  .screen--mafia .mafiapage__rules p,
  .screen--mafia .mafiapage__teamgrid p,
  .screen--mafia .mafiapage__list small {
    font-size: 17px !important;
    line-height: 1.4 !important;
  }

  .screen--mafia .mafiapage__rounds h3,
  .screen--mafia .mafiapage__how h3,
  .screen--mafia .mafiapage__list h3 {
    font-size: clamp(42px, 4.1vw, 66px) !important;
    line-height: 1 !important;
    overflow: hidden !important;
  }

  .screen--mafia .mafiapage__cover {
    position: static !important;
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    width: min(330px, 100%) !important;
    max-width: 330px !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    opacity: 1 !important;
    mask-image: none !important;
    filter: drop-shadow(0 20px 34px rgba(22, 22, 22, 0.16)) !important;
  }

  .screen--mafia .mafiapage__play {
    position: relative !important;
    z-index: 3 !important;
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    width: 148px !important;
    min-width: 148px !important;
    min-height: 69px !important;
    border-radius: 0 34px 0 34px !important;
    font-size: 28px !important;
  }

  .screen--mafia .mafiapage__rounds ol {
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .screen--mafia .mafiapage__rounds li,
  .screen--mafia .mafiapage__rules article {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .screen--mafia .mafiapage__note,
  .screen--mafia .mafiapage__list button {
    min-height: 176px !important;
    padding: 24px !important;
    border: 0 !important;
    border-radius: 0 32px 0 32px !important;
    background: var(--fig-white) !important;
    box-shadow: 0 18px 42px rgba(22, 22, 22, 0.08) !important;
  }

  .screen--mafia .mafiapage__note {
    min-height: 94px !important;
  }

  .screen--mafia .mafiapage__teamgrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 30px !important;
  }

  .screen--mafia .mafiapage__list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .screen--mafia .mafiapage__list h3 {
    grid-column: 1 / -1 !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--mafia .mafiapage.mafiapage--figma {
    grid-template-columns: minmax(350px, 420px) minmax(0, 1fr) !important;
    gap: 42px 28px !important;
  }

  .screen--mafia .mafiapage__intro {
    grid-template-columns: minmax(350px, 420px) minmax(220px, 1fr) 132px !important;
    min-height: 330px !important;
  }

  .screen--mafia .mafiapage__titlepack h2 {
    font-size: clamp(68px, 7vw, 92px) !important;
  }

  .screen--mafia .mafiapage__cover {
    width: min(260px, 100%) !important;
  }

  .screen--mafia .mafiapage__play {
    width: 132px !important;
    min-width: 132px !important;
    min-height: 60px !important;
    font-size: 24px !important;
  }
}

/* Final29 Mafia Figma render layer: vector reference + live values + click zones. */
.fig-page--mafia {
  aspect-ratio: 1080 / 3886;
  max-width: 1080px;
  background: #161616;
}

.fig-page-hotspots--mafia .mafiapage__list {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

.fig-page-hotspots--mafia .mafiapage__list .fig-page-hit {
  pointer-events: auto;
}

.fig-page-hit--mafia-logo { left: 41.5%; top: 2.0%; width: 19%; height: 1.55%; }
.fig-page-hit--mafia-search { display: none; }
.fig-page-hit--mafia-balance { left: 72%; top: 1.75%; width: 20%; height: 2.1%; }
.fig-page-hit--mafia-profile { display: none; }
.fig-page-hit--mafia-play-hero { left: 69.5%; top: 20.55%; width: 22%; height: 3.1%; }
.fig-page-hit--mafia-round-note { left: 5.3%; top: 60.2%; width: 8.5%; height: 3.0%; }
.fig-page-hit--mafia-teams { left: 5.0%; top: 26.8%; width: 89.5%; height: 19.3%; border-radius: 20px; }
.fig-page-hit--mafia-start { left: 5.4%; top: 64.45%; width: 89.2%; height: 3.25%; border-radius: 999px; }
.fig-page-hit--mafia-roles { left: 6.0%; top: 72.4%; width: 29.5%; height: 8.8%; border-radius: 24px; }
.fig-page-hit--mafia-muzloto { left: 37.1%; top: 72.4%; width: 29.5%; height: 8.8%; border-radius: 24px; }
.fig-page-hit--mafia-gift { left: 68.2%; top: 72.4%; width: 29.5%; height: 8.8%; border-radius: 24px; }
.fig-page-hit--mafia-more { left: 5.7%; top: 82.25%; width: 88.8%; height: 2.8%; border-radius: 999px; }

.fig-live-mafia-balance {
  left: 77.5%;
  top: 2.25%;
  width: 12.4%;
  height: 1.05%;
  justify-content: center;
  overflow: visible;
  color: #f5f5f5;
  font-size: min(3.9vw, 22px);
  line-height: 1;
  letter-spacing: 0;
  --fig-live-mask-bg: #2a2a2a;
  --fig-live-mask-radius: 999px;
  --fig-live-mask-inset: -5px -10px -5px -16px;
}

.fig-live-mafia-avatar {
  display: none;
}

@media (min-width: 900px) {
  .fig-page--mafia {
    width: min(100vw, 1280px);
    max-width: 1280px;
    aspect-ratio: 1280 / 1892;
  }

  .fig-page-hit--mafia-logo { left: 4.7%; top: 3.05%; width: 12.9%; height: 4.55%; }
  .fig-page-hit--mafia-search { display: block; left: 17%; top: 3.75%; width: 62.6%; height: 3.1%; }
  .fig-page-hit--mafia-balance { left: 80.7%; top: 3.75%; width: 10.2%; height: 3.0%; }
  .fig-page-hit--mafia-profile { display: block; left: 91%; top: 3.65%; width: 4.2%; height: 3.0%; }
  .fig-page-hit--mafia-play-hero { left: 82.2%; top: 20.65%; width: 13%; height: 4.1%; }
  .fig-page-hit--mafia-round-note { left: 4.7%; top: 50.9%; width: 36.5%; height: 7.4%; border-radius: 0 24px 0 24px; }
  .fig-page-hit--mafia-teams { left: 44.1%; top: 35.2%; width: 52.7%; height: 19.5%; border-radius: 28px; }
  .fig-page-hit--mafia-start { left: 44%; top: 55.8%; width: 52.8%; height: 2.5%; border-radius: 999px; }
  .fig-page-hit--mafia-roles { left: 44.2%; top: 64.1%; width: 16.9%; height: 11.2%; border-radius: 24px; }
  .fig-page-hit--mafia-muzloto { left: 62.2%; top: 64.1%; width: 16.5%; height: 11.2%; border-radius: 24px; }
  .fig-page-hit--mafia-gift { left: 79.9%; top: 64.1%; width: 16.5%; height: 11.2%; border-radius: 24px; }
  .fig-page-hit--mafia-more { left: 44.2%; top: 77.1%; width: 52.5%; height: 2.75%; border-radius: 999px; }

  .fig-live-mafia-balance {
    left: 84.25%;
    top: 4.62%;
    width: 4.8%;
    height: 0.9%;
    color: #f3f3f3;
    font-size: min(1.29vw, 16.5px);
    font-weight: 900;
    letter-spacing: 0;
    --fig-live-mask-bg: #2a2a2a;
    --fig-live-mask-radius: 999px;
    --fig-live-mask-inset: -5px -14px -5px -12px;
  }

  .fig-live-mafia-avatar {
    display: flex;
    left: 92.25%;
    top: 4.15%;
    width: 1.25%;
    height: 1.18%;
    overflow: visible;
    color: #fff;
    font-size: min(1.95vw, 25px);
    font-weight: 900;
    line-height: 1;
    --fig-live-mask-bg: #ff4a24;
    --fig-live-mask-radius: 999px;
    --fig-live-mask-inset: -19px -17px;
  }
}
/* Final29 Mafia export lock: prevent hidden fallback from reappearing after old overrides. */
.screen--mafia.screen--fig-export > :not(.fig-page) {
  display: none !important;
}

@media (min-width: 900px) {
  .fig-live-mafia-balance {
    left: 83.65%;
    top: 4.58%;
    width: 6.85%;
    height: 0.95%;
    font-size: min(1.05vw, 13.5px);
    --fig-live-mask-inset: -5px -9px -5px -7px;
  }

  .fig-live-mafia-avatar {
    left: 91.45%;
    top: 3.65%;
    width: 3.2%;
    height: 3.2%;
    font-size: min(1.95vw, 25px);
    --fig-live-mask-inset: 0;
  }
}
/* Final29 Mafia hitbox reset: old card CSS must not paint over the SVG reference. */
.fig-page-hotspots--mafia .fig-page-hit,
.fig-page-hotspots--mafia .mafiapage__list .fig-page-hit {
  display: block !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
/* Final30 mobile typography safety: prevent display-font glyph clipping on auxiliary pages. */
@media (max-width: 899px) {
  .screen:not(.screen--launcher):not(.screen--fig-export) :is(.topup__hero h2, .giftpage__hero h2, .authpage__hero h2, .statuspage h2, .docpage h2),
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--mafia-sub .mafiaflow__hero h2 {
    line-height: 1.02 !important;
    padding-bottom: 0.28em !important;
    overflow: visible !important;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    min-height: 86px !important;
    line-height: 1.02 !important;
    padding-bottom: 0.16em !important;
    overflow: visible !important;
  }

  .screen--mafia-sub .mafiaflow__hero h2 {
    min-height: 136px !important;
  }

  .screen--mafia-rounds .mafiatimer__head,
  .screen--mafia-rounds .mafiatimer__head b {
    min-height: 82px !important;
    line-height: 1.04 !important;
    overflow: visible !important;
  }
}

/* Final31 inner-page visual pass: keep utility screens in the same branded rhythm as Figma-backed pages. */
@media (min-width: 900px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 1080px !important;
  }

  .screen--topup .topup,
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    gap: 18px 22px !important;
  }

  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    display: grid !important;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.88fr) !important;
    align-items: stretch !important;
  }

  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    position: relative !important;
    min-height: 260px !important;
    align-content: end !important;
    overflow: hidden !important;
    border-radius: 30px !important;
    background:
      linear-gradient(135deg, #151515 0%, #191919 58%, #ff391f 58%, #ff8a1e 100%) !important;
    color: var(--fig-white) !important;
    box-shadow: 0 22px 58px rgba(22, 22, 22, 0.12) !important;
  }

  .screen--topup .topup__hero::after,
  .screen--promo .topup__hero::after,
  .screen--sup .topup__hero::after,
  .screen--gift .giftpage__hero::after,
  .screen--auth .authpage__hero::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 26px;
    width: 104px;
    height: 104px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(8deg);
    pointer-events: none;
  }

  .screen--topup .topup__emoji,
  .screen--promo .topup__emoji,
  .screen--sup .topup__emoji,
  .screen--gift .giftpage__mark,
  .screen--auth .authpage__mark {
    position: relative !important;
    z-index: 1 !important;
    background: rgba(255, 255, 255, 0.16) !important;
    color: var(--fig-white) !important;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    position: relative !important;
    z-index: 1 !important;
    max-width: 620px !important;
    color: var(--fig-white) !important;
    -webkit-text-fill-color: var(--fig-white) !important;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    position: relative !important;
    z-index: 1 !important;
    max-width: 540px !important;
    color: rgba(255, 255, 255, 0.82) !important;
  }

  .screen--topup .amt,
  .screen--topup .topup__custom,
  .screen--topup .topup__methods,
  .screen--topup .topup__summary,
  .screen--promo .promo__input,
  .screen--promo .promo__result,
  .screen--promo .promo__hint,
  .screen--sup .support .row-link,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel,
  .screen--settings .row-switch,
  .screen--settings .row-action,
  .screen--settings .row-info {
    box-shadow: 0 18px 42px rgba(22, 22, 22, 0.065) !important;
  }

  .screen--topup .topup__summary b,
  .screen--topup #payAmount,
  .screen--topup #payCoins,
  .screen--settings .row-info b,
  .screen--settings .row-action,
  .screen--sup .support .row-link,
  .screen--gift .giftpage__field input,
  .screen--gift .giftpage__field select,
  .screen--gift .giftpage__field textarea,
  .screen--auth .authpage__field input {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .screen--sup .support .row-link {
    min-height: 76px !important;
    text-decoration: none !important;
    border-radius: 24px !important;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
  }

  .screen--sup .support .row-link:hover,
  .screen--sup .support .row-link:focus-visible {
    background: #fff7ef !important;
    box-shadow: 0 18px 42px rgba(254, 57, 31, 0.10) !important;
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply,
  .screen--promo .promo__result,
  .screen--promo .promo__hint,
  .screen--sup .support .row-link,
  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    grid-column: 2 !important;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    grid-column: 1 !important;
    grid-row: 1 / span 6 !important;
    min-height: 100% !important;
  }

  .screen--settings .settings {
    gap: 14px !important;
  }

  .screen--settings .settings__group,
  .screen--settings h3.settings__group {
    color: #202326 !important;
  }
}

@media (min-width: 900px) and (max-height: 720px) {
  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 214px !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen.screen--topup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--promo:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--settings:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--sup:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--gift:not(.screen--launcher):not(.screen--fig-export),
  .screen.screen--auth:not(.screen--launcher):not(.screen--fig-export) {
    --inner-max: 980px !important;
  }
}

@media (max-width: 899px) {
  .fig-live-profile-xp {
    --fig-live-mask-bg: var(--fig-orange) !important;
    --fig-live-mask-radius: 999px !important;
    --fig-live-mask-inset: -3px -8px -3px -2px !important;
  }
}

/* Final32: keep laptop hero typography inside the dark reading zone. */
@media (min-width: 900px) {
  .screen--topup .topup__hero,
  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    background:
      linear-gradient(135deg, #151515 0%, #191919 74%, #ff391f 74%, #ff8a1e 100%) !important;
  }

  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: 380px !important;
    font-size: clamp(42px, 4.05vw, 58px) !important;
    line-height: 0.88 !important;
    overflow: visible !important;
    text-wrap: balance !important;
  }

  .screen--topup .topup__hero p,
  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    max-width: 380px !important;
  }

  .screen--topup .topup__hero::after,
  .screen--promo .topup__hero::after,
  .screen--sup .topup__hero::after,
  .screen--gift .giftpage__hero::after,
  .screen--auth .authpage__hero::after {
    width: 88px !important;
    height: 88px !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .screen--topup .topup__hero h2,
  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: 340px !important;
    font-size: clamp(38px, 4.2vw, 52px) !important;
  }
}

/* Final33: reserve the gift result area so generated gift data cannot resize the whole desktop layout. */
@media (min-width: 900px) {
  .screen--gift .giftpage__panel {
    display: grid !important;
    align-content: start !important;
    gap: 14px !important;
  }

  .screen--gift .giftpage__result {
    display: block !important;
    min-height: 178px !important;
    max-height: 178px !important;
    margin: 0 !important;
    padding: 18px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    background: #f1f1f1 !important;
  }

  .screen--gift .giftpage__result[hidden] {
    display: block !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .screen--gift .giftpage__result b,
  .screen--gift .giftpage__result span,
  .screen--gift .giftpage__result code {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .screen--gift .giftpage__result code {
    display: block !important;
    max-height: 68px !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
}

/* Final34: laptop utility pages should feel composed, not like stretched empty hero slabs. */
@media (min-width: 900px) {
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    align-items: start !important;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    grid-row: 1 !important;
    align-self: start !important;
    min-height: clamp(238px, 30vw, 318px) !important;
    height: auto !important;
    padding: clamp(26px, 3.2vw, 38px) !important;
  }

  .screen--promo .topup__hero::before,
  .screen--sup .topup__hero::before,
  .screen--gift .giftpage__hero::before,
  .screen--auth .authpage__hero::before {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    top: 34px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
    pointer-events: none;
  }

  .screen--promo .topup__hero h2,
  .screen--sup .topup__hero h2,
  .screen--gift .giftpage__hero h2,
  .screen--auth .authpage__hero h2 {
    max-width: min(360px, 72%) !important;
    font-size: clamp(34px, 3.55vw, 50px) !important;
  }

  .screen--promo .topup__hero p,
  .screen--sup .topup__hero p,
  .screen--gift .giftpage__hero p,
  .screen--auth .authpage__hero p {
    max-width: min(390px, 72%) !important;
  }

  .screen--gift .giftpage__panel,
  .screen--auth .authpage__panel {
    min-height: 0 !important;
    align-self: start !important;
  }
}

@media (min-width: 900px) and (max-width: 1080px) {
  .screen--promo .promo,
  .screen--sup .support,
  .screen--gift .giftpage,
  .screen--auth .authpage {
    grid-template-columns: minmax(0, 0.98fr) minmax(384px, 0.88fr) !important;
  }

  .screen--promo .topup__hero,
  .screen--sup .topup__hero,
  .screen--gift .giftpage__hero,
  .screen--auth .authpage__hero {
    min-height: 258px !important;
    border-radius: 28px !important;
  }
}

/* Final35: keep right-column actions stacked tightly beside compact laptop heroes. */
@media (min-width: 900px) {
  .screen--promo .topup__hero {
    grid-row: 1 / span 4 !important;
  }

  .screen--sup .topup__hero {
    grid-row: 1 / span 5 !important;
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply,
  .screen--promo .promo__result,
  .screen--sup .support .row-link {
    align-self: start !important;
  }

  .screen--gift .giftpage__result[hidden] {
    visibility: visible !important;
    opacity: 0.58 !important;
    background:
      linear-gradient(135deg, rgba(255, 57, 31, 0.10), rgba(255, 138, 30, 0.06)),
      #f1f1f1 !important;
  }
}

/* Final36: promo desktop controls sit as a compact stack instead of inheriting hero row height. */
@media (min-width: 900px) {
  .screen--promo .topup__hero {
    grid-row: 1 !important;
  }

  .screen--promo .promo__input,
  .screen--promo #btnPromoApply,
  .screen--promo .promo__result {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

  .screen--promo #btnPromoApply {
    margin-top: 94px !important;
  }

  .screen--promo .promo__result {
    margin-top: 188px !important;
  }

  .screen--promo .promo__hint {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

/* Final37: id anchors beat legacy grid-area resets on the promo controls. */
@media (min-width: 900px) {
  .screen--promo #promoInputWrap {
    grid-area: 1 / 2 !important;
    align-self: start !important;
  }

  .screen--promo #btnPromoApply {
    grid-area: 1 / 2 !important;
    align-self: start !important;
    margin-top: 94px !important;
  }

  .screen--promo #promoResult {
    grid-area: 1 / 2 !important;
    align-self: start !important;
    margin-top: 188px !important;
  }

  .screen--promo #promoHint {
    grid-area: 2 / 1 !important;
  }
}

/* Mobile Figma source-of-truth: hide click zones that do not have confirmed mobile frames. */
@media (max-width: 899px) {
  .screen--setup .fig-live--game::after {
    content: "" !important;
    position: absolute !important;
    left: 5.6% !important;
    top: 42.9% !important;
    width: 105% !important;
    height: 46px !important;
    background: #f2f2f2 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  .screen--setup .fig-live-game-cat {
    position: absolute !important;
    top: 42.72% !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #2d2d2d !important;
    font-family: var(--font-body) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: none !important;
    z-index: 2 !important;
  }

  .screen--setup .fig-live-game-cat.is-active {
    background: var(--fig-orange) !important;
    color: #fff !important;
    font-weight: 700 !important;
  }

  .screen--setup .fig-live-game-cat--party {
    left: 5.7% !important;
    width: 23.2% !important;
  }

  .screen--setup .fig-live-game-cat--y2k {
    left: 30.1% !important;
    width: 24.4% !important;
  }

  .screen--setup .fig-live-game-cat--karaoke {
    left: 55.9% !important;
    width: 27.4% !important;
  }

  .screen--setup .fig-live-game-cat--nineties {
    left: 84.6% !important;
    width: 24.2% !important;
  }

  .screen--meloman .fig-page--meloman {
    aspect-ratio: 1080 / 3084 !important;
    width: 100vw !important;
    max-width: 1080px !important;
    margin: 0 auto !important;
    background: #f2f2f2 !important;
  }

  .screen--meloman .fig-page-render--meloman {
    display: block !important;
  }

  .screen--meloman .fig-page-hit--meloman-back {
    left: 5.4% !important;
    top: 3.05% !important;
    width: 12.5% !important;
    height: 4.6% !important;
  }

  .screen--meloman .fig-page-hit--meloman-logo {
    left: 32% !important;
    top: 3.05% !important;
    width: 35% !important;
    height: 4.6% !important;
  }

  .screen--meloman .fig-page-hit--meloman-balance {
    left: 70.8% !important;
    top: 3.05% !important;
    width: 23.2% !important;
    height: 4.6% !important;
  }

  .screen--meloman .fig-page-hit--meloman-start {
    left: 5.4% !important;
    top: 74.5% !important;
    width: 89.2% !important;
    height: 5.4% !important;
  }

  .screen--meloman .fig-live-meloman-balance {
    left: 79.15% !important;
    top: 4.15% !important;
    width: 13.1% !important;
    height: 22px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
    color: #e9eef3 !important;
    font-family: Arial, "Helvetica Neue", system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" 1, "lnum" 1 !important;
    font-size: min(3.65vw, 14.2px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: right !important;
    --fig-live-mask-bg: #272727 !important;
    --fig-live-mask-radius: 999px !important;
    --fig-live-mask-inset: -7px -10px -7px -3px !important;
  }

  .screen--meloman .fig-live-meloman-balance.is-compact-live {
    font-size: min(3.35vw, 13px) !important;
  }

  .screen--profile .fig-live-profile-balance-main {
    left: 8.9% !important;
    top: 29.28% !important;
    width: 51% !important;
    height: 58px !important;
    overflow: hidden !important;
    align-items: center !important;
    justify-content: flex-start !important;
    font-size: clamp(38px, 12.1vw, 48px) !important;
    line-height: 0.95 !important;
    font-family: Arial, "Helvetica Neue", system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" 1, "lnum" 1 !important;
    letter-spacing: 0 !important;
    --fig-live-mask-bg: var(--fig-orange) !important;
    --fig-live-mask-radius: 8px !important;
    --fig-live-mask-inset: -10px -34px -10px -8px !important;
  }

  .screen--profile .fig-live-profile-balance-main.is-compact-live {
    width: 55% !important;
    font-size: clamp(30px, 9.6vw, 40px) !important;
  }

  .screen--launcher .fig-live-home-balance,
  .screen--profile .fig-live-profile-nav-balance {
    overflow: hidden !important;
    align-items: center !important;
    justify-content: flex-end !important;
    box-sizing: border-box !important;
    font-family: Arial, "Helvetica Neue", system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" 1, "lnum" 1 !important;
    letter-spacing: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .screen--launcher .fig-live-home-balance {
    left: 71.7% !important;
    top: 3.02% !important;
    width: 12.4% !important;
    height: 22px !important;
    padding-right: 0 !important;
    color: #e9eef3 !important;
    font-size: min(3.85vw, 15px) !important;
    line-height: 1 !important;
    --fig-live-mask-bg: #272727 !important;
    --fig-live-mask-radius: 999px !important;
    --fig-live-mask-inset: -7px -11px -7px 18px !important;
  }

  .screen--launcher .fig-live-home-balance.is-compact-live {
    font-size: min(3.55vw, 13.8px) !important;
  }

  .screen--profile .fig-live-profile-nav-balance {
    left: 79.8% !important;
    top: 10.5% !important;
    width: 13.9% !important;
    height: 22px !important;
    color: #e9eef3 !important;
    font-size: min(3.85vw, 15px) !important;
    line-height: 1 !important;
    --fig-live-mask-bg: #272727 !important;
    --fig-live-mask-radius: 999px !important;
    --fig-live-mask-inset: -7px -10px -7px 18px !important;
  }

  .screen--profile .fig-live-profile-nav-balance.is-compact-live {
    font-size: min(3.55vw, 13.8px) !important;
  }

  .screen--profile .fig-live-profile-avatar,
  .screen--profile .fig-live-profile-name,
  .screen--profile .fig-live-profile-meta {
    font-family: Arial, "Helvetica Neue", system-ui, sans-serif !important;
    letter-spacing: 0 !important;
  }

  .screen--profile .fig-live-profile-avatar {
    font-size: min(8.6vw, 34px) !important;
    line-height: 1 !important;
  }

  .screen--mafia .fig-live-mafia-balance {
    left: 73.2% !important;
    top: 3.6% !important;
    width: 17.6% !important;
    height: 1.35% !important;
    justify-content: center !important;
    overflow: visible !important;
    color: #f5f5f5 !important;
    font-size: min(4.35vw, 17px) !important;
    line-height: 1 !important;
    --fig-live-mask-bg: #2a2a2a !important;
    --fig-live-mask-radius: 999px !important;
    --fig-live-mask-inset: -8px -16px -9px -22px !important;
  }

  .screen--blankview .bv-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .screen--blankview .bv-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }

  .screen--meloman-play {
    background: #ff841a !important;
  }

  .screen--meloman-play .melomanflow {
    width: min(100%, 560px) !important;
    margin: 0 auto !important;
    padding: 20px 18px 34px !important;
    display: grid !important;
    gap: 16px !important;
  }

  .screen--meloman-play .melomanflow__hero,
  .screen--meloman-play .melomanflow__card {
    border-radius: 28px !important;
    background: #f2f2f2 !important;
    padding: 22px !important;
    color: #151515 !important;
    box-shadow: 0 12px 28px rgba(20, 20, 20, 0.12) !important;
  }

  .screen--meloman-play .melomanflow__hero small,
  .screen--meloman-play .melomanflow__card span {
    color: #ff3b21 !important;
    font-weight: 800 !important;
  }

  .screen--meloman-play .melomanflow__hero h2,
  .screen--meloman-play .melomanflow__card h3 {
    margin: 8px 0 0 !important;
    font-family: var(--font-display) !important;
    font-size: clamp(34px, 10vw, 54px) !important;
    line-height: 0.95 !important;
    letter-spacing: 0 !important;
  }

  .screen--meloman-play .melomanflow__card p {
    margin: 18px 0 0 !important;
    padding: 14px 16px !important;
    border-radius: 16px !important;
    background: #151515 !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  .screen--meloman-play .melomanflow__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .screen--setup .fig-live-game-blanks {
    left: 33.5% !important;
    top: 50.82% !important;
    width: 33% !important;
    height: 22px !important;
    justify-content: center !important;
    overflow: visible !important;
    font-size: 24px !important;
    line-height: 0.95 !important;
    --fig-live-mask-bg: #fff;
    --fig-live-mask-radius: 10px;
    --fig-live-mask-inset: -8px -18px;
  }

  .screen--setup .fig-live-game-price {
    left: 39.6% !important;
    top: 53.42% !important;
    width: 10.5% !important;
    height: 18px !important;
    justify-content: center !important;
    font-size: 17px !important;
    line-height: 1 !important;
  }

  .screen--profile .fig-live-profile-name {
    height: 24px !important;
    line-height: 0.9 !important;
  }

  .screen--profile .fig-live-profile-meta {
    top: 11.82% !important;
    height: 8px !important;
    line-height: 1 !important;
  }

  .fig-hit-promo-tab,
  .fig-hit-gift,
  .fig-hit-promo,
  .fig-hit-support,
  .fig-hit-privacy,
  .fig-page-hit--game-topup,
  .fig-page-hit--game-promo,
  .fig-page-hit--profile-balance,
  .fig-page-hit--profile-topup,
  .fig-page-hit--profile-promo-card,
  .fig-page-hit--profile-achievements,
  .fig-page-hit--profile-myblanks,
  .fig-page-hit--profile-stats,
  .fig-page-hit--profile-friends,
  .fig-page-hit--profile-promocode,
  .fig-page-hit--profile-settings,
  .fig-page-hit--profile-edit,
  .fig-page-hit--profile-support,
  .fig-page-hit--profile-logout,
  .fig-page-hit--mafia-gift,
  .fig-tabs [data-gosub] {
    display: none !important;
    pointer-events: none !important;
  }
}

/* Final34: live numeric slots must be stable for real profile data, not only the Figma sample value. */
.fig-live-text[data-live="balance"],
.fig-live-profile-games,
.fig-live-profile-wins,
.fig-live-profile-winrate,
.fig-live-profile-cups,
.fig-live-profile-ach-count,
.fig-live-profile-my-games,
.fig-live-profile-friends-count {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
}

@media (min-width: 900px) {
  .screen--launcher .fig-live-home-balance {
    left: 82.18% !important;
    top: 4.6% !important;
    width: 6.25% !important;
    height: 18px !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
    font-size: min(1.08vw, 14px) !important;
    line-height: 1 !important;
    --fig-live-mask-inset: -5px -10px -5px -8px !important;
  }

  .screen--launcher .fig-live-home-balance.is-compact-live {
    font-size: min(1vw, 13px) !important;
  }

  .screen--launcher .fig-live-home-avatar {
    left: 87.92% !important;
    top: 3.56% !important;
    width: 4.55% !important;
    height: 3.75% !important;
    font-size: min(1.95vw, 25px) !important;
    line-height: 1 !important;
    --fig-live-mask-inset: 0 !important;
  }

  .screen--profile .fig-live-profile-nav-balance {
    width: 5.9% !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
    --fig-live-mask-inset: -5px -10px -5px -7px !important;
  }
}

@media (max-width: 899px) {
  .screen--launcher .fig-live-home-balance {
    left: 70.4% !important;
    width: 13.9% !important;
    justify-content: flex-end !important;
  }

  .screen--launcher .fig-live-home-balance.is-compact-live {
    font-size: min(3.28vw, 12.8px) !important;
  }

  .screen--profile .fig-live-profile-games,
  .screen--profile .fig-live-profile-wins,
  .screen--profile .fig-live-profile-winrate,
  .screen--profile .fig-live-profile-cups {
    height: 34px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    font-size: min(6vw, 23px) !important;
    line-height: 1 !important;
  }

  .screen--profile .fig-live-profile-games {
    left: 11.3% !important;
    width: 9.2% !important;
  }

  .screen--profile .fig-live-profile-wins {
    left: 34.3% !important;
    width: 7.8% !important;
  }

  .screen--profile .fig-live-profile-winrate {
    left: 53.7% !important;
    width: 14.8% !important;
  }

  .screen--profile .fig-live-profile-cups {
    left: 80.6% !important;
    width: 10.8% !important;
    justify-content: flex-end !important;
  }

  .screen--profile .fig-live-profile-cups::after {
    content: none !important;
  }

  .screen--profile .fig-live-profile-name,
  .screen--profile .fig-live-profile-balance-main {
    overflow: hidden !important;
  }

  .screen--profile .fig-live-profile-balance-main {
    height: 72px !important;
    line-height: 1.02 !important;
    align-items: center !important;
  }
}
