@layer legacy {
/* ── 시트 규칙(2026-10 시안): 위 막대는 끌어 내리기, 닫기는 둥근 ✕ 하나, 높이는 내용만큼 ── */
.view-routes .route-notes-sheet-grabber {
  position:absolute;
  z-index:1;
  top:10px;
  left:50%;
  width:36px;
  height:5px;
  margin-left:-18px;
  border-radius:var(--r-xs);
  background:color-mix(in srgb, var(--muted) 38%, transparent);
  pointer-events:none;
}
.view-routes .route-notes-workspace .route-notes-sheet-head,
.view-routes .route-notes-list-head { touch-action:none; }
.view-routes .route-notes-workspace .route-notes-sheet-head,
.view-routes .route-notes-workspace:not([data-panel="false"]) .route-notes-sheet-head {
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-height:0;
  padding:24px 16px 8px;
}
.view-routes .route-notes-workspace .route-notes-sheet-heading { flex:1 1 auto; min-width:0; }
/* 둥근 닫기: 보이는 크기 36px, 누르는 곳은 44px */
.view-routes .route-notes-workspace .route-notes-sheet-back,
.view-routes .route-notes-workspace .route-notes-panel-close,
.view-routes .route-notes-workspace .route-notes-pin-popup-close {
  position:relative;
  flex:0 0 36px;
  width:36px;
  height:36px;
  min-width:36px;
  min-height:36px;
  margin:-4px 0 0;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--map-fill-strong);
  color:var(--map-muted);
  gap:0;
}
.view-routes .route-notes-workspace .route-notes-sheet-back::after,
.view-routes .route-notes-workspace .route-notes-panel-close::after,
.view-routes .route-notes-workspace .route-notes-pin-popup-close::after { content:""; position:absolute; inset:-4px; }
.view-routes .route-notes-workspace .route-notes-sheet-back .route-notes-icon,
.view-routes .route-notes-workspace .route-notes-panel-close .route-notes-icon,
.view-routes .route-notes-workspace .route-notes-pin-popup-close .route-notes-icon { width:16px; height:16px; stroke-width:2.6; }
.view-routes .route-notes-workspace .route-notes-sheet-back > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.view-routes .route-notes-workspace .route-notes-sheet-back[data-kind="back"],
.view-routes .route-notes-workspace .route-notes-panel-close[data-kind="back"] { order:-1; }
.view-routes .route-notes-workspace .route-notes-pin-popup-close { position:absolute; top:12px; right:12px; margin:0; }
.view-routes .route-notes-workspace .route-notes-common-popup-head .route-notes-pin-popup-close { position:relative; top:auto; right:auto; }
.view-routes .route-notes-workspace .route-notes-section-head { gap:12px; }
.view-routes .route-notes-workspace .route-notes-section-head > h3 { flex:1 1 auto; min-width:0; }

/* 공간 메뉴·휴지통·팀·기록·구역 메뉴 시트는 내용만큼(넘치면 시트 안에서 스크롤) */
.view-routes .route-notes-workspace:not([data-panel="false"]) .route-notes-sheet {
  height:auto;
  max-height:calc(100% - max(24px, calc(env(safe-area-inset-top) + 16px)));
}

/* 공간 메뉴: 애플 설정 앱처럼 묶음 목록. 고른 공간은 ✓, 관리 화면은 아래 묶음 */
.view-routes .route-notes-workspace .route-notes-space-options,
.view-routes .route-notes-workspace .route-notes-space-actions {
  display:grid;
  gap:0;
  margin:0 0 12px;
  padding:0;
  border:0;
  border-radius:var(--r-lg);
  background:var(--map-glass-hi);
  box-shadow:0 0 0 .5px var(--map-hairline);
  overflow:hidden;
}
.view-routes .route-notes-workspace .route-notes-space-options .route-notes-button,
.view-routes .route-notes-workspace .route-notes-space-actions .route-notes-button {
  justify-content:flex-start;
  gap:12px;
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--text);
  font-size:var(--fs-title);
  font-weight:500;
  box-shadow:none;
}
.view-routes .route-notes-workspace .route-notes-space-options .route-notes-button + .route-notes-button,
.view-routes .route-notes-workspace .route-notes-space-actions .route-notes-button + .route-notes-button { box-shadow:inset 0 1px 0 var(--map-hairline); }
.view-routes .route-notes-workspace .route-notes-space-options .route-notes-button[aria-pressed="true"] { background:transparent; color:var(--text); font-weight:700; }
.view-routes .route-notes-workspace .route-notes-space-options .route-notes-button > .route-notes-icon { margin-left:auto; color:var(--gold); stroke-width:2.6; }
.view-routes .route-notes-workspace .route-notes-space-actions .route-notes-button > .route-notes-icon {
  flex:0 0 28px;
  width:28px;
  height:28px;
  box-sizing:border-box;
  padding:4px;
  border-radius:var(--r-sm);
  background:color-mix(in srgb, var(--gold) 10%, transparent);
  color:var(--gold);
}
.view-routes .route-notes-workspace .route-notes-space-options .route-notes-button:active,
.view-routes .route-notes-workspace .route-notes-space-actions .route-notes-button:active { background:color-mix(in srgb, var(--muted) 12%, transparent); opacity:1; }

