*{box-sizing:border-box} :root{--bg:#edf3f7;--panel:rgba(255,255,255,.94);--solid:#fff;--ink:#10202f;--muted:#66798a;--line:#bfd0de;--blue:#1387c9;--blue2:#005b8e;--dark:#08243a;--green:#067047;--red:#8b1e22;--orange:#d87919;--yellow:#f2c84b;--cyan:#16c4d8;--shadow:0 12px 28px rgba(8,28,48,.18);--drawer:430px}html,body{height:100%;margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{border:0;border-radius:6px;font-weight:800;cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}.primary{background:var(--blue2);color:#fff;padding:10px 14px}.secondary{background:#e6eef6;color:var(--ink);padding:10px 14px;border:1px solid var(--line)}.danger{background:var(--red);color:#fff;padding:10px 14px}.muted{color:var(--muted)}.small{font-size:12px}.hint{line-height:1.35}.map-page,.platform-shell{height:100vh;width:100vw;overflow:hidden}.platform-shell{display:flex}.map-stage{position:relative;flex:1 1 auto;min-width:0;height:100vh;background:#d8e4ed}#map{height:100%;width:100%}.workflow-drawer{height:100vh;background:var(--solid);border-left:1px solid var(--line);box-shadow:-10px 0 28px rgba(0,0,0,.16);width:var(--drawer);flex:0 0 var(--drawer);overflow:hidden;transition:width .22s ease,flex-basis .22s ease}.workflow-drawer.closed{width:0;flex-basis:0;border-left:0}.drawer-head{height:86px;padding:18px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between}.drawer-head h2{margin:5px 0 0;color:var(--blue2)}.drawer-section{padding:14px 18px;border-bottom:1px solid #d9e5ee}.drawer-section h3{margin:0 0 10px;color:var(--ink)}.workflow-drawer{overflow-y:auto}.sticky-actions{padding-bottom:32px}.eyebrow{display:inline-block;background:var(--dark);color:#fff;padding:6px 12px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;font-size:12px}.small-eyebrow{font-size:11px;padding:5px 10px}.mini-button{background:#dce8f0;color:var(--ink);padding:7px 10px;min-width:36px}.form-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}label{display:block;font-weight:800;margin:9px 0}input,select,textarea{width:100%;margin-top:5px;border:1px solid var(--line);border-radius:5px;padding:8px 10px;background:#fff;color:var(--ink)}select[multiple]{min-height:120px}.status{margin-top:8px;border:1px solid var(--line);border-radius:5px;background:#f7fbfe;padding:8px 10px;font-size:13px;line-height:1.35}.image-preview{min-height:120px;border:1px dashed var(--line);border-radius:6px;background:#f7fbfe;display:grid;place-items:center;overflow:hidden;color:var(--muted);margin-top:8px}.image-preview img{max-width:100%;max-height:280px}.floating-title{position:absolute;z-index:520;left:20px;top:20px;width:min(420px,38vw);background:rgba(255,255,255,.90);padding:12px 16px 14px;border-left:6px solid var(--blue);box-shadow:var(--shadow)}.floating-title h1{font-size:24px;line-height:1.12;margin:10px 0}.quick-search{border-top:1px solid rgba(170,190,205,.7);padding-top:10px}.quick-row{display:grid;grid-template-columns:120px 1fr 40px;gap:6px}.quick-row select,.quick-row input{margin:0;font-size:13px}.quick-results{margin-top:8px;max-height:210px;overflow:auto;border:1px solid var(--line);border-radius:6px;background:#fff}.quick-result{padding:8px 9px;border-bottom:1px solid #e5eef5;cursor:pointer}.quick-result:hover{background:#eef7fd}.map-tool-dock{position:absolute;z-index:760;top:22px;right:18px;display:flex;flex-direction:column;gap:10px;align-items:flex-end}.map-icon-btn{width:46px;height:46px;padding:0;border:1px solid var(--line);background:rgba(255,255,255,.96);color:var(--dark);box-shadow:var(--shadow);border-radius:6px;font-size:22px;line-height:1}.map-icon-btn:hover{background:var(--blue);color:#fff}.layer-tool{position:relative}.layer-popover{position:absolute;top:0;right:58px;width:245px;background:rgba(255,255,255,.98);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:8px;padding:10px 12px}.layer-popover label{display:flex;gap:8px;align-items:center;margin:8px 0}.layer-popover input{width:auto;margin:0}.floating-panel{position:absolute;z-index:700;background:rgba(255,255,255,.96);border:1px solid var(--line);box-shadow:var(--shadow);border-left:6px solid var(--blue);padding:13px}.query-panel{right:76px;top:20px;width:370px;max-height:calc(100vh - 50px);overflow:auto}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-head h2{margin:0;color:var(--blue2)}.panel-head.compact h2{font-size:19px}.clickable{cursor:pointer}.recent-panel{left:20px;bottom:20px;width:360px;max-height:300px;overflow:hidden}.recent-panel.collapsed{width:300px;padding:10px 12px}.recent-panel.collapsed #recentActivityList{display:none}.activity-list{display:flex;flex-direction:column;gap:7px;margin-top:8px}.activity-row{font-size:13px;border-top:1px solid #d8e3ed;padding-top:6px}.radio-stack label{display:block;margin:5px 0;font-weight:700}.radio-stack input{width:auto;margin:0 6px 0 0}.query-subblock{border:1px solid #d9e5ee;background:#f8fbfe;padding:9px;border-radius:6px;margin:8px 0}.record-list,.compact-list,.context-rows{display:flex;flex-direction:column;gap:8px}.draft-card,.record-item,.context-row,.context-result{border:1px solid var(--line);border-radius:6px;background:#f8fbfe;padding:10px}.draft-card.selected{border-color:var(--blue);box-shadow:0 0 0 2px rgba(19,135,201,.18)}.meta{font-size:12px;color:var(--muted);line-height:1.35}.context-row-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.context-grid{display:grid;grid-template-columns:135px 1fr;gap:7px}.context-results{max-height:180px;overflow:auto}.bound-chip{display:inline-block;background:#eaf7ef;border:1px solid #afd7bf;color:#075b3a;border-radius:999px;padding:4px 8px;font-size:12px;margin-top:6px}.leaflet-control-zoom{box-shadow:var(--shadow)!important}.vr-marker{width:24px;height:24px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:3px solid #fff;box-shadow:0 2px 7px rgba(0,0,0,.35)}.vr-marker::after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;left:5px;top:5px}.vr-marker.approved{background:#1c8dd3}.vr-marker.draft{background:#d87919}.vr-marker.selected{background:#f2c84b;border-color:#0b3c5d;box-shadow:0 0 0 4px rgba(242,200,75,.35),0 2px 9px rgba(0,0,0,.45)}.vr-marker.spider{background:#16c4d8;border-color:#fff}.spider-line{stroke:#666}.infocard{min-width:250px;max-width:330px}.infocard img{max-width:100%;border:1px solid var(--line);border-radius:5px;cursor:pointer}.infocard h3{margin:7px 0 4px}.linked-list{margin:6px 0 0 16px;padding:0}.image-lightbox{position:absolute;z-index:10000;inset:0;background:rgba(0,0,0,.78);display:flex;align-items:center;justify-content:center}.image-lightbox img{max-width:90%;max-height:88%;box-shadow:0 0 30px rgba(0,0,0,.5);background:#fff}.lightbox-close{position:absolute;right:22px;top:18px;background:#fff;color:#111;border-radius:50%;width:42px;height:42px;font-size:28px}.admin-page{min-height:100vh;padding:22px 26px}.admin-topbar{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid var(--line);padding-bottom:14px;margin-bottom:16px}.admin-topbar h1{margin:8px 0 0}.card{background:#fff;border:1px solid var(--line);border-left:6px solid var(--blue);box-shadow:var(--shadow);padding:14px}.admin-login{max-width:440px;margin:55px auto}.admin-dashboard{display:grid;grid-template-columns:minmax(520px,1fr) 440px;gap:18px}.admin-map-card{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);overflow:hidden}#adminMap{height:calc(100vh - 130px);min-height:650px}.admin-side{display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - 130px);overflow:auto}.detail-box{background:#f8fbfe;border:1px solid var(--line);border-radius:6px;padding:10px;max-height:330px;overflow:auto}.detail-box img{max-width:100%;border:1px solid var(--line);border-radius:5px;margin-bottom:8px}@media(max-width:980px){:root{--drawer:390px}.floating-title{width:320px;transform:scale(.92);transform-origin:top left}.recent-panel{width:310px}.query-panel{right:65px;width:320px}.admin-dashboard{grid-template-columns:1fr}#adminMap{height:520px;min-height:520px}}
/* v2.3 EXIF metadata modal and direction-ring selected symbol */
.metadata-modal{
  position:absolute;
  z-index:1200;
  inset:0;
  background:rgba(8,20,32,.35);
  display:grid;
  place-items:center;
}
.metadata-modal-card{
  width:min(460px,calc(100vw - 32px));
  background:#fff;
  border:1px solid var(--line);
  border-left:6px solid var(--blue);
  box-shadow:var(--shadow);
  border-radius:10px;
  padding:16px;
}
.metadata-summary{
  padding:10px 12px;
  background:#f6fbff;
  border:1px solid var(--line);
  border-radius:6px;
  line-height:1.45;
  margin:10px 0;
}
.metadata-options label{
  display:flex;
  gap:8px;
  align-items:center;
  margin:9px 0;
  font-weight:700;
}
.metadata-options input{
  width:auto;
  margin:0;
}
.vr-selected-direction-symbol{
  width:46px;
  height:46px;
  position:relative;
  pointer-events:none;
}
.vr-selected-direction-symbol .vr-selected-ring{
  position:absolute;
  left:5px;
  top:5px;
  width:36px;
  height:36px;
  border:3px solid #12324d;
  border-radius:50%;
  background:rgba(242,200,75,.18);
  box-shadow:0 3px 8px rgba(8,28,48,.28);
}
.vr-selected-direction-symbol .vr-selected-core{
  position:absolute;
  left:16px;
  top:16px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ffcf33;
  border:3px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.35);
}
.vr-selected-direction-symbol .vr-direction-pointer{
  position:absolute;
  left:20px;
  top:1px;
  width:6px;
  height:14px;
  background:#f2c84b;
  border:1px solid #12324d;
  border-radius:5px;
  transform-origin:3px 22px;
  box-shadow:0 1px 3px rgba(0,0,0,.35);
}
.vr-selected-direction-symbol.no-direction .vr-direction-pointer{
  display:none;
}
.infocard-section{
  margin-top:8px;
}
.infocard-section ul{
  margin:4px 0 0 18px;
  padding:0;
}


