:root{
  --bg:#060709;
  --panel:#0b0d10;
  --panel2:#0d1014;
  --muted:#9aa4b2;
  --text:#e8eef7;
  --accent:#f59a13;
  --accent2:#ffb23a;
  --danger:#ff5a5f;
  --ok:#2ecc71;
  --outline:rgba(255,255,255,.08);
  --shadow:0 20px 60px rgba(0,0,0,.65);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:radial-gradient(1200px 700px at 50% 30%, rgba(245,154,19,.10), rgba(0,0,0,0) 60%), var(--bg);
  color:var(--text);
  -webkit-user-select:none;
  user-select:none;
}
.input,.search,.modalInput{ -webkit-user-select:text; user-select:text; }
.ptt,.ptt *{ -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; touch-action:none; }
.app{min-height:100%;display:flex;flex-direction:column}
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px;
}
.pill{
  display:inline-flex;align-items:center;gap:10px;
  padding:10px 12px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--outline);
  border-radius:999px;
  backdrop-filter: blur(10px);
}
.dot{width:10px;height:10px;border-radius:50%;background:#555;box-shadow:0 0 0 3px rgba(255,255,255,.06)}
.pillText{font-weight:600;color:#d7e0ee;font-size:13px}
.chip{
  cursor:pointer;
  border:1px solid rgba(245,154,19,.55);
  background:rgba(245,154,19,.08);
  color:var(--accent2);
  border-radius:12px;
  padding:10px 12px;
  display:flex;flex-direction:column;align-items:flex-end;
}
.chip.danger{
  border-color:rgba(255,90,95,.55);
  background:rgba(255,90,95,.10);
  color:rgba(255,255,255,.82);
}
.chipLabel{font-weight:800;font-size:12px;letter-spacing:.12em}
.chipSub{font-size:10px;color:rgba(255,255,255,.55);margin-top:2px}
.stage{flex:1;display:flex;align-items:center;justify-content:center;padding:22px}

.centerCard{
  width:min(520px, 92vw);
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--outline);
  border-radius:24px;
  padding:44px 34px 32px;
  box-shadow:var(--shadow);
  text-align:center;
}
.centerCard h1{margin:18px 0 10px;font-size:28px;letter-spacing:-.02em}
.centerCard p{margin:0 auto 22px;max-width:46ch;color:rgba(255,255,255,.70);line-height:1.5}
.iconCircle{
  width:88px;height:88px;border-radius:50%;
  margin:0 auto;
  background:rgba(255,255,255,.92);
  display:grid;place-items:center;
}
.walkieIcon,.pinIcon{
  width:36px;height:44px;border-radius:10px;
  background:#111;
  position:relative;
}
.walkieIcon:before{
  content:"";
  position:absolute;left:12px;top:10px;
  width:12px;height:12px;border-radius:50%;
  background:#2b2f38;
  box-shadow:0 14px 0 #2b2f38;
}
.walkieIcon:after{
  content:"";
  position:absolute;left:4px;top:12px;
  width:8px;height:8px;border-radius:999px;background:var(--danger);
}
.pinIcon{
  width:16px;height:16px;border-radius:999px;background:#111;
}
.pinIcon:before{
  content:"";
  position:absolute;left:50%;top:70%;
  width:18px;height:18px;transform:translate(-50%,-50%) rotate(45deg);
  background:#111;border-radius:3px;
}
.cta{
  cursor:pointer;
  background:linear-gradient(180deg, var(--accent2), var(--accent));
  border:0;
  color:#160d00;
  font-weight:800;
  padding:13px 18px;
  border-radius:999px;
  display:inline-flex;align-items:center;gap:10px;
  box-shadow:0 16px 40px rgba(245,154,19,.35);
}
.powerIcon,.targetIcon{
  width:18px;height:18px;border-radius:50%;
  border:2px solid rgba(0,0,0,.55);
  position:relative;
}
.powerIcon:before{
  content:"";
  position:absolute;left:50%;top:-3px;transform:translateX(-50%);
  width:2px;height:9px;background:rgba(0,0,0,.55);border-radius:2px;
}
.targetIcon:before,.targetIcon:after{
  content:"";
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:10px;height:10px;border-radius:50%;
  border:2px solid rgba(0,0,0,.55);
}
.targetIcon:after{
  width:2px;height:2px;background:rgba(0,0,0,.55);border-radius:50%;border:0;
}
.ghost{
  cursor:pointer;
  margin-top:12px;
  background:transparent;
  border:1px solid var(--outline);
  color:rgba(255,255,255,.75);
  padding:11px 14px;border-radius:999px;
}
.fineprint{margin-top:14px;color:rgba(255,255,255,.55);font-size:12px;line-height:1.35}

.hidden{display:none !important}

.mapWrap{
  width:min(1180px, 96vw);
  height:min(700px, 80vh);
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:18px;
  align-items:stretch;
}
.mapBg{
  position:relative;
  border-radius:22px;
  border:1px solid var(--outline);
  overflow:hidden;
  background:
    radial-gradient(900px 600px at 50% 45%, rgba(245,154,19,.10), rgba(0,0,0,0) 55%),
    radial-gradient(700px 500px at 35% 60%, rgba(120,160,255,.10), rgba(0,0,0,0) 58%),
    #07090c;
  box-shadow:var(--shadow);
}
.leafletMap{
  position:absolute;
  inset:0;
  z-index:0;
}
.mapGrid{
  position:absolute;inset:0;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity:.35;
  mix-blend-mode:screen;
  z-index:2;
  pointer-events:none;
}
.radar{position:absolute;inset:0;display:grid;place-items:center}
.radar{z-index:3;pointer-events:none}
.ring{position:absolute;border-radius:50%;border:2px solid rgba(245,154,19,.22);box-shadow:0 0 0 6px rgba(245,154,19,.04)}
.ring1{width:160px;height:160px}
.ring2{width:260px;height:260px;border-color:rgba(245,154,19,.18)}
.ring3{width:380px;height:380px;border-color:rgba(245,154,19,.12)}

.avatar{
  position:absolute;left:50%;top:48%;
  transform:translate(-50%,-50%);
  width:74px;height:74px;border-radius:50%;
  background:rgba(245,154,19,.18);
  border:2px solid rgba(245,154,19,.55);
  display:grid;place-items:center;
  box-shadow:0 0 0 12px rgba(245,154,19,.08);
  z-index:4;
  pointer-events:none;
}
.avatarInner{
  width:52px;height:52px;border-radius:50%;
  background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.16);
}
.avatarLabel{
  position:absolute;top:78px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  padding:6px 10px;border-radius:999px;
  font-size:12px;color:rgba(255,255,255,.84);
}

