/* Trinity Campus Nav — editorial palette (light first), 6-language UI, mobile + desktop */

:root{
  /* light (default) — warm paper, Trinity navy ink, oxblood accent */
  --paper:#f6f3ed; --surface:#fffefb; --surface-2:#efeae1;
  --ink:#1a2430; --muted:#6c7783; --line:#e0d9cd; --line-strong:#cfc6b6;
  --primary:#123c5e; --accent:#9e3b32; --sage:#42705a; --gold:#a97b1f;
  --sheet-bg:var(--surface); --shadow:0 1px 2px rgba(26,36,48,.06), 0 8px 24px rgba(26,36,48,.08);
  --radius:12px; --radius-sm:8px;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Songti SC","Noto Serif CJK SC",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Noto Sans Devanagari",sans-serif;
  --safe-top:env(safe-area-inset-top,0px); --safe-bot:env(safe-area-inset-bottom,0px);
  --panel-h:0px;   /* 底部面板实际高度，由 JS 写入 */
}
html[data-theme="dark"]{
  --paper:#12161b; --surface:#181e25; --surface-2:#1f262e;
  --ink:#e9e4dc; --muted:#98a3af; --line:#2b333c; --line-strong:#3a444f;
  --primary:#7fb0da; --accent:#d98873; --sage:#7fb08e; --gold:#d3ac63;
  --shadow:0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark){
  html[data-theme="auto"]{
    --paper:#12161b; --surface:#181e25; --surface-2:#1f262e;
    --ink:#e9e4dc; --muted:#98a3af; --line:#2b333c; --line-strong:#3a444f;
    --primary:#7fb0da; --accent:#d98873; --sage:#7fb08e; --gold:#d3ac63;
    --shadow:0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
  }
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;height:100%}
body{background:var(--paper);color:var(--ink);font:15px/1.55 var(--sans);
  -webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:var(--serif);font-weight:600;letter-spacing:-.01em}
button,input{font:inherit;color:inherit}
a{color:var(--primary)}

#app{position:fixed;inset:0;display:block}

/* ---------------------------------------------------------------- header */
#topbar{padding:calc(var(--safe-top) + 10px) 12px 0;background:var(--paper);border-bottom:1px solid var(--line)}
.brandrow{display:flex;align-items:center;gap:10px;justify-content:space-between}
.brand{display:flex;align-items:center;gap:9px;min-width:0}
.crest{width:30px;height:30px;flex:none;border-radius:8px;background:var(--primary);display:grid;place-items:center}
.crest svg{width:19px;height:19px;fill:var(--paper)}
.brandtext{min-width:0}
.brandtext strong{display:block;font-family:var(--serif);font-size:16.5px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brandtext small{display:block;color:var(--muted);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.toolbtns{display:flex;gap:6px;flex:none}
.iconbtn{width:38px;height:38px;border-radius:var(--radius-sm);border:1px solid var(--line);
  background:var(--surface);display:grid;place-items:center;flex:none;cursor:pointer;flex-shrink:0}
.iconbtn.wide{width:auto;min-width:38px;padding:0 9px}          /* 语言按钮：按文字宽度自适应，不换行 */
#lang-flag{white-space:nowrap;font-size:11.5px;font-weight:600;letter-spacing:.01em;line-height:1}
#lang-flag.cjk{font-size:13px}
.iconbtn:hover{border-color:var(--line-strong)}
.iconbtn .ic{width:19px;height:19px;color:var(--ink)}
.iconbtn.active{border-color:var(--accent);color:var(--accent)}

.menu{position:absolute;right:12px;top:calc(var(--safe-top) + 58px);z-index:40;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:5px;min-width:170px}
.menu button{display:flex;width:100%;gap:8px;align-items:center;background:none;border:0;padding:9px 10px;
  border-radius:var(--radius-sm);cursor:pointer;text-align:left}
.menu button:hover{background:var(--surface-2)}
.menu button[aria-selected="true"]{background:var(--surface-2);font-weight:600}
.menu .flag{width:26px;flex:none;color:var(--muted);font-size:11px;font-weight:700}

.searchrow{margin-top:10px}
.searchbox{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);padding:0 10px;height:42px}
.searchbox:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent)}
.searchbox .ic{width:17px;height:17px;fill:var(--muted);flex:none}
.searchbox input{flex:1;background:none;border:0;outline:none;min-width:0;font-size:15.5px}
.kbd{border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:0 5px;font-size:11px;color:var(--muted)}
.searchbox input:not(:placeholder-shown) + .kbd{display:none}
.clear{border:0;background:none;font-size:19px;color:var(--muted);padding:0 2px;cursor:pointer}

