/* =========================================================================
   Нитка — contest page for the «Пуговки» loyalty programme.
   Cream linen, Onest, glossy sewing buttons and one continuous thread.
   Self-contained: local fonts only, no external requests, no ads, no payments.
   ========================================================================= */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #1F2742;
  --navy-soft: rgba(31, 39, 66, 0.66);
  --navy-faint: rgba(31, 39, 66, 0.12);
  --violet: #6260C6;
  --lavender: #D2D0FF;
  --lavender-bg: #E9E8FF;
  --coral: #E8623E;
  --coral-dark: #C94B2E;
  --sand: #FFF4DF;
  --cream: #FFFDF7;
  --yellow: #FED78C;
  --yellow-deep: #E7B45D;
  --mint: #7FC8A9;
  --white: #FFFFFF;
  --shadow: 0 16px 36px rgba(31, 39, 66, 0.12);
  --radius: 26px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Onest', 'Segoe UI', 'Arial', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, #F4EFFF 0%, #E9E8FF 55%, #E2E0FA 100%);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.th-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.th-ico {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.16em;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ shell */

.th-app {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(31, 39, 66, 0.04);
}

@media (min-width: 560px) {
  .th-app {
    height: min(940px, 100dvh);
    margin-top: max(0px, calc((100dvh - 940px) / 2));
    border-radius: 34px;
    box-shadow: 0 30px 80px rgba(31, 39, 66, 0.16);
  }
}

.th-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.th-aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
}

.th-aurora i:nth-child(1) {
  width: 320px;
  height: 320px;
  left: -120px;
  top: -70px;
  background: rgba(254, 215, 140, 0.5);
}

.th-aurora i:nth-child(2) {
  width: 300px;
  height: 300px;
  right: -130px;
  top: 140px;
  background: rgba(210, 208, 255, 0.6);
}

.th-aurora i:nth-child(3) {
  width: 280px;
  height: 280px;
  left: 35%;
  bottom: -150px;
  background: rgba(232, 98, 62, 0.14);
}

/* ----------------------------------------------------------------- screens */

.th-screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  padding: calc(var(--safe-top) + 10px) 18px calc(var(--safe-bottom) + 10px);
}

.th-screen.is-active {
  display: flex;
  animation: th-fade 0.28s ease both;
}

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

/* -------------------------------------------------------------------- top */

.th-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 4px 2px 10px;
}

.th-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.th-brand__word {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.th-brand__o {
  width: 0.92em;
  height: 0.92em;
  margin: 0 0.02em;
}

.th-brand__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--violet);
  background: var(--lavender-bg);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

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

.th-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid rgba(231, 180, 93, 0.4);
  font-weight: 700;
  font-size: 15px;
}

.th-chip--wallet b {
  font-variant-numeric: tabular-nums;
}

.th-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--navy-faint);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  font-size: 18px;
  transition: transform 0.15s ease;
}

.th-icon-btn:active {
  transform: scale(0.94);
}

.th-icon-btn.is-off {
  color: rgba(31, 39, 66, 0.4);
}

/* ------------------------------------------------------------------- menu */

.th-menu {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 6px;
}

.th-hero {
  position: relative;
  padding: 4px 2px 2px;
  min-height: 168px;
}

.th-hero__line {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 10px;
  overflow: visible;
  pointer-events: none;
}

.th-hero__thread-base {
  fill: none;
  stroke: #E8623E;
  stroke-width: 4.5;
  stroke-linecap: round;
  opacity: 0.22;
}

.th-hero__thread {
  fill: none;
  stroke: #E8623E;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 2px 2px rgba(201, 75, 46, 0.28));
  animation: th-sew 5.2s ease-in-out infinite;
}

@keyframes th-sew {
  0% {
    stroke-dashoffset: 100;
  }
  52% {
    stroke-dashoffset: 0;
  }
  86% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

.th-hero__buttons circle {
  filter: drop-shadow(0 2px 2px rgba(31, 39, 66, 0.18));
}

.th-kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}

.th-hero__title {
  margin: 0;
  font-size: clamp(38px, 12vw, 52px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 72%;
}

.th-hero__title em {
  font-style: normal;
  color: var(--coral);
}

.th-hero__lead {
  margin: 10px 0 0;
  max-width: 30ch;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--navy-soft);
}

/* ------------------------------------------------------------- play card */

.th-play-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 39, 66, 0.06);
}

.th-play-card__math {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--navy-soft);
}

.th-play-card__math div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.th-play-card__math small {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(31, 39, 66, 0.45);
}

.th-play-card__math b {
  font-size: 17px;
  font-weight: 800;
}

.th-play-card__math b span {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-soft);
}

.th-play-card__win {
  color: var(--coral) !important;
}

.th-arrow {
  width: 22px;
  height: 22px;
  color: rgba(31, 39, 66, 0.28);
  margin-top: 8px;
}

