.cash-picker{width:100%;box-sizing:border-box;text-align:center}
.cash-picker h2{margin:0 0 4px}.cash-purpose{margin:0 0 8px!important}
.cash-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 12px}
.cash-totals>span{display:grid;gap:6px;padding:8px 4px;border:2px solid #e9bd43;border-radius:12px;background:#201405;color:#ffe9a8;font-size:13px}
.cash-totals b{font:400 28px/1 var(--display);color:#ffda39;direction:ltr}
.cash-tabs,.cash-footer{display:flex;gap:8px;margin:8px 0}.cash-tabs button,.cash-footer button{flex:1;min-height:42px;border:2px solid #bc8528;border-radius:10px;padding:7px;color:#ffe9a8;background:#30200d;font:400 17px/1.3 var(--display);cursor:pointer}
.cash-tabs button[aria-pressed=true],.cash-footer .pri{background:#ffda39;color:#442500}
.cash-help,.cash-message{font-size:13px!important;line-height:1.5!important;margin:6px 0!important}.cash-message{min-height:20px;color:#ffda39!important}
.cash-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;direction:rtl}
.cash-note{min-width:0;padding:5px;border:1px solid #725326;border-radius:10px;background:#110c06}
.cash-note>button{position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:4px 0;border:0;background:none;color:#ffe9a8;cursor:pointer;gap:5px}
.cash-note .note2{display:block;position:static!important;transform:none!important;width:100%!important;height:auto!important;aspect-ratio:2;background-size:100% 100%}
.cash-note small{font:400 12px/1.2 var(--display)}.cash-count{display:flex;align-items:center;justify-content:center;gap:7px;font:400 13px/1.2 var(--display);color:#ffda39}
.cash-count button{min-width:32px;min-height:30px;border:1px solid #a0742c;border-radius:8px;background:#3a230b;color:#fff;font-size:20px;cursor:pointer}
.cash-picker button:disabled{opacity:.35;cursor:default}.cash-note.empty{opacity:.4}.cash-picker button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.cash-note.chosen{border-color:#ffda39;box-shadow:inset 0 0 0 1px #ffda39}.cash-note.chosen>button:disabled{opacity:1}
.cash-legacy{width:100%;padding:8px;border:1px solid #9b7131;border-radius:10px;background:transparent;color:#f0d398;font:400 14px/1.3 var(--display);cursor:pointer}
/* Payment dialogs share the existing bank frame, ribbon and close-button skin. */
#peerPaymentModal{z-index:150}#cashChangeModal{z-index:210}#bankruptcyConfirm{z-index:220}
.cash-reason{margin:0 0 5px!important;color:#ffe8a0!important;text-align:center;font:400 18px/1.4 var(--display)!important}
.cash-purpose{text-align:center;font-size:14px!important}
.cash-footer{display:flex!important;direction:rtl;align-items:center;gap:10px;padding-bottom:10px}
html body .cash-footer .cash-pay{position:relative;overflow:hidden;flex:1!important;width:100%;min-height:62px!important;padding:12px 14px 16px!important;font:400 21px/1.1 var(--display)!important;background:linear-gradient(180deg,var(--g3a) 0%,var(--g3b) 50%,var(--g3c) 100%)!important;color:#3a2205!important;border:2px solid var(--g3e)!important;border-radius:14px 14px 0 0!important;text-shadow:0 1px 0 #ffffff99!important;box-shadow:inset 0 2px 0 #ffffffbf,inset 0 -3px 0 #a05a0059,0 4px 0 #6b3a00,0 7px 10px #00000073!important;cursor:pointer}
html body .cash-footer .cash-pay::after{content:""!important;display:block!important;position:absolute;left:0;right:0;bottom:0;height:clamp(4px,.9vh,8px);pointer-events:none;background:#101a30 url('/ottoman-border.webp') repeat-x left center;background-size:auto 132%;opacity:.5}
html body .cash-footer .cash-pay:disabled{opacity:.75!important;filter:grayscale(.65) brightness(.8)!important;cursor:not-allowed}
html body .cash-footer .cash-pay:not(:disabled):hover{filter:brightness(1.07)}
html body .cash-footer .cash-pay:not(:disabled):active{transform:translateY(3px)}
.dialog.manualcash,.dialog.cashchange{width:min(500px,calc(100vw - 34px))!important}
.dialog.manualcash .pin-in,.dialog.cashchange .pin-in{max-height:calc(100dvh - 155px);overflow:auto}
.cashchange .cash-grid{margin:8px 0}.cashchange .cash-message{color:#ffe29b}
#paymentModeration{position:fixed;z-index:145;right:12px;top:150px;width:min(330px,calc(100vw - 24px));padding:12px;border:3px solid #ffe395;border-radius:18px;background:#2b1809;color:#ffe9af;box-sizing:border-box;font-family:var(--display)}
#paymentModeration p{font-size:14px}#paymentModeration button,.bankruptcy-actions button{padding:9px;border:2px solid #ffe395;border-radius:10px;background:#e8ba29;color:#412500;font:400 16px/1.3 var(--display);cursor:pointer;margin:4px}
#paymentModeration .bad,.bankruptcy-actions .bad{background:#b82b25;color:#fff}.bankruptcy-actions{display:flex;justify-content:center;gap:8px}
#drawer [data-declare-bankruptcy]{margin-top:18px;border:2px solid #ed6b58;border-radius:12px;padding:12px;background:#62221b;color:#fff;font:400 18px/1.3 var(--display);cursor:pointer;width:100%}
html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl{--player-avatar:66px;flex:0 1 auto!important;min-width:calc(var(--player-avatar)*1.1)!important;max-width:180px!important;gap:0!important;overflow:visible!important}
html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl>.chip.av{width:var(--player-avatar)!important;height:var(--player-avatar)!important;min-width:var(--player-avatar)!important;box-sizing:border-box!important}
html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl>.who{position:relative!important;z-index:4!important;width:max-content!important;min-width:calc(var(--player-avatar)*1.1)!important;max-width:180px!important;margin-top:calc(var(--player-avatar)*-.15)!important}
html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl .nm{position:relative!important;box-sizing:border-box!important;display:block!important;min-width:calc(var(--player-avatar)*1.1)!important;max-width:180px!important;padding:5px 12px 7px!important;border:2px solid #7a4a00!important;border-radius:999px!important;background:linear-gradient(180deg,#fff7a8 0%,#ffd23f 45%,#f2b705 70%,#d99a00 100%)!important;color:#3a2205!important;box-shadow:inset 0 2px 0 #ffffffbf,0 3px 0 #7a4a00,0 5px 8px #0005!important;font:400 16px/1.15 var(--display)!important;text-shadow:0 1px 0 #ffffff99!important;overflow:hidden!important;white-space:nowrap!important}
html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl .nm::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;pointer-events:none;background:#101a30 url('/ottoman-border.webp') repeat-x left center;background-size:auto 132%;opacity:.5}
@media(max-width:1000px) and (orientation:portrait){html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl{--player-avatar:50px;max-width:120px!important}html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl .nm{font-size:13px!important;padding:4px 8px!important}html body.v2:not(.prestart) #topbar2>#players{flex-wrap:wrap!important;row-gap:12px!important}}
@media(max-height:560px) and (orientation:landscape){html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl{--player-avatar:43px}html body.v2:not(.prestart):not(.mland) #topbar2 #players#players>li.pl .nm{font-size:12px!important;padding:3px 5px!important}.dialog.manualcash .pin-in,.dialog.cashchange .pin-in{max-height:calc(100dvh - 110px)}}
.cash-bank-warning{padding:10px;border:2px solid #ffbf31;border-radius:10px;background:#5c320b;color:#fff3ce!important;font-size:14px!important}
#peerPayments{position:fixed;right:12px;top:145px;z-index:32;width:min(360px,calc(100vw - 24px));color:#ffe9a8;font-family:var(--display);pointer-events:auto}
#peerPayments[hidden],#peerPayments [hidden]{display:none!important}
.peer-toggle{width:100%;min-height:42px;padding:8px;border:2px solid #ffe59b;border-radius:12px;background:linear-gradient(#ffe87a,#eab022);color:#482b06;font:400 17px/1.3 var(--display);cursor:pointer;box-shadow:0 4px 0 #775019}
.peer-panel{box-sizing:border-box;padding:10px;background:#130e07;border:3px solid #e6ba40;border-radius:12px;max-height:calc(100dvh - 295px);overflow:auto;overscroll-behavior:contain;box-shadow:0 8px 20px #0008}
.peer-list{display:grid;gap:6px;margin-bottom:8px}.peer-list>button{padding:6px;border:1px solid #996c26;border-radius:8px;background:#2a1c0c;color:#ffdf75;font:400 15px/1.2 var(--display);cursor:pointer}.peer-list>button[aria-pressed=true]{border-color:#ffe59b}.peer-list small{display:block;color:#cdb885;font-size:12px}.peer-list p{font-size:14px;margin:4px}
#peerPayments h2{font-size:22px;text-align:center}#peerPayments .cash-totals b{font-size:24px}#peerPayments .cash-totals>span{font-size:12px}#peerPayments .cash-note small{font-size:11px}#peerPayments .cash-count{font-size:11px}
@media(max-width:560px){#peerPayments{top:115px}.peer-panel{max-height:calc(100dvh - 260px)}}
@media(max-height:560px) and (orientation:landscape){#peerPayments{top:12px;right:85px;width:min(390px,calc(100vw - 180px))}.peer-panel{max-height:calc(100dvh - 115px)}#peerPayments .cash-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.cash-change-options{display:grid;gap:6px;max-height:180px;overflow:auto}.cash-change-options button{padding:9px;border:1px solid #c89635;border-radius:8px;background:#251808;color:#ffe9a8;cursor:pointer}
.cash-change-options b{display:inline-block}.cash-picker [hidden]{display:none!important}
html body #dialog.manualcash{width:min(500px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important}
html body #dialog.manualcash .pin-in{max-height:calc(100dvh - 100px);overflow:auto}
@media(max-height:560px) and (orientation:landscape){.cash-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.cash-totals{margin:4px 0}.cash-totals b{font-size:22px}.cash-note .note2{max-height:45px}.cash-help{font-size:12px!important}html body #dialog.manualcash{width:min(680px,calc(100vw - 28px))!important}}

.name-validation{display:block;color:#ffccad;font-size:13px;margin-top:4px}

/* ===== جهّز فلوس الدفع — تصميم مضغوط بثيم اللعبة، وزرار الدفع ثابت تحت دايمًا ===== */
html body .cash-picker .cash-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:2px 8px;margin:0 0 8px}
html body .cash-picker .cash-reason{margin:0!important;font:400 17px/1.35 var(--display)!important;color:#fff3c4!important}
html body .cash-picker .cash-purpose{margin:0!important;padding:1px 10px;border-radius:999px;background:#3a250c;border:1px solid #8a6424;color:#ffd75a!important;font:400 13px/1.5 var(--display)!important}
html body .cash-picker .cash-totals{gap:6px;margin:0 0 8px}
html body .cash-picker .cash-totals>span{gap:2px;padding:6px 4px 7px;border-radius:12px;border:2px solid #6e4d1c;background:linear-gradient(#2a1a08,#1a1005);font:400 12px/1.2 var(--display);color:#e9cf8e}
html body .cash-picker .cash-totals>span:first-child{border-color:#e9bd43}
html body .cash-picker .cash-totals b{font:400 24px/1.05 var(--display);color:#ffda39}
html body .cash-picker .cash-left b{color:#ff8a6a}
html body .cash-picker .cash-left.done{border-color:#5fc98a;background:linear-gradient(#123a22,#0b2416)}
html body .cash-picker .cash-left.done b{color:#8dffb6}
html body .cash-picker .cash-help{margin:0 0 8px!important;font-size:12px!important;color:#c9b07a!important}
html body .cash-picker .cash-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
html body .cash-picker .cash-note{position:relative;padding:0;border:2px solid #4a3414;border-radius:12px;background:#140d05;transition:border-color .15s,transform .1s}
html body .cash-picker .cash-note>.cash-add{gap:4px;padding:7px 6px 6px;border-radius:10px}
html body .cash-picker .cash-note>.cash-add:not(:disabled):active{transform:scale(.96)}
html body .cash-picker .cash-note .note2{filter:drop-shadow(0 2px 2px #0008)}
html body .cash-picker .cash-own{font:400 12px/1.2 var(--display);color:#c9b07a}
html body .cash-picker .cash-sel{direction:ltr;position:absolute;top:-9px;left:-7px;min-width:30px;padding:3px 7px 4px;border-radius:999px;border:2px solid #7a4a00;background:linear-gradient(#fff7a8,#ffd23f 55%,#e0a400);color:#3a2205;font:400 16px/1 var(--display);box-shadow:0 2px 0 #7a4a00,0 4px 6px #0007}
html body .cash-picker .cash-minus{position:absolute;top:-9px;right:-7px;width:30px;height:30px;padding:0;border-radius:50%;border:2px solid #fff3;background:linear-gradient(#ff6b5a,#c62d22);color:#fff;font:400 22px/26px var(--display);box-shadow:0 2px 0 #6e140e,0 4px 6px #0007;cursor:pointer}
html body .cash-picker .cash-note.chosen{border-color:#ffd23f;background:#2a1b06;box-shadow:0 0 0 1px #ffd23f55,0 0 14px #ffd23f33}
html body .cash-picker .cash-note>.cash-add:disabled{opacity:1;cursor:default}
html body .cash-picker .cash-note.maxed:not(.chosen) .note2{filter:grayscale(.7) brightness(.6)}
html body .cash-picker .cash-message{min-height:0!important;margin:6px 0 0!important}
.cash-empty{grid-column:1/-1;color:#c9b07a}
/* زرار الدفع لازق تحت جوه البوب اب حتى لو المحتوى طويل */
html body #dialog.manualcash .pin-in,html body .dialog.manualcash .pin-in{max-height:calc(100dvh - 120px);overflow:auto;overscroll-behavior:contain;padding-bottom:0}
html body .cash-picker .cash-footer{position:sticky;bottom:0;z-index:5;margin:8px -2px 0;padding:10px 2px 12px;background:linear-gradient(180deg,#0f0a0400,#0f0a04 30%)}
html body .cash-footer .cash-pay{min-height:56px!important;font-size:20px!important}
@media(max-width:420px){
 html body .cash-picker .cash-totals b{font-size:21px}
 html body .cash-picker .cash-reason{font-size:15px!important}
 html body .cash-picker .cash-grid{gap:9px 7px}
 html body .cash-picker .cash-note>.cash-add{padding:6px 4px 5px}
}
@media(max-height:560px) and (orientation:landscape){
 html body .cash-picker .cash-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 html body .cash-picker .cash-help{display:none}
 html body .cash-picker .cash-head{margin-bottom:4px}
 html body .cash-picker .cash-totals b{font-size:19px}
 html body .cash-footer .cash-pay{min-height:46px!important}
}
