body.balance-sheet-open { overflow:hidden; }
.balance-sheet-layer { z-index:80; }
.balance-sheet-layer .case-sheet-backdrop { background:#15070394; backdrop-filter:blur(14px); }
.balance-sheet-layer .balance-sheet { width:min(100%,560px); max-height:calc(100% - 20px); overflow:auto; overscroll-behavior:contain; padding:12px 16px calc(20px + env(safe-area-inset-bottom)); gap:0; border-color:#ff8e3c38; background:radial-gradient(ellipse at 50% 0,#65281336,transparent 70%),linear-gradient(145deg,#29160f,#170d0a); box-shadow:0 -8px 60px #ff661314,0 -20px 60px #0009; }
.balance-sheet .sheet-handle { flex:none; background:#b86b424d; width:40px; }
.balance-sheet-head { position:relative; display:flex; align-items:center; justify-content:center; min-height:58px; margin:8px 0 10px; }
.balance-sheet-head h2 { margin:0; font-size:23px; letter-spacing:-.4px; }
.balance-sheet button,.balance-sheet input { font-family:inherit; }
.balance-sheet button { flex-direction:row; cursor:pointer; transition:background .25s,border-color .25s,box-shadow .25s,opacity .25s; }
.balance-sheet button span { font:inherit; line-height:1.2; }
.balance-sheet-x { position:absolute; right:0; top:8px; width:42px; height:42px; display:grid; place-items:center; border:1px solid #ffb1741c; border-radius:50%; color:#ffe6d4; background:#6b321d55; }
.balance-sheet-x svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.balance-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:12px; }
.balance-mode-tabs button { min-height:48px; border:1px solid #ffa7621c; border-radius:17px; color:#ffe8d8; font-size:16px; font-weight:650; background:#50291b60; }
.balance-mode-tabs button[aria-selected=true],.balance-methods button[aria-pressed=true] { border-color:#ffbb71b0; background:linear-gradient(130deg,#ff9935,#ee491b 68%,#c72e10); box-shadow:inset 0 1px #ffedbd66,0 5px 16px #ff561c20; color:#fff5e7; }
.balance-methods { display:grid; grid-template-columns:1.13fr 1.35fr .92fr; gap:7px; margin-bottom:12px; }
.balance-methods button { min-width:0; display:flex; align-items:center; justify-content:center; gap:4px; padding:9px 5px; min-height:47px; border:1px solid #ffae6924; border-radius:17px; background:#50291b60; color:#ffe5d1; font-size:14px; font-weight:600; white-space:nowrap; }
.balance-icon { display:block; width:25px; height:25px; object-fit:contain; flex:none; filter:drop-shadow(0 0 3px #ff8c3426); }
.balance-methods small { padding:3px 5px; font-size:10px; line-height:1.2; font-weight:750; border-radius:10px; color:#9c350f; background:#ffe5bb; }
.balance-amount-card { min-height:126px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:18px 8px; border:1px solid #ffae6924; border-radius:23px; background:radial-gradient(ellipse at center,#a34b1f26,transparent 75%),#4e291c50; box-shadow:inset 0 1px #ffd4b008; }
.balance-amount-line { width:100%; display:flex; justify-content:center; align-items:center; gap:5px; }
.balance-amount-line input { display:block; width:calc(var(--amount-digits,3)*.65em + .2em); max-width:calc(100% - 50px); min-width:1em; padding:0; border:0; outline:none; background:transparent; color:#fff4e8; caret-color:#ff9f47; font-size:52px; line-height:1.2; font-weight:750; letter-spacing:-2px; text-align:center; font-variant-numeric:tabular-nums; border-radius:8px; }
.balance-amount-line input:focus { box-shadow:0 2px #ff9e57; }
.balance-amount-line .balance-icon { width:39px; height:39px; }
#balance-amount-hint { font-size:11px; color:#d4a485; }
[data-balance-bonus] { font-size:12px; color:#ffc35a; line-height:1.3; }
.balance-increments { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.balance-increments button { display:flex; align-items:center; justify-content:center; gap:4px; min-height:45px; padding:8px 5px; border:1px solid #ffae6924; border-radius:16px; background:#50291b60; color:#ffebd9; font-size:15px; font-weight:650; }
.balance-increments .balance-icon { width:22px; height:22px; }
.balance-coupon { display:flex; align-items:center; gap:8px; min-height:53px; padding:7px 9px 7px 14px; border:1px solid #ffae6924; border-radius:19px; background:#50291b60; }
.balance-coupon input { min-width:0; flex:1; width:0; padding:7px 0; border:0; outline:none; background:transparent; color:#fff1df; font-size:16px; }
.balance-coupon input::placeholder { color:#d4ae96; font-size:14px; }
.balance-coupon button { padding:10px 12px; border:1px solid #ffc29618; border-radius:14px; background:#8c4b2c55; color:#ffe9d5; font-size:12px; font-weight:600; }
.balance-availability,.balance-notice { margin:9px 2px 0; color:#dab394; text-align:center; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.balance-availability:empty,.balance-notice:empty { display:none; }
.balance-notice.is-error { color:#ffb39a; }
.balance-pay { display:flex; align-items:center; justify-content:center; width:100%; flex:none; min-height:55px; margin-top:15px; padding:12px; border:1px solid #ffbe78; border-radius:21px; background:linear-gradient(125deg,#ffa33e,#f45a20 58%,#d33213); box-shadow:inset 0 1px #fff1c678,0 6px 24px #ef511a25; color:#fff6e7; font-size:18px; font-weight:700; line-height:1.2; }
.balance-sheet button:disabled { cursor:default; opacity:.55; }
.balance-sheet :focus-visible { outline:2px solid #ffba75; outline-offset:3px; }
.balance-withdraw { padding:25px 10px; text-align:center; color:#dfb99d; }
.balance-withdraw-amount { display:flex; justify-content:center; align-items:center; gap:8px; color:#fff0de; font-size:38px; }
.balance-withdraw-amount .balance-icon { width:40px; height:40px; }
.balance-withdraw h3 { font-size:18px; color:#ffe7d0; }
.balance-withdraw p { font-size:14px; line-height:1.5; }
.balance-sheet [hidden] { display:none!important; }
.balance-sheet:focus { outline:none; }
.balance-wallet-account { display:flex; align-items:center; justify-content:center; gap:12px; width:100%; min-width:0; }
.balance-wallet-account .ton-wallet-address,.balance-wallet-account .ton-wallet-disconnect { flex-direction:row; min-height:30px; padding:5px 8px; font-size:12px!important; line-height:16px; gap:5px; }
.balance-wallet-account svg { flex:none; width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.balance-availability.has-wallet { min-height:34px; }
@media(max-width:350px) {
 .balance-sheet-layer .balance-sheet { padding-left:12px; padding-right:12px; }
 .balance-methods { gap:5px; }
 .balance-methods button { font-size:12px; gap:2px; padding:8px 3px; }
 .balance-methods .balance-icon { width:21px; height:21px; }
 .balance-methods small { font-size:9px; padding:3px; }
 .balance-coupon { padding-left:11px; gap:4px; }
 .balance-coupon button { padding:10px 8px; font-size:11px; }
}
@media(max-height:600px) {
 .balance-sheet-layer .balance-sheet { max-height:100%; padding-bottom:12px; }
 .balance-sheet-head { min-height:42px; margin:5px 0 8px; }
 .balance-sheet-x { top:0; }
 .balance-amount-card { min-height:100px; padding:10px 6px; }
 .balance-mode-tabs button { min-height:40px; }
 .balance-methods button { min-height:40px; }
 .balance-mode-tabs,.balance-methods { margin-bottom:8px; }
 .balance-increments { margin:8px 0; }
 .balance-pay { min-height:48px; margin-top:10px; }
}

/* Stable geometry across payment methods, including touch screens. */
.balance-sheet-layer .balance-sheet {
  height:min(calc(620px + env(safe-area-inset-bottom)),calc(100% - 20px));
  max-height:calc(100% - 20px);
}
.balance-sheet > * { flex-shrink:0; }
.balance-sheet { scrollbar-width:none; }
.balance-sheet::-webkit-scrollbar { display:none; }
.balance-methods { grid-template-columns:repeat(3,minmax(0,1fr)); }
.balance-methods button {
  position:relative; height:48px; min-height:48px; padding:8px 5px;
  gap:5px; line-height:20px;
}
.balance-methods button .balance-icon { width:24px; height:24px; }
.balance-methods button span { display:block; line-height:20px; }
.balance-methods small {
  position:absolute; top:-6px; right:7px; min-width:30px;
  padding:3px 5px; text-align:center; font-size:9px; line-height:12px;
  box-shadow:0 2px 7px #16070340;
}
.balance-amount-card { height:150px; min-height:150px; padding:14px 8px; gap:6px; }
.balance-amount-line { height:72px; flex:none; gap:8px; }
.balance-amount-line input {
  appearance:none; -webkit-appearance:none;
  font-size:var(--amount-font-size,64px);
  line-height:1.1; font-weight:750; letter-spacing:-2px;
  width:calc(var(--amount-digits,3)*.62em + .15em);
  max-width:calc(100% - 52px); height:72px; flex:none;
  -webkit-text-fill-color:#fff4e8; opacity:1;
}
/* The visible numeral sits slightly above the centre of its input line box. */
.balance-amount-line .balance-icon { width:44px; height:44px; transform:translateY(-2px); }
[data-balance-bonus] { display:block; min-height:18px; line-height:18px; }
[data-balance-bonus].is-empty { visibility:hidden; }
.balance-increments button { height:46px; min-height:46px; line-height:20px; gap:5px; }
.balance-increments button span { display:block; line-height:20px; }
.balance-increments .balance-icon { width:18px; height:18px; transform:translateY(-1px); }
.balance-availability { height:34px; min-height:34px; display:flex; align-items:center; justify-content:center; line-height:17px; margin:9px 2px 0; }
.balance-availability:empty { display:block; }
.balance-notice { min-height:0; }
.balance-pay { margin-top:auto; height:55px; min-height:55px; }
.balance-withdraw { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
@media(max-width:350px) {
  .balance-methods button { padding:8px 3px; gap:4px; font-size:12px; }
  .balance-methods button .balance-icon { width:20px; height:20px; }
  .balance-methods small { top:-6px; right:5px; font-size:9px; }
}
@media(max-height:600px) {
  .balance-sheet-layer .balance-sheet { height:calc(100% - 10px); max-height:calc(100% - 10px); }
  .balance-amount-card { height:150px; min-height:150px; }
  .balance-mode-tabs button { min-height:48px; }
  .balance-methods button { height:48px; min-height:48px; }
  .balance-pay { margin-top:12px; min-height:55px; }
}

/* Use the same gold star symbol as the header balance. */
.balance-sheet .balance-star {
  display:grid; place-items:center; color:#ffd34f;
  font-family:inherit; font-size:25px; font-weight:400; line-height:1;
  text-shadow:0 2px 7px rgb(255 174 43/.48); filter:none;
}
.balance-sheet .balance-methods button .balance-star { display:grid; font-size:24px; line-height:1; }
.balance-sheet .balance-amount-line .balance-star { font-size:44px; }
.balance-sheet .balance-increments button .balance-star { display:grid; font-size:18px; line-height:1; }
.balance-sheet .balance-withdraw-amount .balance-star { font-size:40px; }
@media(max-width:350px) {
  .balance-sheet .balance-methods button .balance-star { font-size:20px; }
}

