@layer legacy {
/* ── 노트 공간 · 팀 · 변경 기록 ─────────────────────────────── */
.route-notes-spaces {
  display:flex;
  gap:6px;
  margin-bottom:10px;
  overflow-x:auto;
  scrollbar-width:none;
}
.route-notes-spaces::-webkit-scrollbar { display:none; }
.route-notes-spaces .route-notes-button { flex:0 0 auto; min-height:44px; white-space:nowrap; }
.route-notes-spaces .route-notes-button.active { background:var(--text); border-color:var(--text); color:var(--bg); font-weight:700; }
.route-notes-spaces .route-notes-team-button { margin-left:auto; }
.route-notes-team,.route-notes-team-create,.route-notes-team-join { display:grid; gap:10px; margin-bottom:16px; }
.route-notes-members { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.route-notes-member {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  min-height:52px;
  padding:8px 12px;
  border-radius:var(--r-lg);
  background:var(--panel2);
  color:var(--text);
  font-size:var(--fs-body);
}
.route-notes-member > span { flex:1; min-width:0; font-weight:600; }
.route-notes-member em { color:var(--gold); font-size:var(--fs-label); font-style:normal; font-weight:700; }
.route-notes-member .route-notes-button { min-height:40px; }
.route-notes-invite-link {
  margin:0;
  padding:10px 12px;
  border-radius:var(--r-md);
  background:var(--panel2);
  color:var(--text);
  font-family:var(--font-code);
  font-size:var(--fs-label);
  overflow-wrap:anywhere;
  user-select:all;
}
.route-notes-form-hint { margin:0; color:var(--muted); font-size:var(--fs-label); line-height:1.5; }
.route-notes-history { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.route-notes-history-row {
  display:grid;
  gap:4px;
  padding:12px 14px;
  border-radius:var(--r-lg);
  background:var(--panel2);
  color:var(--text);
}
.route-notes-history-row small { color:var(--muted); font-size:var(--fs-caption); }
.route-notes-history-row p { margin:0; color:var(--soft); font-size:var(--fs-body); line-height:1.45; overflow-wrap:anywhere; }
.route-notes-history-row .route-notes-button { justify-self:start; margin-top:4px; }
.route-notes-trash-list { display:grid; gap:8px; margin:12px 0; padding:0; list-style:none; }
.route-notes-panel-filters { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.route-notes-panel-filters .route-notes-button { min-height:48px; }
.route-notes-panel-filters .route-notes-button.active { background:var(--text); border-color:var(--text); color:var(--bg); font-weight:700; }
.route-notes-panel-title { min-width:0; overflow-wrap:anywhere; }
.route-notes-panel-error { margin:10px 0; color:var(--red); line-height:1.5; overflow-wrap:anywhere; }
.route-notes-page-status { margin:10px 0; color:var(--muted); font-size:var(--fs-label); line-height:1.5; }
.route-notes-trash-more,.route-notes-history-more { min-height:48px; margin-top:12px; max-width:100%; white-space:normal; }
.route-notes-trash-list .route-notes-button,.route-notes-history-row .route-notes-button,.route-notes-trash-button { min-height:48px; }

/* Parent context stays compact while the map carries the subroute hierarchy. */
.route-notes-parent-name { display:grid; flex:1; min-width:0; max-width:100%; min-height:44px; gap:2px; padding:6px 8px; border:0; border-radius:var(--r-md); background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.route-notes-parent-name > * { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-notes-parent-name strong { font:700 var(--fs-body-l)/1.3 var(--font-ui); }
.route-notes-parent-name small { color:var(--muted); font:500 var(--fs-caption)/1.4 var(--font-ui); }
.route-notes-parent-name:active { background:var(--panel2); }
.route-notes-parent-name:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.route-notes-child-context { display:flex; align-items:center; gap:8px; min-width:0; max-width:100%; padding:6px 10px; border:1px solid var(--line); border-radius:var(--r-full); background:var(--panel); color:var(--text); box-shadow:var(--shadow-card); }
.route-notes-child-context[hidden] { display:none; }
.route-notes-child-context > :first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--fs-label); }
.route-notes-child-context button { flex:none; min-height:36px; }
.route-notes-subroute-choices { display:grid; gap:8px; min-width:0; max-width:min(320px,calc(100vw - 40px)); padding:14px; border-radius:var(--r-lg); background:var(--panel); color:var(--text); box-shadow:var(--shadow-raise); }
.route-notes-subroute-choices p { margin:0; color:var(--muted); font-size:var(--fs-label); }
.route-notes-subroute-choice { min-width:0; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--panel2); color:var(--text); font:600 var(--fs-body)/1.4 var(--font-ui); text-align:left; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
.route-notes-subroute-choice:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.route-notes-child-context { justify-self:start; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-height:40px; font-size:var(--fs-label); }
.route-notes-overview-toggle { flex:0 0 auto; min-height:40px; padding:6px 10px; border-radius:var(--r-full); font-size:var(--fs-label); white-space:nowrap; }
.route-notes-selected-bar .route-notes-zone-change { align-items:center; padding:0; }
}
