*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI","Noto Sans KR",sans-serif;
}


body{
    background:#020617;
    color:white;
    overflow:hidden;
}

/* =========================
   시작화면
========================= */

.start-screen{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;

    background:
    radial-gradient(circle at top,#0ea5e944 0%,transparent 40%),
    linear-gradient(#020617,#0f172a);

    z-index:9999;
}

.start-card{

    width:500px;

    background:#111827;

    border:1px solid #334155;

    border-radius:24px;

    padding:45px;

    text-align:center;

    box-shadow:0 20px 60px rgba(0,0,0,.45);

}

.company{

    font-size:28px;

    font-weight:800;

    margin-bottom:15px;

}

.start-card h1{

    color:#38bdf8;

    font-size:40px;

    margin-bottom:15px;

}

.start-card p{

    color:#94a3b8;

    margin-bottom:30px;

    line-height:1.7;

}

.start-card input{

    width:100%;

    padding:15px;

    margin-bottom:15px;

    border-radius:12px;

    border:1px solid #334155;

    background:#020617;

    color:white;

    font-size:16px;

}

.start-card button{

    width:100%;

    padding:15px;

    border:none;

    border-radius:12px;

    background:#0284c7;

    color:white;

    cursor:pointer;

    font-size:16px;

    font-weight:bold;

    transition:.25s;

}

.start-card button:hover{

    background:#0369a1;

}

/* =========================
   Header
========================= */

header{

    height:70px;

    background:#111827;

    border-bottom:1px solid #334155;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 25px;

}

.logo{

    font-size:22px;

    font-weight:800;

}

.logo span{

    color:#38bdf8;

}

.header-right{

    display:flex;

    gap:10px;

}

.header-right input{

    width:270px;

    padding:10px;

    border-radius:10px;

    border:1px solid #334155;

    background:#020617;

    color:white;

}

.header-right button{

    padding:10px 18px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    background:#334155;

    color:white;

    font-weight:bold;

}

.header-right button:hover{

    background:#0284c7;

}

/* =========================
   Layout
========================= */

.layout{

    display:grid;

    grid-template-columns:260px 1fr 360px;

    height:calc(100vh - 70px);

}

aside{

    background:#111827;

    border-right:1px solid #334155;

    overflow:auto;

    padding:18px;

}

main{

    background:black;

}

#panorama{

    width:100%;

    height:100%;

}

.info{

    background:#111827;

    border-left:1px solid #334155;

    overflow:auto;

    padding:20px;

}

/* =========================
   Card
========================= */

.card{

    background:#1e293b;

    border-radius:16px;

    padding:18px;

    margin-bottom:15px;

    border:1px solid #334155;

}


.area-title{
    display:block;
    margin:18px 0 10px;
    color:#38bdf8;
    font-weight:900;
    font-size:16px;
    cursor:pointer;
    user-select:none;
}

.floor-group{
    display:none;
    margin-bottom:18px;
}

.floor-group.open{
    display:block;
}

.floor-btn{
    display:block;
    width:100%;
    padding:13px 14px;
    margin-bottom:8px;
    background:#1e293b;
    border:1px solid #334155;
    color:white;
    border-radius:12px;
    cursor:pointer;
    text-align:left;
    font-weight:700;
}

.floor-btn:hover{
    background:#334155;
}

.floor-btn.active{
    background:#0284c7;
    border-color:#38bdf8;
}

.custom-hotspot {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.hotspot-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 12px rgba(0,0,0,.7);
}

/* ===========================
   TAG COLOR
=========================== */

.hotspot-major .hotspot-dot {
  background: #E53935;
  border-color: #C62828;
}

.hotspot-pump .hotspot-dot {
  background: #FB8C00;
  border-color: #EF6C00;
}

.hotspot-valve .hotspot-dot {
  background: #FDD835;
  border-color: #F9A825;
}

.hotspot-motor .hotspot-dot {
  background: #8E24AA;
  border-color: #6A1B9A;
}

.hotspot-fan .hotspot-dot {
  background: #F57C00;
  border-color: #E65100;
}

.hotspot-damper .hotspot-dot {
  background: #FFF176;
  border-color: #FBC02D;
}

.hotspot-instrument .hotspot-dot {
  background: #43A047;
  border-color: #2E7D32;
}

.hotspot-breaker .hotspot-dot {
  background: #1E88E5;
  border-color: #1565C0;
}


@keyframes searchBlink {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.9); opacity: 0.25; }
  100% { transform: scale(1); opacity: 1; }
}