#chips{display:flex;gap:6px;overflow-x:auto;padding:0;scrollbar-width:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}
.chipsrow{display:flex;align-items:center;gap:4px;padding:9px 0 10px;position:relative}
#cat-btn.catbtn{gap:5px;padding:0 8px;width:auto;min-width:30px;max-width:158px;font-size:11px;font-weight:600;
  display:inline-flex;align-items:center;justify-content:flex-start}   /* id 选择器压过 .chipnav 的 grid/center */
#cat-btn-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:104px;line-height:1;
  display:block;min-width:0;flex:0 1 auto}
.catbtn.has-cat{color:var(--paper);background:var(--ink);border-color:var(--ink)}
#cat-select{display:none;width:100%;appearance:none;-webkit-appearance:none;
  padding:10px 36px 10px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);
  background:var(--surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%236c7783' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center/13px;
  color:var(--ink);font:600 13.5px/1.2 var(--sans);cursor:pointer}
.catmenu{left:0;right:auto;top:calc(100% + 6px);width:min(300px,86vw);max-height:56vh;overflow:auto}
.catmenu button .dot{width:9px;height:9px;border-radius:50%;flex:none}
.catmenu .mi-label{flex:1}
.catmenu .mi-n{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.chipsrow #chips{flex:1;min-width:0}
.chipnav{width:24px;height:28px;flex:none;border:1px solid var(--line);background:var(--surface);color:var(--ink);
  border-radius:8px;cursor:pointer;font-size:15px;line-height:1;display:grid;place-items:center;padding:0}
.chipnav:hover{background:var(--surface-2)}
.chipnav[hidden]{display:none}
#chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid var(--line);background:var(--surface);border-radius:999px;
  padding:6px 11px;font-size:12.5px;display:flex;gap:6px;align-items:center;cursor:pointer;white-space:nowrap}
.chip:hover{border-color:var(--line-strong)}
.chip .dot{width:8px;height:8px;border-radius:99px;flex:none}
.chip[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:var(--paper)}
.cnum{font-size:10.5px;color:var(--muted);font-variant-numeric:tabular-nums;background:var(--surface-2);
  border-radius:999px;padding:0 5px;margin-left:2px}
.favthumb{width:18px;height:18px;border-radius:50%;object-fit:cover;flex:none}
#fav-row button{display:inline-flex;align-items:center;gap:6px}
.chip[aria-pressed="true"] .cnum{background:color-mix(in srgb, var(--paper) 30%, transparent);color:var(--paper)}
#results-list li.more{cursor:pointer;justify-content:center;color:var(--primary);font-size:13.5px;
  border-top:1px dashed var(--line);margin-top:6px;padding:12px}
#results-list li.more:hover{background:var(--surface)}
#results-list li.empty{cursor:default;color:var(--muted);font-size:13.5px;padding:14px 10px}
.chip[aria-pressed="true"] .dot{box-shadow:0 0 0 2px color-mix(in srgb, var(--paper) 60%, transparent)}

/* ---------------------------------------------------------------- results */
#results{display:flex;flex-direction:column;min-height:0;background:var(--paper);overflow-y:auto;-webkit-overflow-scrolling:touch}
.results-head{display:flex;justify-content:space-between;align-items:baseline;padding:12px 12px 4px;
  position:sticky;top:0;z-index:3;background:var(--paper)}
.results-head strong{font-family:var(--serif);font-size:15px}
.linkbtn{background:none;border:0;color:var(--primary);padding:2px;cursor:pointer;font-size:13px}
.favrow{display:flex;gap:6px;overflow-x:auto;padding:2px 12px 6px;scrollbar-width:none}
.favrow:empty{display:none}
.favrow button{flex:none;border:1px dashed var(--line-strong);background:none;border-radius:999px;
  padding:4px 10px;font-size:12px;color:var(--muted);cursor:pointer}
