:root{--gray:#c3c3c3;--dark-gray:gray;--navy:#0000c3;--teal:teal;--black:#000;--white:#fff;--font:"MS Sans Serif", "Microsoft Sans Serif", Tahoma, Geneva, sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--teal);color:var(--black);font-family:var(--font);-webkit-font-smoothing:none;-moz-osx-font-smoothing:unset;font-size:12px;overflow:hidden}button,input,select{font-family:inherit;font-size:inherit}.desktop{height:100%;padding:8px;display:flex}.win{background:var(--gray);border:1px solid var(--black);box-shadow:inset 1px 1px 0 var(--white), inset -1px -1px 0 var(--dark-gray);flex-direction:column;flex:1;min-width:0;min-height:0;padding:3px;display:flex}.win-title{background:var(--navy);border:1px solid var(--black);color:var(--white);-webkit-user-select:none;user-select:none;align-items:stretch;height:20px;font-weight:700;display:flex}.win-title-text{white-space:nowrap;flex:1;justify-content:center;align-items:center;display:flex;overflow:hidden}.win-box{background:var(--gray);border-left:1px solid var(--black);border-right:1px solid var(--black);color:var(--black);justify-content:center;align-items:center;width:20px;font-size:10px;display:flex}.win-box.control:before{background:var(--white);border:1px solid var(--black);box-shadow:1px 1px 0 var(--dark-gray);content:"";width:12px;height:4px;display:block}.win-box.arrows{box-shadow:inset 1px 1px 0 var(--white), inset -1px -1px 0 var(--dark-gray);border-right:none}.win-menu{background:var(--white);border:1px solid var(--black);-webkit-user-select:none;user-select:none;z-index:20;border-top:none;gap:2px;height:21px;padding:0 4px;display:flex;position:relative}.win-menu-item{position:relative}.win-menu-button{cursor:default;background:0 0;border:none;height:100%;padding:0 7px;font-weight:700}.win-menu-button.open,.win-menu-button:hover:not(:disabled){background:var(--navy);color:var(--white)}.win-menu-button:disabled{color:var(--dark-gray);text-shadow:1px 1px 0 var(--white)}.win-menu-button.right{margin-left:auto}.win-menu-spacer{flex:1}.win-dropdown{background:var(--white);border:1px solid var(--black);box-shadow:2px 2px 0 var(--black);min-width:190px;padding:2px 0;position:absolute;top:100%;left:0}.win-dropdown.align-right{left:auto;right:0}.win-dropdown button{text-align:left;background:0 0;border:none;justify-content:space-between;width:100%;padding:3px 18px;font-weight:700;display:flex}.win-dropdown button:hover:not(:disabled){background:var(--navy);color:var(--white)}.win-dropdown button:disabled{color:var(--dark-gray)}.win-dropdown hr{border:none;border-top:1px solid var(--black);margin:2px 0}.win-body{border:1px solid var(--black);border-top:none;flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}u.key{text-decoration:underline}.btn{background:var(--gray);border:1px solid var(--black);box-shadow:inset 2px 2px 0 var(--white), inset -2px -2px 0 var(--dark-gray);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px;min-width:60px;min-height:23px;padding:3px 10px;font-weight:700}.btn:active:not(:disabled),.btn.pressed{box-shadow:inset 2px 2px 0 var(--dark-gray), inset -1px -1px 0 var(--white);padding:4px 9px 2px 11px}.btn:focus-visible{outline:1px dotted var(--black);outline-offset:-5px}.btn:disabled{color:var(--dark-gray);cursor:default;text-shadow:1px 1px 0 var(--white)}.btn.small{min-width:22px;min-height:19px;padding:0 4px}.btn.small:active:not(:disabled),.btn.small.pressed{padding:1px 3px 0 5px}.btn.fire{min-width:110px;font-size:15px}.field{background:var(--white);border:1px solid var(--black);box-shadow:inset 1px 1px 0 var(--dark-gray);min-height:22px;padding:2px 4px}.field:disabled{background:var(--gray);color:var(--dark-gray)}.field:focus{outline:1px dotted var(--black)}.radio,.check{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;display:inline-flex}.radio input,.check input{accent-color:var(--black);margin:0}.group{border:1px solid var(--dark-gray);box-shadow:1px 1px 0 var(--white);min-width:0;margin:0;padding:10px 8px 8px}.group>legend{padding:0 4px;font-weight:700}.row{align-items:center;gap:6px;display:flex}.stack{flex-direction:column;gap:6px;display:flex}.muted{color:#404040}.table-wrap{background:var(--white);border:1px solid var(--black);box-shadow:inset 1px 1px 0 var(--dark-gray);overflow:auto}.table{border-collapse:collapse;width:100%}.table th{background:var(--gray);border-bottom:1px solid var(--black);border-right:1px solid var(--dark-gray);text-align:left;white-space:nowrap;padding:2px 6px;font-weight:700;position:sticky;top:0}.table td{white-space:nowrap;padding:2px 6px}.table td.num,.table th.num{text-align:right}.table tr.me td{background:var(--navy);color:var(--white)}.table tbody tr:hover:not(.me) td{background:#e8e8e8}.table .empty{color:var(--dark-gray);text-align:center;padding:12px}.overlay{z-index:100;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.overlay.dim{background:#00000040}.dialog{background:var(--gray);border:1px solid var(--black);box-shadow:inset 1px 1px 0 var(--white), inset -1px -1px 0 var(--dark-gray), 3px 3px 0 #00000080;flex-direction:column;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);padding:3px;display:flex}.dialog-body{border:1px solid var(--black);border-top:none;padding:14px;overflow:auto}.dialog-actions{justify-content:center;gap:8px;margin-top:14px;display:flex}.toast{z-index:200;position:fixed;top:44px;left:50%;transform:translate(-50%)}.toast .dialog-body{align-items:center;gap:10px;padding:10px 14px;display:flex}.toast-icon{background:var(--white);border:2px solid var(--black);border-radius:50%;flex:none;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;font-weight:700;display:flex}.lobby{grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);gap:10px;min-height:0;padding:10px;display:grid}.lobby-hero{border:1px solid var(--black);background:#0ff;grid-column:1/-1;align-items:center;gap:16px;padding:10px 16px;display:flex}.lobby-hero h1{letter-spacing:1px;text-shadow:2px 2px 0 var(--white);margin:0;font-size:28px}.lobby-hero p{margin:2px 0 0}.lobby-col{flex-direction:column;gap:10px;min-width:0;min-height:0;display:flex}.lobby .table-wrap{max-height:360px}.status-dot{border:1px solid var(--black);border-radius:50%;width:9px;height:9px;margin-right:4px;display:inline-block}.room{flex:1;grid-template-columns:minmax(0,1fr) 270px;gap:6px;min-height:0;padding:6px;display:grid}.stage{flex-direction:column;gap:6px;min-width:0;min-height:0;display:flex}.viewport{background:var(--black);border:1px solid var(--black);flex:1;justify-content:center;align-items:center;min-height:200px;display:flex;overflow:hidden}.viewport canvas{cursor:crosshair;image-rendering:pixelated;touch-action:none;display:block}.fire-panel{flex-direction:column;gap:6px;display:flex}.fire-row{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.fire-title{background:var(--navy);color:var(--white);padding:2px 8px;font-weight:700}.swatch{border:1px solid var(--black);flex:none;width:46px;height:23px;display:inline-block}.swatch.small{width:14px;height:12px}.spinner{align-items:center;gap:3px;display:flex}.spinner label{text-align:right;min-width:56px;margin-right:3px;font-weight:700}.spinner .field{text-align:right;width:64px}.steps{flex-direction:column;gap:1px;display:flex}.weapons{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:4px;display:grid}.weapon{text-align:left;justify-content:flex-start;align-items:center;gap:4px;min-width:0;padding:2px 6px;font-size:11px;display:flex}.weapon .k{background:var(--white);border:1px solid var(--dark-gray);padding:0 3px;font-size:10px}.weapon .n{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.weapon .a{font-size:10px}.weapon.pressed{background:#e0e0e0}.side{flex-direction:column;gap:6px;min-height:0;display:flex}.players{flex-direction:column;gap:3px;display:flex}.player{background:var(--white);border:1px solid var(--black);grid-template-columns:14px 1fr auto;align-items:center;gap:2px 6px;min-height:34px;padding:3px 6px;display:grid}.player.empty{border-style:dashed;border-color:var(--dark-gray);color:var(--dark-gray);background:0 0}.player.turn{outline:2px solid var(--navy);outline-offset:-1px}.player .name{text-overflow:ellipsis;white-space:nowrap;font-weight:700;overflow:hidden}.player .meta{grid-column:2/-1;font-size:10px}.player.dead .name{color:var(--dark-gray);text-decoration:line-through}.hpbar{background:var(--white);border:1px solid var(--black);width:60px;height:6px}.hpbar>div{background:#00c000;height:100%}.tabs{gap:2px;margin-bottom:-1px;padding-left:4px;display:flex;position:relative}.tab{background:var(--gray);border:1px solid var(--black);box-shadow:inset 1px 1px 0 var(--white);cursor:pointer;border-bottom:none;border-radius:4px 4px 0 0;padding:3px 10px;font-weight:700}.tab.active{background:var(--white);padding-bottom:4px}.tab-body{background:var(--white);border:1px solid var(--black);flex-direction:column;flex:1;min-height:160px;display:flex}.chat-log{word-break:break-word;flex:1;min-height:0;padding:4px 6px;overflow-y:auto}.chat-log p{margin:0 0 3px}.chat-log .system{color:var(--navy);font-style:italic}.chat-form{border-top:1px solid var(--black);gap:4px;padding:4px;display:flex}.chat-form .field{flex:1;min-width:0}.tab-body .table-wrap{box-shadow:none;border:none;flex:1;min-height:0}.help{max-width:620px;line-height:1.5}.help h3{margin:10px 0 4px}.help kbd{background:var(--white);border:1px solid var(--black);box-shadow:1px 1px 0 var(--dark-gray);border-radius:2px;padding:0 4px;font-family:inherit;font-size:11px;font-weight:700}.help kbd+kbd{margin-left:3px}.shortcuts td:first-child{white-space:nowrap}.winner{text-align:center;margin-bottom:10px;font-size:20px;font-weight:700}.row.wrap{flex-wrap:wrap}.settings{width:min(480px,100vw - 70px)}.settings-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px 14px;display:grid}.setting{flex-direction:column;gap:2px;display:flex}.setting label{font-weight:700}.weapon-checks{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:4px 10px;display:grid}.rules-summary{background:var(--white);border:1px dashed var(--dark-gray);cursor:pointer;text-align:left;padding:3px 6px}.rules-summary:hover{border-color:var(--navy)}.move-controls{align-items:center;gap:3px;display:flex}.btn.move{touch-action:none;min-width:28px;min-height:23px}.fuel{background:var(--white);border:1px solid var(--black);width:86px;height:18px;position:relative}.fuel>div{height:100%}.fuel>span{text-align:center;text-shadow:1px 0 0 var(--white), -1px 0 0 var(--white), 0 1px 0 var(--white), 0 -1px 0 var(--white);font-size:10px;font-weight:700;line-height:16px;position:absolute;inset:0}.touch-controls{touch-action:manipulation;-webkit-user-select:none;user-select:none;flex-direction:column;gap:6px;display:none}.touch-status{background:var(--navy);color:var(--white);text-align:center;padding:3px 8px;font-size:13px;font-weight:700}.touch-status.urgent{background:#c00000}.touch-row{flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;display:flex}.touch-dial{background:var(--white);border:1px solid var(--black);align-items:center;gap:3px;padding:2px;display:flex}.touch-label{writing-mode:vertical-rl;font-size:10px;font-weight:700;transform:rotate(180deg)}.touch-value{text-align:center;min-width:46px;font-size:14px}.btn.touch{touch-action:none;min-width:42px;min-height:44px;padding:0;font-size:20px}.touch-controls .btn.move{min-width:44px;min-height:44px;font-size:18px}.touch-controls .fuel{width:70px;height:26px}.touch-controls .fuel>span{line-height:24px}.touch-weapon{min-width:0;min-height:44px;font-size:14px}.touch-fire{flex:1;min-width:120px;min-height:48px;font-size:20px}@media (width<=900px),(pointer:coarse){body{overflow:auto}.desktop{height:auto;min-height:100%;padding:0}.room,.lobby{grid-template-columns:1fr}.lobby{padding:6px}.lobby-hero h1{font-size:22px}.viewport{aspect-ratio:2;flex:none;width:100%;min-height:0}.fire-panel{display:none}.touch-controls{display:flex}.field,select.field{font-size:16px}.tab-body{max-height:50vh}}@media (orientation:landscape) and (height<=560px){.win-title{display:none}.room{padding:3px}.stage{grid-template-columns:minmax(0,1fr) 200px;align-items:start;gap:4px;display:grid}.viewport{aspect-ratio:auto;height:calc(100dvh - 30px)}.touch-controls{gap:4px;max-height:calc(100dvh - 30px);overflow-y:auto}.touch-row{flex-flow:column;align-items:stretch;gap:4px}.touch-dial,.touch-controls .move-controls{justify-content:space-between}.btn.touch,.touch-controls .btn.move,.touch-weapon{min-height:38px}.touch-fire{min-width:0;min-height:52px}}