.home-screen{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background-image:
    linear-gradient(rgba(2,6,23,.45), rgba(2,6,23,.78)),
    url("/images/plant_main.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.home-card{
  text-align:center;
  padding:50px;
  border:1px solid #334155;
  border-radius:24px;
  background:rgba(17,24,39,.92);
  box-shadow:0 0 45px rgba(56,189,248,.18);
}

.home-card h1{
  font-size:36px;
}

.home-card h2{
  color:#38bdf8;
  font-size:42px;
  margin:12px 0;
}

.home-card p{
  color:#94a3b8;
  line-height:1.8;
}


.tag-form h3 {
  margin-bottom: 15px;
  color: #38bdf8;
}

.tag-form label {
  display: block;
  margin: 12px 0 6px;
  color: #cbd5e1;
  font-weight: bold;
  font-size: 14px;
}

.tag-form input,
.tag-form select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #020617;
  color: white;
}

.save-btn {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #0284c7;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.cancel-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #475569;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
.admin-btn{
    background:#334155;
    color:white;
    border:1px solid #475569;
    border-radius:10px;
    padding:10px 16px;
    font-weight:700;
    cursor:pointer;
    transition:all .25s ease;
}

.admin-btn.on{
    background:#16a34a;
    border:1px solid #22c55e;
    color:white;
    box-shadow:0 0 15px rgba(34,197,94,.45);
}

/* 관리자 모드 */

.admin-mode #panorama{
    outline:4px solid #22c55e;
    outline-offset:-4px;
    transition:.25s;

    cursor:crosshair;
}

.admin-badge{

    background:#16a34a;
    color:white;

    padding:8px 14px;

    border-radius:999px;

    margin-left:15px;

    font-size:13px;

    font-weight:bold;

    box-shadow:0 0 18px rgba(34,197,94,.45);

}

.admin-guide{
  position:absolute;
  bottom:95px;
  left:50%;
  transform:translateX(-50%);

  background:rgba(22,163,74,.95);
  color:white;

  padding:7px 14px;
  border-radius:22px;

  font-size:11px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
  white-space:nowrap;

  max-width:280px;
  overflow:hidden;

  box-shadow:0 0 14px rgba(34,197,94,.45);
  z-index:1200;
}

.temp-hotspot .hotspot-dot{
  background:#fb923c !important;
  border:3px solid white;
  animation: tempPulse .8s infinite;
  box-shadow:0 0 25px #fb923c;
}

@keyframes tempPulse{
  0%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.5); opacity:.45; }
  100%{ transform:scale(1); opacity:1; }
}
.search-card{
  background:linear-gradient(180deg,#1e293b,#111827);
  border:1px solid #334155;
  border-radius:18px;
  padding:18px;
}

.search-card h3{
  color:#38bdf8;
  margin-bottom:16px;
  font-size:20px;
}

.search-card label{
  display:block;
  margin:12px 0 7px;
  color:#cbd5e1;
  font-size:13px;
  font-weight:800;
}

.search-card input,
.search-card select{
  width:100%;
  height:42px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid #334155;
  background:#020617;
  color:white;
  margin-bottom:8px;
  font-weight:600;
}

.search-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}

.search-btn,
.filter-btn,
.reset-filter-btn{
  height:42px;
  border:none;
  border-radius:10px;
  color:white;
  font-weight:800;
  cursor:pointer;
}

.search-btn{
  background:#0284c7;
}

