-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1201 lines (1146 loc) · 71.9 KB
/
index.html
File metadata and controls
1201 lines (1146 loc) · 71.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>STRAIT OF CONSEQUENCES // AI WARGAME</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://unpkg.com/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #060c12;
--panel: rgba(6,12,24,0.96);
--border: #1a3a5a;
--blue: #4488cc;
--red: #cc4444;
--green: #44cc88;
--text: #c0d8e8;
--dim: #4a6a7a;
--yellow: #ccaa22;
}
body { background: var(--bg); color: var(--text); font-family: 'Courier New', monospace; overflow: hidden; user-select: none; }
#map {
position: fixed; top: 0; left: 0;
width: calc(100% - 340px);
height: calc(100% - 110px);
z-index: 1;
outline: none; /* suppress focus ring on map div */
}
/* Airstrike crosshair cursor — overrides Leaflet */
#map.airstrike-mode .leaflet-container,
#map.airstrike-mode .leaflet-grab,
#map.airstrike-mode { cursor: crosshair !important; }
/* Leaflet attribution minimal */
.leaflet-control-attribution { font-size: 9px !important; opacity: 0.4; }
/* ── BOTTOM ACTION BAR ─────────────────────────────────────── */
#action-bar {
position: fixed; bottom: 0; left: 0;
width: calc(100% - 340px); height: 110px;
background: rgba(4,10,20,0.97);
border-top: 1px solid var(--border);
border-right: 1px solid var(--border);
display: flex; align-items: center;
padding: 0 20px; gap: 8px;
z-index: 60;
transition: opacity 0.2s;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: thin;
}
#action-bar::-webkit-scrollbar { height: 4px; }
#action-bar::-webkit-scrollbar-thumb { background: rgba(68,170,255,0.4); }
#action-bar.hidden { opacity: 0.3; pointer-events: none; }
#action-bar-label {
font-size: 9px; color: var(--dim); letter-spacing: 2px;
writing-mode: vertical-rl; transform: rotate(180deg);
flex-shrink: 0;
}
.action-btn {
display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 4px; padding: 6px 8px;
border: 1px solid var(--border); background: transparent;
cursor: pointer; transition: all 0.15s;
min-width: 84px; height: 82px;
flex-shrink: 0;
font-family: 'Courier New', monospace;
}
.action-btn:hover:not(:disabled) { background: rgba(255,255,255,0.06); border-color: currentColor; }
.action-btn:disabled { opacity: 0.22; cursor: not-allowed; }
.action-btn .btn-icon { font-size: 20px; }
.action-btn .btn-label { font-size: 9px; letter-spacing: 1px; text-align: center; line-height: 1.4; }
.action-btn .btn-cost { font-size: 8px; color: var(--dim); }
.action-btn.blue { color: var(--blue); }
.action-btn.green { color: var(--green); }
.action-btn.yellow { color: var(--yellow); }
.action-btn.purple { color: #aa66ff; }
.action-btn.cyan { color: #44ffee; }
.action-btn.red { color: #ff5566; }
#action-hint { flex:1; text-align:center; font-size:11px; color:var(--dim); letter-spacing:1px; line-height:2; }
/* ── D-PAD ─────────────────────────────────────────────────── */
#dpad { display:none; flex-direction:column; align-items:center; gap:2px; flex-shrink:0; margin-left:6px; }
#map-dpad { display:none !important; }
#dpad-row { display:flex; gap:2px; }
.dpad-btn {
width:32px; height:32px; border:1px solid var(--border); background:transparent;
color:var(--text); font-size:14px; cursor:pointer; display:flex; align-items:center;
justify-content:center; font-family:'Courier New',monospace; transition:all 0.1s;
}
.dpad-btn:hover:not(:disabled) { background:rgba(68,136,204,0.18); border-color:var(--blue); }
.dpad-btn:active { background:rgba(68,136,204,0.35); }
.dpad-btn:disabled { opacity:0.2; cursor:not-allowed; }
#dpad-label { font-size:8px; color:var(--dim); letter-spacing:1px; margin-top:2px; }
/* ── RIGHT PANEL ───────────────────────────────────────────── */
#panel {
position: fixed; right: 0; top: 0;
width: 340px; height: calc(100vh - 110px);
background: var(--panel);
border-left: 2px solid var(--border);
display: flex; flex-direction: column;
z-index: 20;
}
#panel-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#panel-header h1 { font-size: 24px; letter-spacing: 8px; color: var(--blue); text-shadow: 0 0 20px rgba(68,136,204,0.4); }
#panel-header .subtitle { font-size: 12px; color: var(--dim); letter-spacing: 2px; margin-top: 3px; }
#panel-tabs { display: flex; border-bottom: 2px solid var(--border); flex-shrink: 0; }
.panel-tab { flex: 1; padding: 8px 4px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--dim); font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 2px; cursor: pointer; transition: all 0.15s; }
.panel-tab:hover { color: var(--text); }
.panel-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
#panel-exercise { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }
#panel-chat { display: none; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; padding: 0; }
#panel-chat.visible { display: flex; }
#panel-routes { display: none; flex-direction: column; flex: 1; overflow-y: auto; min-height: 0; padding: 12px; gap: 10px; }
#panel-routes.visible { display: flex; }
.mkt-header { font-size: 10px; letter-spacing: 2px; color: var(--dim); margin-bottom: 2px; }
.mkt-price { font-size: 28px; letter-spacing: 2px; color: #ffdd55; font-weight: bold; }
.mkt-sub { font-size: 11px; color: var(--dim); margin-top: 2px; }
.mkt-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; }
.mkt-row { display: flex; gap: 10px; }
.mkt-row .mkt-card { flex: 1; }
.mkt-change.up { color: #ff4444; }
.mkt-change.dn { color: #44cc88; }
.strait-status-bar { background: rgba(255,68,68,0.12); border: 1px solid rgba(255,68,68,0.4); border-radius: 4px; padding: 10px 14px; }
.strait-status-label { font-size: 10px; letter-spacing: 2px; color: var(--dim); }
.strait-status-val { font-size: 15px; color: #ff4444; font-weight: bold; margin-top: 3px; letter-spacing: 1px; }
.mkt-news { font-size: 11px; color: #aabbcc; line-height: 1.6; }
.mkt-news-item { border-left: 2px solid var(--border); padding-left: 8px; margin-bottom: 8px; }
.mkt-news-item a { color: #88ccff; text-decoration: none; }
.mkt-news-item a:hover { text-decoration: underline; }
.mkt-news-date { font-size: 9px; color: var(--dim); letter-spacing: 1px; }
#chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { font-size: 12px; line-height: 1.6; font-family: 'Courier New', monospace; }
.chat-msg-user { color: #88ccff; align-self: flex-end; background: rgba(68,136,204,0.12); border: 1px solid rgba(68,136,204,0.3); padding: 7px 10px; border-radius: 4px; max-width: 90%; }
.chat-msg-ai { color: var(--text); align-self: flex-start; max-width: 100%; }
.chat-msg-ai .chat-source { font-size: 10px; color: var(--dim); letter-spacing: 1px; margin-bottom: 4px; }
.chat-msg-ai .chat-text { color: #c8dce8; }
.chat-msg-ai.streaming .chat-text::after { content: '▌'; animation: blink 0.7s infinite; color: var(--blue); }
@keyframes blink { 50% { opacity: 0; } }
#chat-input-row { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
#chat-input { flex: 1; background: rgba(20,35,55,0.8); border: 1px solid var(--border); color: var(--text); font-family: 'Courier New', monospace; font-size: 12px; padding: 8px 10px; outline: none; resize: none; height: 52px; border-radius: 2px; }
#chat-input:focus { border-color: var(--blue); }
#chat-send { background: none; border: 1px solid var(--blue); color: var(--blue); font-family: 'Courier New', monospace; font-size: 11px; padding: 0 12px; cursor: pointer; letter-spacing: 1px; transition: all 0.15s; white-space: nowrap; }
#chat-send:hover { background: rgba(68,136,204,0.15); }
#chat-send:disabled { opacity: 0.3; cursor: not-allowed; }
#chat-context-count { font-size: 10px; color: var(--dim); padding: 0 12px 6px; letter-spacing: 1px; flex-shrink: 0; }
#turn-bar { padding: 8px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#turn-label { font-size: 13px; color: var(--dim); }
#turn-num { font-size: 18px; color: var(--yellow); font-weight: bold; }
#phase-label { margin-left: auto; font-size: 13px; padding: 3px 8px; border: 1px solid currentColor; letter-spacing: 1px; }
#phase-label.player { color: var(--green); }
#phase-label.ai { color: var(--red); animation: pulse 0.8s infinite; }
#scenario-section { padding: 10px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#scenario-title { font-size: 13px; color: var(--yellow); letter-spacing: 3px; margin-bottom: 5px; }
#scenario-text { font-size: 13px; line-height: 1.6; max-height: 90px; overflow-y: auto; }
#unit-info { padding: 10px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; min-height: 70px; }
#unit-name { font-size: 15px; font-weight: bold; }
#unit-name.blue { color: var(--blue); } #unit-name.red { color: var(--red); } #unit-name.none { color: var(--dim); }
#unit-stats { font-size: 13px; color: var(--dim); margin-top: 4px; line-height: 1.8; }
#move-hint { font-size: 13px; color: var(--green); margin-top: 4px; }
#ai-log { flex:1; overflow-y:auto; padding:10px 16px; display:flex; flex-direction:column; gap:8px; }
.log-entry { border-left: 2px solid var(--border); padding: 7px 10px; font-size: 13px; line-height: 1.65; }
.log-entry.adjudication { border-color: var(--yellow); }
.log-entry.redcell { border-color: var(--red); background: rgba(180,40,40,0.07); }
.log-entry.scenario { border-color: var(--blue); }
.log-entry.system { border-color: var(--dim); }
.log-entry.blue { border-color: var(--blue); }
.log-entry.red { border-color: var(--red); }
.log-entry.victory { border-color: var(--green); background: rgba(68,204,136,0.07); }
#btn-demo { color: var(--yellow); border-color: var(--yellow); }
#btn-demo:hover:not(:disabled) { background: rgba(204,170,34,0.12); }
#btn-demo.running { color: var(--red); border-color: var(--red); animation: pulse 0.8s infinite; }
#demo-progress { font-size: 12px; color: var(--dim); letter-spacing: 2px; text-align: center; display: none; margin-top: 2px; }
.log-source { font-size: 11px; color: var(--dim); letter-spacing: 2px; margin-bottom: 3px; }
.log-text { color: var(--text); }
#controls { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
button.ctrl {
font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 2px;
padding: 10px 12px; border: 1px solid; background: transparent; cursor: pointer; transition: all 0.15s; width: 100%;
}
#btn-end-turn { color: var(--green); border-color: var(--green); }
#btn-end-turn:hover:not(:disabled) { background: rgba(68,204,136,0.12); }
#btn-end-turn:disabled { opacity: 0.3; cursor: not-allowed; }
#btn-new-scenario { color: var(--blue); border-color: var(--blue); }
#btn-new-scenario:hover:not(:disabled) { background: rgba(68,136,204,0.12); }
#btn-new-scenario:disabled { opacity: 0.3; cursor: not-allowed; }
/* HUD */
#hud { position: fixed; left: 12px; top: 12px; font-size: 10px; color: rgba(100,160,200,0.7); z-index: 5; pointer-events: none; line-height: 1.9; letter-spacing: 1px; }
#legend { position: fixed; left: 12px; bottom: 124px; font-size: 10px; z-index: 5; pointer-events: none; line-height: 2; }
#coord-readout { font-size: 10px; color: #44cc88; margin-top: 4px; letter-spacing: 1px; display: none; cursor: pointer; pointer-events: all; }
#coord-readout:hover { color: #fff; }
#coord-copied { font-size: 9px; color: #44cc88; display: none; margin-top: 2px; }
/* ── TRANSIT COUNTER ───────────────────────────────────── */
#transit-counter {
position: fixed; left: 12px; bottom: 240px; z-index: 5;
background: rgba(4,10,20,0.88); border: 1px solid var(--border);
padding: 6px 10px; cursor: pointer; font-size: 10px;
letter-spacing: 1px; color: var(--dim); transition: all 0.2s;
}
#transit-counter:hover { border-color: var(--blue); color: var(--text); }
#transit-num { font-size: 18px; color: #44ffcc; font-weight: bold; display: block; line-height: 1.2; }
#transit-log-panel {
display: none; position: fixed; left: 12px; bottom: 220px;
width: 310px; background: rgba(4,10,20,0.97); border: 1px solid var(--border);
z-index: 30; font-size: 12px; max-height: 360px; overflow-y: auto;
}
#transit-log-panel.visible { display: block; }
.transit-row { padding: 8px 12px; border-bottom: 1px solid rgba(30,50,70,0.6); display: flex; gap: 10px; align-items: center; }
.transit-row:last-child { border-bottom: none; }
.tr-flag { font-size: 16px; flex-shrink: 0; }
.tr-dir-IN { color: #44cc88; font-size: 11px; letter-spacing: 1px; flex-shrink: 0; }
.tr-dir-OUT { color: #44aaff; font-size: 11px; letter-spacing: 1px; flex-shrink: 0; }
.tr-name { flex: 1; color: var(--text); font-size: 12px; letter-spacing: 0.5px; }
.tr-time { color: var(--dim); font-size: 11px; flex-shrink: 0; }
/* VLM tools — stacked right-edge column, top to bottom: AIR INTEL → SURVEY → INTEL → SENTINEL */
#airport-intel-btn {
position: fixed; top: 80px; right: 360px; z-index: 30; min-width: 150px;
background: rgba(6,12,24,0.95); border: 1px solid #44ffcc; color: #44ffcc;
font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer; text-align: left;
}
#airport-intel-btn:hover { background: rgba(68,255,204,0.12); }
.airport-intel-tip { background: rgba(6,12,24,0.95); border: 1px solid #44ffcc; color: #cce8ff; font-family: monospace; font-size: 12px; }
#survey-btn {
position: fixed; top: 116px; right: 360px; z-index: 30; min-width: 150px;
background: rgba(6,12,24,0.95); border: 1px solid #ffaa44; color: #ffaa44;
font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer; text-align: left;
}
#survey-btn:hover { background: rgba(255,170,68,0.15); }
#survey-btn.loading { opacity: 0.5; cursor: wait; }
#intel-btn {
position: fixed; top: 152px; right: 360px; z-index: 30; min-width: 150px;
background: rgba(6,12,24,0.95); border: 1px solid #aa66ff; color: #aa66ff;
font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer; text-align: left;
}
#intel-btn:hover { background: rgba(170,102,255,0.15); }
#intel-btn.loading { opacity: 0.5; cursor: wait; }
/* Full-screen intel report viewer — sits ABOVE collapsable bars (z-index 70 > action-bar 60) */
#intel-report-overlay {
display: none; position: fixed;
top: 0; left: 0; right: 340px; bottom: 110px;
background: rgba(4,6,14,0.97); z-index: 70;
flex-direction: column; font-family: 'Courier New', monospace;
border-right: 1px solid #aa66ff;
}
body.action-collapsed #intel-report-overlay { bottom: 0; }
body.panel-collapsed #intel-report-overlay { right: 0; }
/* Slide every bottom-anchored element down with the action bar */
/* exercise-overlay is now a centered popup, so action/panel collapses don't reposition it */
body.action-collapsed #legend { bottom: 14px; }
body.action-collapsed #transit-counter { bottom: 130px; }
body.action-collapsed #transit-log-panel { bottom: 110px; }
/* ── COLLAPSE TOGGLES ─────────────────────────────────────── */
#toggle-action-bar {
position: fixed; bottom: 110px; right: 348px; z-index: 65;
width: 28px; height: 22px; border: 1px solid var(--border);
border-bottom: none; background: rgba(4,10,20,0.97); color: var(--blue);
font-family: 'Courier New', monospace; font-size: 14px; line-height: 1;
cursor: pointer; transition: bottom 0.25s ease, right 0.25s ease;
}
#toggle-action-bar:hover { color: var(--text); border-color: var(--blue); }
body.action-collapsed #action-bar { transform: translateY(120px); }
body.action-collapsed #toggle-action-bar { bottom: 0; }
body.panel-collapsed #toggle-action-bar { right: 8px; }
#action-bar { transition: transform 0.25s ease; }
#toggle-panel {
position: fixed; top: 12px; right: 348px; z-index: 65;
width: 22px; height: 28px; border: 1px solid var(--border);
border-right: none; background: rgba(4,10,20,0.97); color: var(--blue);
font-family: 'Courier New', monospace; font-size: 14px; line-height: 1;
cursor: pointer; transition: right 0.25s ease;
}
#toggle-panel:hover { color: var(--text); border-color: var(--blue); }
body.panel-collapsed #panel { transform: translateX(340px); }
body.panel-collapsed #toggle-panel { right: 8px; transform: rotate(180deg); }
body.panel-collapsed #map { width: 100%; }
body.panel-collapsed #action-bar { width: 100%; }
#panel { transition: transform 0.25s ease; }
#map, #action-bar { transition: width 0.25s ease; }
/* Right-rail action buttons slide right with the panel so they sit at the new map edge */
#intel-btn, #survey-btn, #airport-intel-btn, #sentinel-btn, #btn-present, #btn-tour,
#paint-toolbar, #paint-coords, #map-dpad, #transit-counter { transition: transform 0.25s ease; }
body.panel-collapsed #intel-btn,
body.panel-collapsed #survey-btn,
body.panel-collapsed #airport-intel-btn,
body.panel-collapsed #sentinel-btn,
body.panel-collapsed #btn-present,
body.panel-collapsed #btn-tour,
body.panel-collapsed #paint-toolbar,
body.panel-collapsed #paint-coords,
body.panel-collapsed #map-dpad { transform: translateX(340px); }
/* Black "bar" residue under collapsed action-bar — kill action-bar's borders so nothing peeks through */
body.action-collapsed #action-bar { border-top: none; border-right: none; }
/* Map extends to full screen height when bottom action bar is collapsed */
#map, #action-bar { transition: height 0.25s ease, width 0.25s ease, transform 0.25s ease; }
body.action-collapsed #map { height: 100%; }
/* AIS / vessel popups — cap height so they don't run off-screen */
.leaflet-popup-content { max-height: 60vh; overflow-y: auto; max-width: 360px !important; }
.ais-popup .leaflet-popup-content-wrapper { max-height: 60vh; }
/* Ship-cat-sidebar (STRIKE CONSEQUENCES) — shorter when exercise overlay covers bottom */
body.exercise-active #ship-cat-sidebar { max-height: 45vh !important; top: 70px !important; }
/* Wider sidebar while an exercise is active (more room for indicators + decision detail) */
body.exercise-active #panel { width: 480px; }
body.exercise-active #map { width: calc(100% - 480px); }
body.exercise-active #action-bar { width: calc(100% - 480px); }
body.exercise-active #intel-report-overlay { right: 480px; }
body.exercise-active #toggle-panel { right: 488px; }
body.exercise-active #toggle-action-bar { right: 488px; }
/* Right-rail action buttons sit at the new wider panel edge */
body.exercise-active #intel-btn,
body.exercise-active #survey-btn,
body.exercise-active #airport-intel-btn,
body.exercise-active #sentinel-btn,
body.exercise-active #btn-present,
body.exercise-active #btn-tour,
body.exercise-active #paint-toolbar,
body.exercise-active #paint-coords,
body.exercise-active #map-dpad { transform: translateX(-140px); }
body.exercise-active.panel-collapsed #panel { transform: translateX(480px); }
/* When action bar collapses, the right panel extends to the full bottom */
body.action-collapsed #panel { height: 100vh; }
#panel { transition: transform 0.25s ease, height 0.25s ease; }
body.exercise-active.panel-collapsed #map { width: 100%; }
body.exercise-active.panel-collapsed #action-bar { width: 100%; }
body.exercise-active.panel-collapsed #intel-report-overlay { right: 0; }
/* Close ✕ for transit-log-panel */
#transit-log-close {
position: absolute; top: 4px; right: 6px; background: none; border: none;
color: var(--dim); font-family: 'Courier New', monospace; font-size: 16px;
cursor: pointer; padding: 2px 6px; line-height: 1;
}
#transit-log-close:hover { color: var(--text); }
/* Make ship-cat-sidebar close button bigger and more visible */
#ship-cat-sidebar-close { font-size: 16px !important; padding: 4px 12px !important; font-weight: bold; }
#intel-report-overlay.visible { display: flex; }
#intel-report-header {
flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;
padding: 14px 24px; border-bottom: 1px solid #aa66ff;
color: #aa66ff; font-size: 12px; letter-spacing: 3px;
cursor: move; user-select: none;
}
#intel-report-header::before { content: '⋮⋮ DRAG '; color: #aa66ff88; margin-right: 6px; font-size: 10px; }
/* When dragged, switch from anchored layout to free-floating */
#intel-report-overlay.dragged {
width: 720px; height: 480px; right: auto; bottom: auto; resize: both; overflow: auto;
}
#intel-report-close {
background: none; border: 1px solid #aa66ff; color: #aa66ff;
font-family: 'Courier New', monospace; font-size: 11px;
padding: 5px 16px; cursor: pointer; letter-spacing: 2px;
}
#intel-report-close:hover { background: rgba(170,102,255,0.15); }
#intel-report-body {
flex: 1; overflow-y: auto; padding: 28px 36px;
color: #c0d8e8; font-size: 14px; line-height: 1.9;
white-space: pre-wrap; word-break: break-word;
}
#intel-report-dismiss-wrap {
flex-shrink: 0; padding: 12px 24px; border-top: 1px solid #2a1a1a;
}
#intel-report-dismiss {
background: #1a0a0a; border: 1px solid #cc4444; color: #cc4444;
font-family: 'Courier New', monospace; font-size: 11px;
padding: 7px 20px; cursor: pointer; letter-spacing: 1px;
}
#intel-report-dismiss:hover { background: rgba(204,68,68,0.15); }
#intel-modal {
display: none; position: fixed; bottom: 20px; left: 12px;
width: 420px; max-width: calc(100vw - 360px);
max-height: 340px; overflow: hidden;
background: rgba(4,6,16,0.97); border: 1px solid #aa66ff;
z-index: 50; font-family: 'Courier New', monospace;
box-shadow: 0 0 20px rgba(170,102,255,0.3);
display: none; flex-direction: column;
}
#intel-modal.visible { display: flex; }
#intel-modal.collapsed #intel-modal-body,
#intel-modal.collapsed #intel-model-cfg { display: none; }
#intel-modal-header {
flex-shrink: 0;
padding: 8px 14px; border-bottom: 1px solid #aa66ff;
color: #aa66ff; font-size: 11px; letter-spacing: 2px;
display: flex; justify-content: space-between; align-items: center;
cursor: pointer; user-select: none;
}
#intel-modal-header:hover { background: rgba(170,102,255,0.08); }
#intel-collapse-icon { font-size: 12px; margin-left: 8px; }
#intel-modal-body { flex: 1; overflow-y: auto; padding: 10px 14px; color: #c0d8e8; line-height: 1.5; font-size: 11px; white-space: pre-wrap; word-break: break-word; }
#intel-modal-body img { width: 100%; max-height: 100px; object-fit: contain; display: block; margin-bottom: 6px; }
#intel-modal-close { cursor: pointer; color: #aa66ff; background: none; border: none; font-size: 16px; font-family: inherit; }
#intel-model-cfg { flex-shrink: 0; font-size: 10px; color: #4a6a7a; padding: 4px 14px 6px; border-top: 1px solid #1a3a5a; }
body.present #intel-btn { right: 440px; }
body.present #survey-btn { right: 510px; }
/* ── SENTINEL PANEL ──────────────────────────────────────── */
#sentinel-btn {
position: fixed; top: 188px; right: 360px; z-index: 30; min-width: 150px;
background: rgba(6,12,24,0.95); border: 1px solid #33aaff; color: #33aaff;
font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer; text-align: left;
}
#sentinel-btn:hover { background: rgba(51,170,255,0.15); }
#sentinel-btn.loading { opacity: 0.5; cursor: wait; }
#sentinel-panel {
display: none; position: fixed; inset: 0;
background: rgba(2,4,10,0.98); border: none;
z-index: 200; font-family: 'Courier New', monospace;
flex-direction: column;
}
#sentinel-panel.visible { display: flex; }
#sentinel-panel-header {
padding: 10px 16px; border-bottom: 1px solid #33aaff;
color: #33aaff; font-size: 11px; letter-spacing: 2px;
display: flex; justify-content: space-between; align-items: center;
flex-shrink: 0;
}
#sentinel-panel-close { cursor: pointer; background: none; border: none; color: #33aaff; font-size: 18px; font-family: inherit; padding: 0 4px; }
#sentinel-status { padding: 6px 16px; color: #4a8aaa; font-size: 11px; flex-shrink: 0; }
/* Main viewer area */
#sentinel-viewer {
flex: 1; display: flex; overflow: hidden; position: relative; min-height: 0;
}
/* Compare slider mode */
#sentinel-compare {
display: none; position: relative; width: 100%; height: 100%; overflow: hidden; cursor: col-resize;
}
#sentinel-compare.active { display: block; }
#sentinel-compare-a { position: absolute; inset: 0; }
#sentinel-compare-a img { width: 100%; height: 100%; object-fit: contain; display: block; }
#sentinel-compare-b {
position: absolute; inset: 0; overflow: hidden;
clip-path: inset(0 0 0 50%);
}
#sentinel-compare-b img { width: 100%; height: 100%; object-fit: contain; display: block; }
#sentinel-compare-divider {
position: absolute; top: 0; bottom: 0; width: 3px;
background: #33aaff; cursor: col-resize; z-index: 10;
box-shadow: 0 0 12px #33aaff;
}
#sentinel-compare-divider::after {
content: '◀ ▶'; position: absolute; top: 50%; transform: translateY(-50%) translateX(-50%);
background: #33aaff; color: #000; font-size: 10px; padding: 4px 6px;
white-space: nowrap; border-radius: 2px;
}
/* Single image mode */
#sentinel-single {
display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
}
#sentinel-single img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
#sentinel-single.hidden { display: none; }
/* Analysis overlay */
#sentinel-analysis-overlay {
position: absolute; bottom: 0; left: 0; right: 0;
background: rgba(2,4,10,0.88); border-top: 1px solid #1a3a5a;
padding: 10px 16px; font-size: 12px; color: #c0d8e8;
line-height: 1.6; max-height: 30%; overflow-y: auto;
display: none;
}
#sentinel-analysis-overlay.visible { display: block; }
/* Thumbnail strip */
#sentinel-filmstrip {
display: flex; gap: 8px; padding: 10px 16px;
border-top: 1px solid #1a3a5a; overflow-x: auto;
flex-shrink: 0; background: rgba(2,4,10,0.95);
align-items: flex-end;
}
.sentinel-thumb {
flex-shrink: 0; width: 120px; cursor: pointer;
border: 2px solid #1a3a5a; background: #020608;
transition: border-color 0.15s;
}
.sentinel-thumb:hover { border-color: #33aaff; }
.sentinel-thumb.active { border-color: #33aaff; }
.sentinel-thumb.compare-a { border-color: #ffdd00; }
.sentinel-thumb.compare-b { border-color: #ff6600; }
.sentinel-thumb img { width: 100%; display: block; }
.sentinel-thumb-date { font-size: 9px; color: #33aaff; padding: 3px 5px; letter-spacing: 1px; }
.sentinel-thumb-analyzing { font-size: 9px; color: #4a6a7a; padding: 0 5px 3px; }
#sentinel-toolbar {
display: flex; gap: 8px; padding: 6px 16px; border-top: 1px solid #1a3a5a;
flex-shrink: 0; align-items: center; background: rgba(2,4,10,0.95);
}
.sentinel-tool-btn {
background: transparent; border: 1px solid #1a3a5a; color: #4a8aaa;
font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 1px;
padding: 5px 12px; cursor: pointer;
}
.sentinel-tool-btn:hover { border-color: #33aaff; color: #33aaff; }
.sentinel-tool-btn.active { border-color: #33aaff; color: #33aaff; background: rgba(51,170,255,0.1); }
#sentinel-compare-hint { font-size: 10px; color: #4a6a7a; margin-left: 8px; }
body.present #sentinel-btn { right: 440px; }
#paint-toolbar { position: fixed; top: 12px; right: 360px; z-index: 30; display: flex; gap: 6px; align-items: center; }
#paint-toolbar button { background: rgba(6,12,24,0.95); border: 1px solid #4a6a7a; color: #4a6a7a; font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 1px; padding: 6px 12px; cursor: pointer; }
#btn-paint.active { border-color: #ffdd44; color: #ffdd44; }
#btn-paint-boundary.active { border-color: #cc4444; color: #cc4444; }
#btn-paint-battery.active { border-color: #ff6600; color: #ff6600; }
#btn-paint-clear { display: none; }
#paint-coords { position: fixed; top: 48px; right: 360px; z-index: 30; background: rgba(6,12,24,0.95); border: 1px solid #ffdd44; color: #ffdd44; font-family: 'Courier New', monospace; font-size: 9px; padding: 4px 10px; max-width: 420px; word-break: break-all; cursor: pointer; display: none; text-align: center; }
#paint-coords:hover { color: #fff; }
/* ── MAP D-PAD (touch/phone controls) ─────────────────────────────── */
#map-dpad {
position: fixed;
right: 360px;
bottom: 130px;
z-index: 15;
display: grid;
grid-template-areas: ". u ." "l . r" ". d .";
grid-template-columns: 60px 60px 60px;
grid-template-rows: 60px 60px 60px;
gap: 4px;
}
.mdp {
width: 60px; height: 60px;
background: rgba(4,12,24,0.82);
border: 1.5px solid var(--border);
border-radius: 6px;
color: var(--text);
font-size: 22px;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
touch-action: manipulation;
user-select: none;
transition: background 0.1s, border-color 0.1s;
-webkit-tap-highlight-color: transparent;
}
.mdp:active, .mdp.pressed {
background: rgba(68,136,204,0.35);
border-color: var(--blue);
}
#mdp-u { grid-area: u; }
#mdp-l { grid-area: l; }
#mdp-r { grid-area: r; }
#mdp-d { grid-area: d; }
#map-dpad-label {
position: fixed; right: 370px; bottom: 120px;
font-size: 8px; color: var(--dim); letter-spacing: 2px;
z-index: 15; pointer-events: none; text-align: center; width: 188px;
}
.lb { color: var(--blue); } .lr { color: var(--red); } .lg { color: var(--green); }
#loading {
position: fixed; top: 45%; left: calc((100% - 340px) / 2);
transform: translate(-50%, -50%);
background: var(--panel); border: 1px solid var(--border);
padding: 18px 32px; font-size: 12px; letter-spacing: 3px;
color: var(--blue); z-index: 50; display: none;
}
#loading.visible { display: block; animation: pulse 0.7s infinite; }
/* Ship marker styles */
.ship-marker { cursor: pointer; transition: transform 0.1s; }
.ship-marker:hover { transform: scale(1.15); }
.ship-selected { filter: drop-shadow(0 0 6px #ffee00); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }
/* ── GUIDED TOUR NARRATIVE BAR ─────────────────────────────── */
#tour-bar {
position: fixed;
bottom: 110px;
left: 0;
width: calc(100% - 340px);
background: rgba(3, 7, 18, 0.97);
border-top: 2px solid #4488cc;
border-right: 1px solid var(--border);
z-index: 55;
display: flex;
flex-direction: column;
padding: 14px 22px 12px;
gap: 8px;
transform: translateY(100%);
transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-top-color 0.3s;
pointer-events: none;
opacity: 0;
}
#tour-bar.visible {
transform: translateY(0);
pointer-events: all;
opacity: 1;
}
body.present #tour-bar { width: calc(100% - 420px); bottom: 110px; }
#tour-top-row {
display: flex;
align-items: baseline;
gap: 14px;
}
#tour-slide-label {
font-size: 9px;
letter-spacing: 3px;
color: #4488cc;
flex-shrink: 0;
text-transform: uppercase;
}
#tour-slide-title {
font-size: 15px;
font-weight: bold;
color: #ffffff;
letter-spacing: 2px;
flex: 1;
}
#tour-step-num {
font-size: 10px;
color: var(--dim);
letter-spacing: 2px;
flex-shrink: 0;
}
#tour-slide-body {
font-size: 13px;
color: var(--text);
line-height: 1.7;
letter-spacing: 0.3px;
}
#tour-bottom-row {
display: flex;
align-items: center;
gap: 10px;
margin-top: 2px;
}
#tour-dots {
display: flex;
gap: 5px;
flex: 1;
}
.tour-dot {
width: 7px; height: 7px;
border-radius: 50%;
background: var(--border);
cursor: pointer;
transition: background 0.2s, transform 0.2s;
flex-shrink: 0;
}
.tour-dot.active { background: currentColor; transform: scale(1.3); }
.tour-dot:hover { background: #888; }
.tour-ctrl {
font-family: 'Courier New', monospace;
font-size: 10px;
letter-spacing: 1px;
padding: 5px 14px;
border: 1px solid var(--border);
background: transparent;
color: var(--dim);
cursor: pointer;
transition: all 0.15s;
}
.tour-ctrl:hover { border-color: var(--text); color: var(--text); }
#tour-next { color: var(--green); border-color: var(--green); }
#tour-next:hover { background: rgba(68,204,136,0.12); }
#tour-exit { color: var(--red); border-color: #443333; }
#tour-exit:hover { border-color: var(--red); background: rgba(204,68,68,0.1); }
/* Tour launch button (top bar) */
#btn-tour {
display: none; /* Hidden during active demo work — was overlapping the paint toolbar. Set display:flex to re-enable. */
position: fixed; top: 12px; right: 360px; z-index: 30;
background: rgba(6,12,24,0.95); border: 1px solid #ffdd44; color: #ffdd44;
font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer;
}
#btn-tour:hover { background: rgba(255,221,68,0.12); }
body.present #btn-tour { right: 440px; }
.ais-tooltip .leaflet-tooltip { background:transparent !important; border:none !important; box-shadow:none !important; padding:0 !important; }
.ais-popup .leaflet-popup-content-wrapper { background:#060c12 !important; border:1px solid #2a4a5a !important; border-radius:2px !important; box-shadow:0 0 12px rgba(0,0,0,0.8) !important; padding:0 !important; }
.ais-popup .leaflet-popup-content { margin:0 !important; }
.ais-popup .leaflet-popup-tip { background:#2a4a5a !important; }
.vlm-popup .leaflet-popup-content-wrapper { background:#06080f !important; border:1px solid #aa66ff !important; border-radius:2px !important; box-shadow:0 0 16px rgba(170,102,255,0.3) !important; padding:10px 12px !important; }
.vlm-popup .leaflet-popup-content { margin:0 !important; color:#c0d8e8; }
.vlm-popup .leaflet-popup-tip { background:#aa66ff !important; }
.vlm-popup .leaflet-popup-close-button { color:#aa66ff !important; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes keyVesselPulse {
0%, 100% { filter: drop-shadow(0 0 3px #ff8800); }
50% { filter: drop-shadow(0 0 14px #ff8800) drop-shadow(0 0 6px #ffaa00); }
}
.key-vessel-pulse { animation: keyVesselPulse 1.6s ease-in-out infinite; }
.damaged-hulk { filter: grayscale(1) brightness(0.45); }
.disabled-ship { filter: hue-rotate(180deg) brightness(0.7); }
.boarded-flash { animation: boardedFlash 0.6s 4 ease-in-out; }
@keyframes boardedFlash { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 14px #ff0000); } }
@keyframes fxBoom {
0% { transform: scale(0.4); opacity: 0; }
30% { transform: scale(1.4); opacity: 1; }
100% { transform: scale(2.2); opacity: 0; }
}
::-webkit-scrollbar { width: 3px; } ::-webkit-scrollbar-thumb { background: var(--border); }
/* ── STRATEGIC SITUATION PANEL ────────────────────────────── */
#strategic-section { border-bottom: 1px solid var(--border); flex-shrink: 0; }
/* Economic ticker row */
#econ-bar { display: flex; border-bottom: 1px solid var(--border); }
.econ-item { flex: 1; padding: 7px 8px; border-right: 1px solid var(--border); }
.econ-item:last-child { border-right: none; }
.econ-label { font-size: 9px; letter-spacing: 1px; color: var(--dim); display: block; }
.econ-value { font-size: 16px; font-weight: bold; display: block; line-height: 1.3; }
.econ-sub { font-size: 10px; color: var(--dim); display: block; }
#econ-oil { color: #ffdd55; }
#econ-bpd { color: #ffaa33; }
#econ-insurance{ color: #ff4444; }
#econ-closure { color: #ff4444; }
/* Escalation ladder */
#escalation-ladder { padding: 7px 10px 5px; border-bottom: 1px solid var(--border); }
#ladder-header { font-size: 9px; letter-spacing: 2px; color: var(--dim); margin-bottom: 6px; }
#ladder-rungs { display: flex; gap: 2px; align-items: center; }
.rung {
flex: 1; text-align: center; font-size: 9px; letter-spacing: 0.5px;
padding: 5px 2px; border: 1px solid var(--border); color: var(--dim);
transition: all 0.4s; white-space: nowrap; overflow: hidden;
}
.rung.past { border-color: #554400; color: #887733; background: rgba(80,60,0,0.2); }
.rung.current { border-color: #ffaa33; color: #ffaa33; background: rgba(255,150,0,0.15);
font-weight: bold; animation: pulse 1.2s infinite; }
.rung.war.current { border-color: #ff3333; color: #ff3333; background: rgba(255,0,0,0.15); }
/* Coalition flags */
#coalition-bar { padding: 7px 10px; display: flex; align-items: center; gap: 10px; }
#coalition-label { font-size: 9px; letter-spacing: 1px; color: var(--dim); flex-shrink: 0; }
.cflag { font-size: 20px; opacity: 0.55; transition: all 0.3s; cursor: pointer; filter: grayscale(0.4); }
.cflag.active { opacity: 1; filter: grayscale(0); }
.cflag.hostile { opacity: 1; filter: grayscale(0); border-bottom: 2px solid #ff5566; }
/* ── PRESENTATION MODE ─────────────────────────────────────── */
#btn-present {
position: fixed; top: 46px; right: 360px; z-index: 30;
background: rgba(6,12,24,0.95); border: 1px solid #44cc88; color: #44cc88;
font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 1px;
padding: 6px 12px; cursor: pointer;
}
#btn-present:hover { background: rgba(68,204,136,0.15); }
body.present .econ-value { font-size: 17px; }
body.present .econ-label { font-size: 9px; }
body.present .rung { font-size: 9px; padding: 5px 3px; }
body.present .cflag { font-size: 22px; }
body.present #panel { width: 420px; }
body.present #map { width: calc(100% - 420px); }
body.present #action-bar { width: calc(100% - 420px); }
/* exercise-overlay positioning is set inline (centered popup), no overrides needed */
body.present #panel-header h1 { font-size: 30px; }
body.present .subtitle { font-size: 14px; }
body.present #turn-num { font-size: 24px; }
body.present #phase-label { font-size: 16px; }
body.present #scenario-title { font-size: 16px; }
body.present #scenario-text { font-size: 15px; max-height: 110px; }
body.present #unit-name { font-size: 19px; }
body.present #unit-stats { font-size: 15px; }
body.present .log-entry { font-size: 15px; }
body.present .log-source { font-size: 13px; }
body.present .stake-value { font-size: 16px; }
body.present .stake-label { font-size: 10px; }
body.present button.ctrl { font-size: 15px; padding: 13px 12px; }
body.present #paint-toolbar { right: 440px; }
body.present #btn-present { right: 440px; top: 46px; }
body.present #map-dpad { right: 440px; }
body.present #transit-counter { font-size: 12px; }
body.present #transit-num { font-size: 22px; }
</style>
</head>
<body>
<div id="map" tabindex="0"></div>
<div id="paint-toolbar">
<button id="btn-paint">✏ PATH</button>
<button id="btn-paint-clear">✕ CLEAR</button>
</div>
<button id="btn-tour" title="Guided demo tour — walks through all features with explanations">▶ GUIDED TOUR</button>
<button id="airport-intel-btn" title="Toggle AI aircraft counts at all scanned airports">✈ AIR INTEL</button>
<button id="survey-btn" title="3×3 grid scan for condensed areas — best for high-density targets (airbases, port complexes). Auto-tiles into 9 sub-frames + consolidated report.">🗺 SURVEY (3×3 GRID)</button>
<button id="intel-btn" title="Capture current map view and analyze with local VLM">🔭 INTEL</button>
<button id="sentinel-btn" title="Fetch Sentinel-2 satellite passes for this area (last 10 days)">🛰 SENTINEL</button>
<div id="sentinel-panel">
<div id="sentinel-panel-header">
<span>📡 SENTINEL-2 — <span id="sentinel-aoi-label"></span></span>
<div style="display:flex;gap:12px;align-items:center">
<span id="sentinel-status"></span>
<button id="sentinel-panel-close">✕ CLOSE</button>
</div>
</div>
<div id="sentinel-viewer">
<div id="sentinel-single"><img id="sentinel-main-img" src="" alt=""></div>
<div id="sentinel-compare">
<div id="sentinel-compare-a">
<img id="sentinel-img-a" src="">
<div id="sentinel-label-a" style="position:absolute;top:6px;left:8px;background:rgba(0,0,0,0.65);color:#ffdd66;font-size:11px;font-family:'Courier New',monospace;padding:2px 7px;border-radius:2px;letter-spacing:1px;pointer-events:none;z-index:10"></div>
</div>
<div id="sentinel-compare-b">
<img id="sentinel-img-b" src="">
<div id="sentinel-label-b" style="position:absolute;top:6px;right:8px;background:rgba(0,0,0,0.65);color:#a0c8e8;font-size:11px;font-family:'Courier New',monospace;padding:2px 7px;border-radius:2px;letter-spacing:1px;pointer-events:none;z-index:10"></div>
</div>
<div id="sentinel-compare-divider"></div>
</div>
<div id="sentinel-analysis-overlay"></div>
</div>
<div id="sentinel-toolbar">
<button class="sentinel-tool-btn active" id="sentinel-btn-single">⬜ SINGLE</button>
<button class="sentinel-tool-btn" id="sentinel-btn-compare">◧ COMPARE</button>
<button class="sentinel-tool-btn" id="sentinel-btn-analyze">🔍 ANALYZE</button>
<span id="sentinel-compare-hint">Click a thumbnail to view · In COMPARE mode click two</span>
<!-- Single mode sliders -->
<span id="sentinel-sliders-single" style="display:inline-flex;align-items:center;gap:8px;margin-left:12px">
<label style="font-size:11px;color:#7788aa">☀ <input type="range" id="sentinel-brightness" min="50" max="200" value="75" style="width:70px;vertical-align:middle"> <span id="sentinel-brightness-val">75%</span></label>
<label style="font-size:11px;color:#7788aa">◑ <input type="range" id="sentinel-contrast" min="50" max="200" value="150" style="width:70px;vertical-align:middle"> <span id="sentinel-contrast-val">150%</span></label>
</span>
<!-- Compare mode sliders — one per pane -->
<span id="sentinel-sliders-compare" style="display:none;align-items:center;gap:12px;margin-left:12px">
<span style="font-size:10px;color:#ffdd66;letter-spacing:1px">BEFORE</span>
<label style="font-size:11px;color:#7788aa">☀ <input type="range" id="cmp-brightness-a" min="50" max="200" value="75" style="width:60px;vertical-align:middle"></label>
<label style="font-size:11px;color:#7788aa">◑ <input type="range" id="cmp-contrast-a" min="50" max="200" value="150" style="width:60px;vertical-align:middle"></label>
<span style="font-size:10px;color:#ffdd66;letter-spacing:1px;margin-left:8px">AFTER</span>
<label style="font-size:11px;color:#7788aa">☀ <input type="range" id="cmp-brightness-b" min="50" max="200" value="75" style="width:60px;vertical-align:middle"></label>
<label style="font-size:11px;color:#7788aa">◑ <input type="range" id="cmp-contrast-b" min="50" max="200" value="150" style="width:60px;vertical-align:middle"></label>
</span>
</div>
<div id="sentinel-filmstrip"></div>
</div>
<div id="intel-report-overlay">
<div id="intel-report-header">
<span id="intel-report-title">INTEL REPORT</span>
<button id="intel-report-close">✕ CLOSE</button>
</div>
<div id="intel-report-body"></div>
<div id="intel-report-dismiss-wrap">
<button id="intel-report-dismiss">✕ DISMISS REPORT — REMOVE FROM MAP</button>
</div>
</div>
<div id="intel-modal">
<div id="intel-modal-header">
<span>VLM INTEL ANALYSIS <span id="intel-collapse-icon">▼</span></span>
<div style="display:flex;gap:6px;align-items:center">
<button id="intel-modal-copy" title="Copy analysis text" style="background:none;border:1px solid #4a2a6a;color:#aa66ff;font-family:'Courier New',monospace;font-size:10px;padding:3px 8px;cursor:pointer;letter-spacing:1px">⎘ COPY</button>
<button id="intel-modal-close">✕</button>
</div>
</div>
<div id="intel-modal-body">Awaiting capture...</div>
<div id="intel-model-cfg">MODEL: <span id="intel-model-name">llava</span> · <span id="intel-coords-display"></span></div>
</div>
<div id="paint-coords" title="tap to copy"></div>
<div id="hud">
<div>STRAIT OF HORMUZ 26.5°N 56.5°E</div>
<div>APR 2026 // DAY 51 // CEASEFIRE EXPIRING</div>
<div>SCROLL: zoom • DRAG: pan • CLICK ship: select</div>
</div>
<div id="legend">
<div class="lb">▶ US NAVY (YOU)</div>
<div class="lr">▶ IRGC (AI RED CELL)</div>
<div class="lg">▬ TSS SAFE CORRIDOR</div>
<div id="coord-readout" title="tap to copy"></div>
<div id="coord-copied">✓ COPIED</div>
</div>
<div id="transit-counter" title="Strait transits this session — click for log">
<span id="transit-num">0</span>
STRAIT TRANSITS
</div>
<div id="transit-log-panel"></div>
<button id="toggle-panel" title="Collapse / expand right panel">◀</button>
<button id="toggle-action-bar" title="Collapse / expand bottom action bar">▼</button>
<div id="action-bar">
<button class="action-btn purple" id="btn-hide-ships"><span class="btn-icon">👁</span><span class="btn-label">HIDE ALL<br>SHIPS</span><span class="btn-cost">clean map</span></button>
<button class="action-btn cyan" id="btn-sim-transit"><span class="btn-icon">⏃</span><span class="btn-label">SIMULATE<br>BLUE TRANSIT</span><span class="btn-cost">DDG west-bound</span></button>
<button class="action-btn green" id="btn-exec-route"><span class="btn-icon">▶</span><span class="btn-label">EXECUTE<br>PAINTED ROUTE</span><span class="btn-cost">tanker + 2 escorts</span></button>
<button class="action-btn red" id="btn-spawn-adv"><span class="btn-icon">🎲</span><span class="btn-label">SPAWN<br>ADVERSARIES</span><span class="btn-cost">Monte-Carlo roll</span></button>
<button class="action-btn yellow" id="btn-hist-toggle"><span class="btn-icon">⚠</span><span class="btn-label">MINE / ATTACK<br>HISTORY</span><span class="btn-cost">show on map</span></button>
<button class="action-btn purple" id="btn-iran-intel"><span class="btn-icon">📋</span><span class="btn-label">IRGC<br>INTEL PINS</span><span class="btn-cost">VLM-style flags</span></button>
<button class="action-btn cyan" id="btn-osm-infra"><span class="btn-icon">🌐</span><span class="btn-label">OSM<br>INFRASTRUCTURE</span><span class="btn-cost">live OSM data</span></button>
<button class="action-btn green" id="btn-ai-scenario"><span class="btn-icon">🤖</span><span class="btn-label">AI GENERATE<br>SCENARIO</span><span class="btn-cost">Llama 3.1 8B</span></button>
<button class="action-btn green" id="btn-ai-oob"><span class="btn-icon">🛰</span><span class="btn-label">AI GENERATE<br>ORDER OF BATTLE</span><span class="btn-cost">Llama 3.1 8B</span></button>
<button class="action-btn cyan" id="btn-gulf-feed"><span class="btn-icon">📡</span><span class="btn-label">GULF EVENTS<br>FEED</span><span class="btn-cost">ACLED-cached</span></button>
<button class="action-btn green" id="btn-auto-demo"><span class="btn-icon">▶</span><span class="btn-label">AUTO<br>DEMO LOOP</span><span class="btn-cost">hands-free walkthru</span></button>
<button class="action-btn yellow" id="btn-reset-all"><span class="btn-icon">🔄</span><span class="btn-label">RESET</span><span class="btn-cost">ships, mines, exercise</span></button>
<div id="dpad">
<div id="dpad-row">
<button class="dpad-btn" id="dp-ul" title="NW">↖</button>
<button class="dpad-btn" id="dp-up" title="N">▲</button>
<button class="dpad-btn" id="dp-ur" title="NE">↗</button>
</div>
<div id="dpad-row">
<button class="dpad-btn" id="dp-left" title="W">◀</button>
<button class="dpad-btn" id="dp-down" title="S">▼</button>
<button class="dpad-btn" id="dp-right" title="E">▶</button>
</div>
<div id="dpad-row">
<button class="dpad-btn" id="dp-dl" title="SW">↙</button>
<button class="dpad-btn" id="dp-x" title="center" style="visibility:hidden"></button>
<button class="dpad-btn" id="dp-dr" title="SE">↘</button>
</div>
<div id="dpad-label">MOVE</div>
</div>
</div>
<div id="panel">
<div id="panel-header"><h1>STRAIT OF CONSEQUENCES</h1><div class="subtitle">AI WARGAME // STRAIT OF HORMUZ // 2026</div></div>
<div id="panel-tabs">
<button class="panel-tab active" id="tab-exercise">⚠ EXERCISE</button>
<button class="panel-tab" id="tab-chat">💬 INTEL CHAT</button>
<button class="panel-tab" id="tab-routes">🚦 ROUTES</button>
</div>
<div id="panel-exercise">
<!-- Hidden legacy wargame DOM — kept so existing JS handlers don't crash on null. Will be removed once those references are stripped. -->
<!-- Always-visible state strip: econ bar + escalation ladder + coalition bar.
The other legacy blocks (turn-bar / scenario-section / unit-info / ai-log / controls)
stay in the DOM but display:none so existing JS handlers don't crash on null. -->
<div id="legacy-wargame-ui">
<div id="turn-bar" style="display:none"><span id="turn-label">TURN</span><span id="turn-num">1</span><span id="phase-label" class="player">PLAYER PHASE</span></div>
<div id="strategic-section">
<div id="econ-bar">
<div class="econ-item"><span class="econ-label">OIL AT RISK</span><span class="econ-value" id="econ-oil">21%</span><span class="econ-sub" id="econ-bpd">18.5M BPD</span></div>
<div class="econ-item"><span class="econ-label">WAR RISK INS.</span><span class="econ-value" id="econ-insurance">SUSPENDED</span><span class="econ-sub">LLOYD'S APR 18</span></div>
<div class="econ-item"><span class="econ-label">IRAN CLOSURE</span><span class="econ-value" id="econ-closure">CLOSED</span><span class="econ-sub">ENFORCED APR 18</span></div>
</div>
<div id="escalation-ladder">
<div id="ladder-header">ESCALATION LADDER</div>
<div id="ladder-rungs">
<div class="rung current" data-lvl="0">HARASS</div><div class="rung" data-lvl="1">SEIZURE</div><div class="rung" data-lvl="2">MINING</div><div class="rung" data-lvl="3">STRIKE</div><div class="rung" data-lvl="4">CLOSURE</div><div class="rung war" data-lvl="5">WAR</div>
</div>
</div>
<div id="coalition-bar">
<span id="coalition-label">COALITION</span>
<span class="cflag" id="cf-uk" title="UK">🇬🇧</span><span class="cflag" id="cf-fr" title="France">🇫🇷</span><span class="cflag" id="cf-sa" title="Saudi">🇸🇦</span><span class="cflag" id="cf-un" title="UN">🇺🇳</span><span class="cflag hostile" id="cf-cn" title="China">🇨🇳</span>
</div>
</div>
<div id="scenario-section" style="display:none"><div id="scenario-title">CONNECTING TO AI...</div><div id="scenario-text">Loading scenario engine...</div></div>
<div id="unit-info" style="display:none"><div id="unit-name" class="none">— SELECT A BLUE UNIT —</div><div id="unit-stats"></div><div id="move-hint"></div></div>
<div id="ai-log" style="display:none"><div class="log-entry system"><div class="log-source">SYSTEM</div><div class="log-text">Legacy log.</div></div></div>
<div id="controls" style="display:none">
<button class="ctrl" id="btn-demo">▶▶ DEMO</button>
<div id="demo-progress"></div>
<button class="ctrl" id="btn-end-turn">▶ END TURN</button>
<button class="ctrl" id="btn-new-scenario">↺ NEW SCENARIO</button>
</div>
</div>
<div id="exercise-tab-body" style="padding:14px;display:flex;flex-direction:column;gap:10px;overflow-y:auto;flex:1">
<div id="exercise-scenario-list">
<div style="color:#ff6600;font-size:11px;letter-spacing:2px;margin-bottom:8px">// SELECT SCENARIO //</div>
<button id="btn-adhoc-scenario" style="width:100%;margin-bottom:10px;padding:9px;background:rgba(68,255,170,0.10);border:1.5px solid #44ffaa88;color:#44ffaa;cursor:pointer;font-family:inherit;font-size:11px;letter-spacing:1.5px;font-weight:bold">⚡ GENERATE SCENARIO ON THE FLY</button>
<div id="scenario-cards"></div>
</div>
<div id="exercise-active" style="display:none">
<div id="exercise-brief" style="font-size:12px;line-height:1.5;color:#cce0ff;margin-bottom:10px"></div>
<div id="exercise-key-vessels"></div>
<div id="exercise-decisions"></div>
<button id="exercise-end-btn" style="margin-top:12px;padding:10px;background:rgba(255,80,80,0.18);color:#ff9999;border:1.5px solid #ff5555aa;cursor:pointer;font-family:inherit;font-size:12px;letter-spacing:2px;font-weight:bold">⏹ END EXERCISE NOW</button>
</div>
</div>
</div><!-- end #panel-exercise -->
<div id="panel-routes">
<div id="exercise-indicators-strip" style="display:none;border:1px solid #ff660066;padding:10px 12px;background:rgba(255,80,0,0.05);margin-bottom:10px"></div>
<div style="color:#88ccff;font-size:11px;letter-spacing:2px;margin-bottom:10px;padding:0 4px">// TRANSIT ROUTE OPTIONS //</div>
<div id="route-cards"></div>
<div style="color:#7a8896;font-size:10px;line-height:1.5;margin-top:14px;padding:8px 10px;border-top:1px dashed #1a3a5a">
Each route is a preset transit + IRGC engagement profile. Click EXECUTE on any card to paint the path and run the formation along it.
</div>
<details style="margin-top:14px;color:#7a8896;font-size:10px"><summary style="cursor:pointer;letter-spacing:2px;padding:4px 0">▸ LEGACY MARKET DATA</summary><div id="legacy-markets-content">
<div class="strait-status-bar">
<div class="strait-status-label">STRAIT OF HORMUZ — CURRENT STATUS</div>
<div class="strait-status-val">⛔ EFFECTIVELY CLOSED — DUAL NAVAL BLOCKADE ACTIVE</div>
<div class="mkt-sub" style="margin-top:5px">Iran IRGC controlling exits · US Navy controlling entry from Arabian Sea · ~2,000 vessels stranded</div>
</div>
<div class="mkt-row">
<div class="mkt-card">
<div class="mkt-header">BRENT CRUDE</div>
<div class="mkt-price" id="mkt-brent">$105.30</div>
<div class="mkt-sub"><span class="mkt-change up" id="mkt-brent-chg">+73% YTD</span> · Peak $126 (Mar 8)</div>
</div>
<div class="mkt-card">
<div class="mkt-header">WTI CRUDE</div>