@layer legacy {
/* ── 1c 아래 카드 넘기기(2026-10-13): 위 한 줄(‹ · 검색 · 내 노트 ▾), 아래 카드 한 줄 ──
   지도는 끝까지 덮고, 메뉴 바로 위에 제목 알약 + 주 버튼, 그 아래 옆으로 넘기는 카드 줄.
   카드와 핀은 짝: 고른 팁은 핀이 커지며 구역 색 링, 카드도 구역 색 테두리. */
.view-routes .route-notes-workspace .route-notes-topbar,
.view-routes .route-notes-workspace[data-selected="false"][data-panel="false"] .route-notes-topbar { margin-top:0; gap:8px; }
/* 1단계 C1(2026-10-13 시안): 구역을 열면 ‹ · 구역 이름 알약(구역 메뉴) · 검색, 열지 않으면 검색 알약 · 내 노트 ▾. 모두 42px. */
.route-notes-top-row { display:flex; align-items:center; gap:8px; min-width:0; }
/* 목록 상태의 위쪽 줄도 구역을 연 상태와 같은 자리(위 max(16px, 안전 영역+8px), 좌우 12px). 옛 목록 시트용 relative 배치(styles.css)를 덮는다. */
.view-routes .route-notes-workspace[data-selected="false"][data-panel="false"] .route-notes-topbar {
  position:absolute; top:max(16px, calc(env(safe-area-inset-top) + 8px)); right:12px; left:12px; width:auto; margin:0;
}
.view-routes .route-notes-top-row :is(.route-notes-zone-back, .route-notes-search-open, .route-notes-space-switch, .route-notes-top-settings) {
  flex:0 0 42px; width:42px; height:42px; min-height:42px; margin:0; padding:0; border-radius:50%;
  border:1px solid var(--rn-glass-border); background:var(--rn-glass); color:var(--text);
  box-shadow:var(--rn-glass-shadow); -webkit-backdrop-filter:var(--rn-glass-filter); backdrop-filter:var(--rn-glass-filter);
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
.view-routes .route-notes-top-row .route-notes-zone-back .route-notes-icon { width:20px; height:20px; stroke-width:2.2; }
.view-routes .route-notes-top-row .route-notes-top-settings svg { width:20px; height:20px; }
.view-routes .route-notes-top-row .route-notes-search-open .route-notes-icon { flex:none; width:18px; height:18px; stroke-width:2; }
/* 목록 상태의 검색 알약: 남은 폭을 채우고 안내 문구를 보인다. 누르면 검색 화면(D4). */
.view-routes .route-notes-top-row .route-notes-search-open[data-kind="pill"] {
  flex:1 1 auto; width:auto; justify-content:flex-start; gap:8px; padding:0 16px; border-radius:var(--r-full);
  color:var(--muted); font:500 var(--fs-body) var(--font-ui); text-align:left;
}
.view-routes .route-notes-top-row .route-notes-search-open[data-kind="pill"] .route-notes-icon { width:16px; height:16px; }
.route-notes-search-open-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-notes-search-open[data-kind="icon"] .route-notes-search-open-label { display:none; }
.view-routes .route-notes-top-row > .route-notes-space-switch {
  flex:0 0 auto; width:auto; max-width:40%; gap:2px; padding:0 12px; border-radius:var(--r-full);
  font:600 var(--fs-label) var(--font-ui); white-space:nowrap;
}
.view-routes .route-notes-top-row > .route-notes-space-switch .route-notes-space-name { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.view-routes .route-notes-top-row > .route-notes-space-switch .route-notes-icon { flex:none; width:14px; height:14px; color:var(--muted); }
/* D5: 열린 동안 알약은 짙은 면, ▾는 ▴ */
.view-routes .route-notes-top-row > .route-notes-space-switch[aria-expanded="true"] { border-color:transparent; background:var(--text); color:var(--panel); }
.view-routes .route-notes-top-row > .route-notes-space-switch[aria-expanded="true"] .route-notes-icon { color:inherit; transform:rotate(180deg); }
/* 구역 이름 알약: 남은 폭 가운데, [구역색 점][모노 코드][▾]. 옆의 ‹ · 검색과 같은 유리 면(테두리·그림자)을 써서 한 줄로 읽힌다(2026-10-19). */
.route-notes-zone-pill-slot { display:flex; flex:1 1 auto; justify-content:center; min-width:0; }
.view-routes .route-notes-top-row .route-notes-zone-pill {
  display:inline-flex; align-items:center; gap:8px; min-width:0; max-width:100%; height:42px; margin:0; padding:0 14px 0 16px;
  border:1px solid var(--rn-glass-border); border-radius:var(--r-full); background:var(--rn-glass); color:var(--text); box-shadow:var(--rn-glass-shadow);
  -webkit-backdrop-filter:var(--rn-glass-filter); backdrop-filter:var(--rn-glass-filter); cursor:pointer;
}
.route-notes-zone-pill .route-notes-zone-dot { width:10px; height:10px; }
.route-notes-zone-pill-code { min-width:0; overflow:hidden; font:700 var(--fs-body-l)/1 var(--font-code); letter-spacing:.01em; text-overflow:ellipsis; white-space:nowrap; }
.route-notes-zone-pill .route-notes-icon { flex:none; width:12px; height:12px; color:var(--muted); stroke-width:2.4; }
.view-routes .route-notes-top-row .route-notes-zone-pill[aria-expanded="true"] { box-shadow:var(--rn-glass-shadow), 0 0 0 2px var(--gold); }
@media (prefers-reduced-motion:no-preference) {
  .view-routes .route-notes-top-row :is(.route-notes-zone-back, .route-notes-search-open, .route-notes-space-switch, .route-notes-zone-pill) { transition:transform 150ms ease, background-color 150ms ease; }
  .view-routes .route-notes-top-row :is(.route-notes-zone-back, .route-notes-search-open, .route-notes-space-switch, .route-notes-zone-pill):active { transform:scale(.96); }
}

.route-notes-rail {
  position:absolute; z-index:3; right:0; left:0;
  bottom:max(0px, calc(8px + var(--safe-b) - var(--rn-under-b, 0px)));
  display:grid; gap:8px; min-width:0;
}
/* 카드 줄을 감싼 판이 pointer-events:none이면 크롬(안드로이드 웹뷰 포함)이 카드 줄을 스크롤 대상으로 못 잡아
   옆으로 밀어도 넘어가지 않았다. 판은 받고, 머리 줄의 빈 곳만 지도로 넘긴다. */
.route-notes-rail-head { display:flex; align-items:center; gap:8px; min-width:0; padding:0 16px; pointer-events:none; }
.route-notes-rail-head > * { pointer-events:auto; }
.route-notes-rail-space { flex:1 1 auto; }
.route-notes-rail-title {
  display:inline-flex; align-items:center; min-width:0; max-width:60%; height:28px; padding:0 12px; overflow:hidden;
  border-radius:var(--r-full); background:var(--map-glass-hi); color:var(--text); box-shadow:var(--shadow-lift);
  -webkit-backdrop-filter:var(--rn-glass-filter); backdrop-filter:var(--rn-glass-filter);
  font:700 var(--fs-label)/1 var(--font-ui); text-overflow:ellipsis; white-space:nowrap;
}
/* 내 위치: 카드 줄(또는 아래에 붙은 카드) 위 오른쪽에 둥근 유리 하나. 사이에 네이버 로고·축척 한 줄이 들어가고, 위아래로 띄워 로고·축척을 가리지 않는다(지도 약관). */
.view-routes .route-notes-workspace[data-rail="true"] .route-notes-fabs { right:16px; bottom:calc(var(--route-note-rail-h, 0px) + max(0px, calc(8px + var(--safe-b) - var(--rn-under-b, 0px))) + 36px) !important; }
.view-routes .route-notes-workspace .route-notes-fabs > .route-notes-fab:is(.route-notes-locate, .route-notes-street) { width:40px; min-width:40px; height:40px; min-height:40px; }
.view-routes .route-notes-workspace .route-notes-fabs > .route-notes-fab:is(.route-notes-locate, .route-notes-street) .route-notes-icon { width:20px; height:20px; }
/* 폰(2026-10-21 A안, 애플 지도식): 내 위치는 오른쪽 위, 검색줄 아래의 지도 버튼 자리. 아래 구역 카드·로고·축척과 겹치지 않는다. */
/* Phone layout on every screen since 2026-10-23 (was max-width:599px). */
#routeNotesContent .route-notes-workspace[data-rail="true"]:not([data-placing="true"]) .route-notes-fabs {
  top:calc(max(16px, calc(env(safe-area-inset-top) + 8px)) + 50px) !important; right:12px !important; bottom:auto !important;
  /* 거리뷰 위, 내 위치 아래로 세로 한 줄 (네이버 지도식, 2026-10-28). */
  flex-direction:column; align-items:flex-end; gap:8px;
}
.route-notes-rail-action { flex:0 0 auto; white-space:nowrap; }
.route-notes-rail-track {
  /* 옆으로 넘기는 줄이라 위아래로 넘치는 건 잘린다. 카드 그림자(아래 14px까지; 더 내리면 메뉴를 덮는다)와 고른 카드 테두리·초점 링(위 5px)이
     들어갈 자리를 안쪽 여백으로 두고, 같은 만큼 바깥 여백을 빼서 카드 위치는 그대로 둔다(2026-10-17). */
  position:relative; display:flex; gap:8px; min-width:0; padding:8px 16px 14px; margin:-8px 0 -8px;
  overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory; scroll-padding-inline:16px; scrollbar-width:none;
}
.route-notes-rail-track::-webkit-scrollbar { display:none; }
.route-notes-rail-card {
  position:relative; flex:0 0 220px; display:flex; flex-direction:column; gap:4px; min-width:0; padding:14px;
  border:0; border-radius:var(--r-lg); background:var(--panel); color:var(--text);
  box-shadow:var(--shadow-float); scroll-snap-align:start; text-align:left; font-family:var(--font-ui); cursor:pointer;
}
.route-notes-rail-card > * { min-width:0; }
.route-notes-rail-card:active { filter:brightness(.97); }
.route-notes-rail-card:focus-visible { outline:3px solid color-mix(in srgb, var(--gold) 36%, transparent); outline-offset:2px; }
.route-notes-rail-card:disabled { opacity:.6; cursor:default; }
.route-notes-tip-card { flex-basis:240px; }
.route-notes-tip-card[aria-pressed="true"],
.route-notes-common-card[aria-expanded="true"] { box-shadow:0 0 0 2px var(--route-note-zone, var(--gold)), var(--shadow-float); }
/* 구역 카드: 색 점 + 모노 코드, 지역 한 줄, 팁 수 */
.route-notes-zone-card-head { display:flex; align-items:center; gap:8px; }
.route-notes-zone-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--route-note-zone, var(--gold)); }
.route-notes-zone-card-code { overflow:hidden; font:700 var(--fs-title)/1.3 var(--font-code); letter-spacing:.01em; text-overflow:ellipsis; white-space:nowrap; }
.route-notes-zone-card-area { overflow:hidden; color:var(--muted); font-size:var(--fs-label); font-weight:500; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.route-notes-zone-card-meta { margin-top:6px; color:var(--text); font-size:var(--fs-label); font-weight:500; line-height:1.4; }
.route-notes-zone-card-meta small { color:var(--muted); font-size:inherit; }
/* 구역 공통 팁 카드: 세 줄 미리보기 */
.route-notes-rail-kicker,.route-notes-tip-card-kind { color:var(--muted); font-size:var(--fs-caption); font-weight:600; line-height:1.4; }
.route-notes-common-card-text {
  display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3;
  font-size:var(--fs-body); font-weight:500; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere;
}
/* 공통 팁 카드(2026-10-20 시안): 공통 팁이 있으면 지도를 좀 가려도 되는 넓고 따뜻한 첫 카드 — 본문 네 줄, 사진 세 장 */
.route-notes-common-card-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.route-notes-common-card[data-filled="true"] {
  flex-basis:min(360px, calc(100vw - 32px)); gap:10px;
  background:var(--panel); box-shadow:var(--shadow-float);
}
.route-notes-common-card[data-filled="true"] .route-notes-rail-kicker { color:var(--warn); font-size:var(--fs-label); font-weight:700; }
.route-notes-common-card[data-filled="true"] .route-notes-common-card-text { -webkit-line-clamp:4; font-size:var(--fs-body-l); font-weight:600; line-height:1.45; }
.route-notes-common-card-photo { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.route-notes-common-card-photo[hidden] { display:none; }
.route-notes-common-card-shot { position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:var(--r-md); background:var(--panel2); }
.route-notes-common-card-shot img { display:block; width:100%; height:100%; object-fit:cover; }
.route-notes-common-card-shot small { position:absolute; inset:0; display:grid; place-items:center; background:rgb(0 0 0 / .45); color:#fff; font-size:var(--fs-body-l); font-weight:700; }
/* 팁 카드: 종류 상자 + 이름, 제목, 두 줄 본문 */
.route-notes-tip-card-kind { display:flex; align-items:center; gap:6px; }
.route-notes-tip-card-icon {
  display:grid; flex:none; place-items:center; width:24px; height:24px; overflow:hidden; border-radius:var(--r-sm);
  background:color-mix(in srgb, var(--route-note-zone, var(--gold)) 12%, transparent); color:var(--route-note-zone, var(--gold));
}
.route-notes-tip-card-icon .route-notes-icon { width:15px; height:15px; }
.route-notes-tip-card-title {
  display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  font-size:var(--fs-body-l); font-weight:600; line-height:1.4; overflow-wrap:anywhere;
}
.route-notes-tip-card-body {
  display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  color:var(--text-sub, var(--muted)); font-size:var(--fs-label); font-weight:500; line-height:1.5; overflow-wrap:anywhere;
}
/* 첫 사용: 카드 한 장에 안내와 팀 가입 */
.route-notes-rail-empty { flex-basis:min(340px, calc(100% - 32px)); cursor:default; }
.route-notes-rail-empty .route-notes-empty { display:grid; gap:4px; margin:0; }
.route-notes-rail-empty .route-notes-empty strong { font-size:var(--fs-title); font-weight:700; }
.route-notes-rail-empty .route-notes-empty span { color:var(--muted); font-size:var(--fs-body); font-weight:500; line-height:1.5; }
.route-notes-rail-empty .route-notes-empty-ghost { align-self:flex-start; margin-left:-8px; }
@media (prefers-reduced-motion:no-preference) {
  .route-notes-rail-track { scroll-behavior:smooth; }
  .route-notes-rail-card { transition:box-shadow 150ms ease, filter 150ms ease; }
}
.route-notes-rail-step { display:none; }
/* 마우스로 끄는 동안은 자석 맞춤·부드러운 이동을 끄고, 놓으면 가까운 카드에 맞는다 */
.route-notes-rail-track[data-dragging="true"] { scroll-snap-type:none; scroll-behavior:auto; cursor:grabbing; }
.route-notes-rail-track[data-dragging="true"] > * { pointer-events:none; }


/* 서랍 손잡이는 넓은 화면에서만 */
.route-notes-rail-toggle { display:none; }
}
/* 팁 카드 글래스(2026-10-21): 하단 메뉴와 같은 유리 — 지도가 비치고, 흐림·밝은 테두리·부드러운 그림자 */
.route-notes-rail-card {
  background:linear-gradient(rgb(255 255 255 / .92), rgb(255 255 255 / .92)), var(--nav-glass); border:1px solid var(--nav-glass-border); box-shadow:var(--nav-glass-shadow);
  -webkit-backdrop-filter:blur(20px) saturate(180%); backdrop-filter:blur(20px) saturate(180%);
}
/* 공통 팁은 다른 카드와 같은 흰 유리 면; 구분은 위의 '공통 팁' 글자색만 맡는다(2026-10-21: 주황 면이 유리 위에서 누렇게 보였다). */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .route-notes-rail-card { background:var(--nav-glass-solid); }
}
.route-notes-common-card-text[hidden] { display:none; }
/* ── 폰(2026-10-21 A안, 애플 지도식): 아래에는 유리 카드 한 장 — [● 구역 코드 … (+)] / 공통 팁 한 줄 / 팁 N개 ›.
   '팁 N개 ›'를 누르면 같은 카드 안에 팁 카드 줄이 펼쳐진다. 목록은 [내 구역 N개 › … (+)]. 팁은 지도 핀을 눌러 본다. ── */
/* Phone layout on every screen since 2026-10-23 (was max-width:599px). */
.view-routes .route-notes-workspace .route-notes-rail {
  left:12px; right:12px; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"head action" "common common" "title title" "track track";
  align-items:center; column-gap:12px; row-gap:2px; padding:12px 12px 10px 16px; border:1px solid var(--rn-glass-border); border-radius:22px;
  background:var(--rn-glass); box-shadow:var(--rn-glass-shadow); -webkit-backdrop-filter:var(--rn-glass-filter); backdrop-filter:var(--rn-glass-filter);
}
.view-routes .route-notes-workspace .route-notes-rail > .route-notes-rail-head { display:contents; }
.view-routes .route-notes-workspace .route-notes-rail :is(.route-notes-rail-space, .route-notes-rail-toggle, .route-notes-rail-section) { display:none; }
/* 첫 줄: 구역색 점 + 코드(모노 17) */
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-heading { grid-area:head; display:flex; align-items:center; gap:8px; min-width:0; }
.route-notes-rail-heading .route-notes-zone-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--route-note-zone, var(--gold)); }
.route-notes-rail-heading-title { overflow:hidden; font:700 17px/1.3 var(--font-code); text-overflow:ellipsis; white-space:nowrap; }
.route-notes-rail-heading-sub { display:none; }
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail .route-notes-rail-heading { display:none; }
/* + (팁 쓰기 / 구역 만들기): 36 원, 글자는 읽기 프로그램에만 */
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-action {
  grid-area:action; width:36px !important; min-width:36px !important; height:36px !important; min-height:36px !important; padding:0 !important;
  border-radius:50% !important; display:grid !important; place-items:center; align-self:start;
}
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-action > svg { width:20px; height:20px; }
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-action > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* '팁 N개 ›' 펼치기 줄. 목록에서는 '내 구역 N개 ›'가 첫 줄 제목이 된다 */
.route-notes-rail-title-code { display:none; }
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-title {
  grid-area:title; justify-self:stretch; gap:2px; height:auto; min-height:28px; max-width:none; padding:0; overflow:visible;
  border:0; border-radius:0; background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none;
  color:var(--muted); font:600 var(--fs-label)/1.3 var(--font-ui); cursor:pointer;
}
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-title[role="button"]::after { content:"›" / ""; display:inline-block; margin-left:6px; font-size:var(--fs-body-l); line-height:1; transition:transform 200ms ease; }
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-title[aria-expanded="true"]::after { transform:rotate(90deg); }
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail .route-notes-rail-title { grid-area:head; min-height:36px; color:var(--text); font:700 var(--fs-body-l)/1.3 var(--font-ui); }
.view-routes .route-notes-workspace .route-notes-rail:has(.route-notes-rail-empty) .route-notes-rail-title::after { content:none; }
/* 접힘: 카드 줄은 공통 팁 한 줄만 남는다(비어 있으면 숨김) */
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) > .route-notes-rail-track { display:contents; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) > .route-notes-rail-track > :not(.route-notes-common-card),
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) > .route-notes-rail-track > .route-notes-common-card:not([data-filled="true"]) { display:none; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) > .route-notes-rail-track > .route-notes-common-card {
  grid-area:common; display:block; width:auto; height:auto; min-height:0; margin:2px 0 0; padding:0; overflow:hidden; border:0 !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; text-align:left; white-space:nowrap; text-overflow:ellipsis;
}
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card-copy { display:inline; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card .route-notes-rail-kicker { display:inline; margin:0 6px 0 0; color:var(--warn); font:700 var(--fs-label)/1.4 var(--font-ui); }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card-text { display:inline; color:var(--text); font:500 var(--fs-body)/1.4 var(--font-ui); -webkit-line-clamp:unset; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card-photo { display:none; }
/* 글 없이 사진만 있는 공통 팁은 '사진 N장'으로 읽힌다 */
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card:has(.route-notes-common-card-text[hidden]) .route-notes-common-card-photo[data-count]:not([hidden]) { display:inline; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card-photo > * { display:none; }
.view-routes .route-notes-workspace .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-common-card-photo::before { content:"사진 " attr(data-count) "장"; color:var(--text); font:500 var(--fs-body)/1.4 var(--font-ui); }
/* 펼침: 같은 카드 안, 아래에 지금까지의 카드 줄(옆으로 넘김) */
/* 펼침: 같은 카드 안에 세로 목록(애플 지도 시트처럼 줄 + 가는 구분선), 길면 그 안에서만 넘긴다 */
.view-routes .route-notes-workspace .route-notes-rail:is([data-cards="open"], :has(.route-notes-rail-empty)) > .route-notes-rail-track {
  grid-area:track; flex-direction:column; gap:0; max-height:min(46dvh, 380px); margin:4px -12px -10px -16px; padding:0 12px 6px 16px;
  overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scroll-snap-type:none;
}
.view-routes .route-notes-workspace .route-notes-rail[data-cards="open"] > .route-notes-rail-track > .route-notes-rail-card {
  flex:none; width:auto; min-width:0; max-width:none; height:auto; min-height:56px; margin:0; padding:10px 0; scroll-snap-align:none;
  border:0 !important; border-top:1px solid var(--line) !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.view-routes .route-notes-workspace .route-notes-rail[data-cards="open"] .route-notes-zone-card { gap:2px; }
/* 구역을 열면 카드는 한 줄(2026-10-21): 구역 이름은 위 알약이 맡고, [공통 팁 한 줄 / 팁 N개 ›] … (+) */
.view-routes .route-notes-workspace[data-selected="true"] .route-notes-rail { grid-template-areas:"common action" "title action" "track track"; padding:10px 10px 10px 16px; row-gap:0; }
.view-routes .route-notes-workspace[data-selected="true"] .route-notes-rail .route-notes-rail-heading { display:none; }
.view-routes .route-notes-workspace[data-selected="true"] .route-notes-rail .route-notes-rail-action { align-self:center; }
.view-routes .route-notes-workspace[data-selected="true"] .route-notes-rail .route-notes-rail-title { min-height:24px; }
/* 구역을 안 열면 카드 없이 지도만(라우트노트처럼): 왼쪽 [내 구역 N개 ›] 유리 알약, 오른쪽 (+) 구역 만들기. 알약을 누르면 그때 카드가 펼쳐진다 */
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) {
  padding:0; border:0; background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; pointer-events:none;
}
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) > * { pointer-events:auto; }
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-rail-title {
  justify-self:start; height:44px; min-height:44px; padding:0 14px 0 16px; border:1px solid var(--rn-glass-border); border-radius:22px;
  background:var(--rn-glass); box-shadow:var(--rn-glass-shadow); -webkit-backdrop-filter:var(--rn-glass-filter); backdrop-filter:var(--rn-glass-filter);
  font:700 var(--fs-body)/1 var(--font-ui);
}
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail:not([data-cards="open"], :has(.route-notes-rail-empty)) .route-notes-rail-action {
  height:44px !important; min-height:44px !important; align-self:center;
}
/* 구역 만들기·팁 쓰기는 글자도 보인다(2026-10-26): 지도 위 + 하나는 확대로 읽힌다 */
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-action {
  width:auto !important; padding:0 16px 0 12px !important; border-radius:999px !important; display:inline-flex !important; gap:6px; justify-self:end;
}
.view-routes .route-notes-workspace .route-notes-rail .route-notes-rail-action > span {
  position:static; width:auto; height:auto; overflow:visible; clip-path:none; font:700 var(--fs-body)/1 var(--font-ui);
}
/* 목록: 내 구역 첫 줄 아래 바로 카드 줄 */
.view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail { grid-template-areas:"head action" "track track"; }
/* 태블릿·PC도 휴대폰 구조(2026-10-23, 시안 route-notes-wide-20261023): 지도가 화면 전체, 메뉴는 다른 탭과 같은 자리.
   카드·검색칸·팁 상세·입력 창은 휴대폰 폭까지만 늘어나고 왼쪽에 붙는다. 나머지는 지도가 쓴다. */
@media (min-width:600px) {
  /* 구역을 연 카드, 펼친 구역 목록, 구역이 없을 때의 안내 카드를 휴대폰 폭으로 묶는다.
     접힌 처음 화면은 휴대폰처럼 "내 구역 N개 ›"는 왼쪽, "+"는 오른쪽 끝. */
  .view-routes .route-notes-workspace:not([data-selected="false"]) .route-notes-rail,
  .view-routes .route-notes-workspace[data-selected="false"] .route-notes-rail:is([data-cards="open"], :has(.route-notes-rail-empty)) { max-width:400px; }
  .view-routes .route-notes-workspace[data-selected="false"][data-panel="false"] .route-notes-topbar { max-width:480px; }
}
@layer legacy {
  @media (min-width:600px) {
    /* 팁 상세: 기본 규칙(같은 층)의 max-width:none !important를 더 구체적인 선택자로 덮는다. */
    .view-routes .route-notes-workspace .route-notes-map-popup[data-docked="true"] { max-width:420px !important; }
    /* 팁 쓰기·구역 편집 창: 휴대폰 높이·아래 위치 그대로, 폭만 휴대폰만큼 왼쪽에. 입력 중에는 메뉴가 숨는다.
       휴대폰 규칙(.route-notes-workspace:not([data-panel="false"]) …)보다 구체적이어야 해서 #routeNotesContent로 시작한다. */
    .view-routes #routeNotesContent .route-notes-workspace .route-notes-sheet { left:12px; right:auto; width:min(420px, calc(100% - 24px)); max-width:420px; }
  }
}