.filter-btn{
  background:#0f766e;
}

.reset-filter-btn{
  width:100%;
  margin-top:8px;
  background:#475569;
}
.admin-help{
  color:#94a3b8;
  font-size:13px;
  margin-right:10px;
  white-space:nowrap;
}

.admin-help{
  color:#94a3b8;
  font-size:13px;
  white-space:nowrap;
}

.hotspot-search .hotspot-dot {
  animation: searchBlink 0.45s ease-in-out infinite;
  box-shadow: 0 0 28px #38bdf8;
  border-color: #38bdf8;
}

.selected-tag-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.selected-label {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.selected-tag-no {
  color: #38bdf8;
  font-size: 22px;
  font-weight: 900;
}
.pid-link.active {
  color: #38bdf8;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
}

.pid-link.active:hover {
  color: #7dd3fc;
}
.pid-link.active,
#pidText.active {
  color: #38bdf8;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
}

.pid-link.active:hover,
#pidText.active:hover {
  color: #7dd3fc;
}

.temp-roadview-link .roadview-arrow {
  background: #22c55e;
  box-shadow: 0 0 25px rgba(34,197,94,.9);
}

/* =========================
   ROADVIEW 개선
========================= */

.roadview-link {
  width: 60px;
  height: 60px;
  cursor: pointer;
  text-align: center;
}

.roadview-label{

    margin-top:4px;

    color:white;

    font-size:11px;

    font-weight:700;

    text-align:center;

    text-shadow:
      0 1px 4px rgba(0,0,0,.9);

}

.roadview-arrow {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(56,189,248,.9);
  transition: transform .2s ease, background .2s ease;
}

.roadview-link:hover .roadview-arrow {
  transform: scale(1.12);
  background: #38bdf8;
  color: white;
}

.temp-roadview-link .roadview-arrow {
  background: #22c55e;
  color: white;
  box-shadow: 0 0 25px rgba(34,197,94,.95);
}

.moving-roadview #panorama {
  opacity: 0.25;
  transform: scale(1.03);
}

#panorama {
  transition: all 0.45s ease;
}

.delete-ready .roadview-arrow {
  background: #dc2626 !important;
  color: white !important;
  box-shadow: 0 0 25px rgba(220,38,38,.95);
}
main {
  position: relative;
}

.roadview-direction-panel {
  position: absolute;
  right: 25px;
  bottom: 25px;
  width: 230px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid #38bdf8;
  border-radius: 18px;
  padding: 16px;
  z-index: 50;
  box-shadow: 0 0 25px rgba(56,189,248,.35);
}

.direction-title {
  text-align: center;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 12px;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.direction-grid button {
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #334155;
  color: white;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
}

.direction-grid button:hover {
  background: #0284c7;
}

.direction-grid button:disabled {
  background: transparent;
  cursor: default;
}

.move-ready .roadview-arrow {
  background: #f59e0b !important;
  color: white !important;
  box-shadow: 0 0 25px rgba(245,158,11,.95);
}

.roadview-arrow-icon {
  display: inline-block;
  line-height: 1;
}
.roadview-link {
  width: 64px;
  height: 64px;
  cursor: pointer;
}

.roadview-move-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.9);
  border: 4px solid white;
  box-shadow: 0 0 18px rgba(56,189,248,.95);
  animation: roadviewPulse 1.4s ease-in-out infinite;
}

@keyframes roadviewPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.65;
  }
}

.delete-ready .roadview-move-dot {
  background: #dc2626 !important;
  box-shadow: 0 0 25px rgba(220,38,38,.95);
}

.move-ready .roadview-move-dot {
  background: #f59e0b !important;
  box-shadow: 0 0 25px rgba(245,158,11,.95);
}

.existing-node-picker h3 {
  color: #38bdf8;
  margin-bottom: 8px;
}

.existing-node-picker p {
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 12px;
}