.panel{
  border-radius:22px;
  border:1px solid var(--outline);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:var(--shadow);
  display:flex;flex-direction:column;overflow:hidden;
}
.panelTop{padding:14px 14px 12px;border-bottom:1px solid rgba(255,255,255,.06)}
.tabs{
  display:flex;
  gap:10px;
  padding:8px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.28);
}
.tab{
  cursor:pointer;
  flex:1;
  border:0;
  background:transparent;
  color:rgba(255,255,255,.72);
  font-weight:800;
  padding:10px 10px;
  border-radius:12px;
  letter-spacing:.01em;
}
.tab.active{
  background:linear-gradient(180deg, var(--accent2), var(--accent));
  color:#160d00;
  box-shadow:0 10px 24px rgba(245,154,19,.18);
}
.searchRow{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.32);
}
.search{
  flex:1;
  border:0;
  outline:none;
  color:rgba(255,255,255,.86);
  background:transparent;
  font-weight:600;
}
.searchIcon{
  width:14px;height:14px;border-radius:50%;
  border:2px solid rgba(255,255,255,.52);
  position:relative;
  opacity:.9;
}
.searchIcon:after{
  content:"";
  position:absolute;
  width:8px;height:2px;
  background:rgba(255,255,255,.52);
  right:-7px;bottom:-4px;
  transform:rotate(45deg);
  border-radius:2px;
}
.me{display:flex;gap:12px;align-items:center}
.badge{
  width:44px;height:44px;border-radius:14px;
  background:rgba(245,154,19,.18);
  border:1px solid rgba(245,154,19,.45);
  display:grid;place-items:center;
  font-weight:900;letter-spacing:.04em;color:var(--accent2);
}
.meta{flex:1}
.nameRow{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.name{font-weight:800}
.sub{font-size:12px;color:rgba(255,255,255,.55)}
.stats{margin-top:6px;font-size:12px;color:rgba(255,255,255,.62)}
.sep{margin:0 8px;color:rgba(255,255,255,.20)}

.panelBody{padding:14px 16px;flex:1}
.meRow{margin-bottom:12px}
.row{display:flex;gap:10px;align-items:center}
.label{font-size:12px;color:rgba(255,255,255,.65);min-width:68px}
.input{
  flex:1;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.88);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
.input:focus{border-color:rgba(245,154,19,.45);box-shadow:0 0 0 3px rgba(245,154,19,.12)}
.btnSmall{
  cursor:pointer;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.80);
  border-radius:12px;
  padding:10px 12px;
  font-weight:700;
}
.help{margin-top:12px;color:rgba(255,255,255,.56);font-size:12px;line-height:1.35}
.emptyNote{
  margin-top:12px;
  padding:12px 12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.12);
  color:rgba(255,255,255,.55);
  font-size:12px;
  line-height:1.35;
}
.modeView{min-height:240px}
.emptyState{
  padding:16px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
}
.emptyTitle{font-weight:900;letter-spacing:.02em;margin-bottom:8px}
.emptyText{color:rgba(255,255,255,.62);font-size:12px;line-height:1.4}
.wideAction{
  cursor:pointer;
  width:100%;
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(120,200,255,.35);
  background:rgba(120,200,255,.06);
  color:rgba(180,230,255,.90);
  font-weight:800;
  display:flex;justify-content:center;align-items:center;gap:10px;
}
.wideAction.secondary{
  border-color:rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.70);
}
.wideAction:disabled{opacity:.45;cursor:not-allowed}
.plusIcon{
  width:12px;height:12px;position:relative;
}
.plusIcon:before,.plusIcon:after{
  content:"";
  position:absolute;left:50%;top:50%;
  background:rgba(180,230,255,.95);
  transform:translate(-50%,-50%);
  border-radius:2px;
}
.plusIcon:before{width:12px;height:2px}
.plusIcon:after{width:2px;height:12px}
.list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.listItem{
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.24);
}
.listTitle{font-weight:900}
.listDesc{margin-top:6px;color:rgba(255,255,255,.60);font-size:12px;line-height:1.35}
.badgeMini{
  display:inline-flex;align-items:center;
  margin-top:10px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(245,154,19,.35);
  background:rgba(245,154,19,.10);
  color:rgba(255,255,255,.75);
  font-size:11px;
  font-weight:800;
}