/* ---------------------------------------------------------------- buttons */

.th-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.12s ease, box-shadow 0.16s ease;
}

.th-btn:active {
  transform: translateY(1px) scale(0.995);
}

.th-btn--primary {
  background: linear-gradient(180deg, #FFE0A4 0%, var(--yellow) 46%, var(--yellow-deep) 100%);
  color: var(--navy);
  box-shadow: 0 10px 22px rgba(231, 180, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.th-btn--xl {
  min-height: 62px;
  font-size: 16.5px;
  justify-content: flex-start;
  text-align: left;
}

.th-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(31, 39, 66, 0.1);
  font-size: 16px;
  flex: 0 0 auto;
}

.th-btn__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}

.th-btn__text b {
  font-size: 17px;
  font-weight: 800;
}

.th-btn__text small {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(31, 39, 66, 0.6);
}

.th-btn__chev {
  font-size: 22px;
  color: rgba(31, 39, 66, 0.35);
  line-height: 1;
}

.th-btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--navy-faint);
  color: var(--navy);
  min-height: 46px;
  font-size: 14px;
}

.th-btn--plain {
  background: transparent;
  color: var(--navy-soft);
  min-height: 44px;
  font-size: 14px;
}

.th-btn--danger {
  background: linear-gradient(180deg, #F07A5A, var(--coral));
  color: #fff;
  box-shadow: 0 10px 20px rgba(232, 98, 62, 0.3);
}

.th-btn--sm {
  min-height: 42px;
}

.th-btn--hint {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--navy-faint);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  gap: 6px;
}

.th-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: saturate(0.7);
}

/* --------------------------------------------------------------- rewards */

.th-rewards {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(31, 39, 66, 0.06);
}

.th-rewards__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.th-rewards__head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.th-rewards__head span {
  font-size: 11px;
  color: rgba(31, 39, 66, 0.42);
  font-weight: 600;
}

.th-rewards__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.th-rewards__list li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 3px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid rgba(31, 39, 66, 0.07);
  font-size: 12.5px;
}

.th-rewards__list li b {
  font-weight: 700;
  color: var(--navy-soft);
}

.th-rewards__list li i {
  font-style: normal;
  color: rgba(31, 39, 66, 0.3);
}

.th-rewards__list li strong {
  font-weight: 800;
}

.th-rewards__list li.is-best {
  background: var(--yellow);
  border-color: rgba(231, 180, 93, 0.55);
}

.th-rewards__list li.is-best b {
  color: rgba(31, 39, 66, 0.62);
}

/* ---------------------------------------------------------------- note */

.th-note-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--lavender-bg);
  border: 1px solid rgba(98, 96, 198, 0.16);
}

.th-note-card__icon {
  color: var(--violet);
  font-size: 16px;
  line-height: 1.4;
}

.th-note-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(31, 39, 66, 0.72);
}

.th-note-card b {
  color: var(--navy);
}

.th-menu-stats {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(31, 39, 66, 0.5);
  text-align: center;
}

.th-best-line {
  margin: auto 0 0;
  padding-top: 6px;
  font-size: 12.5px;
  color: rgba(31, 39, 66, 0.55);
  text-align: center;
}

.th-best-line b {
  color: var(--navy);
  font-weight: 800;
}

/* ------------------------------------------------------------------- foot */

.th-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 2px;
  font-size: 11.5px;
  color: rgba(31, 39, 66, 0.45);
}

.th-foot i {
  font-style: normal;
}

.th-link {
  border: 0;
  background: none;
  padding: 0 2px;
  color: var(--violet);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ------------------------------------------------------------------- game */

.th-screen--game {
  padding: calc(var(--safe-top) + 6px) 10px calc(var(--safe-bottom) + 6px);
  gap: 0;
}

.th-hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}

.th-hud__figure,
.th-hud__timer {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.th-hud__figure small,
.th-hud__timer small {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(31, 39, 66, 0.42);
}

.th-hud__figure b {
  font-size: 15px;
  font-weight: 800;
}

.th-hud__timer b {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
}

.th-hud__timer b.is-low {
  color: var(--coral);
}

.th-hud__spacer {
  flex: 1 1 auto;
}

.th-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 10px;
}

.th-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(31, 39, 66, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.th-dots i.is-current {
  background: var(--violet);
  transform: scale(1.25);
}

.th-dots i.is-done {
  background: var(--coral);
}

.th-timer {
  flex: 0 0 auto;
  height: 4px;
  margin: 6px 6px 8px;
  border-radius: 2px;
  background: rgba(31, 39, 66, 0.08);
  overflow: hidden;
}

.th-timer span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--coral));
  transition: width 0.2s linear;
}

.th-timer span.is-low {
  background: linear-gradient(90deg, var(--coral), #B83A21);
}

.th-figure-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 8px;
}