.existing-node-picker button {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #334155;
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.existing-node-picker button:hover {
  background: #0284c7;
}

.existing-node-picker .cancel-node-picker {
  background: #7f1d1d;
}

.existing-node-picker {
  position: fixed;
  right: 390px;
  top: 90px;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 16px;
  padding: 16px;
  z-index: 9999;
  box-shadow: 0 0 30px rgba(56,189,248,.35);
}

.existing-node-picker h3 {
  color: #38bdf8;
  margin-bottom: 8px;
}

.existing-node-picker p {
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 12px;
}

.node-preview-card {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px;
  border: none;
  border-radius: 12px;
  background: #334155;
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.node-preview-card:hover {
  background: #0284c7;
}

.node-preview-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin-bottom: 6px;
}

.node-preview-card span {
  display: block;
  text-align: center;
}

.cancel-node-picker {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #7f1d1d;
  color: white;
  cursor: pointer;
  font-weight: 800;
}

/* 설비 TAG 은은한 존재감 */
.custom-hotspot:not(.temp-hotspot):not(.hotspot-search) .hotspot-dot {
  animation: tagBreath 2.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes tagBreath {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.12);
    filter: brightness(1.25);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.hidden {
  display: none !important;
}

/* =========================
   RIGHT ACTION MENU - MODERN
========================= */

.info .card:last-of-type {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 18px 40px rgba(0,0,0,.28);
}

.doc-btn {
  position: relative;
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  padding: 0 18px;

  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;

  background: linear-gradient(180deg, #334155, #273449);
  color: #e5e7eb;

  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;

  cursor: pointer;
  transition: all .18s ease;
}

.doc-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, #3b4b63, #2f3f56);
  box-shadow: 0 8px 20px rgba(56,189,248,.12);
}

.doc-btn:active {
  transform: translateY(0);
}

#adminActionPanel {
  margin-top: 14px;
}

.admin-section {
  margin-top: 14px;
  overflow: hidden;

  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 12px 26px rgba(0,0,0,.22);
}

.admin-section[open] {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow:
    inset 4px 0 0 #38bdf8,
    0 16px 30px rgba(0,0,0,.28);
}

.admin-section summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  user-select: none;

  padding: 15px 46px 15px 18px;

  color: #60a5fa;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.admin-section summary::-webkit-details-marker {
  display: none;
}

.admin-section summary::after {
  content: "⌄";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 22px;
  transition: transform .2s ease;
}

.admin-section[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.admin-section summary:hover {
  background: rgba(30, 41, 59, 0.72);
}

.admin-section .doc-btn {
  height: 50px;
  margin: 0;
  border-radius: 0;

  background: rgba(30, 41, 59, 0.72);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);

  box-shadow: none;
}

.admin-section .doc-btn:first-of-type {
  border-top: 1px solid rgba(56, 189, 248, 0.18);
}

.admin-section .doc-btn:last-of-type {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.admin-section .doc-btn:hover {
  transform: none;
  background: rgba(51, 65, 85, 0.92);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #38bdf8;
}

.node-picker-close {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 30px !important;
  height: 30px;
  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 50% !important;

  background: rgba(15, 23, 42, 0.9) !important;
  color: #cbd5e1 !important;

  font-size: 20px;
  font-weight: 800;
  line-height: 26px;
  cursor: pointer;
}

.node-picker-close:hover {
  background: #dc2626 !important;
  color: white !important;
}

.search-result-panel {
  position: fixed;
  right: 390px;
  top: 90px;
  width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 20px;
  padding: 18px;
  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.search-result-panel h3 {
  color: #38bdf8;
  margin-bottom: 8px;
}

.search-result-panel p {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 14px;
}

.search-result-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5e1;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.search-result-close:hover {
  background: #dc2626;
  color: white;
}

.search-result-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 13px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #1e293b, #111827);
  color: white;
  cursor: pointer;
}

.search-result-item:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: #334155;
}

.search-result-item strong {
  display: block;
  color: #38bdf8;
  font-size: 15px;
  margin-bottom: 4px;
}

