/* FEARX Food Map - map.css
 * Page-specific styles for the food map view (/). Loaded after base.css.
 * The list, place detail and pins follow Naver Map conventions on top of the
 * bootcamp.fearx.gg colour tokens (base.css) and type (brand.css).
 */

  /* LAYOUT: desktop = side-by-side; mobile = map on top, resizable sheet below */
  .app{position:fixed;inset:0;display:grid;grid-template-columns:400px 1fr;grid-template-rows:minmax(0,1fr)}
  .app[data-tab="kitchen"]{grid-template-columns: min(1200px, calc(100vw - var(--rail-w, 72px) - 240px)) 1fr}
  @media (max-width:860px){
    .app{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr)}
    .app[data-tab="kitchen"]{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 0}
    .app[data-tab="kitchen"] .map-wrap{display:none}
  }
  #side-panel.panel-loading{opacity:.6;pointer-events:none;transition:opacity .15s}

  /* Icons */
  .ico{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;display:block}
  .ico-fill{width:14px;height:14px;flex-shrink:0;fill:currentColor;display:block}

  .resize-handle{display:none}
  .rh-back{display:none}

  /* PANEL HEAD */
  .panel{background:var(--panel-bg);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden;z-index:2;position:relative}
  .panel-head{display:flex;flex-direction:column;gap:9px;padding:12px 14px 10px;border-bottom:1px solid var(--border);background:var(--panel-bg)}
  .head-top{display:flex;align-items:center;gap:10px;min-width:0}
  .logo{display:flex;align-items:center;gap:10px;font-weight:800;min-width:0;flex:1 1 auto}
  .logo-mark{width:38px;height:38px;border-radius:9px;background:var(--surface-2) center/cover no-repeat;background-image:url('../../fearx-logo.jpg');flex-shrink:0}
  .logo-text{line-height:1.15;min-width:0;overflow:hidden}
  .logo-text > span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .spacer{flex:1}
  .toolbar{display:flex;gap:4px;align-items:center;flex-shrink:0;justify-content:flex-end}
  .icon-btn{background:var(--surface-2);border:1px solid var(--border);color:var(--muted);padding:0 8px;cursor:pointer;font-size:13px;line-height:1;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:4px;height:30px;min-width:30px;box-sizing:border-box;text-decoration:none}
  .icon-btn .ico{width:16px;height:16px}
  .icon-btn:hover{color:var(--text)}
  .icon-btn.active{background:var(--accent);color:#000;border-color:var(--accent)}
  .icon-btn.discord{color:#5865f2}
  .icon-btn.discord:hover{background:#5865f2;color:#fff;border-color:#5865f2}
  .lang-label{font-size:10.5px;font-weight:800}
  .icon-btn.has-flag .ico,.icon-btn.has-flag .lang-label{display:none !important}
  .lang-flag-btn{display:none}
  .lang-flag-btn .flag-img{width:24px;height:18px;border-radius:3px}
  .icon-btn.has-flag .lang-flag-btn{display:inline-block}
  .lang-menu-wrap{position:relative;display:inline-flex;align-items:center}
  .lang-menu{position:absolute;top:calc(100% + 6px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow);padding:4px;display:none;flex-direction:column;min-width:150px;z-index:500}
  .lang-menu.open{display:flex}
  .lang-opt{background:none;border:none;color:var(--text);font-family:inherit;font-size:13px;padding:9px 10px;text-align:left;cursor:pointer;border-radius:6px;display:flex;align-items:center;gap:10px}
  .lang-opt:hover{background:var(--surface-2)}
  .lang-opt.active{background:var(--surface-2);color:var(--accent-text);font-weight:700}
  .lang-flag{display:inline-flex}
  .flag-img{display:block;width:20px;height:15px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.15);object-fit:cover}
  .lang-code{font-size:10px;font-weight:800;color:var(--muted);width:20px}

  /* Search (Naver style pill field) */
  .search-wrap{position:relative;width:100%}
  .search-input{width:100%;background:var(--surface-2);border:1.5px solid var(--border);border-radius:12px;padding:11px 40px 11px 40px;color:var(--text);font-family:inherit;font-size:14px;font-weight:500;outline:none;transition:border-color .15s,background .15s;-webkit-appearance:none}
  .search-input::-webkit-search-cancel-button{display:none}
  .search-input:focus{border-color:var(--accent);background:var(--bg)}
  .search-input::placeholder{color:var(--muted);font-weight:400}
  .search-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
  .search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--muted);cursor:pointer;padding:6px;display:none;border-radius:50%}
  .search-clear .ico{width:16px;height:16px}
  .search-wrap.has-value .search-clear{display:block}

  /* Filter chips: guides first, then categories */
  .chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
  .chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;padding:6px 11px;background:var(--surface);border:1px solid var(--border);color:var(--text);font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,color .15s;font-family:inherit}
  .chip:hover{border-color:var(--muted)}
  .chip.active{background:var(--text);color:var(--bg);border-color:var(--text)}
  .chip-n{font-size:11px;font-weight:700;opacity:.55}
  .chip-sep{width:1px;height:18px;background:var(--border);margin:0 2px;flex-shrink:0}
  .chip-guide .ico-fill{width:13px;height:13px}
  .chip-ribbon{color:#2f6fde;border-color:color-mix(in srgb,#2f6fde 45%,var(--border))}
  .chip-bib{color:#e3262d;border-color:color-mix(in srgb,#e3262d 45%,var(--border))}
  .chip-ribbon.active{background:#2f6fde;border-color:#2f6fde;color:#fff}
  .chip-bib.active{background:#e3262d;border-color:#e3262d;color:#fff}
  .chip-pick{color:#8a6a00;border-color:color-mix(in srgb,#FFD200 60%,var(--border))}
  .chip-pick.active{background:#FFD200;border-color:#FFD200;color:#000}
  :root:not([data-theme="light"]) .chip-pick{color:#FFD200}
  :root:not([data-theme="light"]) .chip-pick.active{color:#000}
  .chip-grp .ico{width:15px;height:15px}
  :root:not([data-theme="light"]) .chip-ribbon{color:#7aa7ff}
  :root:not([data-theme="light"]) .chip-bib{color:#ff6b70}
  :root:not([data-theme="light"]) .chip-ribbon.active,:root:not([data-theme="light"]) .chip-bib.active{color:#fff}

  .sub-toolbar{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
  .count-badge{font-weight:800;color:var(--text);font-size:12.5px}
  .sort-wrap{margin-left:auto;display:inline-flex;align-items:center}
  .sort-sel{background:transparent;border:none;color:var(--text);font-family:inherit;font-size:12px;font-weight:700;padding:4px 2px;cursor:pointer;outline:none}

  /* LIST: Naver style result cards */
  .list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .list-item{position:relative;display:flex;flex-direction:column;gap:5px;padding:16px 14px 16px;border-bottom:8px solid var(--bg);cursor:pointer;transition:background .12s}
  .list-item:hover{background:color-mix(in srgb,var(--surface-2) 55%,transparent)}
  .list-item.active{background:var(--surface-2)}
  .list-item.active::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}
  .li-row1{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;min-width:0}
  .li-name{font-size:16.5px;font-weight:800;letter-spacing:-0.3px;color:#3d8bff;padding:0}
  :root[data-theme="light"] .li-name{color:#0068c3}
  .name-ko{font-size:.78em;color:var(--muted);font-weight:500;margin-left:3px;letter-spacing:0}
  .li-cat{font-size:12.5px;color:var(--muted);font-weight:500}
  .li-desc{font-size:13px;color:var(--text);opacity:.82;line-height:1.45;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
  .li-desc:empty{display:none}
  .li-focus{background:none;border:0;font-family:inherit;text-align:left;cursor:pointer;line-height:1.3}

  /* Guide badges and meta line (shared by card and detail) */
  .badges{display:flex;gap:5px;flex-wrap:wrap}
  .badge{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:800;line-height:1;padding:4px 7px 4px 5px;border-radius:5px;letter-spacing:-0.1px}
  .badge .ico-fill{width:13px;height:13px}
  .badge-ribbon{color:#2f6fde;background:color-mix(in srgb,#2f6fde 12%,transparent)}
  .badge-ribbon .ico-fill + .ico-fill{margin-left:-5px}
  .badge-bib{color:#e3262d;background:color-mix(in srgb,#e3262d 12%,transparent)}
  :root:not([data-theme="light"]) .badge-ribbon{color:#8fb5ff;background:rgba(47,111,222,.2)}
  :root:not([data-theme="light"]) .badge-bib{color:#ff7a7f;background:rgba(227,38,45,.2)}
  .badge-pick{color:#7a5c00;background:color-mix(in srgb,#FFD200 30%,transparent)}
  :root:not([data-theme="light"]) .badge-pick{color:#FFD200;background:rgba(255,210,0,.16)}
  .meta-hours{font-weight:700}
  .meta-hours.is-open{color:#16a34a}
  .meta-hours.is-closed{color:#e5484d}
  .meta-hours.is-break{color:#d97706}
  :root:not([data-theme="light"]) .meta-hours.is-break{color:#fbbf24}
  :root:not([data-theme="light"]) .meta-hours.is-open{color:#4ade80}
  :root:not([data-theme="light"]) .meta-hours.is-closed{color:#ff7a7f}
  .meta-hours .mh-sub{font-weight:500;color:var(--muted);margin-left:5px}
  .dt-hours small.dt-hours-note{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
  .dt-fee .dt-fee-k{font-weight:600}
  .meta{display:flex;align-items:center;gap:0;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
  .meta > span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
  .meta > span + span::before{content:'';display:inline-block;width:1px;height:10px;background:var(--border);margin:0 8px}
  .meta .ico{width:14px;height:14px}
  .meta-rating{color:var(--text);font-weight:700}
  .meta-rating .star{color:#ff5a3c;width:13px;height:13px}

  /* Photo strip: three tiles like Naver's result card */
  .li-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:6px;border-radius:10px;overflow:hidden}
  .li-photos.n1{grid-template-columns:1fr}
  .li-photos.n2{grid-template-columns:1fr 1fr}
  .li-photo{position:relative;padding:0;border:0;overflow:hidden;font:inherit;color:var(--muted);aspect-ratio:1/1;background:var(--surface-2);cursor:zoom-in}
  .li-photos.n1 .li-photo{aspect-ratio:16/9}
  .li-photos.n2 .li-photo{aspect-ratio:4/3}
  .li-photo img,.pop-photo img,.dt-photo img{width:100%;height:100%;display:block;object-fit:cover;opacity:0;transition:opacity .25s}
  .li-photo img.is-loaded,.dt-photo img.is-loaded,.pop-photo img{opacity:1}
  /* No loading shimmer: the old one sat at z-index -1 under the button's own background, so it
     never showed, yet its infinite animation (one per photo) restyled the list every frame. */
  .photo-fallback{display:none;padding:10px;font-size:12px;line-height:1.4}
  .photo-note{font-size:12px;color:var(--muted);padding:8px 0;line-height:1.5}
  .photo-note a{color:var(--text);text-underline-offset:3px}
  .photo-failed{cursor:default!important;background:var(--surface-2)}
  .photo-failed .photo-fallback{display:block}
  .photo-failed::after{display:none}

  /* EMPTY + STATUS */
  .empty{padding:40px 24px;text-align:center;color:var(--muted);font-size:13px}
  .status-btn{display:block;margin:12px auto 0;padding:10px 16px;min-height:44px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;cursor:pointer}
  .map-status{position:absolute;top:12px;right:12px;z-index:800;max-width:min(300px,calc(100% - 75px));padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow);font-size:13px;line-height:1.5}
  .map-status[hidden]{display:none}
  button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

  /* DETAIL: place page inside the panel */
  .detail{display:none;flex:1;min-height:0;flex-direction:column;background:var(--panel-bg)}
  .panel.show-detail .detail{display:flex}
  @media (max-width:860px){ .panel.show-detail .panel-head,.panel.show-detail .list{display:none} }
  .dt-top{display:flex;align-items:center;gap:6px;padding:8px 8px;border-bottom:1px solid var(--border);flex-shrink:0}
  .dt-top-title{flex:1;min-width:0;font-weight:800;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
  .dt-icon-btn{width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;color:var(--text);cursor:pointer}
  .dt-icon-btn:hover{background:var(--surface-2)}
  .dt-icon-btn .ico{width:21px;height:21px}
  .dt-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .dt-hero{position:relative;background:var(--surface-2)}
  .dt-strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .dt-strip::-webkit-scrollbar{display:none}
  .dt-photo{position:relative;flex:0 0 100%;aspect-ratio:4/3;max-height:300px;scroll-snap-align:start;padding:0;border:0;background:var(--surface-2);cursor:zoom-in;overflow:hidden}
  @media (min-width:861px){ .dt-photo{flex-basis:78%;aspect-ratio:auto;height:240px} .dt-photo + .dt-photo{margin-left:2px} }
  .dt-count{position:absolute;right:10px;bottom:10px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;font-weight:700;padding:4px 9px;border-radius:999px;z-index:2;pointer-events:none}
  .dt-body{padding:16px 16px 28px;display:flex;flex-direction:column;gap:10px}
  .dt-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
  .dt-name{font-size:22px;font-weight:800;letter-spacing:-0.5px;line-height:1.25}
  .dt-cat{font-size:13px;color:var(--muted)}
  .dt-desc{font-size:14px;line-height:1.55;color:var(--text)}
  .dt-acts{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:4px -16px 0;padding:6px 6px}
  .dt-act{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 2px;background:none;border:0;color:var(--text);font:inherit;font-size:11.5px;font-weight:600;text-decoration:none;cursor:pointer;border-radius:8px;text-align:center;line-height:1.25}
  .dt-act:hover{background:var(--surface-2)}
  .dt-act-ico{width:40px;height:40px;border-radius:50%;border:1px solid var(--border);display:inline-flex;align-items:center;justify-content:center;color:var(--text)}
  .dt-act-ico.naver{color:#03c75a}
  .dt-act-ico.google{color:#1a73e8}
  :root:not([data-theme="light"]) .dt-act-ico.google{color:#6ea8ff}
  .dt-act.copied .dt-act-ico{border-color:#22c55e;color:#22c55e}
  .dt-act-ico.walkroute{background:#2f6fde;border-color:#2f6fde;color:#fff}
  .rt-slot:empty{display:none}
  .rt-status{font-size:13px;color:var(--muted);padding:12px 0}
  .rt-status.rt-err{color:#e5484d}
  .rt-card{border-bottom:1px solid var(--border);margin:0 -16px;padding:12px 16px 14px;display:flex;flex-direction:column;gap:10px}
  .rt-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
  .rt-time{font-size:20px;font-weight:800;color:#2f6fde}
  :root:not([data-theme="light"]) .rt-time{color:#7aa7ff}
  .rt-dist{font-size:14px;font-weight:700}
  .rt-title{font-size:12.5px;color:var(--muted);margin-left:auto}
  .rt-origin{display:flex;gap:6px}
  .rt-o{flex:1;padding:8px 6px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
  .rt-o.active{background:#2f6fde;border-color:#2f6fde;color:#fff}
  .rt-note{font-size:12.5px;color:var(--muted)}
  .rt-steps{list-style:none;display:flex;flex-direction:column;margin:0;padding:0}
  .rt-step{width:100%;display:flex;align-items:center;gap:10px;padding:8px 0;border:0;border-top:1px solid var(--border);background:none;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
  .rt-steps li:first-child .rt-step{border-top:0}
  .rt-step-n{flex:0 0 22px;height:22px;border-radius:50%;background:var(--surface-2,var(--surface));display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800}
  .rt-step-t{flex:1;min-width:0}
  .rt-step-d{flex:0 0 auto;font-size:12px;color:var(--muted)}
  .rt-foot{font-size:12px;color:var(--muted);line-height:1.45}
  .rt-foot small{font-size:11px}
  .leaflet-interactive.rt-line-casing,path.rt-line-casing{stroke:#ffffff}
  .leaflet-interactive.rt-line,path.rt-line{stroke:#2f6fde}
  path.rt-start{fill:#ffffff;stroke:#2f6fde;stroke-width:3}
  .dt-info{list-style:none;display:flex;flex-direction:column;gap:9px;padding:4px 0}
  .dt-info li{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;line-height:1.45}
  .dt-info .ico{color:var(--muted);margin-top:1px}
  .dt-guide-note{font-size:12px;color:var(--muted);line-height:1.5}
  .dt-links{margin-top:2px}
  .dt-comments{margin-top:8px}

  /* Toast */
  .fx-toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:rgba(20,20,20,.94);color:#fff;font-size:13px;font-weight:600;padding:10px 16px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:3000}
  .fx-toast.show{opacity:1;transform:translate(-50%,0)}
  @media (max-width:860px){ .fx-toast{bottom:calc(70px + env(safe-area-inset-bottom))} }

  /* MAP */
  .map-wrap{position:relative;height:100%;z-index:1;isolation:isolate}
  #map{position:absolute;inset:0;background:var(--map-bg)}
  .leaflet-tile{opacity:1 !important}
  .leaflet-tile-container{transform:translateZ(0)}
  .leaflet-container{background:var(--map-bg) !important;font-family:inherit}
  .leaflet-popup-content-wrapper{background:var(--surface);color:var(--text);border-radius:12px;box-shadow:var(--shadow)}
  .leaflet-popup-tip{background:var(--surface)}
  .leaflet-popup-content{margin:14px 16px;width:260px !important;min-width:260px}
  .leaflet-popup-close-button{color:var(--muted) !important}
  .leaflet-control-attribution{background:var(--overlay-bg) !important;color:var(--muted) !important;font-size:9px !important;padding:2px 6px !important}
  .leaflet-control-attribution a{color:var(--muted) !important}
  .leaflet-control-zoom a{background:var(--surface) !important;color:var(--text) !important;border-color:var(--border) !important}
  .leaflet-control-zoom a:hover{background:var(--surface-2) !important;color:var(--accent-text) !important}

  /* PINS: round category pin, name label from zoom 16, selected pin grows */
  .mk-wrap{background:none;border:0}
  .mk{position:relative;width:30px;height:30px;--c:#ff9e3d}
  .mk-pin{position:absolute;inset:3px;border-radius:50%;background:var(--c);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;transition:transform .15s}
  .mk-pin svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
  .mk.g-ribbon .mk-pin{box-shadow:0 0 0 2px #2f6fde,0 1px 4px rgba(0,0,0,.35)}
  .mk.g-bib .mk-pin{box-shadow:0 0 0 2px #e3262d,0 1px 4px rgba(0,0,0,.35)}
  .mk-label{position:absolute;top:29px;left:50%;transform:translateX(-50%);font-size:11.5px;font-weight:800;color:#111;white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis;letter-spacing:-0.2px;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,0 0 3px #fff;pointer-events:none;display:none}
  :root:not([data-theme="light"]) .mk-label{color:#f2f2f2;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 0 3px #000}
  .show-labels .mk-label,.mk.is-active .mk-label{display:block}
  .mk:hover .mk-pin{transform:scale(1.12)}
  .mk.is-active .mk-pin{inset:-4px;border-width:3px;box-shadow:0 0 0 3px var(--accent),0 3px 10px rgba(0,0,0,.45)}
  .mk.is-active .mk-pin svg{width:18px;height:18px}
  .mk.is-active .mk-label{top:38px;font-size:12.5px}
  .mk.cat-korean{--c:#ff8a1f}
  .mk.cat-shabu{--c:#e5b400}
  .mk.cat-cafe{--c:#8b5cf6}
  .mk.cat-chinese{--c:#e5484d}
  .mk.cat-japanese{--c:#0ea5c6}
  .mk.cat-asian{--c:#14a37f}
  .mk.cat-western{--c:#65a30d}
  .mk.cat-hotel{--c:#1d2a44}
  .mk.cat-pharmacy{--c:#10b981}
  .mk.cat-cvs{--c:#0284c7}
  /* About 150 stores sit within 1 km, so they show as small dots (the 30px tap target
     stays) with no name; the picked store turns into a full pin with its name. */
  .mk.cat-cvs:not(.is-active) .mk-pin{inset:9px;border-width:1.5px}
  .mk.cat-cvs:not(.is-active) .mk-pin svg{display:none}
  .show-labels .mk.cat-cvs:not(.is-active) .mk-label{display:none}
  .mk.cat-mart{--c:#f59e0b}
  .mk.cat-arena{--c:#db2777}
  .mk.cat-themepark{--c:#c026d3}
  .mk.cat-heritage{--c:#b45309}
  .mk.cat-landmark{--c:#0f766e}
  .mk.cat-arena .mk-label{display:block}
  .mk.cat-hotel .mk-pin{border-color:var(--accent);border-radius:9px}
  .mk.cat-hotel .mk-label{display:block}
  .chip-hotel .ico{width:14px;height:14px}
  .chip-hotel.active{background:#1d2a44;border-color:#1d2a44;color:#fff}
  .pop-link.site{color:var(--text);background:var(--surface-2);border:1px solid var(--border);grid-column:1 / -1}
  .marker-office{width:48px;height:48px;border-radius:50%;background:#ffdf3e center/cover no-repeat;background-image:url('../../fearx-logo.jpg');border:3px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.35);cursor:pointer;position:relative}
  .marker-office::after{content:'';position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid #fff}
  :root:not([data-theme="light"]) .marker-office{border-color:#0b0b0f}
  :root:not([data-theme="light"]) .marker-office::after{border-top-color:#0b0b0f}

  /* COPY BTN (office popup) */
  .copy-btn{cursor:pointer;font-family:inherit}

  /* COMMENTS */
  .pop-comments{border-top:1px solid var(--border);padding-top:12px}
  .pop-comments-head{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:800;color:var(--text);margin-bottom:8px}
  .pop-comments-head > span:first-child{display:inline-flex;align-items:center;gap:6px}
  .pop-comments-head .ico{width:16px;height:16px}
  .cm-count{color:var(--muted);font-weight:700}
  .pop-comments-list{display:flex;flex-direction:column;gap:6px}
  .cm{display:flex;gap:8px;padding:8px;border-radius:8px;background:var(--surface-2)}
  .cm-avatar{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:var(--accent);color:#000;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800}
  .cm-body{flex:1;min-width:0}
  .cm-meta{display:flex;align-items:center;gap:4px;font-size:10.5px;color:var(--muted);margin-bottom:2px}
  .cm-name{font-weight:700;color:var(--text);font-size:11px}
  .cm-time{margin-left:auto}
  .cm-text{font-size:12.5px;color:var(--text);line-height:1.45;word-break:break-word;white-space:pre-wrap}
  .cm-actions{display:flex;gap:6px;margin-top:3px}
  .cm-act{background:none;border:none;color:var(--muted);font-size:10.5px;cursor:pointer;padding:0;font-family:inherit}
  .cm-act:hover{color:var(--accent-text);text-decoration:underline}
  .cm-edited{font-size:9.5px;opacity:.7}
  .cm-form{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding:8px;border-radius:8px;background:var(--surface-2)}
  .cm-form textarea{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:8px;color:var(--text);font-family:inherit;font-size:13px;resize:vertical;min-height:52px;outline:none}
  .cm-form textarea:focus{border-color:var(--accent)}
  .cm-form-row{display:flex;gap:6px;align-items:center}
  .cm-pin{flex:0 0 84px;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:8px;color:var(--text);font-family:inherit;font-size:13px;outline:none;text-align:center;letter-spacing:2px}
  .cm-pin:focus,.cm-nick:focus{border-color:var(--accent)}
  .cm-nick{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:8px;color:var(--text);font-family:inherit;font-size:13px;outline:none}
  .cm-submit{flex:1;background:var(--accent);color:#000;border:none;border-radius:6px;padding:9px;font-weight:800;font-size:13px;cursor:pointer;font-family:inherit}
  .cm-submit:disabled{opacity:.5;cursor:not-allowed}
  .cm-empty{font-size:12px;color:var(--muted);padding:6px;text-align:center}
  .cm.editing .cm-text,.cm.editing .cm-actions,.cm.deleting .cm-text,.cm.deleting .cm-actions{display:none}
  .cm-inline-form{display:flex;flex-direction:column;gap:5px;padding:4px 0 2px}
  .cm-inline-form textarea{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:6px 8px;color:var(--text);font-family:inherit;font-size:12px;resize:vertical;min-height:40px;outline:none}
  .cm-inline-row{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
  .cm-inline-pin{flex:0 0 72px;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:6px;color:var(--text);font-family:inherit;font-size:12px;outline:none;text-align:center;letter-spacing:2px}
  .cm-inline-btn{flex:1;min-width:60px;padding:6px 8px;border-radius:6px;border:1px solid var(--border);font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;background:var(--surface);color:var(--text)}
  .cm-inline-btn.primary{background:var(--accent);color:#000;border-color:var(--accent)}
  .cm-inline-btn.danger{background:#ef4444;color:#fff;border-color:#ef4444}
  .cm-inline-btn:disabled{opacity:.5;cursor:not-allowed}
  .cm-inline-msg{font-size:11.5px;color:var(--muted);margin-bottom:3px}
  .cm-inline-err{font-size:11px;color:#ef4444;min-height:13px}
  .cm-error{font-size:11px;color:#ef4444;padding:2px 0}

  /* Ingredients (text pills) */
  .ingredients{display:flex;gap:4px;flex-wrap:wrap}
  .ing-pill{font-size:11px;line-height:1;padding:5px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}

  /* OFFICE POPUP */
  .pop-title{font-size:15px;font-weight:800;line-height:1.3}
  .pop-category{display:inline-block;margin-top:5px;font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px;background:var(--surface-2);color:var(--accent-text)}
  .pop-photos{display:flex;gap:5px;overflow-x:auto;margin:10px -16px;padding:0 16px 4px;scroll-snap-type:x mandatory;scrollbar-width:none}
  .pop-photo{position:relative;flex:0 0 auto;width:170px;height:112px;border-radius:8px;padding:0;border:0;overflow:hidden;background:var(--surface-2);scroll-snap-align:start;cursor:zoom-in}
  .pop-desc{font-size:12.5px;color:var(--text);line-height:1.5;margin-top:6px}
  .pop-menu-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:10px;padding:10px 12px;background:var(--accent);color:#000;border:0;font-size:13px;font-weight:800;text-decoration:none;font-family:inherit}
  .pop-menu-btn .ico{width:16px;height:16px}
  .pop-links{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
  .pop-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1;transition:filter .12s}
  .pop-link.google{color:#fff;background:#1a73e8}
  .pop-link.naver{color:#fff;background:#03c75a}
  .pop-link:hover{filter:brightness(1.08)}
  .svc-logo{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-weight:900;font-size:10px;flex-shrink:0;line-height:1;font-family:Arial,sans-serif}
  .svc-logo.google{border-radius:50%}
  .svc-logo.naver{border-radius:3px}
  .svc-logo.g-on-color{background:#fff;color:#1a73e8}
  .svc-logo.n-on-color{background:#fff;color:#03c75a}


  /* PC (Naver Map PC style): list panel, place page as a second panel over the map,
     filter chips floating on the map */
  @media (min-width:861px){
    .app[data-tab="map"] .panel{overflow:visible;min-height:0;height:100%}
    .app[data-tab="map"] .detail{position:absolute;top:0;bottom:0;left:100%;width:400px;border-left:1px solid var(--border);border-right:1px solid var(--border);box-shadow:8px 0 24px rgba(0,0,0,.18);z-index:5}
    .app[data-tab="map"] .panel-head{gap:10px;padding:14px 16px 10px}
    .app[data-tab="map"] .search-input{height:46px;font-size:15px;border-radius:12px}
    .map-chips{position:absolute;top:14px;left:14px;right:70px;z-index:500;display:flex;flex-wrap:wrap;gap:7px;pointer-events:none;transition:left .2s}
    .map-chips > *{pointer-events:auto}
    .map-chips .chip{min-height:34px;padding:7px 13px;font-size:13px;border:0;background:var(--surface);color:var(--text);box-shadow:0 2px 8px rgba(0,0,0,.22)}
    .map-chips .chip:hover{box-shadow:0 0 0 1px var(--muted),0 2px 8px rgba(0,0,0,.22)}
    .map-chips .chip.active{background:var(--text);color:var(--bg)}
    .map-chips .chip-ribbon{color:#2f6fde}
    .map-chips .chip-bib{color:#e3262d}
    .map-chips .chip-pick{color:#8a6a00}
    :root:not([data-theme="light"]) .map-chips .chip-pick{color:#FFD200}
    .map-chips .chip-pick.active{background:#FFD200;color:#000}
    :root:not([data-theme="light"]) .map-chips .chip-pick.active{color:#000}
    :root:not([data-theme="light"]) .map-chips .chip-ribbon{color:#8fb5ff}
    :root:not([data-theme="light"]) .map-chips .chip-bib{color:#ff7a7f}
    .map-chips .chip-ribbon.active{background:#2f6fde;color:#fff}
    .map-chips .chip-bib.active{background:#e3262d;color:#fff}
    .map-chips .chip-hotel.active{background:#1d2a44;color:#fff}
    .map-chips .chip-sep{display:none}
    .app.has-detail .map-chips{left:414px}
    .app[data-tab="map"] .dt-photo{height:250px}
    .list-item{padding:18px 16px}
  }
  .mk.is-hover .mk-pin{transform:scale(1.22)}
  .mk.is-hover .mk-label,.mk:hover .mk-label{display:block}


  /* My location */
  .loc-btn{position:absolute;right:12px;bottom:96px;z-index:640;width:42px;height:42px;border-radius:50%;border:0;background:var(--surface);color:var(--text);box-shadow:0 2px 10px rgba(0,0,0,.28);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:bottom .3s,opacity .2s}
  .loc-btn .ico{width:21px;height:21px}
  .loc-btn.on{color:#1a73e8}
  :root:not([data-theme="light"]) .loc-btn.on{color:#5aa2ff}
  .loc-btn.busy .ico{animation:locSpin 1s linear infinite}
  @keyframes locSpin{to{transform:rotate(360deg)}}
  .me-wrap{background:none;border:0}
  .me-dot{position:absolute;inset:4px;border-radius:50%;background:#1a73e8;border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4)}
  .me-dot::after{content:'';position:absolute;inset:-9px;border-radius:50%;background:rgba(26,115,232,.28);animation:mePulse 2s ease-out infinite}
  @keyframes mePulse{from{transform:scale(.5);opacity:1}to{transform:scale(1.4);opacity:0}}
  @media (prefers-reduced-motion:reduce){.me-dot::after,.loc-btn.busy .ico{animation:none}}
  .me-acc{fill:#1a73e8;fill-opacity:.1;stroke:#1a73e8;stroke-opacity:.35;stroke-width:1}
  @media (max-width:860px){
    /* Rides on the sheet with a transform (--sheet-vis is set on the button by Sheet.follow), so its moves stay off the layout */
    .app[data-tab="map"] .loc-btn{bottom:12px;transform:translateY(calc(0px - var(--sheet-vis,0px)));transition:opacity .2s}
    .app[data-tab="map"] .loc-btn.follow-anim{transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .2s}
    .app[data-sheet="full"] .loc-btn{opacity:0;pointer-events:none}
  }

  /* MOBILE (Naver Map style): full screen map, floating search and chips, bottom sheet */
  @media (max-width:860px){
    .app[data-tab="map"]{display:block}
    .app[data-tab="map"] .map-wrap{position:absolute;inset:0}
    .app[data-tab="map"] #side-panel{position:absolute;left:0;right:0;bottom:0;height:50%;z-index:600;border:0;border-radius:16px 16px 0 0;box-shadow:0 -2px 18px rgba(0,0,0,.28);will-change:transform;overscroll-behavior:contain}
    .app[data-tab="map"] #side-panel.sheet-anim{transition:transform .3s cubic-bezier(.2,.8,.2,1)}
    .app[data-tab="map"] .resize-handle{display:flex;align-items:center;justify-content:center;height:22px;flex-shrink:0;cursor:grab;touch-action:none;user-select:none;background:transparent}
    .rh-grab{width:38px;height:4px;border-radius:2px;background:var(--border)}
    :root:not([data-theme="light"]) .rh-grab{background:#3a3a3a}
    #side-panel #subToolbar{padding:0 14px 10px;border-bottom:1px solid var(--border);touch-action:none;user-select:none;flex-shrink:0}
    /* half and peek: the list moves the sheet first, it scrolls only when full. pan-x stops a
       finger from scrolling it (vertical moves go to the sheet handler in map.js, sideways ones
       still reach photo strips); .dt-strip is listed too because every scroller starts its own
       touch-action. Overflow stays auto: switching it made WebKit rebuild the list's scroll layer
       on every trip to full (100-200 ms frames). A mouse wheel is stopped in map.js. */
    #side-panel[data-sheet="half"] .list,#side-panel[data-sheet="peek"] .list,
    #side-panel[data-sheet="half"] .dt-scroll,#side-panel[data-sheet="peek"] .dt-scroll,
    #side-panel[data-sheet="half"] .dt-strip,#side-panel[data-sheet="peek"] .dt-strip{touch-action:pan-x}
    .panel.show-detail #subToolbar{display:none}
    .dt-top{touch-action:none}

    /* Floating search head over the map */
    #panelHead.floating{position:absolute;top:0;left:0;right:0;z-index:650;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 4px;background:none;border:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"search tools" "chips chips";gap:8px;pointer-events:none}
    #panelHead.floating > *,#panelHead.floating .toolbar{pointer-events:auto}
    #panelHead.floating .head-top{display:contents}
    #panelHead.floating .logo,#panelHead.floating .spacer,#panelHead.floating .guide-link{display:none}
    #panelHead.floating .toolbar{grid-area:tools;gap:6px}
    #panelHead.floating .search-wrap{grid-area:search}
    #panelHead.floating .chips{grid-area:chips;margin:0 -10px;padding:0 10px 6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px}
    #panelHead.floating .chips::-webkit-scrollbar{display:none}
    #panelHead.floating .chip-sep{display:none}
    #panelHead.floating .search-input{height:44px;background:var(--surface);border:0;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.22);font-size:16px;padding:0 38px 0 38px}
    #panelHead.floating .search-input:focus{box-shadow:0 0 0 2px var(--accent),0 2px 10px rgba(0,0,0,.22)}
    #panelHead.floating .search-icon{left:12px;width:18px;height:18px}
    #panelHead.floating .icon-btn{width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:12px;background:var(--surface);color:var(--text);box-shadow:0 2px 10px rgba(0,0,0,.22)}
    #panelHead.floating .icon-btn .ico{width:18px;height:18px}
    #panelHead.floating .lang-label{display:none}
    #panelHead.floating .chip{min-height:32px;padding:6px 11px;gap:4px;font-size:12.5px;border:0;background:var(--surface);box-shadow:0 1px 6px rgba(0,0,0,.2)}
    /* Phones: no counts on the chips, like Naver Map, so more of them fit in view */
    #panelHead.floating .chip-n{display:none}
    #panelHead.floating .chip-grp .ico{width:14px;height:14px}
    #panelHead.floating .chip.active{background:var(--text);color:var(--bg)}
    #panelHead.floating .chip-ribbon.active{background:#2f6fde;color:#fff}
    #panelHead.floating .chip-bib.active{background:#e3262d;color:#fff}
    #panelHead.floating .chip-pick.active{background:#FFD200;color:#000}
    #panelHead.floating .chip-hotel.active{background:#1d2a44;color:#fff}
    #panelHead.floating .lang-menu{right:0}

    /* Leaflet: pinch zoom instead of buttons; attribution rides above the sheet */
    .app[data-tab="map"] .leaflet-control-zoom{display:none}
    .app[data-tab="map"] .leaflet-bottom{transform:translateY(calc(0px - var(--sheet-vis,0px)))}
    .app[data-tab="map"] .leaflet-bottom.follow-anim{transition:transform .3s cubic-bezier(.2,.8,.2,1)}

    /* Compact sheet content */
    .list-item{padding:12px 14px;gap:4px;border-bottom-width:6px}
    .li-name{font-size:15.5px}
    .li-cat{font-size:12px}
    .meta{font-size:12px}
    .li-desc{font-size:12.5px}
    .badge{font-size:10.5px;padding:3px 6px 3px 4px}
    .sort-sel{font-size:12.5px}
    .dt-top{padding:0 6px 4px}
    .dt-icon-btn{width:36px;height:36px}
    .dt-icon-btn .ico{width:19px;height:19px}
    .dt-top-title{font-size:14.5px}
    .dt-body{padding:14px 14px 28px;gap:9px}
    .dt-name{font-size:19px}
    .dt-acts{margin:2px -14px 0;padding:4px}
    .dt-act{font-size:11px;gap:4px;padding:6px 2px}
    .dt-act-ico{width:36px;height:36px}
    .dt-act-ico .ico{width:16px;height:16px}
    .pop-link{padding:9px 8px;font-size:11.5px}
    .dt-photo{aspect-ratio:auto;height:190px;max-height:none}
    .lang-opt{min-height:40px}
  }

  /* Directions panel (Naver Map style) */
  .dirp{display:none;flex:1;min-height:0;flex-direction:column;background:var(--panel-bg)}
  .panel.show-dir .dirp{display:flex}
  .panel.show-dir .panel-head,.panel.show-dir .list,.panel.show-dir .detail,.panel.show-dir #subToolbar{display:none !important}
  .app.has-dir #panelHead.floating,.app.has-dir .map-chips{display:none !important}
  .dir-modes{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:10px 12px 6px}
  .dir-mode{display:flex;align-items:center;justify-content:center;gap:5px;padding:9px 4px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap}
  .dir-mode .ico{width:17px;height:17px;flex-shrink:0}
  .dir-mode.active{background:#2f6fde;border-color:#2f6fde;color:#fff}
  .dir-form{display:flex;align-items:center;gap:8px;padding:6px 12px}
  .dir-fields{flex:1;min-width:0;border:1.5px solid var(--border);border-radius:10px;overflow:hidden;background:var(--surface)}
  .dir-fields:focus-within{border-color:#2f6fde}
  .dir-field{display:flex;align-items:center;gap:10px;padding:0 12px}
  .dir-field + .dir-field{border-top:1px solid var(--border)}
  .dir-dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;border:3px solid #16a34a}
  .dir-to .dir-dot{border-color:#e5484d}
  .dir-input{flex:1;min-width:0;height:44px;border:0;background:none;color:var(--text);font:inherit;font-size:14.5px;outline:none}
  .dir-input::-webkit-search-cancel-button{display:none}
  .dir-swap{width:38px;height:38px;flex-shrink:0;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
  .dir-swap .ico{width:19px;height:19px}
  .dir-actions{display:flex;gap:6px;padding:4px 12px 10px;border-bottom:1px solid var(--border)}
  .dir-btn{display:inline-flex;align-items:center;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
  .dir-btn .ico{width:15px;height:15px}
  .dir-btn.primary{margin-left:auto;color:#2f6fde;border-color:#2f6fde}
  :root:not([data-theme="light"]) .dir-btn.primary{color:#7aa7ff;border-color:#7aa7ff}
  .dir-suggest{max-height:55vh;overflow-y:auto;border-bottom:1px solid var(--border)}
  .dir-suggest[hidden]{display:none}
  .dir-pick{width:100%;display:flex;align-items:center;gap:10px;padding:10px 14px;border:0;border-bottom:1px solid var(--border);background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
  .dir-pick:hover,.dir-pick:focus-visible{background:var(--surface-2)}
  .dir-pick-ico{display:flex;color:var(--muted)}
  .dir-pick-ico .ico{width:18px;height:18px}
  .dir-pick-t{display:flex;flex-direction:column;min-width:0}
  .dir-pick-t b{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dir-pick-t small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dir-sec{padding:10px 14px;font-size:12.5px;color:var(--muted)}
  .dir-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 16px 24px}
  .dir-body .rt-card{margin:0;padding:14px 0;border-bottom:0}
  .dir-body .rt-status{padding:16px 0}
  .dir-ext{display:flex;flex-wrap:wrap;gap:6px}
  path.rt-end{fill:#e5484d;stroke:#ffffff;stroke-width:3}
  path.rt-line.rt-foot{stroke-dasharray:0.1 10;stroke-linecap:round;stroke-width:6}
  .tr-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
  .tr-item{border-bottom:1px solid var(--border)}
  .tr-item:last-child{border-bottom:0}
  .tr-card{width:100%;display:flex;flex-direction:column;gap:9px;padding:12px 0;border:0;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
  .tr-item:not(.active) .rt-time{color:var(--text)}
  .tr-meta{display:flex;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
  .tr-meta span + span::before{content:"";display:inline-block;width:1px;height:10px;background:var(--border);margin:0 7px}
  .tr-bar{display:flex;gap:2px;height:20px;border-radius:10px;overflow:hidden;background:var(--surface-2,var(--surface))}
  .tr-seg{min-width:6px;display:flex;align-items:center;justify-content:center;overflow:hidden}
  .tr-seg-walk{background:var(--border)}
  .tr-seg:not(.tr-seg-walk){background:var(--c)}
  .tr-seg b{font-size:11px;font-weight:800;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 5px}
  .tr-legs{list-style:none;margin:0 0 12px;padding:0}
  .tr-leg{position:relative;padding-left:16px}
  .tr-leg::before{content:"";position:absolute;left:4px;top:0;bottom:0;width:4px;border-radius:2px;background:var(--c)}
  .tr-leg-walk{display:flex;align-items:center;gap:8px;padding:7px 0 7px 16px;font-size:12.5px;color:var(--muted)}
  .tr-leg-walk::before{background:none;border-left:3px dotted var(--border);width:0;left:5px}
  .tr-wico{display:inline-flex}
  .tr-wico .ico{width:15px;height:15px}
  .tr-ride{width:100%;display:flex;align-items:flex-start;gap:10px;padding:9px 0;border:0;background:none;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
  .tr-badge{flex:0 0 auto;max-width:42%;padding:3px 8px;border-radius:999px;background:var(--c);color:#fff;font-size:11.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tr-ride-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .tr-ride-t small{font-size:12px;color:var(--muted)}
  .tr-ride-sub{display:block}
  .tr-walk-btn{margin-left:0}
  path.tr-line-casing{stroke-linecap:round;stroke-linejoin:round}
  path.tr-line{stroke-linecap:round;stroke-linejoin:round}
  .dir-open{color:#2f6fde}
  :root:not([data-theme="light"]) .dir-open{color:#7aa7ff}

  /* Start and destination buttons, pins and popup (Naver Map style) */
  .end-btns{display:flex;gap:8px;margin:12px 0 4px}
  .end-btn{flex:1;height:40px;border-radius:20px;border:1px solid #2f6fde;background:var(--surface);color:#2f6fde;font:inherit;font-size:14px;font-weight:800;cursor:pointer}
  .end-btn.to{background:#2f6fde;color:#fff}
  :root:not([data-theme="light"]) .end-btn{color:#7aa7ff;border-color:#7aa7ff}
  :root:not([data-theme="light"]) .end-btn.to{background:#2f6fde;border-color:#2f6fde;color:#fff}
  .leaflet-popup-content .end-btns{margin:12px 0 0}
  .end-popup .leaflet-popup-content{margin:10px 12px;width:200px !important;min-width:200px}
  .end-pop-t{font-size:14px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
  .end-pop .end-btns{margin:10px 0 0}
  .end-pop .end-btn{height:36px;font-size:13.5px}
  .end-mk-wrap{background:none;border:0}
  .end-mk{position:absolute;left:0;bottom:6px;transform:translateX(-50%);display:inline-block;padding:4px 9px;border-radius:12px;font-size:12px;font-weight:800;color:#fff;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.35);border:2px solid #fff}
  .end-mk::after{content:"";position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);border:5px solid transparent;border-top-color:#fff}
  .end-mk.from{background:#16a34a}
  .end-mk.to{background:#e5484d}
  .nav-go{align-self:center;margin-left:auto;display:inline-flex;align-items:center;gap:5px;height:38px;padding:0 16px;border:0;border-radius:19px;background:#2f6fde;color:#fff;font:inherit;font-size:14px;font-weight:800;cursor:pointer;white-space:nowrap}
  .nav-go .ico{width:18px;height:18px;fill:#fff;stroke:none}

  /* Turn by turn guidance: the map fills the screen under a banner and a summary bar */
  body.fx-nav .panel,body.fx-nav .nav-rail,body.fx-nav .map-chips,body.fx-nav #panelHead.floating{display:none !important}
  body.fx-nav .app{grid-template-columns:1fr !important;bottom:0 !important;padding:0 !important}
  body.fx-nav .app .map-wrap{position:absolute !important;inset:0 !important;height:auto;grid-column:1/-1}
  body.fx-nav .loc-btn{bottom:calc(96px + env(safe-area-inset-bottom)) !important;transform:none !important;transition:opacity .2s !important;opacity:1 !important;pointer-events:auto !important}
  body.fx-nav .leaflet-control-zoom{display:none}
  .nav-top{position:absolute;left:10px;right:10px;top:calc(10px + env(safe-area-inset-top));z-index:700;background:#0f7a43;color:#fff;border-radius:14px;box-shadow:0 4px 16px rgba(0,0,0,.35);overflow:hidden}
  .nav-main{display:flex;align-items:center;gap:12px;padding:12px 10px 12px 14px}
  .nav-turn{flex:0 0 auto;display:inline-flex}
  .nav-turn .ico{width:44px;height:44px;stroke:#fff;stroke-width:2.4}
  .nav-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:15px;font-weight:700;line-height:1.3}
  .nav-big{font-size:26px;font-weight:900;line-height:1.1}
  .nav-steps{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;background:#0a5c32;border-top:1px solid rgba(255,255,255,.12)}
  .nav-steps button{display:inline-flex;align-items:center;gap:2px;height:32px;padding:0 12px;border-radius:16px;border:0;background:rgba(255,255,255,.16);color:#fff;font:inherit;font-size:13px;font-weight:800;cursor:pointer}
  .nav-steps button:disabled{opacity:.35;cursor:default}
  .nav-steps .ico{width:15px;height:15px}
  .nav-count{font-size:12.5px;font-weight:700;opacity:.85}
  .nav-then{display:flex;align-items:center;gap:6px;padding:7px 14px;background:#0a5c32;font-size:13px;font-weight:700}
  .nav-then-ico .ico{width:18px;height:18px;stroke:#fff}
  .nav-note{padding:8px 14px;background:#fff7d6;color:#3a2f00;font-size:12.5px;font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .nav-rr{border:0;border-radius:14px;padding:5px 10px;background:#2f6fde;color:#fff;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer}
  .nav-bot{position:absolute;left:0;right:0;bottom:0;z-index:700;display:flex;align-items:center;gap:10px;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:var(--surface);color:var(--text);box-shadow:0 -4px 16px rgba(0,0,0,.18);border-radius:16px 16px 0 0}
  .nav-sum{flex:1;min-width:0;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
  .nav-sum b{font-size:22px;font-weight:900;color:#2f6fde}
  :root:not([data-theme="light"]) .nav-sum b{color:#7aa7ff}
  .nav-mode{align-self:center;display:inline-flex;color:var(--text)}
  .nav-mode .ico{width:20px;height:20px}
  .nav-end{flex:0 0 auto;height:42px;padding:0 16px;border-radius:21px;border:0;background:#e5484d;color:#fff;font:inherit;font-size:14px;font-weight:800;cursor:pointer}
  /* Phones: with a route on screen the Reset and Search row gives its room to the summary. */
  @media (max-width:860px){ .dirp.has-route .dir-actions{display:none} }
  body.fx-nav .leaflet-bottom{bottom:calc(84px + env(safe-area-inset-bottom)) !important;transform:none !important;transition:none !important}

  /* Pin card on phones (Naver Map style): a short card over the map, the list sheet tucked to its handle */
  .pin-card{position:absolute;left:10px;right:10px;bottom:calc(var(--sheet-vis,96px) + 10px);z-index:660;background:var(--surface);color:var(--text);border-radius:16px;box-shadow:0 6px 24px rgba(0,0,0,.35);padding:12px 14px 12px;cursor:pointer}
  .pin-card[hidden]{display:none}
  .pc-top{display:flex;align-items:flex-start;gap:8px}
  .pc-title{flex:1;min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
  .pc-name{font-size:17px;font-weight:800;line-height:1.25}
  .pc-name .name-ko{font-size:13px;font-weight:600;color:var(--muted);margin-left:4px}
  .pc-cat{font-size:12.5px;color:var(--muted)}
  .pc-close{flex:0 0 auto;width:30px;height:30px;margin:-4px -6px 0 0;border:0;border-radius:50%;background:none;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
  .pc-close .ico{width:18px;height:18px}
  .pin-card .badges{margin-top:6px}
  .pin-card .meta{margin-top:6px;font-size:12.5px}
  .pc-sub{margin-top:4px;font-size:13px;color:var(--muted)}
  .pc-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:10px;border-radius:10px;overflow:hidden;height:78px}
  .pc-photos.n1{grid-template-columns:1fr}.pc-photos.n2{grid-template-columns:1fr 1fr}
  .pc-photo{position:relative;border:0;padding:0;background:var(--surface-2,#222);overflow:hidden;cursor:zoom-in}
  .pc-photo img{width:100%;height:100%;object-fit:cover;display:block}
  .pc-photo .photo-fallback{display:none}
  .pc-acts{display:flex;align-items:center;gap:8px;margin-top:10px}
  .pc-acts .end-btns{flex:1;margin:0}
  .pc-acts .end-btn{height:38px;font-size:14px}
  .pc-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:38px;border-radius:19px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:13px;font-weight:800;text-decoration:none;cursor:pointer}
  .pc-icon{width:38px}
  .pc-menu{padding:0 12px;background:var(--accent);border-color:var(--accent);color:#000}
  .pc-btn .ico{width:17px;height:17px}
  @media (max-width:860px){ .app.has-pincard .loc-btn{transform:translateY(calc(0px - var(--sheet-vis,96px) - var(--pc-h,180px) - 8px))} }
  @media (min-width:861px){ .pin-card{display:none} }