/* 구역 메뉴: 같은 묶음 목록. 묶음 제목은 위 작은 회색 글씨 */
.view-routes .route-notes-workspace .route-notes-zone-actions-menu { gap:12px; margin-top:0; }
.view-routes .route-notes-workspace .route-notes-zone-action-group {
  gap:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:var(--r-lg);
  background:var(--map-glass-hi);
  box-shadow:0 0 0 .5px var(--map-hairline);
  overflow:hidden;
}
.view-routes .route-notes-workspace .route-notes-zone-action-group > h3 { margin:0; padding:12px 14px 4px; }
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-help { margin:0; padding:4px 14px 10px; font-size:var(--fs-label); }
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-button,
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-icon-button,
.view-routes .route-notes-workspace .route-notes-zone-actions-menu > .route-notes-icon-button {
  justify-content:flex-start;
  gap:12px;
  width:100%;
  height:auto;
  min-height:50px;
  padding:0 14px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--text);
  font-size:var(--fs-title);
  font-weight:500;
  box-shadow:none;
}
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-button + .route-notes-button,
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-icon-button + .route-notes-icon-button,
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-icon-button + .route-notes-button,
.view-routes .route-notes-workspace .route-notes-zone-action-group > .route-notes-button + .route-notes-icon-button { box-shadow:inset 0 1px 0 var(--map-hairline); }
.view-routes .route-notes-workspace .route-notes-zone-actions-menu > .route-notes-icon-button {
  border-radius:var(--r-lg);
  background:var(--map-glass-hi);
  box-shadow:0 0 0 .5px var(--map-hairline);
}

/* 휴지통·팀·변경 기록은 시트 안 머리 하나만: ‹ 또는 ✕ + 제목 */
.view-routes .route-notes-workspace:is([data-panel="trash"], [data-panel="team"], [data-panel="history"]) .route-notes-sheet-head { display:none; }
.view-routes .route-notes-workspace:is([data-panel="trash"], [data-panel="team"], [data-panel="history"]) .route-notes-sheet-body { padding-top:24px; }
.view-routes .route-notes-workspace .route-notes-sheet-body > .route-notes-section-head { display:flex; align-items:center; margin:0 0 10px; }
.view-routes .route-notes-workspace .route-notes-sheet-body > .route-notes-section-head > h3 { margin:0; color:var(--text); font-size:var(--fs-title-l); font-weight:700; letter-spacing:-.02em; }
/* 보기 전환은 회색 칸 안의 흰 렌즈(애플 세그먼트) */
.view-routes .route-notes-workspace .route-notes-panel-filters { display:flex; gap:2px; margin:0 0 12px; padding:4px; border:0; border-radius:20px; background:var(--map-fill); }
.view-routes .route-notes-workspace .route-notes-panel-filters .route-notes-button {
  flex:1 1 0;
  min-width:0;
  height:36px;
  min-height:36px;
  padding:0 10px;
  border:0;
  border-radius:17px;
  background:transparent;
  color:var(--muted);
  font-weight:600;
  box-shadow:none;
}
.view-routes .route-notes-workspace .route-notes-panel-filters .route-notes-button:is(.active, [aria-pressed="true"]) { background:var(--nav-lens); box-shadow:var(--nav-lens-rim); color:var(--text); font-weight:700; }/* 지도 카드의 닫기도 같은 둥근 ✕(36px, 누르는 곳 44px) */
.view-routes .route-notes-workspace .route-notes-popup-close {
  position:relative;
  flex:0 0 36px;
  width:36px;
  height:36px;
  min-width:36px;
  min-height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--map-fill-strong);
  color:var(--map-muted);
}
.view-routes .route-notes-workspace .route-notes-popup-close::after { content:""; position:absolute; inset:-4px; }
.view-routes .route-notes-workspace .route-notes-popup-close .route-notes-icon { width:16px; height:16px; stroke-width:2.6; }.route-notes-visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

}