.search-result-item span {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.search-result-item small {
  color: #94a3b8;
  font-size: 12px;
}

.tag-label-toggle {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #38bdf8;
  border-radius: 999px;
  padding: 9px 16px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(56,189,248,.25);
}

.tag-label-toggle input {
  margin-right: 6px;
}

.hotspot-label {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  white-space: nowrap;

  background: none;
  border: none;
  padding: 0;

  color: white;
  font-size: 12px;
  font-weight: 900;

  text-shadow:
    0 0 4px black,
    0 0 8px black,
    0 0 12px black;

  pointer-events: none;
}

.hide-tag-label .hotspot-label {
  display: none;
}

.mobile-move-btn {
  display: none;
}

/* =============================
   Mobile UI - Clean Stable Version
   모바일 전용 최종 정리본
============================= */

.mobile-menu-btn,
.mobile-search,
.bottom-sheet-handle {
  display: none;
}

/* Pannellum 나침반 숨김 */
.pnlm-orientation-button,
.pnlm-orientation-button-active {
  display: none !important;
}

/* 로드뷰 이동 버튼 안에 '이동' 표시 */
.roadview-move-dot {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: white !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
}

.roadview-move-dot span {
  pointer-events: none;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    position: fixed;
    inset: 0;
    background: #020617;
  }

  /* =============================
     상단바
  ============================= */

  .app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 68px;
    padding: 8px 10px;

    display: flex;
    align-items: center;
    gap: 8px;

    background: #111827;
    border-bottom: 1px solid #334155;
    z-index: 3000;
  }

  .logo {
    display: none;
  }

  .mobile-menu-btn,
  .admin-btn {
    display: flex !important;
    width: 56px !important;
    height: 52px !important;
    flex: 0 0 56px !important;

    align-items: center;
    justify-content: center;

    padding: 0 !important;
    border-radius: 14px !important;
  }

  .mobile-menu-btn {
    border: none;
    background: #1e293b;
    color: white;
    font-size: 28px;
    font-weight: 900;
  }

  .admin-btn {
    background: #334155;
    border: 1px solid #475569;
    color: white;
    font-size: 0 !important;
  }

  .admin-btn::after {
    content: "⚙";
    font-size: 28px;
    line-height: 1;
  }

  .admin-btn.on {
    background: #16a34a;
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34,197,94,.45);
  }

  .mobile-search {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .mobile-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0 14px;

    border-radius: 14px;
    border: 1px solid #334155;
    background: #020617;
    color: white;

    font-size: 16px;
  }

  .mobile-search button {
    width: 68px;
    height: 52px;
    flex: 0 0 68px;

    border: none;
    border-radius: 14px;
    background: #0284c7;
    color: white;

    font-size: 16px;
    font-weight: 900;
  }

  /* =============================
     전체 레이아웃
  ============================= */

  .layout {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;

    display: block;
    height: auto;
  }

  main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: black;
  }

  #panorama {
    width: 100%;
    height: 100%;
  }

  /* =============================
     좌측 메뉴 - 컴팩트
  ============================= */

  #sideMenu {
    position: fixed;
    top: 68px;
    left: -42%;

    width: 42%;
    height: auto;
    max-height: 72vh;
    overflow-y: auto;

    padding: 10px 9px;
    background: #111827;
    border-right: 1px solid #334155;
    border-radius: 0 0 14px 0;

    z-index: 2800;
    transition: left 0.25s ease;
  }

  #sideMenu.mobile-open {
    left: 0;
  }

  .area-title {
    font-size: 14px;
    margin: 9px 0 5px;
    line-height: 1.25;
  }

  .floor-btn {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 9px;
    margin-bottom: 4px;
  }

  /* =============================
     설비명 표시 체크박스
  ============================= */

  .tag-label-toggle {
    position: absolute;
    top: 12px;
    right: 10px;
    left: auto;
    transform: none;

    z-index: 500;
    padding: 8px 12px;

    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #38bdf8;
    border-radius: 999px;

    color: white;
    font-size: 13px;
    font-weight: 900;

    box-shadow: 0 0 16px rgba(56,189,248,.25);
  }

  .tag-label-toggle input {
    margin-right: 6px;
  }

  /* =============================
     관리자 안내 문구
  ============================= */

  .admin-guide {
  bottom: 105px;
  max-width: 230px;
  padding: 5px 9px;
  font-size: 9px;
  line-height: 1.15;
  white-space: normal;
  z-index: 900;
}

  /* =============================
     하단 설비정보
  ============================= */

  .info {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;

    max-height: 48px;
    padding: 0;

    overflow: hidden;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid #334155;
    border-radius: 18px;

    z-index: 700;
    transition: max-height 0.25s ease;
  }

  .info.open,
  #bottomInfoPanel.open {
    max-height: 45vh;
    height: auto;
    overflow-y: auto;
    padding-bottom: 8px;
  }

  .bottom-sheet-handle {
    display: block;
    height: 48px;
    line-height: 48px;

    text-align: center;
    color: #38bdf8;
    font-size: 14px;
    font-weight: 900;

    background: rgba(2, 6, 23, 0.96);
    border-bottom: 1px solid #334155;
  }

  .selected-tag-box,
  .info .card {
    margin: 8px;
  }

  .selected-tag-box {
    padding: 10px 12px;
  }

  .selected-label {
    font-size: 11px;
  }

  .selected-tag-no {
    font-size: 17px;
  }

  .search-card {
    display: none;
  }

  .card {
    padding: 12px;
    border-radius: 14px;
  }

  .info-card p {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .doc-btn,
  .save-btn,
  .cancel-btn {
    min-height: 44px;
    font-size: 13px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .tag-form h3 {
    font-size: 16px;
  }

  .tag-form label {
    font-size: 12px;
    margin: 8px 0 4px;
  }

  .tag-form input,
  .tag-form select,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .tag-form input,
  .tag-form select {
    height: 42px;
  }

  /* 모바일에서는 하단 설비정보 안 관리자 메뉴 숨김 */
  #adminActionPanel {
    display: none !important;
  }

  /* =============================
     오른쪽 관리자 레일
  ============================= */

  .mobile-admin-rail {
    position: fixed;
    right: 8px;
    top: 150px;

    width: 64px;
    max-height: calc(100dvh - 260px);
    overflow-y: auto;

    z-index: 1600;

    background: rgba(15, 23, 42, 0.96);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 6px;

    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-admin-rail.hidden {
    display: none !important;
  }

  .mobile-admin-rail button {
    width: 100%;
    min-height: 46px;

    border: none;
    border-radius: 12px;

    background: #1e293b;
    color: white;

    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
  }

  .mobile-admin-rail button:active {
    background: #0284c7;
  }

  /* =============================
     핫스팟
  ============================= */

  .roadview-link {
    width: 54px;
    height: 54px;
  }

  .roadview-move-dot {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }

  .custom-hotspot {
    width: 22px;
    height: 22px;
  }

  .hotspot-dot {
    width: 16px;
    height: 16px;
    border-width: 2px;
  }

  .hotspot-label {
    font-size: 10px;
    top: 20px;
  }

  /* =============================
     검색 결과 / 기존 위치 선택 패널
  ============================= */

  .search-result-panel,
  .existing-node-picker {
    left: 10px;
    right: 10px;
    top: 78px;
    width: auto;
    max-height: 72vh;
    z-index: 9999;
  }

  /* =============================
     시작 / 홈 화면
  ============================= */

  .start-card {
    width: calc(100% - 32px);
    padding: 28px 22px;
    border-radius: 20px;
  }

  .company {
    font-size: 20px;
  }

  .start-card h1 {
    font-size: 30px;
  }

  .home-card {
    width: calc(100% - 32px);
    padding: 28px 20px;
  }

  .home-card h1 {
    font-size: 24px;
  }

  .home-card h2 {
    font-size: 30px;
  }

  .panorama-loading {
    z-index: 600;
  }
}

/* 모바일 관리자 오른쪽 메뉴 - 그룹형 */
@media (max-width: 768px) {
  .mobile-admin-rail {
    position: fixed;
    right: 8px;
    top: 150px;
    width: 70px;
    max-height: calc(100vh - 270px);
    overflow-y: auto;
    z-index: 1600;

    background: rgba(15, 23, 42, 0.96);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 6px;

    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-admin-rail.hidden {
    display: none !important;
  }

  .mobile-admin-group {
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
  }

  .mobile-admin-group summary {
    list-style: none;
    cursor: pointer;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #38bdf8;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
  }

  .mobile-admin-group summary::-webkit-details-marker {
    display: none;
  }

  .mobile-admin-group[open] summary {
    background: #0284c7;
    color: white;
  }

  .mobile-admin-group button {
    width: 100%;
    min-height: 52px;
    border: none;
    border-top: 1px solid #334155;
    background: #1e293b;
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
  }

  .mobile-admin-group button:active {
    background: #334155;
  }

  #adminActionPanel {
    display: none !important;
  }
}

/* 모바일 태그 등록폼 표시 개선 */
@media (max-width: 768px) {
  #tagForm {
    display: block;
    padding: 14px !important;
  }

  #tagForm.hidden {
    display: none !important;
  }

  #tagForm h3 {
    display: block !important;
    font-size: 15px !important;
    margin-bottom: 12px !important;
    color: #38bdf8 !important;
  }

  #tagForm label {
    display: block !important;
    font-size: 13px !important;
    margin: 10px 0 5px !important;
    color: #e5e7eb !important;
    font-weight: 800 !important;
  }

  #tagForm input,
  #tagForm select {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }

  #tagForm .save-btn,
  #tagForm .cancel-btn {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    margin-top: 8px !important;
  }
}