/* =========================
   v2.5 interaction refinement
   ========================= */
.vr-pin-wrap{width:36px;height:46px;position:relative;pointer-events:none;}
.vr-pin{position:absolute;left:6px;top:2px;width:24px;height:24px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);transform-origin:50% 50%;border:3px solid #fff;box-shadow:0 2px 7px rgba(0,0,0,.35);}
.vr-pin::after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;left:5px;top:5px;}
.vr-pin.approved{background:#1c8dd3;}
.vr-pin.draft{background:#d87919;}
.vr-pin.spider{background:#16c4d8;}
.vr-pin.selected{background:#f2c84b;border-color:#0b3c5d;box-shadow:0 0 0 4px rgba(242,200,75,.35),0 2px 9px rgba(0,0,0,.45);}
/* keep old generated markers harmless if any old HTML remains */
.vr-marker{display:none;}

.record-info-panel{position:absolute;z-index:980;left:24px;top:132px;width:390px;max-width:min(420px,calc(100vw - 48px));max-height:calc(100vh - 164px);background:#fff;border:1px solid var(--line);border-left:6px solid var(--blue);box-shadow:var(--shadow);border-radius:10px;overflow:hidden;}
.record-info-panel.minimized .record-info-body{display:none;}
.record-info-head{height:46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#f5f9fc;border-bottom:1px solid var(--line);cursor:move;user-select:none;}
.record-info-head-title{font-weight:900;color:var(--blue2);}
.record-info-actions{display:flex;gap:6px;}
.record-info-body{padding:14px;overflow:auto;max-height:calc(100vh - 212px);}
.record-info-body .infocard{max-width:none;min-width:0;}
.record-info-body .infocard img{width:100%;max-height:260px;object-fit:cover;border:1px solid var(--line);border-radius:6px;}

.title-collapse-btn{position:absolute;right:8px;top:8px;background:#dce8f0;color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:4px 8px;z-index:2;}
.floating-title.collapsed-title{width:min(400px,36vw);padding-top:12px;}
.floating-title.collapsed-title .eyebrow,
.floating-title.collapsed-title h1{display:none;}
.floating-title.collapsed-title .quick-search{border-top:0;padding-top:0;margin-right:34px;}

.busy-overlay{position:fixed;inset:0;z-index:20000;background:rgba(7,22,35,.46);backdrop-filter:blur(2px);display:grid;place-items:center;pointer-events:auto;}
.busy-card{width:min(420px,calc(100vw - 40px));background:#fff;border:1px solid var(--line);border-left:7px solid var(--blue);border-radius:12px;box-shadow:0 18px 44px rgba(0,0,0,.32);padding:22px;text-align:center;}
.busy-spinner{width:42px;height:42px;border:5px solid #dce8f0;border-top-color:var(--blue);border-radius:50%;animation:vrspin 1s linear infinite;margin:0 auto 12px;}
.busy-card h2{margin:4px 0 6px;color:var(--blue2);}
.busy-card p{margin:0 0 12px;color:var(--muted);}
.busy-progress{height:7px;background:#e8f1f7;border-radius:999px;overflow:hidden;margin:10px 0;}
.busy-progress div{height:100%;width:35%;background:var(--blue);border-radius:999px;animation:vrprogress 1.4s ease-in-out infinite;}
.busy-stage{font-size:12px;color:var(--muted);}
@keyframes vrspin{to{transform:rotate(360deg)}}
@keyframes vrprogress{0%{transform:translateX(-120%);width:35%}50%{width:55%}100%{transform:translateX(300%);width:35%}}
body.vr-busy{cursor:wait;}
body.vr-busy button,body.vr-busy input,body.vr-busy select,body.vr-busy textarea{pointer-events:none;}
.busy-overlay button,.busy-overlay input,.busy-overlay select,.busy-overlay textarea{pointer-events:auto;}

.admin-page{height:100vh;padding:0;overflow:hidden;}
.admin-shell{height:100vh;display:flex;flex-direction:column;}
.admin-topbar{height:82px;flex:0 0 82px;padding:12px 18px;margin:0;border-bottom:1px solid var(--line);background:#fff;box-shadow:0 3px 12px rgba(8,28,48,.08);}
.admin-topbar h1{font-size:22px;margin:5px 0 0;}
.admin-grid{display:flex;flex:1 1 auto;min-height:0;gap:0;}
.admin-map-card{flex:1 1 auto;min-width:0;border:0;border-right:1px solid var(--line);box-shadow:none;background:#d8e4ed;}
#adminMap{height:100%;min-height:0;width:100%;}
.admin-side{width:440px;flex:0 0 440px;max-height:none;height:100%;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:14px;background:#edf3f7;border-left:1px solid var(--line);}
.admin-side .card{box-shadow:0 7px 18px rgba(8,28,48,.12);}
@media(max-width:900px){.admin-page{overflow:auto}.admin-shell{height:auto;min-height:100vh}.admin-topbar{height:auto;flex-basis:auto}.admin-grid{flex-direction:column}.admin-map-card{height:46vh;min-height:380px}.admin-side{width:100%;flex:auto;height:auto;max-height:none}.record-info-panel{left:10px!important;right:10px;bottom:12px;top:auto!important;width:auto;max-width:none;max-height:62vh}.record-info-body{max-height:calc(62vh - 48px)}.floating-title.collapsed-title{width:min(360px,80vw)}}
/* v2.5 final interaction refinements */
.title-collapse-btn{
  position:absolute;
  right:10px;
  top:10px;
  width:34px;
  height:34px;
  border-radius:8px;
  background:#e7f0f7;
  color:var(--dark);
  border:1px solid var(--line);
  z-index:2;
}
.floating-title{
  transition:width .18s ease, max-height .18s ease;
}
.floating-title.collapsed .title-main-block{
  display:none;
}
.floating-title.collapsed{
  width:min(470px,calc(100vw - 120px));
}
.floating-title.collapsed .quick-search{
  margin-top:0;
}
.floating-title.collapsed .title-collapse-btn{
  top:8px;
}
.direction-simple-actions .primary{
  min-width:235px;
}
.direction-simple-actions .secondary{
  min-width:170px;
}

.vr-pin-wrap{
  width:32px;
  height:42px;
  position:relative;
  pointer-events:none;
}
.vr-pin{
  position:absolute;
  left:4px;
  top:1px;
  width:24px;
  height:24px;
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  transform-origin:50% 50%;
  border:3px solid #fff;
  box-shadow:0 3px 7px rgba(0,0,0,.32);
}
.vr-pin::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  left:5px;
  top:5px;
  border-radius:50%;
  background:#fff;
}
.vr-pin.approved{background:var(--blue)}
.vr-pin.draft{background:var(--orange)}
.vr-pin.spider{background:var(--cyan)}
.vr-pin.deleted{background:#8b8f96;border-color:#b51f2e;opacity:.82}
.vr-pin.candidate{background:#7f6bd8}
.vr-pin.selected{background:var(--yellow)}
.vr-selected-direction-symbol{
  width:46px;
  height:46px;
  position:relative;
  pointer-events:none;
}
.vr-selected-direction-symbol .vr-selected-ring{
  position:absolute;
  left:5px;
  top:5px;
  width:36px;
  height:36px;
  border:3px solid #12324d;
  border-radius:50%;
  background:rgba(242,200,75,.18);
  box-shadow:0 3px 8px rgba(8,28,48,.28);
}
.vr-selected-direction-symbol .vr-selected-core{
  position:absolute;
  left:16px;
  top:16px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ffcf33;
  border:3px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.35);
}
.vr-selected-direction-symbol .vr-direction-pointer{
  position:absolute;
  left:20px;
  top:1px;
  width:6px;
  height:14px;
  background:#f2c84b;
  border:1px solid #12324d;
  border-radius:5px;
  transform-origin:3px 22px;
  box-shadow:0 1px 3px rgba(0,0,0,.35);
}
.vr-selected-direction-symbol.no-direction .vr-direction-pointer{display:none}

.record-info-panel{
  position:absolute;
  width:min(440px,calc(100vw - 32px));
  max-height:calc(100vh - 92px);
  background:#fff;
  border:1px solid var(--line);
  border-left:6px solid var(--blue);
  border-radius:12px;
  box-shadow:var(--shadow);
  z-index:850;
  overflow:hidden;
}
.record-info-panel.minimized .record-info-body{display:none}
.record-info-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px 10px 16px;
  background:#f7fbff;
  border-bottom:1px solid var(--line);
  cursor:move;
}
.record-info-head h2{margin:0;color:var(--blue2)}
.record-info-body{
  padding:16px;
  overflow:auto;
  max-height:calc(100vh - 155px);
}
.record-info-body img{
  width:100%;
  max-height:310px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid var(--line);
}
.record-info-body h3{font-size:24px;margin:14px 0 4px}
.record-info-body .meta{color:var(--muted);line-height:1.3}
.panel-actions{display:flex;gap:8px}
.app-dialog{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  z-index:1700;
  background:rgba(8,20,32,.38);
  backdrop-filter:blur(2px);
}
.app-dialog-card{
  width:min(460px,calc(100vw - 34px));
  background:#fff;
  border:1px solid var(--line);
  border-left:6px solid var(--blue);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:18px;
}
.app-dialog-card h2{margin:0 0 10px;color:var(--blue2)}
.app-dialog-message{line-height:1.45;margin-bottom:14px;white-space:pre-line}
.app-dialog input{width:100%;margin:8px 0 14px;padding:10px;border:1px solid var(--line);border-radius:6px}
.quick-result .badge,.record-item .badge{
  display:inline-block;
  padding:2px 6px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:#e8f2f8;
  color:#0c4e77;
  margin-left:6px;
}
.record-item.deleted{opacity:.75;border-left:4px solid #b51f2e;background:#fff8f8}
.record-item.active{border-left:4px solid var(--blue)}
.admin-map-tools{
  position:absolute;
  z-index:600;
  top:14px;
  left:14px;
  width:min(400px,calc(100% - 28px));
  background:rgba(255,255,255,.94);
  border:1px solid var(--line);
  border-left:5px solid var(--blue);
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:10px;
}
.admin-map-tools .quick-row{display:flex;gap:8px;margin-bottom:8px}
.admin-map-tools input,.admin-map-tools select{height:38px}
.admin-query-mini{display:none;margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.admin-query-mini.open{display:block}
.admin-info-panel .record-info-head .edit-info-btn{background:var(--green);color:#fff;padding:8px 10px}
.admin-edit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.admin-edit-actions .restore{background:#e6f4ed;color:#065f3b;border:1px solid #a6d8bf}
.admin-edit-actions .hard-delete{background:#3a1114;color:#fff}
@media(max-width:760px){
  .record-info-panel{
    left:10px!important;
    right:10px;
    bottom:12px;
    top:auto!important;
    width:auto;
    max-height:65vh;
  }
  .record-info-body{max-height:55vh}
}


/* =========================
   v2.5.1 critical hotfixes
   ========================= */
.busy-overlay{z-index:30000!important;}
.app-dialog{z-index:40000!important;}
.app-dialog.hidden{display:none!important;}
.admin-map-card{position:relative!important;}
.admin-map-tools{
  top:auto!important;
  bottom:18px!important;
  left:18px!important;
  right:auto!important;
  width:min(430px,calc(100% - 36px))!important;
}
.admin-map-tools .quick-row{
  display:grid!important;
  grid-template-columns:1fr 42px auto!important;
  gap:8px!important;
}
.vr-svg-pin-wrap{width:32px;height:42px;pointer-events:none;}
.vr-svg-pin{display:block;overflow:visible;filter:drop-shadow(0 2px 5px rgba(0,0,0,.32));}
.vr-pin-wrap,.vr-pin{pointer-events:none;}
/* =========================
   v3.1 targeted fixes
   ========================= */

/* Keep Leaflet controls below custom information panels. */
.leaflet-control-container,
.leaflet-top,
.leaflet-bottom {
  z-index: 650 !important;
}

.record-info-panel,
.admin-info-panel {
  z-index: 12000 !important;
}

.busy-overlay {
  z-index: 30000 !important;
}

.app-dialog {
  z-index: 40000 !important;
}

.vr-direction-guide-line {
  pointer-events: none;
}


/* =========================
   v3.1 final targeted fixes
   ========================= */

.image-lightbox {
  position: fixed !important;
  z-index: 60000 !important;
  pointer-events: auto !important;
}

.image-lightbox.hidden {
  display: none !important;
}

.lightbox-close {
  z-index: 60010 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.candidate-detail-card {
  display: grid;
  gap: 10px;
  line-height: 1.35;
}

.candidate-detail-card img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.candidate-detail-card h3 {
  margin: 4px 0 0;
  color: var(--ink);
}

.candidate-detail-meta {
  color: var(--muted);
  font-weight: 700;
}

.candidate-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.candidate-detail-section ul {
  margin: 6px 0 0 20px;
  padding: 0;
}

.candidate-detail-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 5px 10px;
  font-size: 0.95em;
}

.candidate-detail-grid b {
  color: var(--ink);
}
/* =========================
   v3.1.2 drawing cursor refinement
   ========================= */

/* Force a crosshair cursor while the user is in point, direction, or bbox picking modes.
   Leaflet often applies .leaflet-grab / .leaflet-dragging cursors internally, so this
   selector intentionally uses several targets plus !important. */
.leaflet-container.vr-crosshair-mode,
.leaflet-container.vr-crosshair-mode *,
.leaflet-container.vr-crosshair-mode .leaflet-grab,
.leaflet-container.vr-crosshair-mode .leaflet-dragging,
.leaflet-container.vr-crosshair-mode .leaflet-interactive {
  cursor: crosshair !important;
}


/* v3.1.2 hotfix: InfoCard post-image-load positioning and drag range */
.record-info-panel,
.admin-info-panel {
  max-height: calc(100vh - 18px) !important;
}

.record-info-body,
.admin-info-body {
  max-height: calc(100vh - 110px) !important;
  overflow-y: auto !important;
}


/* v3.1.2 hotfix: Admin selected candidate detail width + image lightbox */
#candidateDetail,
.candidate-detail-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.candidate-detail-card * {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.candidate-detail-card {
  min-width: 0 !important;
}

.candidate-detail-card img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 360px !important;
  object-fit: cover !important;
  cursor: zoom-in !important;
}

.candidate-detail-grid {
  display: grid !important;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr) !important;
  gap: 6px 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.candidate-detail-grid > div {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
}

.candidate-detail-section,
.candidate-detail-section li,
.candidate-detail-meta {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
}

.vr-admin-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.vr-admin-lightbox.hidden {
  display: none !important;
}

.vr-admin-lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  background: #111;
}

.vr-admin-lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #102033;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  z-index: 70010;
}
