body.plinko-page {
  background:
    radial-gradient(ellipse 60% 68% at 50% 43%, rgba(255, 79, 174, .68) 0%, rgba(255, 79, 174, .38) 38%, rgba(255, 79, 174, .12) 76%, transparent 100%),
    radial-gradient(ellipse at 50% 48%, #35004f 0%, #1d002f 47%, #10001a 100%);
}
.app--plinko-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(max(9px, env(safe-area-inset-top)) + var(--telegram-fullscreen-top-gap, 0px)) 14px max(86px, calc(82px + env(safe-area-inset-bottom)));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 60% 68% at 50% 43%, rgba(255, 79, 174, .68) 0%, rgba(255, 79, 174, .38) 38%, rgba(255, 79, 174, .12) 76%, transparent 100%),
    radial-gradient(ellipse at 50% 48%, #35004f 0%, #1d002f 47%, #10001a 100%);
  color: #f4f5f7;
}
.plinko-topbar { height: 36px; }
.plinko-topbar .online { color: #aeb7c7; }
.plinko-account { max-width: none; margin: 2px 0 0; }
.plinko-account .account-row { height: 34px; justify-content: flex-end; }
.plinko-account .account-label { color: #747b86; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.plinko-account .balance-button { height: 30px; margin-left: auto; border-color: #292d34; border-radius: 10px; background: #181a1f; }
.plinko-game { display: flex; width: 100%; max-width: 406px; flex-direction: column; gap: 8px; margin: 5px auto 0; }
.plinko-heading { display: flex; min-height: 34px; align-items: center; justify-content: space-between; padding: 0 3px; }
.plinko-kicker { color: #808a9a; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.plinko-heading h1 { margin: 0; color: #fff; font-size: 20px; font-weight: 800; line-height: 1.15; }
.plinko-risk-tag { padding: 6px 9px; border: 1px solid rgba(83, 201, 138, .3); border-radius: 9px; background: rgba(40, 96, 68, .45); color: #9cda9a; font-size: 8px; font-weight: 900; letter-spacing: .5px; transition: border-color .16s ease, background-color .16s ease, color .16s ease; }
.plinko-risk-tag[data-risk-level="medium"] { border-color: rgba(240, 160, 74, .38); background: rgba(113, 69, 31, .5); color: #ffc081; }
.plinko-risk-tag[data-risk-level="high"] { border-color: rgba(240, 100, 112, .38); background: rgba(115, 52, 59, .5); color: #ff9ca4; }
.plinko-board-frame { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: #0e121d; }
#plinko-board { display: block; width: 100%; height: clamp(245px, 70vw, 300px); }
.app--low-power .plinko-board-frame { contain: layout paint; }
.app--low-power .plinko-payout--highlight { box-shadow: 0 0 8px rgba(255,255,255,.42); }
.plinko-payouts { display: grid; gap: 2px; padding: 0 3px 5px; }
.plinko-payout {
  display: grid;
  min-width: 0;
  height: 27px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px;
  color: #fff;
  font-size: clamp(7px, 2.25vw, 10px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
.plinko-payout--purple { background: linear-gradient(150deg, #a778fa, #7542d8); }
.plinko-payout--pink { background: linear-gradient(150deg, #fa89b4, #d64d88); }
.plinko-payout--orange { background: linear-gradient(150deg, #ffc081, #ea8147); }
.plinko-payout--yellow { background: linear-gradient(150deg, #f8df83, #c5a849); }
.plinko-payout--green { background: linear-gradient(150deg, #c0e0ad, #78a96e); }
.plinko-payout--highlight { z-index: 1; filter: brightness(1.25); transform: translateY(-3px) scale(1.05); box-shadow: 0 0 13px rgba(255,255,255,.55); }
.plinko-controls { display: flex; flex-direction: column; gap: 7px; }
.plinko-bet-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .92fr); gap: 5px; }
.plinko-amount-field { display: flex; min-width: 0; height: 43px; align-items: center; gap: 8px; padding: 0 8px; border: 1px solid #292f3b; border-radius: 13px; background: #1c2232; }
.plinko-amount-field > span:first-child { flex: 0 0 auto; color: #67b8ff; font-size: 10px; font-weight: 900; }
.plinko-amount-wrap { display: flex; min-width: 0; flex: 1; align-items: center; gap: 5px; }
.plinko-amount-wrap input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #f5f7fb; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.plinko-amount-wrap input::-webkit-inner-spin-button, .plinko-amount-wrap input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.plinko-amount-wrap strong { color: #9ba7bb; font-size: 8px; }
.plinko-presets { display: flex; min-width: 0; gap: 4px; }
.plinko-presets button, .plinko-stepper button {
  min-width: 41px;
  height: 36px;
  border: 1px solid #2b3244;
  border-radius: 10px;
  background: #20263a;
  color: #d8deeb;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.plinko-presets button { min-width: 0; flex: 1; padding: 0 3px; }
.plinko-presets button:active, .plinko-stepper button:active { background: #303b5b; }
.plinko-settings-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.plinko-stepper { display: flex; min-width: 0; min-height: 43px; align-items: center; gap: 4px; padding: 3px; border: 1px solid #2a3040; border-radius: 12px; background: #1d2435; }
.plinko-stepper { justify-content: space-between; }
.plinko-stepper button { width: 34px; min-width: 34px; height: 33px; padding: 0; font-size: 18px; }
.plinko-stepper > span { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: center; gap: 1px; }
.plinko-stepper > span small, .plinko-auto-count > span { color: #8c97aa; font-size: 7px; font-weight: 900; letter-spacing: .4px; }
.plinko-stepper > span strong { color: #f1f3f8; font-size: 13px; line-height: 1; }
.plinko-auto-count { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 8px; border: 1px solid #2a3040; border-radius: 12px; background: #1d2435; }
.plinko-auto-count[hidden] { display: none; }
.plinko-auto-count > span { font-size: 8px; }
.plinko-auto-count .plinko-stepper { min-height: 36px; border: 0; background: transparent; }
.plinko-auto-count .plinko-stepper button { width: 31px; min-width: 31px; height: 30px; }
.plinko-auto-count input { width: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: #f1f3f8; font-size: 13px; font-weight: 900; text-align: center; }
.plinko-auto-count input::-webkit-inner-spin-button, .plinko-auto-count input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.plinko-risk-toggle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid #2a3040; border-radius: 12px; background: #1d2435; }
.plinko-risk-toggle button { min-width: 0; min-height: 35px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #9da8bb; font-size: 9px; font-weight: 900; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.plinko-risk-toggle button.is-active[data-plinko-risk="low"] { border-color: #53c98a; background: #286044; color: #fff; box-shadow: 0 0 10px rgba(83, 201, 138, .24); }
.plinko-risk-toggle button.is-active[data-plinko-risk="medium"] { border-color: #f0a04a; background: #71451f; color: #fff; box-shadow: 0 0 10px rgba(240, 160, 74, .24); }
.plinko-risk-toggle button.is-active[data-plinko-risk="high"] { border-color: #f06470; background: #73343b; color: #fff; box-shadow: 0 0 10px rgba(240, 100, 112, .24); }
.plinko-risk-toggle button:disabled:not(.is-active) { opacity: .58; }
.plinko-drop-button { min-height: 50px; border: 0; border-radius: 13px; background: linear-gradient(105deg, #596cfb, #8250f3); color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .1px; box-shadow: 0 5px 14px rgba(83,91,235,.25); cursor: pointer; }
.plinko-drop-button:disabled { background: #30364a; color: #7f899e; box-shadow: none; cursor: default; }
.plinko-message { min-height: 16px; margin: 0; color: #a1acc0; font-size: 9px; line-height: 1.4; text-align: center; }
.plinko-message--win { color: #a5e59e; }
.plinko-message--loss, .plinko-message--error { color: #ff8c9e; }
.plinko-fairness-note { margin: 0; padding: 0 5px 6px; color: #697386; font-size: 8px; line-height: 1.4; text-align: center; }
.app--plinko-page .toast { z-index: 30; }

@media (max-width: 360px) {
  .app--plinko-page { padding-right: 11px; padding-left: 11px; }
  .plinko-game { gap: 6px; }
  #plinko-board { height: 245px; }
  .plinko-bet-row { grid-template-columns: minmax(0, 1fr) minmax(120px, .92fr); gap: 4px; }
  .plinko-payout { height: 24px; }
  .plinko-amount-field { height: 40px; }
  .plinko-drop-button { min-height: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  .plinko-payout { transition: none; }
}