/* 모바일 단계별 TAG 등록 */
@media (max-width: 768px) {
  .mobile-tag-wizard {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 82px;
    z-index: 3000;
  }

  .mobile-tag-wizard.hidden {
    display: none !important;
  }

  .mobile-tag-card {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid #38bdf8;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 0 24px rgba(0,0,0,.45);
  }

  .mobile-tag-step {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
  }

  .mobile-tag-card h3 {
    color: #38bdf8;
    font-size: 18px;
    margin-bottom: 12px;
  }

  .mobile-tag-card input,
  .mobile-tag-card select {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #020617;
    color: white;
    padding: 0 12px;
    font-size: 16px;
    margin-bottom: 12px;
  }

  .mobile-tag-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mobile-tag-actions button,
  .mobile-tag-cancel {
    height: 44px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    font-size: 14px;
  }

  .mobile-tag-actions button:first-child {
    background: #475569;
  }

  .mobile-tag-actions button:last-child {
    background: #0284c7;
  }

  .mobile-tag-cancel {
    width: 100%;
    margin-top: 8px;
    background: #7f1d1d;
  }
}

/* 모바일 태그 등록 - select 화살표 표시 */
@media (max-width: 768px) {
  .mobile-tag-wizard select {
    appearance: none;
    -webkit-appearance: none;

    background-image:
      linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
      linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
    background-position:
      calc(100% - 22px) 50%,
      calc(100% - 14px) 50%;
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;

    padding-right: 42px !important;
  }

  .mobile-wizard-step {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  #mobileTagSelect {
    appearance: none;
    -webkit-appearance: none;
    background-image:
      linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
      linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
    background-position:
      calc(100% - 22px) 50%,
      calc(100% - 14px) 50%;
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
    padding-right: 44px !important;
  }
}

