/* Room editor — full-screen polygon room creator over the floor minimap. */
.red-overlay { position: fixed; inset: 0; z-index: 1000; background: #16181a; color: #e8e8ea;
  display: flex; flex-direction: column; font: 13px/1.4 system-ui, -apple-system, sans-serif; }

.red-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #1f2225;
  border-bottom: 1px solid rgba(255,255,255,0.08); }
.red-ttl { font-weight: 600; }
.red-grow { flex: 1; }
.red-sel { background: #26282b; color: #e8e8ea; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px; padding: 4px 8px; }
.red-chip { background: #26282b; color: #cfd0d2; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 4px 9px; cursor: pointer; }
.red-chip:hover { background: #303336; }
.red-chip:disabled { opacity: 0.6; cursor: default; }
.red-name { background: rgba(255,136,0,0.16); color: #ffb866; border-color: rgba(255,136,0,0.4); font-weight: 600; }
.red-name:hover:not(:disabled) { background: rgba(255,136,0,0.26); }
.red-suggest { background: rgba(224,162,58,0.14); color: #e9c07a; border-color: rgba(224,162,58,0.4); font-weight: 600; }
.red-suggest:hover:not(:disabled) { background: rgba(224,162,58,0.24); }
.red-close { background: none; border: none; color: #cfd0d2; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 0 6px; }

.red-body { flex: 1; display: flex; min-height: 0; }
.red-rail { display: flex; flex-direction: column; gap: 5px; padding: 10px 8px; background: #1f2225;
  border-right: 1px solid rgba(255,255,255,0.08); }
.red-tool { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: #26282b; color: #cfd0d2; border: 1px solid transparent;
  border-radius: 8px; cursor: pointer; }
.red-tool:hover { background: #303336; }
.red-tool.on { border-color: #3d6fd6; background: rgba(61,111,214,0.18); color: #7aa6ef; }
.red-railsep { height: 1px; background: rgba(255,255,255,0.1); margin: 3px 2px; }

.red-stage { position: relative; flex: 1; min-width: 0; background: #202327; }
.red-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.red-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: rgba(20,22,24,0.82); color: #b9bbbe; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; pointer-events: none; white-space: nowrap; }

/* An outline the server would refuse: which edge, and why, before a save is tried. */
.red-problem { position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 24px); text-align: center;
  background: rgba(244,67,54,0.16); border: 1px solid rgba(244,67,54,0.55); color: #f08080;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; pointer-events: none; }
.red-problem:empty { display: none; }

.red-side { width: 212px; background: #1f2225; border-left: 1px solid rgba(255,255,255,0.08);
  padding: 10px; overflow: auto; }
.red-side h3 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: #9a9a9f; font-weight: 600; }
.red-rooms { display: flex; flex-direction: column; gap: 6px; }
.red-room { padding: 7px 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer; }
.red-room:hover { background: #26282b; }
.red-room.sel { border-color: #3d6fd6; background: rgba(61,111,214,0.14); }
.red-room.seg { opacity: 0.65; }
.red-room.sug { border-color: rgba(224,162,58,0.5); border-style: dashed; background: rgba(224,162,58,0.07); }
.red-room.sug.sel { border-style: solid; background: rgba(224,162,58,0.16); }
.red-room.bad { border-color: rgba(244,67,54,0.5); background: rgba(244,67,54,0.07); }
.red-room.bad.sel { border-color: #f44336; background: rgba(244,67,54,0.14); }
.red-rbad { margin-top: 6px; color: #f08080; font-size: 11.5px; }
.red-accept { color: #6cc08a; font-weight: 700; }
.red-accept:hover { color: #8fe0aa; }
.red-sugbar { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 8px; margin-bottom: 7px; border-radius: 7px; font-size: 12px;
  color: #e9c07a; background: rgba(224,162,58,0.1); border: 1px solid rgba(224,162,58,0.3); }
.red-rhead { display: flex; align-items: center; gap: 8px; }
.red-sw { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.red-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.red-rmeta { color: #9a9a9f; font-size: 11.5px; white-space: nowrap; }
.red-act { background: none; border: none; color: #9a9a9f; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.red-act:hover { color: #e8e8ea; }
.red-rbreak { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.red-tag { font-size: 11px; background: #26282b; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; padding: 2px 7px; color: #cfd0d2; }
.red-rbreak.red-muted, .red-muted { color: #76767b; font-size: 11.5px; }
.red-summary { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 4px 8px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08); color: #9a9a9f; font-size: 12px; }
.red-summary .red-warn { color: #e0a23a; }
.red-summary .red-bad { color: #f08080; }
.red-empty { color: #9a9a9f; font-size: 12px; line-height: 1.5; }

.red-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px;
  background: #1f2225; border-top: 1px solid rgba(255,255,255,0.08); color: #9a9a9f; font-size: 12px; }
.red-tog { background: #26282b; color: #cfd0d2; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.red-tog.on { border-color: #3d6fd6; color: #7aa6ef; }
.red-coord { font-variant-numeric: tabular-nums; min-width: 120px; }
.red-saving { color: #e0a23a; font-size: 0.82rem; }
.red-area { color: #cfd0d2; }

/* ----- Sweep preview window (click a scan marker in the select tool) ----- */
.red-sweepwin {
  position: fixed; right: 16px; bottom: 16px; width: 300px; z-index: 40;
  background: #1a1a1a; border: 1px solid #333; border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55); color: #eee;
  font: 13px system-ui, -apple-system, "Segoe UI", sans-serif;
}
.red-sweephd { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #222; border-bottom: 1px solid #333; }
.red-sweepttl { flex: 1; font-weight: 600; font-size: 12.5px; }
.red-sweepx { background: transparent; border: none; color: #aaa; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 3px; }
.red-sweepx:hover { color: #fff; }
.red-sweepimg { display: block; width: 100%; height: 150px; object-fit: cover; background: #0a0a0a; }
.red-sweepopen { width: 100%; border: none; border-top: 1px solid #333; background: #1c3b4a; color: #cfe8ff; padding: 7px; cursor: pointer; font-size: 12.5px; }
.red-sweepopen:hover { background: #24506a; }