#results-list{list-style:none;margin:0;padding:0 8px 4px;overflow:visible}
#results-list li{display:flex;gap:10px;align-items:center;padding:9px 8px;border-radius:var(--radius-sm);
  cursor:pointer;border:1px solid transparent}
#results-list li:hover{background:var(--surface)}
#results-list li[aria-selected="true"]{background:var(--surface);border-color:var(--line-strong)}
#results-list .thumb{width:44px;height:44px;border-radius:var(--radius-sm);object-fit:cover;background:var(--surface-2);flex:none}
#results-list .meta{min-width:0;flex:1}
#results-list .nm{font-weight:600;display:flex;gap:6px;align-items:center;min-width:0}
#results-list .nm span.n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#results-list .sub{color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tag{font-size:11px;padding:1px 7px;border-radius:999px;background:var(--surface-2);color:var(--muted);
  border:1px solid var(--line);white-space:nowrap;flex:none}
.tag.hi{background:color-mix(in srgb, var(--primary) 12%, var(--surface));border-color:color-mix(in srgb, var(--primary) 30%, var(--line));color:var(--primary)}
.dist{margin-left:auto;flex:none}

/* ------------------------------------------------------------------- map */
#mapwrap{position:absolute;inset:0;z-index:1}
#map{position:absolute;inset:0;background:var(--paper);z-index:0}  /* 自成层叠上下文，避免 Leaflet 内部 z-index 盖住 UI */
.leaflet-container{background:var(--paper);font:inherit}
html[data-theme="dark"] .leaflet-tile-pane,
html[data-theme="auto"] .leaflet-tile-pane{filter:none}
@media (prefers-color-scheme: dark){ html[data-theme="auto"] .leaflet-tile-pane{
  filter:invert(1) hue-rotate(180deg) brightness(.86) contrast(.84) saturate(.65)} }
html[data-theme="dark"] .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.86) contrast(.84) saturate(.65)}
.leaflet-control-attribution{background:color-mix(in srgb, var(--paper) 82%, transparent)!important;color:var(--muted)!important;font-size:10px}
.leaflet-bar{border:1px solid var(--line)!important;box-shadow:var(--shadow)!important;border-radius:var(--radius-sm)!important;overflow:hidden}
.leaflet-bar a{background:var(--surface)!important;color:var(--ink)!important;border-bottom-color:var(--line)!important}
.blabel{font-size:11px;color:var(--ink);background:color-mix(in srgb, var(--surface) 92%, transparent);
  border:1px solid var(--line);border-radius:6px;padding:1px 5px;white-space:nowrap;box-shadow:none}
.blabel::before{display:none}
.pin{display:grid;place-items:center;border-radius:99px;border:2px solid var(--surface);font-size:11px;
  box-shadow:0 1px 3px rgba(0,0,0,.25);color:#fff}
#me-dot{width:15px;height:15px;border-radius:99px;background:var(--primary);border:3px solid var(--surface);
  box-shadow:0 0 0 7px color-mix(in srgb, var(--primary) 20%, transparent)}
.iconbtn.float{position:absolute;right:12px;bottom:calc(18px + var(--safe-bot));z-index:400}

/* ------------------------------------------------------- navigation card */
#navcard{position:absolute;left:12px;right:12px;top:12px;z-index:500;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:11px 12px}
.navrow{display:flex;gap:11px;align-items:center}
.navrow .arrow{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:99px;
  background:var(--primary);color:var(--paper);font-size:17px;transition:transform .25s ease}
.navtext{min-width:0;display:flex;flex-direction:column}
.navtext strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navtext span{color:var(--muted);font-size:12.5px}
.navstart{position:absolute;left:12px;right:12px;bottom:calc(18px + var(--safe-bot));z-index:450;
  display:flex;gap:8px;align-items:center;justify-content:center;background:var(--accent);color:#fff;
  border:0;border-radius:var(--radius);padding:13px;font-weight:600;box-shadow:var(--shadow);cursor:pointer}
.navstart .ic{width:17px;height:17px}

/* ------------------------------------------------------------ detail sheet */
#sheet{position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--sheet-bg);
  border-top-left-radius:16px;border-top-right-radius:16px;border:1px solid var(--line);
  max-height:84vh;display:flex;flex-direction:column;box-shadow:0 -10px 40px rgba(20,26,34,.18);
  padding-bottom:var(--safe-bot)}
