:root {
  --blue: #168cff;
  --blue-2: #248cff;
  --text: #102650;
  --mute: #7185a8;
  --line: rgba(60, 140, 255, 0.2);
  --card: rgba(255, 255, 255, 0.82);
  --gold: #168cff;
  --ok: #1a9d5c;
  --danger: #e24b4b;
  --app-h: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: var(--app-h);
  max-height: var(--app-h);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #d7ecff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(22, 140, 255, 0.14);
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease,
    border-color 0.16s ease;
}

button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
}

button:active:not(:disabled) {
  transform: scale(0.96);
  filter: brightness(0.97);
}

@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) {
    filter: brightness(1.06);
  }

  .back:hover:not(:disabled) {
    transform: scale(1.12);
    filter: none;
  }

  .icon-btn:hover:not(:disabled),
  .wallet-chip:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #f7fbff;
    box-shadow: 0 6px 12px rgba(22, 140, 255, 0.16);
    filter: none;
  }

  .roll-btn:hover:not(:disabled),
  .modal__go:hover:not(:disabled),
  .primary:hover:not(:disabled),
  .tcard__go:hover:not(:disabled),
  .leave-btn:hover:not(:disabled),
  .cash-go--in:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 8px 16px rgba(22, 140, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .tourney__go:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    filter: brightness(1.08);
    box-shadow: 0 6px 14px rgba(22, 140, 255, 0.36);
  }

  .ghost:hover:not(:disabled),
  .modal__go--ghost:hover:not(:disabled),
  .cash-go--out:hover:not(:disabled) {
    background: #eef6ff;
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
    filter: none;
    box-shadow: 0 4px 10px rgba(22, 140, 255, 0.12);
  }

  .text-btn:hover:not(:disabled) {
    color: var(--blue);
    filter: none;
  }

  .tab:hover:not(:disabled) {
    color: var(--blue);
    transform: translateY(-1px);
    filter: none;
  }

  .set-row:hover:not(:disabled) {
    background: #f4f9ff;
    filter: none;
  }

  .tcard--add:hover:not(:disabled) {
    background: #eef6ff;
    border-color: var(--blue);
    transform: translateY(-1px);
    filter: none;
    box-shadow: 0 6px 14px rgba(22, 140, 255, 0.14);
  }

  .create-stake:hover:not(:disabled) {
    background: #eaf4ff;
    border-color: rgba(22, 140, 255, 0.4);
    filter: none;
  }

  .coin-pick:hover:not(:disabled) {
    background: #eaf4ff;
    border-color: rgba(22, 140, 255, 0.4);
    filter: none;
  }

  .create-stake.is-on:hover:not(:disabled) {
    background: #dcebff;
  }

  .dice.is-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(22, 140, 255, 0.18);
  }

  .dice.is-selected:hover {
    transform: translateY(-3px) scale(1.03);
  }
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-width: 0;
  height: var(--app-h);
  max-height: var(--app-h);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: max(8px, var(--safe-top)) 14px 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, transparent 55%),
    linear-gradient(180deg, #eaf6ff 0%, #f4f9ff 42%, #e7f3ff 100%);
}

html.is-tg .app {
  max-width: none;
}

@media (min-width: 600px) {
  html,
  body {
    height: 100%;
    max-height: none;
    display: grid;
    place-items: center;
    overflow: auto;
  }

  .app,
  html.is-tg .app {
    width: min(100%, 430px);
    max-width: 430px;
    height: min(var(--app-h), 844px);
    max-height: min(844px, calc(100dvh - 24px));
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(16, 38, 80, 0.16);
  }
}

.app:has(.tabbar.is-hidden) {
  padding-bottom: max(8px, var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.back {
  width: 28px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--blue);
}

.back[hidden] {
  display: none;
}

.topbar.is-match {
  margin-bottom: 10px;
}

.topbar.is-match .back {
  display: none;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.sheet--set {
  text-align: center;
}

.sheet--set .hint {
  margin-bottom: 14px;
}

.sheet--set .modal__go {
  margin-top: 14px;
}

.set-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #4fb4ff, #168cff);
  box-shadow: 0 8px 16px rgba(22, 140, 255, 0.28);
}

.set-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.08);
}

.set-who .ava {
  width: 44px;
  height: 44px;
}

.set-who b {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.set-who small {
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
}

.set-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-row {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.08);
  text-align: left;
}

.set-row > span b {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.set-row > span small {
  display: block;
  margin-top: 1px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
}

.set-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: #e7f3ff;
}

.switch {
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #d5deea;
  position: relative;
  transition: background 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 38, 80, 0.2);
  transition: left 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.switch.is-on {
  background: var(--blue);
}

.switch.is-on::after {
  left: 21px;
}

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.ava {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  background: #c9e6ff;
  box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(22, 140, 255, 0.2);
}

.who__text b {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.who__text span {
  color: var(--mute);
  font-size: 12px;
}

.who__text .who__rank {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.who__medal {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffe27a, #f0b429);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.who__medal--bronze {
  background: linear-gradient(180deg, #e0a070, #c47a3a);
}

.who__medal--silver {
  background: linear-gradient(180deg, #e8eef6, #8a9bb3);
}

.who__medal--gold {
  background: linear-gradient(180deg, #ffe27a, #f0b429);
}

.who__medal--diamond {
  background: linear-gradient(180deg, #c6f0ff, #3aa6ff);
}

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.wallet-chip__n {
  font-weight: 800;
  font-size: 16px;
}

.wallet-chip__u {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 -8px;
  padding: 6px 8px 18px;
}

.screen {
  display: none;
  animation: in 0.22s ease;
}

.screen.is-on {
  display: block;
  width: 100%;
  min-width: 0;
}

#screen-lobby.is-on {
  display: flex;
  flex-direction: column;
}

#screen-lobby .tourney {
  order: 1;
}

#screen-lobby #btn-create {
  order: 2;
}

#screen-lobby .tables {
  order: 3;
}

#game-header:empty {
  display: none;
}

@keyframes in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  position: relative;
  text-align: center;
  padding: 10px 44px 14px;
}

.hero__luck {
  display: none;
}

@media (min-width: 460px) {
  .hero__luck {
    display: block;
    position: absolute;
    top: 0;
    right: 4px;
    max-width: 78px;
    color: var(--mute);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-align: right;
  }
}

.hero__title {
  font-size: clamp(28px, 8.4vw, 36px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(180, 214, 255, 0.7);
}

.hero__title span {
  color: #163a7a;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, #7ec8ff 0%, #168cff 62%, #0d73e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(16, 70, 160, 0.16));
}

.hero__sub {
  margin-top: 6px;
  color: var(--mute);
  font-size: 14px;
}

.hero__die {
  position: absolute;
  top: 22px;
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  pointer-events: none;
  opacity: 0.95;
}

.hero__die .dice {
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  flex: none;
  aspect-ratio: auto;
  padding: 0;
}

.hero__die--l {
  left: 0;
  transform: rotate(-18deg);
}

.hero__die--r {
  right: 0;
  top: 28px;
  transform: rotate(16deg);
}

.bank {
  position: relative;
  margin-bottom: 12px;
  padding: 16px 64px 14px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(210, 236, 255, 0.95), rgba(255, 255, 255, 0.88));
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.1);
  overflow: hidden;
}

