:root{color-scheme:dark;--ink:#e4f8ff;--muted:#95adbf;--accent:#f7d99c}*{box-sizing:border-box}html{background:#07101e}body{margin:0;color:var(--ink);font:600 14px/1.4 system-ui,sans-serif;background:radial-gradient(ellipse at 50% 0,#263d75 0,transparent 55%),linear-gradient(135deg,#10162f,#141528);min-height:100svh}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;color:inherit;border:1px solid #456174;background:#152c3b;border-radius:12px}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffe49c;outline-offset:3px}[hidden]{display:none!important}#tower-app{max-width:640px;margin:auto;padding:0 12px}header{display:flex;align-items:center;gap:9px;height:75px;border-bottom:1px solid #365467;margin-bottom:12px}.brand{font-size:28px;color:#fff2bd;font-style:italic;font-weight:950;letter-spacing:-1.5px;text-decoration:none;white-space:nowrap}.brand span{color:#b3e44c}.wallet{margin-left:auto;text-align:right}.wallet small{font-size:10px;letter-spacing:1.6px;color:var(--muted)}.wallet strong{display:block;font-size:24px;line-height:1.1}header button{width:39px;height:41px;font-size:23px;flex-shrink:0}.scene,.controls{border:1px solid #38546a;border-radius:23px;background:linear-gradient(135deg,#1b2a50eb,#101b34f2);box-shadow:inset 0 1px 0 #7495ad44,0 10px 35px #0003}.scene{padding:13px 16px 11px}.heading{display:flex;justify-content:space-between;align-items:center}.heading small{font-size:9px;letter-spacing:2.5px;color:#819fae}.heading h1{margin:0;font-size:32px;letter-spacing:4px;line-height:1.1;background:linear-gradient(#fff6d7,#e4c387);color:transparent;background-clip:text;text-shadow:0 5px 22px #26dac33b}.gem-icon{font-size:40px;color:#5cffe0;text-shadow:2px 3px 0 #168774,0 0 20px #31c8c8}.board-top{display:flex;justify-content:space-between;font-size:11px;color:#abc4cd;margin:8px 1px}#board{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.tile{aspect-ratio:1;border-radius:11px;position:relative;border:1px solid #45687d;border-bottom:4px solid #0b1c2c;background:linear-gradient(145deg,#244457,#112738);box-shadow:inset 0 1px 0 #829ca440,0 3px 5px #0003;display:grid;place-items:center;font-size:clamp(20px,5vw,35px);padding:0;transition:transform .16s,background .16s;opacity:1!important}.tile::before{content:'✦';font-size:14px;color:#66869555}.tile:not(:disabled):hover{transform:translateY(-2px);border-color:#59dccf}.tile.gem{background:radial-gradient(#1d6d6555,#072d32);border-color:#2bd5b5;color:#55ffdb;text-shadow:1px 2px 0 #098b7c,0 0 17px #34fddba0;animation:reveal .3s ease-out}.tile.gem::before,.tile.mine::before{content:none}.tile.mine{background:#41243b;border-color:#e26b87}.tile.hit{background:#942f46;box-shadow:0 0 22px #e96a6733}.tile.unpicked{opacity:.6!important}.score{display:flex;justify-content:space-between;align-items:center;margin-top:13px;min-height:43px}.score small{display:block;font-size:9px;letter-spacing:1.2px;color:var(--muted)}.score strong{font-size:21px;line-height:1.2}.next{text-align:right}.next b{color:#74efd9;font-size:16px}.controls{margin-top:10px;padding:14px 16px 11px}.stake-head{display:flex;justify-content:space-between;color:#a3bece;letter-spacing:1.3px;font-size:10px;margin-bottom:6px}.stake-head label:last-child{width:74px;text-align:center}.setup-row{display:flex;gap:10px}.stake{display:flex;flex:1;min-width:0;border:1px solid #688394;border-radius:13px;overflow:hidden;background:#071b2c}.stake button{border:0;width:46px;border-radius:0;font-size:26px;background:transparent}.stake input{width:0;flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font-size:26px;font-weight:850;text-align:center;-moz-appearance:textfield}.stake input::-webkit-inner-spin-button{appearance:none}select{width:74px;background:#0b2235;border:1px solid #688394;border-radius:13px;color:var(--ink);font-size:20px;text-align:center}.accept{font-size:10px;color:#b6c7d4;display:flex;align-items:flex-start;gap:7px;margin:11px 0}.accept input{accent-color:#e6c980;width:17px;height:17px;margin:0;flex-shrink:0}.primary{width:100%;height:51px;font-size:20px;font-weight:950;letter-spacing:1px;color:#292a43;background:linear-gradient(110deg,#fff0bd,#cfae64);box-shadow:inset 0 1px 0 #fff8,0 4px 0 #786239;border:1px solid #f6e0aa}.primary span{margin-left:10px}.controls:has(#cashout:not([hidden])) .setup{opacity:.7}#status{font-size:11px;color:var(--muted);text-align:center;margin:10px 0 0}#recover{width:100%;padding:12px;margin-top:12px;border-color:#ffd88c;color:#ffd88c}.login{display:block;text-align:center;color:var(--accent);margin:10px}footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:16px 0;font-size:10px;color:var(--muted)}footer a{color:#a8cbdc;text-decoration:none}footer button{font-size:10px;border:0;background:none;color:#a8cbdc;padding:0}dialog{width:min(580px,94vw);max-height:86svh;border:1px solid #537289;border-radius:20px;padding:20px;background:#0c1b2d;color:var(--ink);font-size:13px}dialog::backdrop{background:#01050bcc;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{margin:0 0 10px}.dialog-head button{padding:8px 13px}details{border-top:1px solid #344b60;padding:12px 0}summary{cursor:pointer;font-weight:850}dialog p{color:#afc5d3}dialog label{display:block;margin-top:10px}dialog input{display:block;width:100%;padding:10px;background:#071322;color:var(--ink);border:1px solid #486275;border-radius:8px}dialog table{border-collapse:collapse;width:100%;font-size:11px}dialog th,dialog td{text-align:left;border-bottom:1px solid #31465a;padding:7px 4px}code{overflow-wrap:anywhere;font-size:11px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px}#history details{font-size:11px}@keyframes reveal{from{transform:scale(.7)}to{transform:scale(1)}}@media(min-width:600px){#tower-app{max-width:550px}#board{gap:9px}.scene{padding:17px 24px}.tile{aspect-ratio:1.25}.controls{padding:18px 24px}}@media(max-width:360px){#tower-app{padding:0 8px}header{gap:6px}.brand{font-size:24px}.wallet strong{font-size:21px}.scene,.controls{padding-left:12px;padding-right:12px}#board{gap:5px}.tile{border-radius:8px}.score strong{font-size:18px}.next b{font-size:14px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.tile.gem svg{width:66%;height:75%;filter:drop-shadow(0 0 7px #2ce7c677)}

@media(max-width:599px){header{height:65px;margin-bottom:10px}.tile{aspect-ratio:1.2}.scene{padding-top:11px}.heading h1{font-size:29px}.heading .gem-icon{font-size:35px}}

#tower-app{max-width:510px;padding:0 10px}header{height:48px;margin-bottom:7px;gap:7px}.brand{font-size:25px}.wallet strong{font-size:21px}.wallet small{font-size:9px}header button{width:35px;height:35px;font-size:21px}.scene{padding:9px 10px 8px;border-radius:17px}.heading h1{font-size:23px;letter-spacing:4px}.heading>span{font-size:10px;color:#b9c7e3}.board-caption{display:flex;justify-content:space-between;font-size:8px;color:#9caecb;letter-spacing:.6px;margin:7px 0 5px}#board{display:flex;flex-direction:column;gap:3px}.floor-row{display:grid;gap:5px;align-items:center;height:23px}.floor-row.current{height:31px}.floor-number{font-size:10px;color:#899ec0;text-align:center}.floor-value{font-size:10px;text-align:right;color:#b8c9e4}.floor-row.current .floor-value{color:#ffe2a2;font-weight:900}.tile{aspect-ratio:auto;height:23px;width:100%;border-radius:5px;border:1px solid #48608e;border-bottom:2px solid #121d36;background:linear-gradient(135deg,#34456d,#1c2d52);font-size:15px;box-shadow:none;padding:0;color:#8699bc;opacity:.7!important}.tile::before{content:none}.current .tile{height:31px;opacity:1!important;border-color:#f0d49a;background:linear-gradient(135deg,#5b5480,#293b65);box-shadow:0 0 8px #eecf8b22;color:#fff0c8}.tile.gem{background:#214c65;border-color:#6cdaef;color:#a4f9ff;opacity:1!important;text-shadow:0 0 9px #6dd9ff}.tile.trap{background:#582f4e;border-color:#a66b95;color:#dba5be}.tile.hit{background:#974768;opacity:1!important}.score{margin-top:9px;min-height:32px}.score strong{font-size:18px}.score small{font-size:8px}.next b{font-size:14px}.controls{padding:9px 12px 8px;margin-top:7px;border-radius:17px}.stake-head{font-size:9px;margin-bottom:4px}.stake-head label:last-child{width:96px}.stake{height:42px}.stake input{font-size:23px}.stake button{width:38px}.setup-row{gap:8px}select{width:96px;font-size:13px;text-align:center}.accept{font-size:10px;line-height:1.3;margin:8px 0}.primary{height:44px;font-size:18px}#status{font-size:10px;line-height:1.3;margin-top:7px}footer{padding:9px 0;font-size:9px}dialog{background:#141f3b}#recover{margin-top:7px;padding:9px}@media(max-width:360px){.brand{font-size:22px}.wallet strong{font-size:18px}header button{width:32px}.scene{padding-left:8px;padding-right:8px}.floor-row{gap:4px}.score strong{font-size:16px}.floor-value{font-size:9px}.next b{font-size:13px}.controls{padding-left:10px;padding-right:10px}.stake input{font-size:21px}}@media(max-height:620px){header{height:44px}.floor-row,.tile{height:20px}.floor-row.current,.current .tile{height:30px}.score{margin-top:7px}.board-caption{margin-top:5px}.controls{padding-top:7px}.accept{margin:6px 0}footer{padding:7px 0}}

.floor-row,.tile{height:21px}.floor-row.current,.current .tile{height:32px}@media(max-height:620px){#board{gap:2px}.floor-row,.tile{height:16px}.floor-row.current,.current .tile{height:30px}.floor-number,.floor-value{font-size:9px}}