.sheet-grab{padding:7px 0 3px;display:grid;place-items:center;cursor:grab}
.sheet-grab::before{content:"";width:40px;height:4px;border-radius:99px;background:var(--line-strong)}
.sheetclose{position:absolute;top:8px;right:10px;width:32px;height:32px;border-radius:99px;border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface) 88%, transparent);color:var(--ink);font-size:19px;line-height:1;z-index:2;cursor:pointer}
#sheet-body{overflow:auto;-webkit-overflow-scrolling:touch;padding:0 16px 20px}
.hero{position:relative;margin:4px -16px 12px;height:180px;background:var(--surface-2)}
.hero img{width:100%;height:100%;object-fit:cover;display:block}
.hero .shade{position:absolute;inset:auto 0 0 0;height:65%;background:linear-gradient(transparent,rgba(15,20,26,.86))}
.hero .t{position:absolute;left:16px;right:16px;bottom:11px;color:#fff}
.hero h1{margin:0;font-size:21px;line-height:1.2;text-shadow:0 1px 3px rgba(0,0,0,.4)}
.hero .aka{font-size:12.5px;opacity:.92;margin-top:3px}
.headplain{margin:10px 0 4px}
.headplain h1{margin:0;font-size:21px}
.pillrow{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}
.rowbtn{display:flex;gap:8px;margin:10px 0;flex-wrap:wrap}
.rowbtn a,.rowbtn button{flex:1 1 40%;text-align:center;text-decoration:none;padding:11px 12px;border-radius:var(--radius-sm);
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);cursor:pointer;font-weight:500}
.rowbtn a:hover{background:var(--surface-2)}
.rowbtn .primary{background:var(--primary);border-color:var(--primary);color:var(--paper)}
.rowbtn .accent{background:var(--accent);border-color:var(--accent);color:#fff}
.sec{margin:15px 0 0}
.sec h2{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 7px;font-family:var(--sans)}
.sec p{margin:6px 0}
.roomline{display:flex;gap:8px;align-items:baseline;padding:8px 0;border-bottom:1px solid var(--line)}
.roomline:last-child{border-bottom:0}
.roomline .code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;background:var(--surface-2);
  border:1px solid var(--line);border-radius:5px;padding:2px 6px;flex:none}
.roomline .cap{color:var(--muted);font-size:12px;margin-left:auto;flex:none;text-align:right}
.fp{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.fp img{width:100%;border-radius:var(--radius-sm);border:1px solid var(--line);background:#fff}
.small{color:var(--muted);font-size:12.5px}
details{border:1px solid var(--line);border-radius:var(--radius-sm);padding:9px 11px;margin-top:7px;background:var(--surface)}
summary{cursor:pointer;font-weight:600;font-size:13.5px}
details p{margin:7px 0 0;font-size:13.5px;color:var(--ink)}
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(22px + var(--safe-bot));z-index:200;
  background:var(--ink);color:var(--paper);border-radius:99px;padding:9px 15px;font-size:13px;box-shadow:var(--shadow);max-width:88vw;text-align:center;pointer-events:none}   /* 提示条绝不能挡住按钮 */

/* ------------------------------------------------------- mobile layout */
@media (max-width:899px){
  /* 详情弹层停在底部面板之上 —— 搜索、分类、语言按钮始终可点 */
  #sheet{bottom:var(--panel-h);max-height:min(calc(100vh - var(--panel-h) - 54px), 50vh);
    border-bottom-left-radius:0;border-bottom-right-radius:0;
    border-top-left-radius:16px;border-top-right-radius:16px}
  #sheet-body{padding-bottom:14px}
  /* 浮动控件自下而上排队，谁也不压谁：
     版权(左下) → 归位(右下) → 步行导航条 → 提示条（基准 = 面板顶 + 详情弹层高） */
  #recenter{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 22px)}
  .leaflet-bottom.leaflet-left{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 3px)}
  .leaflet-control-zoom{display:none}                 /* 手机捏合缩放，去掉 +/− 省出空间 */
  #nav-start{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 76px)}
  body.navstart-on #recenter{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 130px)}
  body.sheet-open #nav-start{display:none}            /* 详情弹层自带"步行导航"按钮 */
  body.sheet-open #recenter{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 22px)}
  #navcard{top:10px}
  /* 折叠时只收起列表，保留搜索框与分类 */
  #toast{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 136px)}
  /* 手机端：分类换行铺开 —— 不再横向滚动，"拖走"抢点击的问题从根上消失 */
  .chipsrow{padding:8px 0 9px;gap:6px}
  #chips, .chipnav{display:none !important}
  #cat-select{display:block}
  .catmenu{width:min(280px,80vw);max-height:48vh}
  body.navstart-on #toast{bottom:calc(var(--panel-h) + var(--sheet-h,0px) + 190px)}
  #panel.collapsed{max-height:none}
  #panel.collapsed #results{display:none}
}

