
#modalBackdrop { position: fixed; inset: 0; background: radial-gradient(circle at 50% 32%, rgba(86, 207, 255, 0.12) 0%, rgba(19, 50, 95, 0.10) 22%, rgba(0, 0, 0, 0.82) 76%); backdrop-filter: blur(12px) saturate(120%); display: none; z-index: 1000; }
#modalBackdrop.open { display: block; }
#regionModal { position: fixed; top: 50%; left: 50%; width: min(700px, calc(100vw - 28px)); max-height: calc(100vh - 24px); overflow: auto; transform: translate(-50%, -50%); background: radial-gradient(circle at top, rgba(94, 227, 255, 0.16) 0%, rgba(94, 227, 255, 0.04) 24%, rgba(94, 227, 255, 0) 44%), linear-gradient(180deg, rgba(4, 11, 24, 0.78) 0%, rgba(7, 14, 28, 0.7) 100%); color: #ecf8ff; clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px), 0 24px); border: 1px solid rgba(116, 227, 255, 0.2); box-shadow: 0 30px 84px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 44px rgba(67, 196, 255, 0.16); backdrop-filter: blur(22px) saturate(120%); display: none; z-index: 1001; padding: 16px; }
#regionModal::before { content:""; position:absolute; inset:1px; border:1px solid rgba(255,255,255,.045); clip-path: inherit; pointer-events:none; }
#regionModal::after { content:""; position:absolute; inset:auto 22px 0 22px; height:1px; background:linear-gradient(90deg, transparent, rgba(122,244,255,.34), transparent); pointer-events:none; }
#regionModal.open { display: block; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.modal-region-name { margin: 0; font-size: 26px; line-height: 1.02; font-weight: 900; color: #f6fdff; letter-spacing: 0.02em; text-transform: uppercase; }
.modal-node-number { margin-top: 5px; color: rgba(164, 220, 241, 0.86); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.modal-scale { margin-top: 8px; display: inline-block; background: linear-gradient(180deg, rgba(17,39,71,.78) 0%, rgba(8,20,39,.72) 100%); color: #dffbff; border: 1px solid rgba(111, 230, 255, 0.16); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); padding: 7px 11px; font-size: 11px; font-weight: 800; white-space: nowrap; letter-spacing: 0.12em; text-transform: uppercase; }
.modal-close { border: 1px solid rgba(117, 226, 255, 0.18); background: linear-gradient(180deg, rgba(17,39,71,.78) 0%, rgba(8,20,39,.72) 100%); color: #f4fdff; width: 42px; height: 42px; clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); cursor: pointer; font-size: 22px; line-height: 1; flex: 0 0 auto; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.modal-close:hover { border-color: rgba(130, 232, 255, 0.36); box-shadow: 0 0 0 1px rgba(84, 213, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 22px rgba(84, 213, 255, 0.12); }
.modal-current,.modal-timeline-block { position: relative; border: 1px solid rgba(117, 226, 255, 0.12); clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px); background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.035) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.modal-current { text-align: center; padding: 12px 12px 14px; }
.modal-current-label { font-size: 11px; color: rgba(177, 214, 228, 0.82); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.2em; }
.modal-faction-logo { width: 96px; height: 96px; object-fit: contain; display: block; margin: 0 auto 8px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.28)); }
.modal-empty-symbol { width: 96px; height: 96px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 54px; background: rgba(232, 241, 245, 0.08); color: #9dc0cf; border: 1px solid rgba(117, 226, 255, 0.1); clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px); }
.modal-current-name { font-size: 20px; font-weight: 800; white-space: nowrap; color: #ffffff; }
.modal-timeline-block { margin-top: 12px; padding: 12px; }
.modal-timeline-title { font-size: 12px; font-weight: 800; margin-bottom: 10px; color: #effcff; letter-spacing: 0.16em; text-transform: uppercase; }
.timeline-row { display: flex; align-items: stretch; justify-content: center; gap: 8px; flex-wrap: wrap; }
.timeline-card { width: 140px; min-height: 142px; border: 1px solid rgba(117, 226, 255, 0.1); clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%); padding: 11px 9px; text-align: center; }
.timeline-logo { width: 56px; height: 56px; object-fit: contain; display: block; margin: 0 auto 8px; }
.timeline-empty-symbol { width: 56px; height: 56px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 32px; background: rgba(232, 241, 245, 0.08); color: #9dc0cf; border: 1px solid rgba(117, 226, 255, 0.1); clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); }
.timeline-name { font-weight: 800; font-size: 13px; margin-bottom: 5px; white-space: nowrap; color: #f8fdff; }
.timeline-date { font-size: 11px; color: rgba(177, 214, 228, 0.82); white-space: nowrap; }
.timeline-arrow { font-size: 20px; color: rgba(132, 208, 232, 0.66); line-height: 1; align-self: center; }
.timeline-empty { color: rgba(177, 214, 228, 0.82); text-align: center; padding: 8px 0 2px; }
@media (max-width: 900px) { #regionModal { width: calc(100vw - 14px); max-width: none; max-height: calc(100vh - 14px); padding: 12px; clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); } .modal-header { gap: 10px; margin-bottom: 10px; } .modal-region-name { font-size: 20px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; } .modal-node-number { margin-top: 4px; font-size: 11px; } .modal-scale { margin-top: 7px; font-size: 10px; padding: 6px 10px; } .modal-close { width: 38px; height: 38px; font-size: 20px; } .modal-current { padding: 11px 9px 13px; } .modal-current-label { font-size: 10px; margin-bottom: 9px; } .modal-faction-logo, .modal-empty-symbol { width: 78px; height: 78px; margin-bottom: 7px; } .modal-empty-symbol { font-size: 40px; } .modal-current-name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .modal-timeline-block { margin-top: 10px; padding: 10px; } .modal-timeline-title { font-size: 11px; margin-bottom: 9px; } .timeline-row { gap: 8px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; -webkit-overflow-scrolling: touch; } .timeline-card { width: 114px; min-width: 114px; min-height: 122px; padding: 9px 8px; flex: 0 0 auto; } .timeline-logo, .timeline-empty-symbol { width: 46px; height: 46px; margin-bottom: 7px; } .timeline-empty-symbol { font-size: 26px; } .timeline-name { font-size: 11px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .timeline-date { font-size: 10px; white-space: nowrap; } .timeline-arrow { font-size: 18px; flex: 0 0 auto; } }

.modal-current,.modal-timeline-block,.timeline-card{backdrop-filter:blur(14px) saturate(115%);}
.modal-current::before,.modal-timeline-block::before,.timeline-card::before{content:"";position:absolute;inset:1px;clip-path:inherit;border:1px solid rgba(255,255,255,.025);pointer-events:none;}
.modal-close{backdrop-filter:blur(12px);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease;}
.modal-close:hover{transform:translateY(-1px);}
