*{box-sizing:border-box;margin:0;padding:0}
body{background:#0e120d;color:#d9dccb;font:13px/1.4 system-ui,sans-serif;height:100vh;display:grid;grid-template-rows:auto 1fr 120px;overflow:hidden}
header{display:flex;gap:8px;align-items:center;padding:8px 12px;background:#171d14;border-bottom:1px solid #37422c;flex-wrap:wrap}
.brand{font:700 16px ui-monospace,monospace;letter-spacing:3px;color:#d8b979}.op{letter-spacing:2px;color:#9aa583}
.chip{border:1px solid #46533a;border-radius:4px;padding:3px 9px;font-family:ui-monospace,monospace}.grow{flex:1}
button{background:#232c1d;color:#e5e8d6;border:1px solid #536240;border-radius:4px;padding:4px 9px;font:inherit;cursor:pointer}
button:hover{border-color:#c4a45f}button.on{background:#c4a45f;color:#15180f;border-color:#c4a45f}button.go{background:#4d7a3a;border-color:#7bb35f;font-weight:700}
button:disabled{opacity:.4;cursor:default}header a{color:#8d9877;font-size:11px}
main{display:grid;grid-template-columns:290px 1fr 330px;min-height:0}
aside{overflow:auto;padding:8px;background:#131810;border-right:1px solid #2d3625}#right{border-left:1px solid #2d3625;border-right:0}
h3{font-size:11px;letter-spacing:2px;color:#9aa583;margin:6px 0}
.row{border:1px solid #2f3a26;border-radius:5px;padding:6px 8px;margin-bottom:5px;cursor:pointer;background:#181f13}
.row.sel{border-color:#e0bd6c;background:#242a17}.row.dead{opacity:.35}.row.urgent{border-left:4px solid #e4572e}
.row .l{display:flex;justify-content:space-between;gap:6px}.dim{color:#8d9877;font-size:12px}
.row button{margin:4px 4px 0 0;padding:1px 7px;font-size:11px}
.sol{display:flex;justify-content:space-between;width:100%;text-align:left;margin-bottom:4px}.sol.ok{border-color:#7bb35f;background:#23351b}
#mapwrap{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;background:#0a0d09}
#map{display:block;touch-action:none;cursor:crosshair}
#toast{position:absolute;top:10px;left:50%;transform:translateX(-50%);background:#6d2b1c;border:1px solid #e4572e;border-radius:5px;padding:6px 14px;display:none}
footer{overflow:auto;border-top:1px solid #37422c;background:#11160e;padding:6px 12px;font:12px ui-monospace,monospace}
.ev.impact{color:#ff8566}.ev.kill{color:#9fe07f}.ev.contact,.ev.warn{color:#e8c872}.ev.intel{color:#8fc7e8}.ev.miss{color:#a7ab98}
#toast.good{background:#1d3a17;border-color:#7bb35f}
.modal{position:fixed;inset:0;background:#080a07e8;display:flex;align-items:center;justify-content:center;z-index:5;overflow:auto}
.modal.hidden{display:none}.card{background:#171d13;border:1px solid #55633f;border-radius:8px;max-width:760px;width:94%;max-height:94vh;overflow:auto;padding:22px}
.card h1{color:#d8b979;margin-bottom:8px}.card p{margin-bottom:9px}.diffs label{display:block;margin:4px 0}.fine{font-size:11px;color:#8d9877;margin-top:10px}
table{width:100%;border-collapse:collapse;margin:10px 0;font-size:12px}td,th{border-bottom:1px solid #303a27;padding:2px 6px;text-align:left}
@media(max-width:1000px){body{height:auto;overflow:auto;display:block}main{display:flex;flex-direction:column}#mapwrap{order:-1}}
#coach{position:absolute;left:12px;bottom:12px;width:330px;max-height:calc(100% - 24px);overflow:auto;background:#1b2216f5;border:1px solid #e0bd6c;border-left-width:4px;border-radius:7px;padding:10px 12px;z-index:3;box-shadow:0 8px 24px #000a}
#coach .ch{display:flex;justify-content:space-between;color:#e0bd6c;letter-spacing:3px;margin-bottom:6px}#coach .ch button{padding:0 8px}
#coach .steps{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}#coach .steps span{border:1px solid #46533a;border-radius:10px;padding:0 7px;font-size:11px;color:#8d9877}
#coach .steps span.on{background:#e0bd6c;color:#15180f;border-color:#e0bd6c;font-weight:700}
#coach h4{font-size:15px;margin-bottom:4px}#coach p{margin-bottom:8px}#coach .held{color:#e8c872;font-size:12px}
#coach .cb{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}#coach label{font-size:11px;color:#8d9877;display:block}
.coach-hl{outline:3px solid #ffe08a;outline-offset:1px;animation:chl 1s ease-in-out infinite alternate;opacity:1!important}
@keyframes chl{to{outline-color:#ff8a3d}}
@media(prefers-reduced-motion:reduce){.coach-hl{animation:none}}
@media(max-width:1000px){#coach{position:static;width:100%}#mapwrap{flex-direction:column}}
header a.guide{font-size:13px;color:#e0bd6c;border:1px solid #536240;border-radius:4px;padding:4px 9px;text-decoration:none}
.roe{margin:5px 0 2px;font-weight:700;font-size:12px}.roe.yes{color:#9fe07f}.roe.no{color:#ffb454}
.row.civil{border-left:4px solid #6fe3d0}.ev.civil{color:#6fe3d0}.ev.civilloss{color:#fff;background:#8a2415;font-weight:700}#vol{width:80px;accent-color:#c4a45f}
.sol.over{border-color:#d38b2a;border-style:dashed;background:#33260f;color:#ffd08a}
.row.confirm{border:2px solid #ffb454;background:#33220f}.row.confirm button{padding:4px 10px;font-size:12px}
.row.judge{border-color:#8f7ad0}.row.held{border:2px solid #ffe08a;background:#33300f}.code{font:700 20px ui-monospace,monospace;letter-spacing:4px;color:#ffe08a}
.row.shot{cursor:default}.row.shot button{padding:4px 12px;font-size:12px}.seat{display:block;margin:8px 0}.card a{color:#e0bd6c}.ev.judge{color:#c3b2ff}
.join input{font:700 24px ui-monospace,monospace;letter-spacing:6px;text-transform:uppercase;width:11ch;padding:6px 10px;margin:6px 8px 6px 0;background:#0e120d;color:#ffe08a;border:1px solid #55633f;border-radius:4px}
button.wide{display:block;width:100%;margin:6px 0;padding:8px}.fl{margin:7px 0 3px;font-size:11px;opacity:.75}.row .fl~button{margin:0 3px 3px 0}
#aar{position:fixed;inset:0;z-index:50;background:#12170f;color:#eef0e2;display:flex;flex-direction:column;font-size:13px}
#aar .ah{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 14px;border-bottom:1px solid #3a4530}
#aar .ab{flex:1;display:grid;grid-template-columns:minmax(0,3fr) minmax(360px,2fr);min-height:0}
#aar .replay{display:flex;flex-direction:column;min-height:0;padding:8px;gap:6px}#aar .cvw{flex:1;min-height:200px;overflow:hidden;display:flex;justify-content:center;align-items:flex-start}
#aar .ctl{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#aar .ctl input[type=range]{flex:1;min-width:120px;accent-color:#c4a45f}
#aar .legend{margin-left:auto;font-size:11px;opacity:.8}#aar .legend i{display:inline-block;width:9px;height:9px;margin:0 3px 0 10px}#aar .legend .q{border:1.5px solid #ffd35c}#aar .legend .tr{background:#ff6a4a;border-radius:9px}
#aar .rep{overflow:auto;border-left:1px solid #3a4530;padding:8px 12px}#aar .tabs{display:flex;gap:6px;margin-bottom:6px;flex-wrap:wrap}
#aar section{display:none}#aar section.show{display:block}#aar h3{margin:12px 0 6px}
#aar .stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:6px}#aar .stat{border:1px solid #3a4530;border-radius:6px;padding:7px}#aar .stat b{display:block;font-size:19px;color:#e0bd6c}#aar .stat span{font-size:11px;opacity:.8}
#aar table{width:100%;border-collapse:collapse}#aar td,#aar th{border-bottom:1px solid #2c3524;padding:4px 6px;text-align:left;vertical-align:top}
#aar .dec{font-size:11px}#aar .dec tbody tr{cursor:pointer}#aar tr.hot{background:#33220f}#aar tr.now{outline:1.5px solid #ffe08a}
#aar .mo{border:1px solid #3a4530;border-left:4px solid #c4a45f;border-radius:5px;padding:7px 9px;margin:6px 0;cursor:pointer}#aar .mo p{margin:4px 0 0}#aar .mo .ask{font-style:italic;color:#e0bd6c}
@media(max-width:1000px){#aar{overflow:auto}#aar .ab{display:block;flex:none}#aar .cvw{height:60vw;flex:none}#aar .rep{border:0}}
@media print{body.reporting{overflow:visible;height:auto;background:#fff}body.reporting>*:not(#aar){display:none!important}#aar{position:static;background:#fff;color:#111;display:block}#aar button,#aar .ctl{display:none}#aar .ab{display:block}#aar .cvw{display:block;height:auto}#aar canvas{max-width:100%;height:auto!important}#aar .rep{overflow:visible;border:0;padding:0}#aar section{display:block}#aar .stat b,#aar .mo .ask{color:#6b5210}#aar tr.hot{background:#f6e7c8}#aar tr[hidden]{display:table-row}}
.setline{margin:10px 0 0}.setline button{margin-left:8px}
#custom{position:fixed;inset:0;z-index:40;background:#12170f;color:#eef0e2;display:flex;flex-direction:column;font-size:13px}
#custom .ah{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 14px;border-bottom:1px solid #3a4530;flex-wrap:wrap}
#custom nav{display:flex;gap:6px;flex-wrap:wrap;padding:8px 14px;border-bottom:1px solid #2c3524}
#custom .cb2{flex:1;overflow:auto;padding:12px 14px 60px;width:100%;max-width:1100px;margin:0 auto}
#custom p{margin:0 0 9px}#custom h4{margin:12px 0 6px;font-size:15px;color:#e0bd6c}#custom h5{margin:10px 0 4px;font-size:12px;color:#9aa583}
#custom .cc{border:1px solid #3a4530;border-radius:6px;padding:10px 12px;margin-bottom:10px;background:#181f13}
#custom .ct{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px;color:#e0bd6c}#custom .ct span{display:flex;gap:6px;flex-wrap:wrap}
#custom .cg{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px 12px;align-items:end}
#custom .cf{display:flex;flex-direction:column;gap:2px;min-width:0}#custom .cf>span:first-child{font-size:11px;color:#9aa583}
#custom .ck{flex-direction:row;align-items:center;gap:7px;padding-bottom:5px}#custom .ck>span:first-of-type{font-size:12px;color:#d9dccb}
#custom input,#custom select{background:#0e120d;color:#ffe9b0;border:1px solid #55633f;border-radius:4px;padding:4px 6px;font:inherit;width:100%;min-width:0}
#custom input[type=checkbox]{width:auto;accent-color:#c4a45f}
#custom .two{display:flex;gap:5px;align-items:center}#custom .two i{font-size:11px;color:#9aa583;font-style:normal}
#custom .lv{display:grid;grid-template-columns:minmax(110px,1.4fr) repeat(3,minmax(60px,1fr));gap:6px;align-items:center;margin-top:6px}
#custom .lv span{font-size:11px;color:#9aa583}#custom .lv b{font-size:12px}
#custom .saved{display:flex;gap:8px;align-items:center;margin:4px 0}#custom .saved span{flex:1}
#custom .cerr{margin:8px 14px 0;border:1px solid #e4572e;background:#3a1a10;border-radius:5px;padding:8px 12px;max-height:30vh;overflow:auto}#custom .cerr ul{margin-left:18px}
#custom .cnote{margin:8px 14px 0;border:1px solid #7bb35f;background:#1d2d17;border-radius:5px;padding:7px 12px}
@media(max-width:700px){#custom .cg{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
select.lang{background:#222b1c;color:#eef0e2;border:1px solid #536240;border-radius:4px;padding:4px 6px;font:inherit;font-size:13px}
.langline{display:flex;gap:10px;align-items:center;justify-content:flex-end}.langline .guide{font-size:13px}
/* Arabic: the page reads right to left; the map keeps its compass (west on the left) */
[dir=rtl] .brand,[dir=rtl] .op,[dir=rtl] h3,[dir=rtl] #coach .ch,[dir=rtl] *:lang(ar){letter-spacing:0}
[dir=rtl] .brand{direction:ltr}
[dir=rtl] aside{border-right:0;border-left:1px solid #2d3625}[dir=rtl] #right{border-left:0;border-right:1px solid #2d3625}
[dir=rtl] .row.urgent,[dir=rtl] .row.civil,[dir=rtl] #aar .mo{border-left-width:1px;border-right-width:4px;border-right-style:solid}
[dir=rtl] .row.urgent{border-right-color:#e4572e}[dir=rtl] .row.civil{border-right-color:#6fe3d0}[dir=rtl] #aar .mo{border-right-color:#c4a45f}
[dir=rtl] .sol,[dir=rtl] td,[dir=rtl] th,[dir=rtl] #aar td,[dir=rtl] #aar th{text-align:right}
[dir=rtl] #aar .legend{margin-left:0;margin-right:auto}[dir=rtl] #aar .rep{border-left:0;border-right:1px solid #3a4530}
[dir=rtl] .setline button{margin-left:0;margin-right:8px}[dir=rtl] #custom .cerr ul{margin-left:0;margin-right:18px}
[dir=rtl] #mapwrap,[dir=rtl] #aar .cvw{direction:ltr}[dir=rtl] #coach,[dir=rtl] #toast{direction:rtl}
[dir=rtl] .code,[dir=rtl] .join input,[dir=rtl] input[type=number],[dir=rtl] .chip bdi{direction:ltr}
/* Arabic: monospace faces break the joined letters apart */
[dir=rtl] .ah .brand{direction:rtl;font-family:system-ui,sans-serif;margin-inline-end:10px}
[dir=rtl] footer,[dir=rtl] .chip{font-family:system-ui,"Segoe UI",Tahoma,sans-serif}[dir=rtl] footer{font-size:13px}
#custom .cf.wide{display:block;margin-bottom:10px}#custom textarea{width:100%;font:inherit;background:#0e120d;color:#ffe9a8;border:1px solid #55633f;border-radius:4px;padding:6px 8px;resize:vertical}
.setline select{max-width:100%;margin:0 4px}.setline button{margin-top:4px}.row.brief{cursor:default}.row.brief .dim{white-space:normal;opacity:1}
#custom .cf.wide{margin:10px 0 0}
.fullname{margin:10px 0 0;font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.75}
.fullname+h1{margin-top:4px}