.modalWrap{
  position:fixed;inset:0;
  background:rgba(0,0,0,.55);
  display:grid;place-items:center;
  padding:18px;
  z-index:1000;
}
.modal{
  width:min(520px, 92vw);
  background:rgba(22,24,28,.92);
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  box-shadow:0 30px 90px rgba(0,0,0,.75);
  padding:18px 18px 16px;
  backdrop-filter: blur(14px);
}
.modalTitle{font-size:22px;font-weight:900;margin:6px 0 14px}
.modalField{margin-top:12px;position:relative}
.modalLabel{display:block;font-size:12px;color:rgba(255,255,255,.62);margin-bottom:8px}
.modalInput{
  width:100%;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.88);
  border-radius:14px;
  padding:12px 12px;
  outline:none;
}
.modalInput:focus{border-color:rgba(245,154,19,.45);box-shadow:0 0 0 3px rgba(245,154,19,.12)}
.modalCount{
  position:absolute;right:10px;top:38px;
  font-size:11px;color:rgba(255,255,255,.38);
}
.toggleRow{
  margin-top:14px;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.toggleTitle{font-weight:900}
.toggleSub{margin-top:4px;font-size:12px;color:rgba(255,255,255,.58);line-height:1.35}
.toggle{
  width:56px;height:32px;border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  position:relative;
  cursor:pointer;
}
.toggle:before{
  content:"";
  position:absolute;top:50%;left:4px;
  width:24px;height:24px;border-radius:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.72);
  transition: left .16s ease, background .16s ease;
}
.toggle.on{
  border-color:rgba(46,204,113,.45);
  background:rgba(46,204,113,.10);
}
.toggle.on:before{left:28px;background:rgba(46,204,113,.90)}
.modalActions{
  margin-top:14px;
  display:flex;justify-content:flex-end;gap:10px;align-items:center;
}

.pttDock{
  padding:14px 16px 16px;
  border-top:1px solid rgba(255,255,255,.06);
  display:flex;flex-direction:column;align-items:center;gap:10px;
}
.ptt{
  cursor:pointer;
  width:92px;height:92px;border-radius:50%;
  border:2px solid rgba(245,154,19,.55);
  background:radial-gradient(circle at 40% 30%, rgba(255,255,255,.16), rgba(0,0,0,.25) 58%), rgba(245,154,19,.14);
  box-shadow:0 22px 50px rgba(245,154,19,.18);
  display:grid;place-items:center;
  user-select:none;
}
.ptt:disabled{opacity:.45;cursor:not-allowed}
.pttInner{display:flex;flex-direction:column;align-items:center;gap:6px}
.micIcon{
  width:22px;height:30px;border-radius:12px;
  border:2px solid rgba(255,255,255,.85);
  position:relative;
}
.micIcon:before{
  content:"";
  position:absolute;left:50%;top:72%;
  width:18px;height:10px;transform:translate(-50%,-50%);
  border:2px solid rgba(255,255,255,.85);
  border-top:0;border-bottom-left-radius:14px;border-bottom-right-radius:14px;
  opacity:.9;
}
.micIcon:after{
  content:"";
  position:absolute;left:50%;top:104%;
  width:2px;height:10px;transform:translateX(-50%);
  background:rgba(255,255,255,.85);border-radius:2px;
}
.pttText{font-weight:900;letter-spacing:.10em;color:rgba(255,255,255,.92);font-size:12px}
.pttHint{font-size:12px;color:rgba(255,255,255,.60)}

.ptt.talking{
  border-color:rgba(46,204,113,.75);
  box-shadow:0 0 0 6px rgba(46,204,113,.08), 0 22px 50px rgba(46,204,113,.18);
}

@media (max-width: 980px){
  .mapWrap{grid-template-columns:1fr; height:auto}
  .panel{min-height:360px}
  .mapBg{height:420px}
  .tabs{gap:8px}
  .tab{padding:10px 8px;font-size:13px}
  .modeView{min-height:auto}
  .row{flex-wrap:wrap}
  .label{min-width:auto}
  .btnSmall{width:100%}
}