/* 모바일 위치 등록 안내 문구 */
@media (max-width: 768px) {
  .mobile-longpress-guide {
    display: block;
    margin-top: 4px;
    color: #fde047;
    font-size: 12px;
    font-weight: 900;
  }
}

/* 모바일 검색 태그 강조 */
@media (max-width: 768px) {
  .hotspot-search .hotspot-dot {
    animation: mobileSearchPing 0.55s ease-in-out infinite !important;
    box-shadow:
      0 0 0 8px rgba(56,189,248,.45),
      0 0 28px #38bdf8 !important;
    border-color: white !important;
  }

  .hotspot-search::after {
    content: "Here!";
    position: absolute;
    left: 50%;
    top: -28px;
    transform: translateX(-50%);

    padding: 4px 8px;
    border-radius: 999px;

    background: rgba(2,6,23,.9);
    color: #38bdf8;

    font-size: 11px;
    font-weight: 900;

    border: 1px solid #38bdf8;
    white-space: nowrap;
}

  @keyframes mobileSearchPing {
    0% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.9);
      opacity: .45;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
}

/* 설비정보 패널이 열리면 위치등록 안내 숨김 */
@media (max-width: 768px) {
  body:has(#bottomInfoPanel.open) .mobile-register-guide,
  body:has(#bottomInfoPanel.open) .roadview-register-guide,
  body:has(#bottomInfoPanel.open) .admin-guide {
    display: none !important;
  }
}

/* 모바일 설비정보 패널 컴팩트 정리 */
@media (max-width: 768px) {
  .info.open {
    max-height: 42vh !important;
  }

  .selected-tag-box {
    padding: 8px 12px !important;
    margin: 6px 10px !important;
  }

  .selected-label {
    font-size: 10px !important;
  }

  .selected-tag-no {
    font-size: 18px !important;
  }

  .info-card {
    padding: 12px !important;
    margin: 6px 10px !important;
    min-height: auto !important;
  }

  .info-card p {
    font-size: 13px !important;
    margin-bottom: 5px !important;
  }

  .action-card {
    position: static !important;
    width: auto !important;
    margin: 6px 10px 8px !important;
    padding: 8px !important;
    background: rgba(15, 23, 42, 0.55) !important;
    border: 1px solid #334155 !important;
    border-radius: 14px !important;
  }

  .action-card > .doc-btn {
    width: calc(50% - 4px) !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 4px 0 0 !important;
    display: inline-block !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    padding: 0 !important;
  }

  .action-card > .doc-btn:nth-child(2) {
    margin-right: 0 !important;
  }
}

/* 모바일 설비정보 최종 정리 */
@media (max-width: 768px) {
  .info.open,
  #bottomInfoPanel.open {
    max-height: 36vh !important;
  }

  .info-card {
    position: relative !important;
    padding: 12px 118px 12px 14px !important;
    margin: 6px 10px !important;
    min-height: 132px !important;
  }

  .info-card p {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
    
}

@media (max-width: 768px) {
  .mobile-hide-tag-line {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .tag-detail-card {
    position: relative;
    padding-right: 120px;
  }

  .tag-action-buttons {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tag-action-buttons button {
    width: 92px;
    height: 48px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
  }
}



/* ===== 모바일 설비정보 버튼 ===== */
@media (max-width:768px){

  .info-card{
    padding-right:150px !important;
    min-height:150px !important;
  }

  .action-card{
  position:absolute !important;
  right:24px !important;
  top:148px !important;

  width:105px !important;

  background:none !important;
  border:none !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;

  z-index:999 !important;
}

  .action-card>.doc-btn{
    width:105px !important;
    height:40px !important;
    margin-bottom:8px !important;
  }

  /* 관리자 메뉴는 그대로 */
  .action-card #adminActionPanel{
    margin-top:14px;
  }

}



/* ===== 검색된 태그 깜빡임 최종 ===== */
.hotspot-search .hotspot-dot {
  animation: searchedTagPulse 0.35s ease-in-out 8 !important;
  box-shadow: 0 0 30px #38bdf8, 0 0 60px #38bdf8 !important;
  border-color: #ffffff !important;
}

@keyframes searchedTagPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(2.2);
    opacity: 0.35;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}