/* Wallet composition follows the illustrated wood-and-nest reference. */
.game.wallet-open { height:100dvh; min-height:0; overflow:hidden; }
.game.wallet-open .wallet-view { min-height:0; background:#ffecd0; }
.game.wallet-open .wallet-hero {
  box-sizing:border-box;
  flex:0 0 auto;
  height:57.5cqw;
  min-height:0;
  background:#87c675 url('assets/wallet-hero-clear-board.webp') center top/100% 100% no-repeat;
}
.game.wallet-open .wallet-hero h1 {
  position:absolute;
  top:8.1cqw;
  left:26%;
  right:26%;
  display:flex;
  align-items:center;
  justify-content:center;
  height:13cqw;
  margin:0;
  color:#4a1e0d;
  font-size:clamp(22px,7.1cqw,38px);
  font-weight:1000;
  line-height:1;
  white-space:nowrap;
  text-shadow:0 1px #fff2d3;
}
.game.wallet-open .wallet-balance {
  position:absolute;
  top:55%;
  bottom:12%;
  transform:translateY(-4px);
  left:12%;
  right:12%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
  gap:0;
  color:#fff8e9;
  text-shadow:0 2px 2px #59290f,0 0 2px #59290f;
}
.game.wallet-open .wallet-currency { min-width:0; padding:0 2px; }
.game.wallet-open .wallet-currency + .wallet-currency { border:0; padding:0 2px; }
.game.wallet-open .wallet-currency > span {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:#fff6dd;
  font-size:clamp(11px,3.1cqw,16px);
  font-weight:900;
  line-height:1.1;
}
.game.wallet-open .wallet-currency strong {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(3px,1cqw,6px);
  margin-top:5px;
  font-size:clamp(18px,5.6cqw,30px);
  font-weight:1000;
  line-height:1;
  white-space:nowrap;
}
.game.wallet-open .wallet-currency img,
.game.wallet-open .wallet-currency .icon {
  width:clamp(16px,4.2cqw,22px);
  height:clamp(16px,4.2cqw,22px);
  flex-shrink:0;
  object-fit:contain;
}
.game.wallet-open .wallet-sheet {
  flex:1 1 auto;
  min-height:0;
  margin:0;
  padding:8px 9px 0;
  border:0;
  border-radius:0;
  background:linear-gradient(100deg,#fff0d7,#ffe6c3 52%,#fff0d8);
}
.game.wallet-open .wallet-actions { gap:6px; padding:0 3px; }
.game.wallet-open .wallet-actions button {
  min-height:clamp(40px,11cqw,56px);
  padding:4px 11px;
  border-width:2px;
  border-radius:clamp(18px,6cqw,29px);
  font-size:clamp(14px,4cqw,21px);
  font-weight:1000;
  line-height:1;
  box-shadow:inset 0 3px #ffffffa6,inset 0 -3px #7e420c24,0 3px 3px #6e421c3b;
}
.game.wallet-open .wallet-connect {
  color:#4a230c;
  border-color:#ef9f08;
  background:linear-gradient(#fff082,#ffd735 40%,#ffb30c 100%);
  text-shadow:0 1px #ffefb8;
}
.game.wallet-open .wallet-connect .icon { width:clamp(25px,7cqw,38px); height:clamp(25px,7cqw,38px); }
.game.wallet-open .wallet-actions .wallet-exchange {
  color:#fff;
  border-color:#2f8c0b;
  background:linear-gradient(#80e449,#46be19 45%,#14900d 100%);
  text-shadow:0 2px #2f771c;
}
.game.wallet-open .wallet-exchange > .exchange-icon {
  width:clamp(30px,8cqw,44px);
  height:clamp(30px,8cqw,44px);
}
.game.wallet-open .wallet-exchange > b { right:5%; font-size:clamp(24px,7cqw,39px); line-height:1; }
.game.wallet-open .wallet-withdraw {
  color:#795139;
  border-color:#d9b598;
  background:linear-gradient(#f5e4d6,#dfc3ae);
  text-shadow:0 1px #fff4e8;
}
.game.wallet-open .wallet-withdraw svg { width:clamp(23px,6cqw,32px); height:clamp(23px,6cqw,32px); }
.game.wallet-open .wallet-promo {color:#fff7d5;border-color:#966229;background:linear-gradient(#c69250,#9f6a31);text-shadow:0 1px #65471f;}
.game.wallet-open .wallet-promo .icon {width:25px;height:25px;}
.wallet-promo-form {display:flex;align-items:center;gap:7px;padding:5px 0 0;}
.wallet-promo-form input {min-width:0;width:100%;height:42px;border:2px solid #cfab7b;border-radius:16px;background:#fff1d7;color:#704319;padding:0 12px;font:inherit;font-size:14px;box-shadow:inset 0 2px 4px #8d521219;}
.game.wallet-open .wallet-promo-form button {min-height:42px;border-color:#a57127;background:#bb8b40;color:#fff6db;font-size:12px;font-weight:700;padding:6px 12px;text-shadow:none;box-shadow:inset 0 2px #ffe2a64d,0 2px 3px #6e421c30;}
html[dir="rtl"] body {direction:ltr;}
html[dir="rtl"] :is(p,h1,h2,h3,label) {direction:rtl;unicode-bidi:plaintext;}
html[dir="rtl"] .wallet-address {direction:ltr;}
.game.wallet-open .wallet-tabs {
  flex-shrink:0;
  margin:9px 3px 6px;
  border:1px solid #e5bc8f;
  border-radius:22px;
  background:#f5dcb9;
  box-shadow:inset 0 1px #fff7e9;
}
.game.wallet-open .wallet-tabs button {
  min-height:clamp(31px,8.5cqw,44px);
  border-radius:20px;
  font-size:clamp(12px,3.45cqw,18px);
  font-weight:900;
  color:#744527;
}
.game.wallet-open .wallet-tabs button.active {
  color:#3f220e;
  background:linear-gradient(#ffe96b,#ffba1b);
  box-shadow:inset 0 2px #fff7a3,0 2px #c8882f66;
}
.game.wallet-open .wallet-history,
.game.wallet-open .wallet-withdrawals {
  min-height:0;
  margin:0 2px;
  padding:0 8px;
  border:1px solid #e9c49a;
  border-radius:18px 18px 0 0;
  background:linear-gradient(#fff9ea,#ffeace);
  box-shadow:inset 0 1px #fff;
  overflow-y:auto;
}
.game.wallet-open .wallet-row {
  grid-template-columns:clamp(34px,10cqw,50px) minmax(0,1fr) auto;
  gap:7px;
  min-height:clamp(43px,12cqw,60px);
  padding:3px 1px;
  border-bottom:1px solid #e8c8a3;
}
.game.wallet-open .wallet-row:last-child { border-bottom:0; }
.game.wallet-open .wallet-row .wallet-operation {
  width:clamp(33px,9.5cqw,48px);
  height:clamp(33px,9.5cqw,48px);
  border:1px solid #e6bd8a;
  border-radius:13px;
  background:linear-gradient(#fff8e7,#f7d9ab);
}
.game.wallet-open .wallet-row .wallet-operation .icon,
.game.wallet-open .wallet-row .wallet-operation img {
  width:clamp(26px,7.5cqw,38px);
  height:clamp(26px,7.5cqw,38px);
  object-fit:contain;
}
.game.wallet-open .wallet-row h2 {
  margin:0 0 2px;
  color:#452318;
  font-size:clamp(11px,3.5cqw,18px);
  font-weight:900;
  line-height:1.1;
}
.game.wallet-open .wallet-row small {
  color:#9a7558;
  font-size:clamp(9px,2.7cqw,14px);
  line-height:1.1;
}
.game.wallet-open .wallet-row > strong {
  gap:3px;
  color:#098a1e;
  font-size:clamp(12px,3.55cqw,19px);
  font-weight:1000;
  white-space:nowrap;
}
.game.wallet-open .wallet-row > strong.negative { color:#d31811; }
.game.wallet-open .wallet-row > strong .icon { width:clamp(17px,4.5cqw,24px); height:clamp(17px,4.5cqw,24px); }
@media(max-width:350px) {
  .game.wallet-open .wallet-row { gap:4px; }
  .game.wallet-open .wallet-history,.game.wallet-open .wallet-withdrawals { padding-inline:5px; }
  .game.wallet-open .wallet-row h2 { font-size:10.5px; }
  .game.wallet-open .wallet-row > strong { font-size:11px; }
}
