/* V203 — one scrolling deposit form and black glass result dialog. */
.deposit-flow{--df-accent:#111;--df-ink:#151515;--df-muted:#626262;position:fixed;inset:0;margin:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;padding:0;background:#f2f2f2;color:var(--df-ink);font-family:inherit;font-size:16px;line-height:1.8;overflow:hidden;box-sizing:border-box;z-index:1000;color-scheme:light}
.deposit-flow::backdrop{background:#f3f3f3}
.deposit-flow *{box-sizing:border-box}
.deposit-flow [hidden]{display:none!important}
.deposit-flow button,.deposit-flow input{font:inherit}
.deposit-flow button{cursor:pointer}
.deposit-flow button:focus-visible,.deposit-flow input:focus-visible{outline:3px solid #111;outline-offset:3px}
.deposit-flow button:disabled{opacity:.55;cursor:wait}
.df-shell{position:relative;display:flex;flex-direction:column;width:100%;max-width:540px;height:100%;margin:auto;background:#f2f2f2}
.df-header{display:flex;align-items:center;gap:8px;flex-shrink:0;min-height:58px;padding:7px 12px;padding-top:max(7px,env(safe-area-inset-top));background:#fff}
.df-header h2{flex:1;margin:0;text-align:center;font-size:20px;font-weight:500;color:var(--df-ink)}
.df-header button{border:0;background:none;color:var(--df-ink);padding:3px 6px;min-height:40px;min-width:36px}
.df-header #df-back{font:34px/1 sans-serif}
.df-header #df-history-toggle{font-size:12px;text-align:right;line-height:1.5}
.df-body{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;padding:14px 12px 22px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.df-balance{position:relative;overflow:hidden;border-radius:12px;padding:20px 22px 13px;color:#fff;background:linear-gradient(140deg,#333 0%,#171717 55%,#080808 100%);min-height:152px}
.df-balance:after{position:absolute;inset:-75% -20% auto 40%;height:400px;transform:rotate(25deg);width:60px;background:#ffffff14;content:''}
.df-balance>span{font-size:16px}
.df-balance strong{display:block;line-height:1.6;font-size:30px;font-weight:800;letter-spacing:.2px}
.df-card-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:22px;font:16px monospace;letter-spacing:3px}
.df-chip{font:28px sans-serif;color:#d4d4d4}
.df-section-label{margin:18px 2px 10px;font-size:16px;font-weight:600}
.df-methods{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.df-methods>button{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;border:2px solid transparent;border-radius:8px;padding:18px 12px 14px;background:#fff;box-shadow:0 2px 8px #00000005;color:#555;min-height:125px}
.df-methods>button.is-selected{border-color:#111;color:#fff;background:linear-gradient(140deg,#292929,#111)}
.df-methods strong{font:600 16px/1.6 sans-serif}
.df-logo{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;height:42px;width:42px;line-height:1;font:700 14px/1 sans-serif;text-align:center;border-radius:8px}
.df-kpay{background:#0563ac;color:white;border:1px solid #b5d7ec}
.df-wave{border-radius:10px;background:transparent;overflow:hidden}
.df-wave img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}
.df-method-check{position:absolute;top:5px;right:10px;font:18px sans-serif;visibility:hidden}
.is-selected .df-method-check{visibility:visible}
.df-card{margin:0 0 16px;border:0;border-radius:14px;background:#fff;padding:18px 12px}
.df-card h3{color:var(--df-ink);margin:0 0 20px;font-size:20px;font-weight:700}
.df-method-note{margin-top:18px;padding:20px}
.df-method-note h3{font-size:18px;margin-bottom:10px}
.df-method-note p{color:var(--df-muted);margin:8px 0}
.df-section-icon{color:#111;display:inline-block;margin-right:6px}
.df-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px}
.df-amounts button{display:flex;justify-content:space-between;align-items:center;padding:3px 9px;border:1px solid #ddd;border-radius:5px;min-height:36px;background:#fff;color:var(--df-accent);font:16px/1.5 sans-serif}
.df-amounts button span{color:#737373}
.df-amounts button.is-selected{background:linear-gradient(120deg,#292929,#111);color:#fff;border-color:transparent}
.df-amounts button.is-selected span{color:#fff}
.df-credit{display:flex;align-items:center;justify-content:space-between;border-radius:30px;background:#f1f1f1;margin-bottom:12px;overflow:hidden;gap:8px}
.df-credit strong{padding:5px 14px;background:linear-gradient(110deg,#111,#333);color:#fff;border-radius:30px 0 0 30px;white-space:nowrap;font-size:16px}
.df-credit b{color:var(--df-accent);padding-right:12px;font:700 16px/1.6 sans-serif}
.df-breakdown{margin:0 0 17px}
.df-breakdown>div{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0}
.df-breakdown dt{font-size:14px;background:#f1f1f1;padding:6px 12px;border-radius:28px;color:var(--df-muted)}
.df-breakdown dd{font:16px/1.6 sans-serif;color:#111;white-space:nowrap;margin:0}
.df-breakdown>div:first-child dd{color:#555}
.df-amount-input{display:flex;align-items:center;border-radius:30px;padding:8px 12px;background:#f2f2f2;gap:12px}
.df-amount-input>span{font:800 24px/1.6 sans-serif;color:#111;border-right:1px solid #c9c9c9;padding-right:14px}
.df-amount-input input{width:100%;min-width:0;border:0;background:none!important;box-shadow:none!important;outline:0;color:#111!important;font:700 18px/1.6 sans-serif;padding:4px 0}
.df-amount-input button{border:0;background:none;color:#8c8c8c;padding:4px}
.df-rules h3{font-size:19px}
.df-rules ul,.df-instructions ul{list-style:none;padding:0;margin:0}
.df-rules li,.df-instructions li{position:relative;padding-left:16px;margin:13px 0;color:var(--df-muted);font-size:14px;line-height:1.9}
.df-rules li:before{content:'◆';position:absolute;left:0;top:0;color:#555;font-size:10px}
.df-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;padding:12px 12px max(12px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #eee;min-height:76px}
.df-footer>div{display:flex;flex-direction:column;font-size:14px}
.df-footer strong{font:700 14px/1.7 sans-serif}
.df-footer>button{border:0;color:#fff;background:var(--df-accent);border-radius:5px;min-height:49px;padding:10px 17px;white-space:normal;font-size:16px}
.df-payment-page{margin:-6px -5px -12px;padding:6px;background:#ededed;min-height:100%}
.df-payment-brand{display:flex;align-items:center;justify-content:center;gap:9px;background:#fff;border-radius:5px;min-height:66px;padding:10px 12px;font:700 18px sans-serif;color:#111}

.df-payment-brand .df-logo{height:36px;width:36px;font-size:12px}
.df-countdown{text-align:center;color:#444;margin:12px 0;font-size:15px}
.df-payment-page .df-card{border-radius:6px;margin-bottom:6px}
.df-transfer>div{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:14px;flex-wrap:wrap}
.df-transfer>div>span{flex:1;min-width:100px}
.df-transfer b{color:#111;font:700 17px/1.6 sans-serif;overflow-wrap:anywhere}
.df-transfer>div:nth-child(2) b{color:var(--df-muted);font-size:14px}
.df-transfer button{border:1px solid #111;background:#fff;color:#111;border-radius:5px;padding:2px 6px;font-size:13px}
.df-reference label{display:block;color:#222;font-size:14px}
.df-reference label strong{font:700 20px sans-serif}
.df-reference>div{display:flex;align-items:center;border:1px solid #e5e5e5;margin:8px 0 14px}
.df-reference>div>span{padding:5px 9px;font-size:13px;border-right:1px solid #eee;white-space:nowrap}
.df-reference input{border:0;background:#fff;color:#111;min-width:0;width:100%;padding:8px;box-shadow:none;font-size:16px}
.df-reference>button{display:block;margin:10px auto 0;background:#111;color:#fff;border:0;border-radius:2px;min-height:40px;padding:6px 20px;font-size:16px}
.df-instructions h3{color:#111;font-size:17px;margin-bottom:10px}
.df-instructions li{color:var(--df-ink);font-size:14px}
.df-instructions li:before{position:absolute;left:0;content:'●';color:#555;font-size:10px}
.df-waiting{min-height:390px;text-align:center;padding:40px 22px!important}
.df-loader{display:flex;justify-content:center;gap:3px;margin:20px auto 32px;height:26px}
.df-loader i{width:5px;height:24px;background:#222;animation:df-pulse .9s ease-in-out infinite alternate}
.df-loader i:nth-child(2){animation-delay:.12s}
.df-loader i:nth-child(3){animation-delay:.24s}
.df-loader i:nth-child(4){animation-delay:.36s}
.df-loader i:nth-child(5){animation-delay:.48s}
@keyframes df-pulse{to{opacity:.25;transform:scaleY(.55)}}
.df-elapsed{color:#222;font:700 26px/1.6 sans-serif}
.df-waiting>p{color:#222;font-size:16px;line-height:1.9;margin:18px 0 10px}
.df-waiting>small{display:block;color:var(--df-muted);font-size:14px;line-height:1.9}
.df-waiting .df-order-code{font-size:13px;color:#626262}
.df-waiting>button{width:100%;margin:25px 0 12px;border:1px solid #111;color:#111;background:#fff;min-height:42px;padding:8px;font-size:15px}
.df-error{color:#222!important;font-weight:600;font-size:14px!important;line-height:1.8;margin:8px 0;overflow-wrap:anywhere}
.df-error:empty{display:none}
.df-global-error{padding:8px}
.df-loading{color:var(--df-muted);text-align:center;margin:20px}
.df-result{position:fixed;width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:52px 24px 28px;text-align:center;background:radial-gradient(ellipse at top left,#ffffff16,transparent 65%),linear-gradient(145deg,#272727d9,#0b0b0bed 55%,#030303f0);color:#f5f5f5;border:1px solid #ffffff26;border-top-color:#ffffff45;border-radius:24px;box-shadow:0 24px 80px #000a,inset 0 1px 0 #ffffff15,inset 0 -1px 0 #ffffff05;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);color-scheme:dark;overflow-y:auto;overflow-wrap:anywhere}
.df-result::backdrop{background:#0009;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.df-result>.icon-button{position:absolute;right:14px;top:14px;float:none;width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#ffffff15,#ffffff05);color:#f5f5f5;border:1px solid #ffffff24;font:24px/1 sans-serif;cursor:pointer}
.df-result>.icon-button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.df-result-icon{display:grid;place-items:center;width:72px;height:72px;margin:4px auto 18px;border-radius:50%;border:1px solid #ffffff2b;background:linear-gradient(145deg,#ffffff12,#ffffff03);box-shadow:inset 0 1px 0 #ffffff12;font:40px/1 sans-serif;color:#f5f5f5}
.df-result h2{clear:both;color:#f5f5f5;font-size:21px;line-height:1.8;margin:0 0 12px}
.df-result p{color:#d4d4d4;white-space:pre-line;font-size:16px;line-height:1.9;margin:0}
.df-result.rejected .df-result-icon{color:#f5f5f5}
.deposit-flow button#df-retry{display:block;margin:auto;padding:10px 20px;border:1px solid #111;border-radius:6px;background:#fff;color:#111}
.deposit-flow:has(#df-receipt-step:not([hidden])) .df-header{background:#ededed}
@media(min-width:600px){.deposit-flow{background:#ededed}
.df-shell{box-shadow:0 0 50px #0002}
.df-body{padding:18px 16px}
.df-card{padding:22px 18px}
.df-amounts button{min-height:44px}
.df-methods>button{min-height:140px}
.df-waiting{min-height:460px}
}
@media(max-width:350px){.df-header{gap:2px;padding-inline:6px}
.df-breakdown dt{font-size:12px;padding-inline:8px}
.df-credit strong,.df-credit b{font-size:14px}
.df-reference>div{flex-direction:column;align-items:stretch}
.df-reference>div>span{border:0;border-bottom:1px solid #eee}
.df-transfer>div>span{min-width:80px}
.df-transfer b{font-size:15px}
.df-footer>button{font-size:14px;padding-inline:12px}
}
@media(prefers-reduced-motion:reduce){.df-loader i{animation:none}}

/* V204: symmetric controls keep the title centered independently of button widths. */
.deposit-flow .df-header{display:grid;grid-template-columns:100px minmax(0,1fr) 100px;align-items:center}
.deposit-flow #deposit-title{margin:0;text-align:center;font-weight:800;justify-self:stretch}
.deposit-flow .df-header #df-back{justify-self:start;width:44px;min-width:44px}
.deposit-flow .df-header #df-history-toggle{justify-self:end;width:100%;min-width:0}

/* V209 deposit history, matching withdrawal history. */
#deposit-dialog .df-history-hidden{display:none!important}
#deposit-dialog .wd-history-item{display:grid;gap:6px;margin-bottom:8px;font-size:13px;color:#333;background:white;border:1px solid #e1e1e1;border-radius:13px;padding:13px;min-width:0}
#deposit-dialog .wd-line{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:#555}
#deposit-dialog .wd-line strong,#deposit-dialog .wd-line b{color:#111;font-weight:800}
#deposit-dialog .wd-history-item small{color:#666;overflow-wrap:anywhere}
#deposit-dialog .df-amount-input input:focus{outline:none!important;box-shadow:none!important}
#deposit-dialog .df-amount-input:focus-within{box-shadow:inset 0 0 0 1px #999}
@media(max-width:350px){.deposit-flow .df-header{grid-template-columns:78px minmax(0,1fr) 78px}.deposit-flow #deposit-title{font-size:17px}.df-header #df-history-toggle{font-size:11px}}

/* V210: keep the deposit history action on one line without shifting the title. */
.deposit-flow .df-header{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:4px}
.deposit-flow .df-header #df-history-toggle{width:auto;max-width:100%;padding-inline:2px;white-space:nowrap;word-break:normal;overflow-wrap:normal;font-size:12px}
@media(max-width:350px){.deposit-flow .df-header #df-history-toggle{font-size:11px}}

/* V211: compact horizontal payment selector; receipt branding unchanged. */
.deposit-flow .df-methods{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
.deposit-flow .df-methods>button{min-height:64px;flex-direction:row;justify-content:center;gap:8px;padding:9px 20px 9px 9px;border-radius:10px;border-color:#e1e1e1;min-width:0}
.deposit-flow .df-methods>button.is-selected{border-color:#111}
.deposit-flow .df-methods .df-logo{width:32px;height:32px;border-radius:7px;font-size:10px}
.deposit-flow .df-methods strong{font-size:12px;line-height:1.3;white-space:nowrap}
.deposit-flow .df-methods .df-method-check{top:5px;right:7px;font-size:13px}
@media(max-width:350px){.deposit-flow .df-methods>button{gap:5px;padding-inline:6px 17px}.deposit-flow .df-methods strong{font-size:11px}.deposit-flow .df-methods .df-logo{width:28px;height:28px}}

/* V217: Copy feedback inside the modal top layer, accessible manual fallback. */
.deposit-flow .df-transfer [data-df-copy]{min-height:36px;min-width:60px;cursor:pointer;touch-action:manipulation;pointer-events:auto;flex-shrink:0}
.deposit-flow .df-copy-status{margin:8px 0 0;color:#333;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.deposit-flow .df-copy-manual{display:block;width:100%;margin-top:8px;padding:8px;border:1px solid #888;border-radius:5px;background:#fff;color:#111;font-size:16px;user-select:text;-webkit-user-select:text}
.deposit-flow .df-copy-status[hidden],.deposit-flow .df-copy-manual[hidden]{display:none!important}