#topbar{position:relative;z-index:30}
#panel{position:absolute;inset:auto 0 0 0;bottom:0;z-index:50;display:flex;flex-direction:column;
  max-height:56vh;background:var(--paper);border-top:1px solid var(--line);border-radius:16px 16px 0 0;
  box-shadow:0 -8px 30px rgba(20,26,34,.12)}
#panel.dragging{transition:none}
#mapwrap{position:absolute;inset:0}
#results{flex:1;min-height:0}
#mapwrap{top:0;bottom:0}
@media (min-width:900px){
  #panel.collapsed{max-height:0;overflow:hidden;border-radius:0}
  /* 桌面端：底部"步行导航"长条出现时，归位按钮上移让位，别叠在一起 */
  body.navstart-on #recenter{bottom:156px}
}

/* ------------------------------------------------------ desktop layout */
@media (min-width:900px){
  #app{display:grid;grid-template-columns:392px 1fr;grid-template-rows:minmax(0,1fr);height:100vh;overflow:hidden}
  #panel{position:relative;inset:auto;max-height:none;height:100%;overflow:hidden;border-top:0;border-right:1px solid var(--line);
    border-radius:0;box-shadow:none;background:var(--paper)}
  #topbar{padding:calc(var(--safe-top) + 14px) 16px 0}
  .brandtext strong{font-size:17.5px}
  #mapwrap{position:relative;inset:auto;height:100%;overflow:hidden}
  #map{position:absolute;inset:0}
  /* 桌面端：详情卡挂在右上，底部留出 100px 给"步行导航"与归位按钮，避免互相遮挡 */
  #sheet{left:auto;right:16px;top:calc(var(--safe-top) + 76px);bottom:auto;width:430px;
    max-height:calc(100% - 76px - 150px);border-radius:14px;border:1px solid var(--line);box-shadow:var(--shadow)}
  #navcard{left:auto;right:16px;top:16px;width:330px}
  #nav-start{left:auto;right:16px;bottom:16px;width:330px}
  #sheet.collapsed{transform:none}
  /* 浮动控件自下而上：缩放(右下 16) → 归位(88) ；"步行导航"出现时整列上移 */
  .leaflet-bottom.leaflet-left{bottom:2px}
  .leaflet-bottom.leaflet-right{bottom:16px}
  #recenter{right:16px;bottom:96px}
  body.navstart-on .leaflet-bottom.leaflet-right{bottom:84px}
  body.navstart-on #recenter{bottom:156px}
  body.sheet-open #nav-start{display:none}
  body.sheet-open .leaflet-bottom.leaflet-right{bottom:16px}
  body.sheet-open #recenter{bottom:96px}
  body.nav-running #sheet{top:calc(var(--safe-top) + 100px)}   /* 导航卡片在右上，详情卡往下让 */
  .menu{right:16px;top:calc(var(--safe-top) + 66px)}
  #results-list li{padding:10px 10px}
}
@media (min-width:1200px){
  #app{grid-template-columns:420px 1fr}
}
/* keep the sheet above the navigation card on phones */
@media (max-width:899px){
  #navcard{position:absolute;left:10px;right:10px;top:10px;bottom:auto}
  #nav-start{left:10px;right:10px;bottom:calc(var(--panel-h) + 14px)}
  #sheet{z-index:70}
}


/* text rendering — CJK + multilingual polish */
.brandtext strong{overflow-wrap:anywhere}
.brandtext small{line-height:1.35}
#results-list .nm{font-size:14.5px;line-height:1.35}
#results-list .sub{line-height:1.35}
.roomline span{line-height:1.45}
.hero .aka,#results-title,.small{line-height:1.4}
:lang(zh),:lang(zh-Hans) body{letter-spacing:.01em}
html[lang="hi"] body{letter-spacing:0}
@media (max-width:400px){
  .brandtext strong{font-size:15.5px}
  .brandtext small{font-size:11px}
  #topbar{padding-left:10px;padding-right:10px}
  .searchbox input{font-size:15px}
}