.th-preview {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 39, 66, 0.09);
  box-shadow: 0 4px 12px rgba(31, 39, 66, 0.06);
}

.th-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

.th-figure-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}

.th-figure-text b {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.th-figure-text span {
  font-size: 11px;
  color: rgba(31, 39, 66, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-figure-bar .th-btn--hint {
  flex: 0 0 auto;
}

.th-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(31, 39, 66, 0.06), inset 0 2px 10px rgba(31, 39, 66, 0.05);
  touch-action: none;
}

.th-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.th-banner {
  position: absolute;
  left: 50%;
  top: 13%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.94);
  min-width: 168px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid rgba(31, 39, 66, 0.08);
  box-shadow: 0 14px 34px rgba(31, 39, 66, 0.16);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(8px);
}

.th-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.th-banner b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.th-banner span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--navy-soft);
}

.th-game-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 6px 0;
}

.th-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: rgba(31, 39, 66, 0.5);
}

.th-hint.is-warn {
  color: var(--coral);
  font-weight: 700;
}

/* ----------------------------------------------------------------- result */

.th-result {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  padding: 4px 2px;
  overflow-y: auto;
}

.th-result__title {
  margin: 0;
  font-size: clamp(28px, 8.5vw, 36px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.th-result__sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--navy-soft);
  max-width: 34ch;
}

.th-reward-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #FFE9BC 0%, var(--yellow) 100%);
  border: 1px solid rgba(231, 180, 93, 0.5);
  box-shadow: 0 12px 26px rgba(231, 180, 93, 0.32);
}

.th-reward-big__ico {
  width: 26px;
  height: 26px;
  align-self: center;
}

.th-reward-big b {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.th-reward-big span {
  font-size: 14px;
  font-weight: 600;
  color: rgba(31, 39, 66, 0.6);
}

.th-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.th-result-grid div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 39, 66, 0.06);
}

.th-result-grid small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(31, 39, 66, 0.42);
}

.th-result-grid b {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
}

.th-result-grid i {
  font-style: normal;
  font-size: 10.5px;
  color: rgba(31, 39, 66, 0.42);
}

.th-demo-note {
  margin: 0;
  font-size: 12px;
  color: var(--navy-soft);
  text-align: center;
}

.th-result__fine {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(31, 39, 66, 0.42);
  text-align: center;
}

/* ----------------------------------------------------------------- modals */

.th-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(31, 39, 66, 0.42);
  backdrop-filter: blur(3px);
  animation: th-fade 0.2s ease both;
}

.th-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92%;
  overflow-y: auto;
  padding: 22px 20px 18px;
  border-radius: 26px;
  background: var(--cream);
  box-shadow: 0 24px 60px rgba(31, 39, 66, 0.3);
  animation: th-rise 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes th-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.th-modal__card--compact {
  text-align: center;
}

.th-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.th-modal__card h2 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.th-modal__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy-soft);
}

.th-modal__fine {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(31, 39, 66, 0.42);
}

.th-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.th-steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.th-steps li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lavender-bg);
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 800;
}

.th-steps b {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.th-steps small {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--navy-soft);
}

/* ------------------------------------------------------------------ toast */

.th-toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 76px);
  z-index: 30;
  transform: translate(-50%, 12px);
  max-width: 84%;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.th-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.th-toast--warn {
  background: var(--coral);
}

.th-toast--ok {
  background: #2F7D57;
}

/* --------------------------------------------------------------- confetti */

.th-confetti {
  position: absolute;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
}

.th-confetti i {
  position: absolute;
  top: 38%;
  width: 9px;
  height: 13px;
  border-radius: 3px;
  opacity: 0;
  animation: th-confetti 1.9s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes th-confetti {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0), 62vh) rotate(var(--spin, 180deg));
  }
}

.th-noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
}

/* ------------------------------------------------------- small screens */

@media (max-height: 640px) {
  .th-hero__title {
    font-size: clamp(32px, 10vw, 40px);
  }

  .th-hero__lead {
    font-size: 13px;
    margin-top: 6px;
  }

  .th-play-card {
    padding: 12px;
    gap: 8px;
  }

  .th-menu {
    gap: 10px;
  }

  .th-rewards {
    padding: 10px 12px;
  }

  .th-btn--xl {
    min-height: 54px;
  }

  .th-hud__timer b {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .th-figure-bar {
    gap: 8px;
    padding: 0 4px 6px;
  }

  .th-preview {
    width: 42px;
    height: 42px;
  }

  .th-figure-text b {
    font-size: 13px;
  }

  .th-figure-text span {
    font-size: 10px;
  }

  .th-figure-bar .th-btn--hint {
    width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .th-figure-bar .th-btn--hint span {
    display: none;
  }
}

@media (max-width: 340px) {
  .th-brand__tag {
    display: none;
  }

  .th-hint {
    max-width: 170px;
  }
}

