*{box-sizing:border-box}body{margin:0;background:#e0f3ff;color:#203e63;font-family:Arial,sans-serif}main{max-width:1150px;margin:auto;padding:24px}header{display:flex;gap:24px;align-items:center;justify-content:space-between}a{color:#205b86}h1{font-size:26px;margin:8px 0}header span{font-size:11px;letter-spacing:2px}.wallet{background:#fff3c5;border:2px solid #e4b752;padding:12px 20px;border-radius:16px;white-space:nowrap}.wallet strong{display:block;font-size:28px}.note{font-size:13px;color:#4a6578;line-height:1.5}.table{background:radial-gradient(ellipse at top,#25876e,#125342);border:12px solid #b77735;border-radius:100px 100px 50px 50px;box-shadow:0 7px #754921;padding:20px;color:white;text-align:center;min-height:480px}.dealer-person{height:88px;position:relative;margin:0 auto;width:80px}.head{background:#eebf96;width:35px;height:38px;border-radius:45%;position:absolute;top:0;left:23px;border-top:8px solid #40342d}.vest{position:absolute;top:35px;width:80px;height:53px;border-radius:24px 24px 5px 5px;background:linear-gradient(90deg,#fff 15%,#223648 15%,#223648 85%,#fff 85%);padding-top:15px;color:#fdd65b;font-size:25px}.table h2{font-size:15px;margin:12px}.cards{display:flex;justify-content:center;gap:5px;min-height:93px;margin:12px 0}.card{background:#fffdf6;color:#263544;border-radius:9px;box-shadow:0 3px 8px #0003;width:60px;height:85px;display:flex;flex-direction:column;justify-content:space-between;padding:7px;font-size:23px;font-weight:bold;text-align:left}.card.red{color:#c83d49}.card.back{background:repeating-linear-gradient(45deg,#3866a0,#3866a0 6px,#527fb5 6px,#527fb5 12px);border:4px solid #fff}.card span:last-child{text-align:right}.table-letter{color:#f8d685;font-weight:bold;font-size:15px;letter-spacing:2px;margin:16px 0 24px}.table-letter small{display:block;font-size:10px;letter-spacing:1px;margin-top:7px}.seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.seat{border:2px solid #ffffff30;border-radius:20px;padding:12px 8px;background:#ffffff0a}.seat.active{border-color:#ffd768;background:#ffdb7620;box-shadow:0 0 0 3px #ffd76833}.seat h3{font-size:14px;margin:0 0 10px}.seat label{display:block;font-size:12px}.seat select{width:100%;max-width:160px;margin-top:6px;padding:10px;border-radius:9px;font:inherit;background:#fffdf4;color:#203e63}.hand{border-radius:10px;padding:4px}.hand.current{background:#ffffff18}.result{font-weight:bold;font-size:14px}.positive{color:#a8f8c0}.negative{color:#ffb6b9}.console{text-align:center;padding:25px 0}#message{min-height:24px;line-height:1.5}button{border:2px solid #8ab7d6;border-radius:12px;background:#fff;color:#244965;padding:13px 20px;font:inherit;font-weight:bold;cursor:pointer;margin:4px;box-shadow:0 3px #92b9d0}button.primary{background:#ffbb4c;border-color:#d48422;color:#523409}button:disabled{background:#e5eaf0;color:#6d7783;cursor:default;box-shadow:none}details{background:#fffaf0;padding:18px;border-radius:15px;font-size:14px;line-height:1.6}summary{cursor:pointer;font-weight:bold}@media(max-width:650px){main{padding:12px}header{flex-wrap:wrap;gap:12px}header>div:nth-child(2){order:3;width:100%}h1{font-size:22px}.table{padding:16px 6px;border-width:7px;border-radius:50px 50px 25px 25px}.seats{gap:5px}.seat{padding:10px 3px}.card{width:34px;height:56px;font-size:15px;padding:4px;border-radius:6px}.cards{gap:2px;min-height:58px;flex-wrap:wrap}.seat select{font-size:12px;padding:8px 2px}.seat h3,.result{font-size:12px}.table-letter{font-size:12px}button{padding:12px;font-size:13px}}

.seat input[type=number]{display:block;width:100%;max-width:160px;margin:6px auto;padding:11px 8px;border:2px solid #a5cebd;border-radius:9px;font:inherit;background:#fffdf4;color:#203e63;text-align:center;min-height:44px}.seat label small{display:block;font-size:11px;color:#dbede4;margin:5px 0}.seat button{font-size:12px;padding:10px 7px;max-width:100%;margin:8px 0}.seat .leave-seat{background:#fce8d8;color:#774321;border-color:#ce9b72;box-shadow:0 3px #91684a}.empty-seat{color:#d3e5dd;font-size:13px}.seat input:disabled{background:#e5eaf0;color:#536575}@media(max-width:650px){.seat input[type=number]{font-size:16px}.seat button{font-size:11px;line-height:1.3}}

/* v33: a compact mobile table with permanently reachable controls. */
@media(max-width:650px){
 body{padding-bottom:calc(176px + env(safe-area-inset-bottom))}
 main{padding:10px;max-width:650px}
 header{gap:6px;align-items:center}
 header>a{font-size:13px}
 header>div:nth-child(2){order:3;width:100%}
 header>div:nth-child(2)>span{display:none}
 h1{font-size:18px;margin:5px 0}
 .wallet{padding:6px 12px;font-size:11px;border-radius:12px}
 .wallet strong{font-size:21px}
 .note{font-size:11px;line-height:1.3;margin:6px 0 10px}
 .table{min-height:0;padding:10px 5px;border-width:6px;border-radius:40px 40px 22px 22px}
 .dealer-person{height:50px;width:52px}
 .head{width:24px;height:26px;left:14px;border-top-width:6px}
 .vest{top:23px;width:52px;height:29px;border-radius:15px 15px 3px 3px;padding-top:3px;font-size:20px}
 .table h2{font-size:13px;margin:8px 0 4px}
 .cards{margin:7px 0;min-height:53px;gap:3px}
 .card{width:32px;height:50px;font-size:14px;padding:4px}
 .table-letter{font-size:10px;letter-spacing:1px;margin:10px 0 12px}
 .table-letter small{font-size:9px;letter-spacing:0;margin-top:4px}
 .seats{gap:5px;align-items:start}
 .seat{padding:8px 4px;border-radius:14px;min-height:110px}
 .seat h3{font-size:12px;margin-bottom:6px}
 .seat label{font-size:10px}
 .seat input[type=number]{min-height:36px;padding:6px 2px;margin:4px auto;font-size:16px}
 .seat label small{font-size:9px;margin:3px 0}
 .seat button{min-height:40px;padding:5px 3px;font-size:10px;margin:5px 0;line-height:1.2;box-shadow:none}
 .empty-seat{font-size:11px;margin:8px 0}
 .hand{padding:2px;font-size:11px}
 .result{font-size:11px;line-height:1.2;margin:6px 0}
 .console{position:fixed;bottom:0;left:0;right:0;z-index:20;background:#f2f9ff;border-top:2px solid #94bdd7;padding:8px 8px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #203e6320}
 #message{font-size:12px;line-height:1.3;min-height:16px;margin:0 0 5px}
 #actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;max-width:650px;margin:auto}
 .console button{min-height:42px;padding:9px 4px;font-size:12px;margin:0;box-shadow:none}
 #deal{display:block;width:100%;max-width:650px;margin:6px auto 0}
 #refill:not([hidden]){display:block;width:100%;max-width:650px;margin:6px auto 0}
 details{margin-top:14px;font-size:12px;padding:12px}
}

html,body,button,a,input,summary{touch-action:manipulation}

.blackjack-stats{background:#fffaf0;border:2px solid #9cc4df;border-radius:18px;padding:18px;margin-bottom:18px}.blackjack-stats h2{font-size:20px;margin-top:0}.bj-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.bj-stat-grid>div{padding:12px;background:#eaf5ff;border-radius:12px;text-align:center}.bj-stat-grid b,.bj-stat-grid span{display:block}.bj-stat-grid b{font-size:22px;margin-bottom:5px}.bj-stat-grid span,.blackjack-stats p{font-size:12px;line-height:1.5;color:#476078}@media(max-width:650px){.bj-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.blackjack-stats{padding:12px}}