/* ------------------------------------------------------------ legal layer */
.consent{position:fixed;left:0;right:0;bottom:0;z-index:300;display:flex;justify-content:center;
  padding:12px 12px calc(12px + var(--safe-bot));pointer-events:none}
.consent-inner{pointer-events:auto;width:min(720px,100%);background:var(--surface);border:1px solid var(--line);
  border-radius:14px;box-shadow:var(--shadow);padding:16px 18px}
.consent-inner b{display:block;font:700 17px/1.3 Georgia,'Iowan Old Style',serif;margin-bottom:6px}
.consent-inner p{margin:0 0 12px;font-size:14px;line-height:1.6;color:var(--ink)}
.consent-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.consent-actions button{padding:9px 14px;border-radius:9px;border:1px solid var(--line);background:var(--surface-2);
  color:var(--ink);font:600 13.5px var(--sans);cursor:pointer}
.consent-actions button.primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.consent-links{display:flex;gap:12px;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
.consent-links a{color:var(--muted)}
.consent-mail{margin-left:auto}
#map-gate{position:absolute;left:50%;transform:translateX(-50%);bottom:20px;z-index:20;
  display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);
  padding:14px 16px;max-width:min(460px,92%);pointer-events:none}
#map-gate > *{pointer-events:auto}
#map-gate p{max-width:34ch;margin:0;font-size:13.5px;line-height:1.55;color:var(--muted)}
#map-gate button{width:auto;padding:9px 15px;border-radius:9px;border:1px solid var(--ink);background:var(--ink);
  color:var(--paper);font:600 13.5px var(--sans);cursor:pointer}
#map-gate a{font-size:12.5px;color:var(--muted)}
/* 法律信息放在列表最末：不抢戏，滚到底才看到（Google 把这类内容收在菜单/页脚同理） */
#legal-foot{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:11px 12px calc(14px + var(--safe-bot));
  margin:10px 8px 0;border-top:1px solid var(--line);font-size:11.5px;color:var(--muted);background:var(--paper);
  line-height:1.5}
#legal-foot a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
#legal-foot .legal-line{width:100%;font-size:11px;opacity:.85}
#legal-foot a,#legal-foot button{color:var(--muted);background:none;border:0;padding:0;font:inherit;cursor:pointer;
  text-decoration:underline;text-underline-offset:2px}
#legal-foot .legal-line{width:100%;display:flex;flex-wrap:wrap;gap:8px;align-items:center;line-height:1.45}
#legal-foot .legal-line a{color:var(--muted)}
@media (max-width:899px){
  #map-gate{bottom:calc(var(--panel-h) + 16px)}
  .consent{padding:10px 10px calc(var(--panel-h) + 10px)}
  #legal-foot{padding-bottom:calc(10px + var(--safe-bot))}
}
@media (min-width:900px){
  #legal-foot{grid-column:1}
}

/* 地图版权：手机端抬到面板之上，桌面端在左下，和"步行导航"按钮互不遮挡 */
.leaflet-control-attribution{font-size:10.5px;background:color-mix(in srgb, var(--paper) 88%, transparent)}


/* 选中点的 DOM 高亮环（可点击，点了重新打开详情） */
.selring{width:46px;height:46px;border:2px dashed var(--accent);border-radius:50%;
  background:color-mix(in srgb, var(--accent) 14%, transparent);box-sizing:border-box;pointer-events:none}

/* …「更多」菜单：法律与联系方式（不占面板常驻空间） */
#more-menu{min-width:210px}
#more-menu .mi{display:flex;width:100%;gap:8px;align-items:center;background:none;border:0;padding:9px 10px;
  border-radius:var(--radius-sm);cursor:pointer;text-align:left;font-size:14px;color:var(--ink);text-decoration:none}
#more-menu .mi:hover{background:var(--surface-2)}
#more-menu .mnote{font-size:11px;color:var(--muted);padding:6px 10px 4px;line-height:1.45;
  border-top:1px solid var(--line);margin-top:4px}