.bank__k {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
}

.bank__n {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #163a7a;
}

.bank__n .ico-coin {
  margin: 0;
}

.bank__s {
  color: var(--mute);
  font-size: 13px;
  margin-top: 2px;
}

.ico-chip,
.ico-coin,
.ico-trophy {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
}

.ico-chip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #eef6ff;
  border: 2px solid #7ec0ff;
  box-shadow: inset 0 0 0 2px #fff;
}

.ico-coin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe9a8, #f0b429 55%, #d39a12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 1.5px rgba(180, 120, 10, 0.4), 0 1px 0 #c48a0e;
}

.ico-trophy {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  background: linear-gradient(180deg, #ffd978, #f0b429);
  clip-path: polygon(20% 10%, 80% 10%, 86% 42%, 62% 58%, 62% 72%, 78% 86%, 22% 86%, 38% 72%, 38% 58%, 14% 42%);
}

.ico-seats {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 12px;
}

.bank__dice {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bank__k,
.bank__n,
.bank__s {
  position: relative;
  z-index: 1;
}

.bank__die {
  position: absolute;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid rgba(16, 38, 80, 0.08);
  box-shadow: 0 3px 8px rgba(16, 50, 100, 0.12);
  opacity: 0.9;
}

.bank__die--p1 {
  background:
    radial-gradient(circle at 50% 50%, #1a2336 2.2px, transparent 2.4px),
    linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.bank__die--p2 {
  background:
    radial-gradient(circle at 28% 28%, #1a2336 1.8px, transparent 2px),
    radial-gradient(circle at 72% 72%, #1a2336 1.8px, transparent 2px),
    linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.bank__die--p3 {
  background:
    radial-gradient(circle at 28% 28%, #1a2336 1.8px, transparent 2px),
    radial-gradient(circle at 50% 50%, #1a2336 1.8px, transparent 2px),
    radial-gradient(circle at 72% 72%, #1a2336 1.8px, transparent 2px),
    linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.bank__die--p5 {
  background:
    radial-gradient(circle at 26% 26%, #1a2336 2px, transparent 2.2px),
    radial-gradient(circle at 74% 26%, #1a2336 2px, transparent 2.2px),
    radial-gradient(circle at 50% 50%, #1a2336 2px, transparent 2.2px),
    radial-gradient(circle at 26% 74%, #1a2336 2px, transparent 2.2px),
    radial-gradient(circle at 74% 74%, #1a2336 2px, transparent 2.2px),
    linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.bank__die--a {
  left: 12px;
  top: 14px;
  width: 28px;
  height: 28px;
  transform: rotate(-18deg);
}

.bank__die--b {
  left: 18px;
  bottom: 12px;
  width: 20px;
  height: 20px;
  transform: rotate(22deg);
}

.bank__die--c {
  right: 10px;
  top: 10px;
  width: 18px;
  height: 18px;
  transform: rotate(28deg);
}

.bank__die--d {
  right: 8px;
  top: 42px;
  width: 26px;
  height: 26px;
  transform: rotate(-8deg);
}

.bank__die--e {
  right: 36px;
  bottom: 10px;
  width: 16px;
  height: 16px;
  transform: rotate(-34deg);
}

.pcard,
.bank,
.ctable,
.hero {
  width: 100%;
  max-width: 100%;
}

.pcard {
  margin-bottom: 10px;
  padding: 12px 12px 10px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
  min-width: 0;
}

.pcard.is-active {
  border-color: #168cff;
  box-shadow: 0 0 0 2px rgba(22, 140, 255, 0.28), 0 4px 12px rgba(22, 140, 255, 0.14);
}

.pcard__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.pcard__who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  grid-column: 1;
}

.pcard__who > div {
  min-width: 0;
}

.pcard__who b {
  display: block;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard__who span {
  color: var(--mute);
  font-size: 12px;
}

.pcard__hand small {
  display: none;
}

@media (min-width: 400px) {
  .pcard__hand small {
    display: inline;
  }
}

.pcard__score {
  text-align: right;
  flex-shrink: 0;
  grid-column: 3;
  justify-self: end;
}

.pcard__score span {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.pcard__score strong {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 22px;
  font-weight: 800;
  color: #163a7a;
}

.turn-badge {
  grid-column: 2;
  justify-self: center;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5cb6ff, #168cff);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.22);
}

.dice-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  gap: 8px;
  min-width: 0;
  padding-top: 4px;
  touch-action: manipulation;
}

.dice {
  position: relative;
  box-sizing: border-box;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 0;
  border-radius: 16px;
  display: block;
  overflow: hidden;
  contain: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid rgba(16, 38, 80, 0.08);
  box-shadow: 0 3px 8px rgba(16, 50, 100, 0.1);
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.dice.is-hidden {
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(22, 140, 255, 0.16) 0 6px,
      rgba(22, 140, 255, 0.05) 6px 12px
    ),
    linear-gradient(180deg, #d7ecff, #b7dfff);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.dice-reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  pointer-events: none;
}

.dice.is-spinning .dice-reel {
  height: auto;
  bottom: auto;
  will-change: transform;
}

.dice-face {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

@keyframes dice-reel-up {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, var(--spin-to), 0); }
}

@keyframes dice-reel-down {
  from { transform: translate3d(0, var(--spin-to), 0); }
  to { transform: translate3d(0, 0, 0); }
}

.dice.is-spinning .dice-face {
  height: var(--die, 58px);
  flex: 0 0 var(--die, 58px);
  aspect-ratio: auto;
  margin-bottom: 0;
}

.dice.is-clickable:active {
  transform: scale(0.96);
}

.dice.is-selected:active {
  transform: translateY(-1px) scale(0.97);
}

.dice.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(22, 140, 255, 0.28), 0 4px 8px rgba(22, 140, 255, 0.16);
  transform: translateY(-3px);
}

.dice.is-spinning {
  pointer-events: none;
  transition: none;
}

.pip {
  position: absolute;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #1a2336;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28);
}

.pip:nth-child(1) { left: 26%; top: 26%; }
.pip:nth-child(2) { left: 50%; top: 26%; }
.pip:nth-child(3) { left: 74%; top: 26%; }
.pip:nth-child(4) { left: 26%; top: 50%; }
.pip:nth-child(5) { left: 50%; top: 50%; }
.pip:nth-child(6) { left: 74%; top: 50%; }
.pip:nth-child(7) { left: 26%; top: 74%; }
.pip:nth-child(8) { left: 50%; top: 74%; }
.pip:nth-child(9) { left: 74%; top: 74%; }

.dice-face[data-value="1"] .pip:nth-child(5),
.dice-face[data-value="2"] .pip:nth-child(1),
.dice-face[data-value="2"] .pip:nth-child(9),
.dice-face[data-value="3"] .pip:nth-child(1),
.dice-face[data-value="3"] .pip:nth-child(5),
.dice-face[data-value="3"] .pip:nth-child(9),
.dice-face[data-value="4"] .pip:nth-child(1),
.dice-face[data-value="4"] .pip:nth-child(3),
.dice-face[data-value="4"] .pip:nth-child(7),
.dice-face[data-value="4"] .pip:nth-child(9),
.dice-face[data-value="5"] .pip:nth-child(1),
.dice-face[data-value="5"] .pip:nth-child(3),
.dice-face[data-value="5"] .pip:nth-child(5),
.dice-face[data-value="5"] .pip:nth-child(7),
.dice-face[data-value="5"] .pip:nth-child(9),
.dice-face[data-value="6"] .pip:nth-child(1),
.dice-face[data-value="6"] .pip:nth-child(3),
.dice-face[data-value="6"] .pip:nth-child(4),
.dice-face[data-value="6"] .pip:nth-child(6),
.dice-face[data-value="6"] .pip:nth-child(7),
.dice-face[data-value="6"] .pip:nth-child(9),
.roll-btn__die[data-value="1"] .pip:nth-child(5),
.roll-btn__die[data-value="2"] .pip:nth-child(1),
.roll-btn__die[data-value="2"] .pip:nth-child(9),
.roll-btn__die[data-value="3"] .pip:nth-child(1),
.roll-btn__die[data-value="3"] .pip:nth-child(5),
.roll-btn__die[data-value="3"] .pip:nth-child(9),
.roll-btn__die[data-value="4"] .pip:nth-child(1),
.roll-btn__die[data-value="4"] .pip:nth-child(3),
.roll-btn__die[data-value="4"] .pip:nth-child(7),
.roll-btn__die[data-value="4"] .pip:nth-child(9),
.roll-btn__die[data-value="5"] .pip:nth-child(1),
.roll-btn__die[data-value="5"] .pip:nth-child(3),
.roll-btn__die[data-value="5"] .pip:nth-child(5),
.roll-btn__die[data-value="5"] .pip:nth-child(7),
.roll-btn__die[data-value="5"] .pip:nth-child(9),
.roll-btn__die[data-value="6"] .pip:nth-child(1),
.roll-btn__die[data-value="6"] .pip:nth-child(3),
.roll-btn__die[data-value="6"] .pip:nth-child(4),
.roll-btn__die[data-value="6"] .pip:nth-child(6),
.roll-btn__die[data-value="6"] .pip:nth-child(7),
.roll-btn__die[data-value="6"] .pip:nth-child(9) {
  opacity: 1;
}

.pcard__hand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  min-width: 0;
}

.pcard__hand > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcard__hand small {
  color: var(--mute);
  font-weight: 400;
}

.pcard__hand em {
  font-style: normal;
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.rolls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 8px 2px 12px;
  color: var(--mute);
  font-size: 13px;
}

.rolls span:first-child {
  min-width: 0;
}

.rolls b {
  color: var(--text);
}

.rolls__dots {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.rolls__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5deea;
}

.rolls__dots i.is-on {
  background: var(--blue);
}

.roll-btn {
  width: 100%;
  height: 68px;
  margin: 2px 0 6px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #4fb4ff 0%, #168cff 55%, #0f78e6 100%);
  box-shadow: 0 5px 12px rgba(22, 140, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.roll-btn:active:not(:disabled),
.modal__go:active:not(:disabled),
.primary:active:not(:disabled),
.ghost:active:not(:disabled),
.tcard__go:active:not(:disabled),
.tcard--add:active:not(:disabled),
.leave-btn:active:not(:disabled),
.cash-go:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.96);
}

.back:active:not(:disabled),
.icon-btn:active:not(:disabled),
.wallet-chip:active:not(:disabled),
.tab:active:not(:disabled) {
  transform: scale(0.92);
}

.tourney__go:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
  filter: brightness(0.96);
}

.set-row:active:not(:disabled),
.create-stake:active:not(:disabled),
.text-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.roll-btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.roll-btn.is-rolling:disabled {
  opacity: 1;
}

.roll-btn__die {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 38, 80, 0.08);
}

.ctable {
  margin-top: 12px;
  padding: 12px 12px 8px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
  min-width: 0;
}

.ctable__head {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.ctable__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 14px;
}

.ctable li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(60, 140, 255, 0.1);
  font-size: 12px;
  list-style: none;
  min-width: 0;
}

.ctable li b {
  color: #163a7a;
  flex-shrink: 0;
}

.ctable li span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-die {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 50%, #1a2336 1.4px, transparent 1.6px),
    #fff;
  border: 1px solid #c9d8ee;
  box-shadow: 0 1px 2px rgba(16, 50, 100, 0.12);
}

.game-foot {
  text-align: center;
  color: var(--mute);
  font-size: 12px;
  margin: 14px 0 8px;
}

#btn-leave-match {
  display: block;
  width: 100%;
  margin: 4px 0 12px;
}

#btn-cancel-wait {
  width: 100%;
  margin-top: 12px;
}

.leave-btn {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff7b7b, #e24b4b);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(226, 75, 75, 0.22);
}

.cash-card,
.link-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.tourney {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 118px;
  margin-bottom: 12px;
  padding: 14px 100px 12px 84px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(90% 140% at 108% -10%, rgba(255, 255, 255, 0.85), transparent 46%),
    linear-gradient(180deg, #d4eeff 0%, #b7dfff 52%, #c9e7ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(80, 160, 255, 0.18);
}

.tourney__ribbon {
  position: absolute;
  top: 10px;
  left: 0;
  z-index: 2;
  padding: 5px 10px 5px 8px;
  border-radius: 0 11px 11px 0;
  background: linear-gradient(180deg, #62c4ff, #168cff);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.28);
}

.tourney__art {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 80px;
  height: 84px;
  pointer-events: none;
}

.tourney__cup {
  display: block;
  width: 80px;
  height: 84px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 8px rgba(180, 120, 0, 0.28));
}

.tourney__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tourney__body h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tourney__body h2 em {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff8b4a, #ff4d1f);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 2px;
  box-shadow: 0 2px 6px rgba(255, 80, 30, 0.28);
}

.tourney__body h2 em::before {
  content: "";
  width: 8px;
  height: 10px;
  background: radial-gradient(circle at 50% 70%, #ffe27a 1.5px, #ffb020 2px, transparent 2.2px),
    radial-gradient(circle at 50% 30%, #ffd24a 2px, #ff7a20 70%);
  clip-path: polygon(50% 0, 78% 38%, 100% 78%, 50% 100%, 0 78%, 22% 38%);
}

.tourney__body p {
  margin-top: 2px;
  color: var(--mute);
  font-size: 12px;
}

.tourney__prize {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #163a7a;
}

.tourney__prize .ico-coin {
  width: 18px;
  height: 18px;
  margin-right: 0;
}

.tourney__prize .ico-coin + .ico-coin {
  margin-left: -8px;
  margin-right: 6px;
}

.tourney__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  color: var(--mute);
  font-size: 11px;
}

.tourney__go {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7ec8ff, #3aa6ff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.28);
  white-space: nowrap;
}

.tourney__die {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 25% 25%, #3aa6ff 2px, transparent 2.2px),
    radial-gradient(circle at 75% 25%, #3aa6ff 2px, transparent 2.2px),
    radial-gradient(circle at 50% 50%, #3aa6ff 2px, transparent 2.2px),
    radial-gradient(circle at 25% 75%, #3aa6ff 2px, transparent 2.2px),
    radial-gradient(circle at 75% 75%, #3aa6ff 2px, transparent 2.2px),
    linear-gradient(180deg, #fff, #e8f6ff);
  box-shadow: 0 4px 8px rgba(22, 140, 255, 0.18);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.tourney__die--a {
  top: 8px;
  right: 18px;
  transform: rotate(18deg);
}

.tourney__die--b {
  right: 54px;
  bottom: 10px;
  width: 22px;
  height: 22px;
  transform: rotate(-22deg);
  background:
    radial-gradient(circle at 28% 28%, #3aa6ff 1.7px, transparent 1.9px),
    radial-gradient(circle at 72% 72%, #3aa6ff 1.7px, transparent 1.9px),
    linear-gradient(180deg, #fff, #e8f6ff);
}

.lobby-h {
  margin: 4px 2px 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.tables {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tcard {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 8px 11px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.tcard__dice {
  position: relative;
  width: 48px;
  height: 46px;
}

.tcard__dice i {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(16, 50, 100, 0.16);
}

.tcard__dice i:first-child {
  left: 0;
  top: 10px;
  transform: rotate(-18deg);
}

.tcard__dice i:nth-child(2) {
  right: 0;
  top: 2px;
  transform: rotate(16deg);
}

.tcard--cyan .tcard__dice i {
  background:
    radial-gradient(circle at 26% 26%, #3ec4ff 2.4px, transparent 2.6px),
    radial-gradient(circle at 74% 26%, #3ec4ff 2.4px, transparent 2.6px),
    radial-gradient(circle at 50% 50%, #3ec4ff 2.4px, transparent 2.6px),
    radial-gradient(circle at 26% 74%, #3ec4ff 2.4px, transparent 2.6px),
    radial-gradient(circle at 74% 74%, #3ec4ff 2.4px, transparent 2.6px),
    linear-gradient(180deg, #fff, #e7f8ff);
}

.tcard--cyan .tcard__dice i:first-child {
  background:
    radial-gradient(circle at 28% 28%, #3ec4ff 2.4px, transparent 2.6px),
    radial-gradient(circle at 72% 72%, #3ec4ff 2.4px, transparent 2.6px),
    linear-gradient(180deg, #fff, #e7f8ff);
}

.tcard--blue .tcard__dice i {
  background:
    radial-gradient(circle at 26% 26%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 74% 26%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 26% 74%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 74% 74%, #fff 2.3px, transparent 2.5px),
    linear-gradient(180deg, #5eb6ff, #168cff);
}

.tcard--blue .tcard__dice i:first-child {
  background:
    radial-gradient(circle at 28% 28%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 72% 72%, #fff 2.3px, transparent 2.5px),
    linear-gradient(180deg, #7ec8ff, #248cff);
}

.tcard--gold .tcard__dice i {
  background:
    radial-gradient(circle at 26% 26%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 74% 26%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 26% 74%, #fff 2.3px, transparent 2.5px),
    radial-gradient(circle at 74% 74%, #fff 2.3px, transparent 2.5px),
    linear-gradient(180deg, #ffe27a, #f0b429);
}

.tcard--gold .tcard__dice i:first-child {
  background:
    radial-gradient(circle at 50% 50%, #fff 2.3px, transparent 2.5px),
    linear-gradient(180deg, #ffe9a8, #f5c542);
}

.tcard--vip .tcard__dice i {
  background:
    radial-gradient(circle at 26% 26%, #e0b84a 2.2px, transparent 2.4px),
    radial-gradient(circle at 74% 26%, #e0b84a 2.2px, transparent 2.4px),
    radial-gradient(circle at 50% 50%, #e0b84a 2.2px, transparent 2.4px),
    radial-gradient(circle at 26% 74%, #e0b84a 2.2px, transparent 2.4px),
    radial-gradient(circle at 74% 74%, #e0b84a 2.2px, transparent 2.4px),
    linear-gradient(180deg, #fffaf0, #f4e3bf);
}

.tcard--vip .tcard__dice i:first-child {
  background:
    radial-gradient(circle at 28% 28%, #e0b84a 2.2px, transparent 2.4px),
    radial-gradient(circle at 72% 72%, #e0b84a 2.2px, transparent 2.4px),
    linear-gradient(180deg, #fff, #f7ebc8);
}

.tcard__body {
  min-width: 0;
  overflow: hidden;
}

.tcard__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tcard__top h3 {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tcard__on {
  margin-left: auto;
  color: var(--ok);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tcard__on::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
  vertical-align: 0;
}

.tcard__body p {
  margin-top: 1px;
  color: var(--mute);
  font-size: 12px;
}

.tcard__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 6px;
  min-width: 0;
}

.tcard__stat {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--mute);
  font-size: 10px;
  line-height: 1.15;
}

.tcard__stat span {
  display: flex;
  flex-direction: column;
}

.tcard__stat b {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.tcard .ico-stake,
.tcard .ico-coin,
.tcard .ico-seats {
  flex-shrink: 0;
  margin-right: 0;
}

.tcard .ico-stake {
  width: 18px;
  height: 18px;
  display: block;
}

.tcard .ico-coin {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tcard__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 72px;
  min-width: 72px;
}

.tcard--mine {
  grid-template-columns: 48px minmax(0, 1fr) 76px;
  border-color: rgba(22, 140, 255, 0.55);
  box-shadow: 0 4px 12px rgba(22, 140, 255, 0.16);
}

.tcard--mine .leave-btn,
.tcard__kill {
  grid-column: auto;
  width: 100%;
  min-width: 0;
  height: 38px;
  margin-top: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tcard__link {
  display: inline;
  padding: 0;
  color: var(--blue);
  font-size: inherit;
  font-weight: 700;
}

.tcard--mine .tcard__actions {
  width: 80px;
  min-width: 80px;
}

.tcard__actions .tcard__go {
  width: 100%;
  min-width: 0;
}

.tcard__go {
  width: 72px;
  min-width: 72px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4fb4ff, #168cff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.22);
}

.tcard__go--ghost {
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.tcard.is-full .tcard__go {
  background: #eef3fa;
  color: var(--mute);
  border: 1.5px solid #d5deea;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.tcard--add {
  grid-template-columns: 44px minmax(0, 1fr);
  width: 100%;
  margin-bottom: 10px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}

.tcard--add__plus {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e7f3ff;
  color: var(--blue);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.tcard--add__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tcard--add__text b {
  font-size: 15px;
}

.tcard--add__text small {
  color: var(--mute);
  font-size: 12px;
}

.create-stakes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(280px, 42vh);
  overflow: auto;
  margin: 12px 0 8px;
}

.create-stake {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 16px;
  background: #f4f8ff;
  border: 1.5px solid transparent;
  text-align: left;
}

.create-stake.is-on {
  background: #e7f3ff;
  border-color: var(--blue);
}

.create-stake .tcard__dice {
  width: 44px;
  height: 40px;
}

.create-stake .tcard__dice i {
  width: 26px;
  height: 26px;
}

.create-stake__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.create-stake__body strong {
  font-size: 14px;
}

.create-stake__body small {
  color: var(--mute);
  font-size: 11px;
}

.create-stake__pay {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.create-stake__pay b {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.create-sum {
  margin: 2px 0 10px;
  color: var(--mute);
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}

.create-sum b {
  color: var(--text);
}

.sheet--create .modal__go {
  margin-top: 8px;
}

#screen-faucet {
  min-width: 0;
  overflow-x: clip;
}

.faucet {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  margin-bottom: 10px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.85), transparent 42%),
    linear-gradient(180deg, #dff2ff 0%, #c5e6ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(80, 160, 255, 0.16);
}

.faucet__spark {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 28% 28%, #3aa6ff 1.8px, transparent 2px),
    radial-gradient(circle at 72% 72%, #3aa6ff 1.8px, transparent 2px),
    linear-gradient(180deg, #fff, #e8f6ff);
  box-shadow: 0 3px 6px rgba(22, 140, 255, 0.16);
  opacity: 0.7;
  pointer-events: none;
}

.faucet__spark--a {
  top: 10px;
  left: 10px;
  transform: rotate(-18deg);
}

.faucet__spark--b {
  top: 14px;
  right: 12px;
  width: 22px;
  height: 22px;
  transform: rotate(16deg);
}

.faucet__head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 0 0 8px 28px;
}

.faucet__head p {
  color: var(--mute);
  font-size: 12px;
}

.faucet__head h2 {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.faucet__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 108px;
  padding: 6px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e9f8ff, #d5efff);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: #1a7ad4;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.faucet__badge::before {
  content: "★";
  color: #3aa6ff;
  font-size: 11px;
}

.faucet__dice {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 56px));
  justify-content: center;
  width: 100%;
  padding: 6px 0 12px;
  gap: 8px;
}

.faucet .dice {
  flex: none;
  width: 56px;
  height: 56px;
  min-width: 0;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(80, 140, 210, 0.16);
}

.faucet__formula {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 4px;
}

.faucet__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 62px;
  padding: 8px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 6px rgba(80, 160, 255, 0.08);
}

.faucet__cell small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--mute);
  font-size: 10px;
  text-align: center;
}

.faucet__cell b {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 800;
  color: #163a7a;
}

.faucet__cell--pay {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 2px;
  background: linear-gradient(180deg, #fff8e4, #ffe9b0);
}

.faucet__cell--pay.is-pop {
  animation: pay-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.faucet__cell--pay .ico-coin {
  width: 16px;
  height: 16px;
  margin: 0;
}

.faucet__cell--pay .ico-coin + .ico-coin {
  margin-left: -6px;
  margin-right: 4px;
}

.faucet__cell--pay b {
  margin: 0 4px 0 0;
  font-size: 24px;
}

.faucet__cell--pay small {
  width: 100%;
  justify-content: center;
  margin-top: -2px;
}

.faucet__op {
  color: #7aa7d8;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  line-height: 62px;
}

.faucet__star {
  width: 12px;
  height: 12px;
  background: #3aa6ff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.faucet-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.faucet-meta__card {
  display: flex;
  width: 100%;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 12px 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.faucet-crown {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c9840c;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 42%),
    linear-gradient(180deg, #ffd65a, #e8a818 58%, #c48410);
  box-shadow:
    0 6px 12px rgba(196, 132, 16, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.faucet-crown::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.faucet-crown svg {
  position: relative;
  z-index: 1;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(160, 96, 0, 0.18));
}

.faucet-crown--bronze {
  color: #9a5a28;
  background: linear-gradient(180deg, #efc09a, #c47a3a 58%, #a35f28);
  box-shadow:
    0 6px 12px rgba(164, 96, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.faucet-crown--silver {
  color: #6d7d93;
  background: linear-gradient(180deg, #f4f7fb, #b7c3d4 58%, #8a9bb3);
  box-shadow:
    0 6px 12px rgba(120, 140, 170, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.faucet-crown--gold {
  color: #c9840c;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 42%),
    linear-gradient(180deg, #ffd65a, #e8a818 58%, #c48410);
}

.faucet-crown--diamond {
  color: #1a78c8;
  background: linear-gradient(180deg, #e8f8ff, #7ed0ff 42%, #3aa6ff);
  box-shadow:
    0 6px 12px rgba(22, 140, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.faucet-rank {
  align-items: center;
}

.faucet-meta__card small {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.faucet-meta__card strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.faucet-meta__card p {
  margin-top: 2px;
  color: var(--mute);
  font-size: 11px;
}

.faucet-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e4eef8;
}

.faucet-bar i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5d76a, #e0b84a);
}

.faucet-rank__body {
  flex: 1;
  min-width: 0;
}

.faucet-coeff {
  flex-direction: column;
  gap: 12px;
}

.faucet-coeff__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.faucet-coeff__head strong {
  font-size: 22px;
  color: var(--blue);
  letter-spacing: -0.03em;
}

.faucet-star {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #7ec8ff, #168cff);
  box-shadow: 0 6px 12px rgba(22, 140, 255, 0.22);
}

.faucet-star::after {
  content: "";
  width: 22px;
  height: 22px;
  background: #fff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.faucet-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 14px;
  background: #eef4fb;
}

.faucet-track__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  color: var(--mute);
  font-size: 10px;
  line-height: 1.2;
}

.faucet-track__step + .faucet-track__step {
  box-shadow: inset 1px 0 0 #fff;
}

.faucet-track__step b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.faucet-track__step.is-on {
  color: #fff;
  background: linear-gradient(180deg, #4fb4ff, #168cff);
}

.faucet-track__step.is-on b,
.faucet-track__step.is-on small {
  color: #fff;
}

.faucet-track__step.is-on.faucet-tier--bronze {
  background: linear-gradient(180deg, #e0a070, #c47a3a);
}

.faucet-track__step.is-on.faucet-tier--silver {
  background: linear-gradient(180deg, #c5d0e0, #8a9bb3);
}

.faucet-track__step.is-on.faucet-tier--gold {
  background: linear-gradient(180deg, #ffe27a, #f0b429);
  color: #163a7a;
}

.faucet-track__step.is-on.faucet-tier--gold b,
.faucet-track__step.is-on.faucet-tier--gold small {
  color: #163a7a;
}

.faucet-track__step.is-on.faucet-tier--diamond {
  background: linear-gradient(180deg, #9fe0ff, #3aa6ff);
}

.faucet__claim {
  height: 58px;
  font-size: 18px;
}

.faucet__claim.is-wait {
  font-size: 15px;
  letter-spacing: 0;
}

.faucet__claim.is-wait .roll-btn__die {
  display: none;
}

.faucet-note {
  position: relative;
  margin-top: 4px;
  padding-left: 24px;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.4;
}

.faucet-note::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d7e9ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.coin-burst {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.coin-burst__bit {
  position: absolute;
  display: block;
  font-style: normal;
  left: var(--ox);
  top: var(--oy);
  width: var(--sz);
  height: var(--sz);
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff6c8, #f0b429 62%, #c9840c);
  box-shadow: 0 4px 8px rgba(180, 120, 20, 0.22);
  animation: coin-fly var(--dur) cubic-bezier(0.14, 0.72, 0.22, 1) var(--delay) both;
}

.coin-burst__bit.is-spark {
  border-radius: 2px;
  background: #168cff;
  box-shadow: none;
  animation-name: spark-fly;
}

@keyframes coin-fly {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(0.3);
  }
  16% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--tx) * 0.5), calc(-50% + var(--ty)), 0) rotate(var(--r1)) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--tx)), calc(-50% + var(--fall)), 0) rotate(var(--r2)) scale(0.7);
  }
}

@keyframes spark-fly {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) rotate(45deg) scale(0.3);
  }
  14% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--tx) * 0.5), calc(-50% + var(--ty)), 0) rotate(90deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--tx)), calc(-50% + var(--fall)), 0) rotate(160deg) scale(0.4);
  }
}

@keyframes pay-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coin-burst {
    display: none;
  }

  .faucet__cell--pay.is-pop {
    animation: none;
  }

  button,
  .dice {
    transition: none;
  }

  button:hover:not(:disabled),
  button:active:not(:disabled),
  .dice.is-clickable:hover,
  .dice.is-clickable:active {
    transform: none;
    filter: none;
  }

  .tourney__go:hover:not(:disabled),
  .tourney__go:active:not(:disabled) {
    transform: translateY(-50%);
  }

  .dice.is-selected,
  .dice.is-selected:hover,
  .dice.is-selected:active {
    transform: translateY(-3px);
  }

  .podium__frame::before {
    inset: 0;
    border-radius: inherit;
    animation: none;
    background: linear-gradient(180deg, #ffe27a, #f0b429);
  }
}

.hint,
.lead,
.eyebrow {
  color: var(--mute);
  font-size: 13px;
}

.rate {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  margin: 8px 0 12px;
}

.section-h {
  margin: 16px 0 8px;
}

.section-h h2 {
  font-size: 16px;
  font-weight: 800;
}

.cash-bal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.cash-bal > div {
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.1);
}

.cash-bal small {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.cash-bal strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cash-bal span {
  color: var(--mute);
  font-size: 11px;
}

.cash-stars {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px 8px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 248, 210, 0.9), transparent 46%),
    linear-gradient(180deg, #fff8e8, #fff);
  border: 1px solid rgba(240, 180, 41, 0.28);
  box-shadow: 0 3px 8px rgba(240, 180, 41, 0.1);
}

.star-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe27a, #f0b429 58%, #d49a12);
  box-shadow: 0 6px 12px rgba(212, 154, 18, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.star-badge::after {
  content: "";
  width: 22px;
  height: 22px;
  background: #fff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.cash-stars__body small {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.cash-stars__body strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cash-stars__body p {
  color: #b8860b;
  font-size: 11px;
}

.cash-stars__btns {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cash-stars__btns .ghost,
.cash-stars__btns .primary {
  width: 100%;
  height: 40px;
}

.ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.ref-stats > div {
  padding: 10px 8px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}

.ref-stats small {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.ref-stats b {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.ref-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 4px;
}

.ref-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}

.ref-steps b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f3ff;
  color: var(--blue);
  font-size: 13px;
}

.ref-steps span {
  font-size: 13px;
  font-weight: 600;
}

.ref-steps em {
  color: #d4a017;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

#ref-list .top-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.ref-stars {
  color: #d4a017;
}

.cash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.cash-go {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 92px;
  padding: 12px;
  border-radius: 18px;
  text-align: left;
}

.cash-go__mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 9px;
  font-style: normal;
  font-weight: 800;
  font-size: 16px;
}

.cash-go b {
  font-size: 16px;
}

.cash-go small {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.cash-go--in {
  color: #fff;
  background: linear-gradient(180deg, #4fb4ff, #168cff);
  box-shadow: 0 6px 14px rgba(22, 140, 255, 0.24);
}

.cash-go--in .cash-go__mark {
  background: rgba(255, 255, 255, 0.2);
}

.cash-go--out {
  background: #fff;
  border: 1.5px solid #8ec8ff;
  color: var(--blue);
}

.cash-go--out .cash-go__mark {
  background: #e7f3ff;
}

.cash-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.cash-rates span,
.cash-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--mute);
  font-size: 11px;
  font-weight: 700;
}

.cash-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 12px;
}

.sheet--cash {
  max-height: min(86dvh, 680px);
  overflow-y: auto;
  text-align: left;
}

.overlay.is-center .sheet--cash .hint {
  text-align: left;
}

.coin-picks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 12px 0 10px;
}

.coin-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 68px;
  padding: 8px 4px;
  border-radius: 14px;
  background: #f4f8ff;
  border: 1.5px solid transparent;
}

.coin-pick.is-on {
  background: #e7f3ff;
  border-color: var(--blue);
}

.coin-pick b {
  font-size: 12px;
}

.coin-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.coin-ico--ton {
  background: #0098ea;
}

.coin-ico--btc {
  background: #f7931a;
}

.coin-ico--bnb {
  color: #1a1204;
  background: #f3ba2f;
}

.cash-field {
  display: block;
  margin-top: 8px;
}

.cash-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--mute);
  font-size: 12px;
}

.cash-field em {
  font-style: normal;
  color: var(--text);
  font-weight: 700;
}

.cash-field input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
}

.cash-conv {
  margin: 6px 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.cash-copy {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f4f8ff;
  border: 1px solid var(--line);
}

.cash-copy span {
  display: block;
  color: var(--mute);
  font-size: 11px;
}

.cash-copy em {
  font-style: normal;
  color: var(--text);
  font-weight: 700;
}

.cash-copy code {
  display: block;
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}

.cash-copy__btn {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

.cash-copy .hint {
  margin-top: 8px;
}

.cash-card {
  padding: 12px;
  margin-bottom: 10px;
}

.cash-card label {
  display: block;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 8px;
}

.cash-row {
  display: flex;
  gap: 8px;
}

.cash-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
}

.primary,
.ghost {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 700;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.ghost {
  background: #fff;
  border: 1px solid var(--line);
}

.text-btn {
  width: 100%;
  min-height: 44px;
  color: var(--mute);
}

.cash-hist {
  margin-top: 6px;
  padding-bottom: 8px;
}

.cash-hist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
}

.cash-hist__head h2 {
  font-size: 16px;
  font-weight: 800;
}

.ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.led-day {
  margin: 6px 4px -2px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.led-day:first-child {
  margin-top: 0;
}

.led {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.08);
}

.led__ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.led__ico svg {
  width: 18px;
  height: 18px;
}

.led__body {
  min-width: 0;
}

.led__body b {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.led__body small {
  display: block;
  margin-top: 1px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.led__sum {
  text-align: right;
}

.led__sum strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.led__sum span {
  color: var(--mute);
  font-size: 10px;
  font-weight: 700;
}

.led__sum.pos {
  color: var(--ok);
}

.led__sum.neg {
  color: var(--danger);
}

.led__sum.bonus {
  color: #c79212;
}

.led--win .led__ico,
.led--tie .led__ico {
  color: var(--ok);
  background: #e6f8ee;
}

.led--lose .led__ico {
  color: var(--danger);
  background: #fdeeee;
}

.led--stake .led__ico,
.led--refund .led__ico {
  color: var(--blue);
  background: #e7f3ff;
}

.led--deposit .led__ico {
  color: #0098ea;
  background: #e6f6fd;
}

.led--withdraw .led__ico {
  color: #c77816;
  background: #fff4e5;
}

.led--swap .led__ico {
  color: #d4a017;
  background: #fff6dd;
}

.led--faucet .led__ico {
  color: #168cff;
  background: #e7f3ff;
}

.led--empty {
  display: block;
  padding: 22px 12px;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.hand-line {
  text-align: center;
  font-weight: 700;
  margin: 10px 0;
}

.stake-hero {
  font-size: 72px;
  font-weight: 800;
  text-align: center;
  color: var(--blue);
  line-height: 0.95;
}

.link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  margin: 16px 0;
}

.link-box code {
  font-size: 12px;
  color: var(--mute);
}

.wait-timer,
.eyebrow {
  text-align: center;
  margin-bottom: 12px;
}

.result-delta {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  color: var(--ok);
}

.result-delta.is-loss {
  color: var(--danger);
}

.top-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.top-head p {
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
}

.top-head h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.top-head__note {
  margin-bottom: 12px;
  color: var(--mute);
  font-size: 12px;
}

.top-switch {
  display: flex;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 12px;
  background: #eef4fb;
}

.top-switch__btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--mute);
  font-size: 12px;
  font-weight: 700;
}

.top-switch__btn.is-on {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 6px rgba(22, 140, 255, 0.12);
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}

.podium__seat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.podium__ava {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.podium .ava {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.podium__seat--1 .ava {
  width: 56px;
  height: 56px;
  box-shadow: 0 8px 16px rgba(240, 180, 41, 0.28);
}

.podium__frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 62px;
  height: 62px;
  border-radius: 19px;
}

.podium__frame::before {
  content: "";
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #c9840c 0deg,
    #f0b429 80deg,
    #fff6c8 125deg,
    #f0b429 200deg,
    #c9840c 280deg,
    #ffe27a 330deg,
    #c9840c 360deg
  );
  animation: podium-frame 2.6s linear infinite;
}

.podium__frame::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  border-radius: 16px;
  background: #eaf6ff;
}

.podium__frame .ava {
  position: relative;
  z-index: 1;
}

@keyframes podium-frame {
  to {
    transform: rotate(360deg);
  }
}

.podium__seat--2 .ava {
  box-shadow: 0 0 0 3px #b7c3d4, 0 6px 12px rgba(120, 140, 170, 0.22);
}

.podium__seat--3 .ava {
  box-shadow: 0 0 0 3px #d4a06a, 0 6px 12px rgba(164, 96, 40, 0.22);
}

.podium__crown {
  display: block;
  width: 26px;
  height: 22px;
  color: #f0b429;
  filter: drop-shadow(0 2px 2px rgba(180, 120, 20, 0.28));
}

.podium__crown svg {
  display: block;
  width: 100%;
  height: 100%;
}

.podium__seat > b {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium__seat > small {
  margin-bottom: 8px;
  color: var(--mute);
  font-size: 10px;
}

.podium__stand {
  width: 100%;
  border-radius: 14px 14px 8px 8px;
  padding: 8px 4px 10px;
}

.podium__stand em {
  display: block;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.podium__stand strong {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
}

.podium__seat--1 .podium__stand {
  min-height: 86px;
  color: #163a7a;
  background: linear-gradient(180deg, #ffe27a, #f0b429);
}

.podium__seat--2 .podium__stand {
  min-height: 68px;
  color: #3d4c63;
  background: linear-gradient(180deg, #f4f7fb, #b7c3d4);
}

.podium__seat--3 .podium__stand {
  min-height: 56px;
  color: #fff;
  background: linear-gradient(180deg, #efc09a, #c47a3a);
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.top-row {
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(22, 140, 255, 0.08);
}

.top-row.is-you {
  background: #e7f3ff;
  border-color: rgba(22, 140, 255, 0.35);
}

.top-row__n {
  color: var(--mute);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.top-row.is-you .top-row__n {
  color: var(--blue);
}

.top-list .ava,
.top-you .ava {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.ava--ini {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.top-row__who {
  min-width: 0;
}

.top-row__who b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.top-row__who small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-row__who span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  color: var(--mute);
  font-size: 11px;
}

.top-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.top-you {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(22, 140, 255, 0.35);
  box-shadow: 0 -6px 18px rgba(22, 140, 255, 0.12);
}

.top-you .top-row {
  margin: 0;
  box-shadow: none;
}

.tabbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  flex-shrink: 0;
  margin: 0 -14px;
  padding: 6px 4px max(10px, var(--safe-bottom));
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid var(--line);
}

.tabbar.is-hidden {
  display: none;
}

.tab {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
}

.tab.is-on {
  color: var(--blue);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 38, 80, 0.28);
  display: grid;
  place-items: end center;
  z-index: 20;
}

.overlay.is-center {
  place-items: center;
  background: rgba(16, 38, 80, 0.38);
  backdrop-filter: blur(6px);
}

.overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  overflow: hidden;
  width: min(340px, calc(100% - 36px));
  padding: 28px 20px 18px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.9), transparent 46%),
    linear-gradient(180deg, #e7f4ff 0%, #ffffff 58%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(16, 70, 160, 0.22);
}

.modal[hidden] {
  display: none;
}

.modal.is-lose {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.86), transparent 46%),
    linear-gradient(180deg, #ffecec 0%, #ffffff 58%);
}

.modal.is-tie {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.86), transparent 46%),
    linear-gradient(180deg, #eef2f8 0%, #ffffff 58%);
}

.modal__die {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 28% 28%, #3aa6ff 1.6px, transparent 1.8px),
    radial-gradient(circle at 72% 72%, #3aa6ff 1.6px, transparent 1.8px),
    linear-gradient(180deg, #fff, #e8f6ff);
  box-shadow: 0 3px 6px rgba(22, 140, 255, 0.14);
  opacity: 0.55;
  pointer-events: none;
}

.modal__die--a {
  top: 12px;
  left: 12px;
  transform: rotate(-18deg);
}

.modal__die--b {
  top: 16px;
  right: 14px;
  width: 18px;
  height: 18px;
  transform: rotate(22deg);
}

.modal.is-lose .modal__die {
  background:
    radial-gradient(circle at 28% 28%, #e24b4b 1.6px, transparent 1.8px),
    radial-gradient(circle at 72% 72%, #e24b4b 1.6px, transparent 1.8px),
    linear-gradient(180deg, #fff, #ffe8e8);
}

.modal__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #7ec8ff, #168cff);
  box-shadow: 0 8px 16px rgba(22, 140, 255, 0.28);
}

.modal__badge::after {
  content: "";
  width: 22px;
  height: 22px;
  background: #fff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.modal.is-win .modal__badge {
  background: linear-gradient(180deg, #ffe27a, #f0b429);
  box-shadow: 0 8px 16px rgba(212, 160, 23, 0.28);
}

.modal.is-lose .modal__badge {
  background: linear-gradient(180deg, #ff8b8b, #e24b4b);
  box-shadow: 0 8px 16px rgba(226, 75, 75, 0.24);
}

.modal.is-lose .modal__badge::after {
  width: 18px;
  height: 4px;
  border-radius: 99px;
  clip-path: none;
}

.modal.is-tie .modal__badge {
  background: linear-gradient(180deg, #c5d4e8, #8aa0be);
  box-shadow: 0 8px 16px rgba(80, 110, 150, 0.2);
}

.modal.is-tie .modal__badge::after {
  width: 16px;
  height: 10px;
  background: transparent;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
  clip-path: none;
}

.modal__k {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal__n {
  margin: 8px 0 4px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ok);
}

.modal.is-lose .modal__n {
  color: var(--danger);
}

.modal.is-tie .modal__n {
  color: #5d7396;
}

.modal__note {
  color: var(--mute);
  font-size: 13px;
}

.modal__go {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #4fb4ff, #168cff);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(22, 140, 255, 0.24);
}

.modal.is-lose .modal__go {
  background: linear-gradient(180deg, #ff7b7b, #e24b4b);
  box-shadow: 0 6px 14px rgba(226, 75, 75, 0.22);
}

.modal__go--ghost {
  margin-top: 8px;
  background: #fff;
  color: var(--blue);
  border: 1.5px solid #8ec8ff;
  box-shadow: none;
}

.modal.is-lose .modal__go--ghost {
  color: var(--danger);
  border-color: #f3b4b4;
}

.sheet {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 24px;
}

.overlay.is-center .sheet {
  width: min(360px, calc(100% - 36px));
  padding: 22px 18px 16px;
  border-radius: 24px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 255, 255, 0.9), transparent 46%),
    linear-gradient(180deg, #e7f4ff 0%, #ffffff 58%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(16, 70, 160, 0.22);
}

.overlay.is-center .sheet h2 {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}

.overlay.is-center .sheet .hint,
.overlay.is-center .sheet .lead {
  text-align: center;
}

.overlay.is-center .sheet .roll-btn {
  height: 48px;
  margin-top: 8px;
  border-radius: 16px;
  font-size: 16px;
}

.sheet--tourney {
  text-align: center;
}

.tourney-modal__cup {
  display: block;
  width: 108px;
  height: 108px;
  margin: -6px auto 4px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(180, 120, 0, 0.28));
}

.hot {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff8b4a, #ff4d1f);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}

.tourney-modal__prize {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 8px 0 2px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #163a7a;
}

.tourney-modal__prize .ico-coin {
  width: 20px;
  height: 20px;
  margin: 0;
}

.tourney-modal__prize .ico-coin + .ico-coin {
  margin-left: -8px;
  margin-right: 8px;
}

.tourney-modal__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 4px;
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
}

.sheet--tourney .lead {
  margin: 4px 0 4px;
}

.sheet--tourney .modal__go {
  margin-top: 12px;
}

.sheet[hidden] {
  display: none;
}

.sheet .lead {
  margin: 8px 0 14px;
}

.stakes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 14px 0;
}

.stake-btn {
  height: 52px;
  border-radius: 12px;
  background: #f3f8ff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.stake-btn.is-on {
  background: #e7f3ff;
  border-color: var(--blue);
  color: var(--blue);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: #102650;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 30;
  font-size: 13px;
  white-space: nowrap;
}

.toast[hidden] {
  display: none;
}

@media (max-width: 410px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tabbar {
    margin-left: -12px;
    margin-right: -12px;
  }

  .tab {
    font-size: 10px;
  }

  .hero {
    padding-left: 38px;
    padding-right: 38px;
  }

  .dice {
    border-radius: 14px;
  }

  .dice-row {
    gap: 4px;
  }

  .pcard {
    padding: 10px 8px 8px;
  }

  .bank__n {
    font-size: 34px;
  }

  .turn-badge {
    padding: 5px 8px;
    font-size: 11px;
  }

  .pcard__hand small {
    display: none;
  }

  .ava {
    width: 36px;
    height: 36px;
  }

  .ctable__cols {
    gap: 6px 10px;
  }

  .ctable li {
    font-size: 11px;
  }

  .tourney {
    padding: 12px 92px 10px 76px;
  }

  .tourney__art,
  .tourney__cup {
    width: 72px;
    height: 76px;
  }

  .tourney__go {
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .tourney__die {
    display: none;
  }

  .tourney__body h2 {
    font-size: 14px;
  }

  .tcard__stats {
    gap: 6px;
  }

  .faucet__head {
    padding-left: 24px;
  }

  .faucet__badge {
    max-width: 92px;
    font-size: 9px;
  }

  .faucet__cell b {
    font-size: 18px;
  }

  .faucet__cell--pay b {
    font-size: 18px;
  }
}

@media (min-width: 431px) {
  html:not(.is-tg) .app {
    max-width: 460px;
  }
}
