:root{
  --ink:#14231c;
  --forest:#173f33;
  --forest-soft:#e9f0ec;
  --paper:#f6f7f3;
  --surface:#ffffff;
  --lime:#d9f45a;
  --muted:#66736d;
  --line:rgba(20,35,28,.14);
  --line-strong:rgba(20,35,28,.26);
  --dorm:#c9664f;
  --building:#4f7798;
  --dining:#bd9135;
  --landmark:#3f806b;
  --service:#6e7c49;
  --header:72px;
}
*{box-sizing:border-box;letter-spacing:0}
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:var(--paper);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif}
button,input,a{font:inherit}
button,a{color:inherit}
button{cursor:pointer}
svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
[hidden]{display:none!important}

.map-header{
  position:relative;
  z-index:100;
  display:grid;
  grid-template-columns:minmax(250px,1fr) auto minmax(250px,1fr);
  align-items:center;
  height:var(--header);
  padding:0 20px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(18px);
}
.map-brand{display:flex;align-items:center;gap:11px;width:max-content;color:inherit;text-decoration:none}
.map-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:6px;background:var(--lime);color:var(--ink);font-size:17px;font-weight:900}
.map-brand-copy{display:flex;flex-direction:column;gap:2px}
.map-brand-copy strong{font-size:13px;line-height:1.25}
.map-brand-copy small{color:var(--muted);font-size:9px;font-weight:700}
.map-header-title{display:flex;align-items:center;justify-content:center;gap:10px;white-space:nowrap}
.map-header-title strong{font-size:13px}
.map-header-title>span{width:3px;height:3px;border-radius:50%;background:var(--building)}
.map-header-title small{color:var(--muted);font-size:10px}
.map-header-actions{display:flex;justify-content:flex-end;gap:8px}
.header-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  height:38px;
  padding:0 13px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--surface);
  text-decoration:none;
  font-size:11px;
  font-weight:800;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}
.header-button svg{width:16px;height:16px}
.header-button:hover{border-color:var(--ink);background:var(--forest-soft);transform:translateY(-1px)}
.header-button-dark{border-color:var(--ink);background:var(--ink);color:#fff}
.header-button-dark:hover{background:var(--lime);color:var(--ink)}

.map-shell{position:relative;height:calc(100dvh - var(--header));overflow:hidden}
.map-stage{position:absolute;inset:0;overflow:hidden;background:#e4e9e4}
.map-stage #campus-map-canvas{width:100%;height:100%}

.map-panel{
  position:absolute;
  z-index:40;
  top:18px;
  bottom:18px;
  left:18px;
  display:flex;
  width:392px;
  min-height:0;
  overflow:hidden;
  flex-direction:column;
  border:1px solid rgba(20,35,28,.18);
  border-radius:8px;
  background:rgba(251,252,249,.95);
  box-shadow:0 20px 55px rgba(20,35,28,.16),0 2px 8px rgba(20,35,28,.08);
  backdrop-filter:blur(18px);
}
.mobile-drawer-handle{display:none}
.map-panel-head{
  display:flex;
  min-height:96px;
  align-items:center;
  justify-content:space-between;
  padding:20px 22px 17px;
  border-bottom:1px solid var(--line);
}
.map-panel-head h1{margin:0;font-size:24px;line-height:1.18;font-weight:800}
.map-panel-head p{margin:7px 0 0;color:var(--muted);font-size:10px;line-height:1.4}
.map-panel-head p span{color:var(--forest);font-weight:900}
.panel-toggle{
  display:none;
  place-items:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface);
}
.panel-toggle svg{width:18px;height:18px;transition:transform .35s cubic-bezier(.22,.8,.24,1)}
body.panel-open .panel-toggle svg{transform:rotate(180deg)}
.map-panel-body{display:flex;min-height:0;flex:1;flex-direction:column;padding:16px 16px 0}

.map-search{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  height:50px;
  border:1px solid var(--line-strong);
  border-radius:7px;
  background:var(--surface);
  box-shadow:0 5px 15px rgba(20,35,28,.05);
  transition:border-color .2s ease,box-shadow .2s ease;
}
.map-search:focus-within{border-color:var(--forest);box-shadow:0 0 0 3px rgba(63,128,107,.12)}
.map-search svg{width:18px;height:18px;margin:0 12px 0 15px;color:var(--forest)}
.map-search input{min-width:0;flex:1;height:100%;padding:0 14px 0 0;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}
.map-search input::placeholder{color:#8a948f}

.map-filters{display:grid;flex:0 0 auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:11px 0 15px}
.map-filters button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  height:34px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:6px;
  background:rgba(255,255,255,.78);
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.map-filters button i{width:7px;height:7px;border-radius:50%;background:var(--filter-color,var(--ink))}
.map-filters button[data-category="all"]{--filter-color:var(--ink)}
.map-filters button[data-category="dorm"]{--filter-color:var(--dorm)}
.map-filters button[data-category="building"]{--filter-color:var(--building)}
.map-filters button[data-category="dining"]{--filter-color:var(--dining)}
.map-filters button[data-category="landmark"]{--filter-color:var(--landmark)}
.map-filters button[data-category="service"]{--filter-color:var(--service)}
.map-filters button:hover{border-color:var(--line-strong);color:var(--ink);transform:translateY(-1px)}
.map-filters button.active{border-color:var(--ink);background:var(--ink);color:#fff}
.map-filters button.active i{box-shadow:0 0 0 2px rgba(255,255,255,.35)}

.map-result-head{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;padding:0 3px 10px;border-bottom:1px solid var(--line)}
.map-result-head strong{font-size:11px}
.map-result-head span{color:var(--muted);font-size:9px}
.map-result-head b{color:var(--forest);font-size:10px}

.map-detail{
  position:relative;
  flex:0 0 auto;
  margin:0 -16px;
  padding:18px 20px 17px;
  border-bottom:1px solid var(--line);
  background:var(--forest-soft);
  animation:detail-enter .28s cubic-bezier(.22,.8,.24,1) both;
}
@keyframes detail-enter{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.map-detail>div:first-child small{display:flex;align-items:center;gap:6px;color:var(--detail-color,var(--landmark));font-size:9px;font-weight:900}
.map-detail>div:first-child small::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.map-detail h2{margin:6px 42px 0 0;font-size:21px;line-height:1.3}
.map-detail>button{
  position:absolute;
  top:14px;
  right:15px;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid var(--line);
  border-radius:6px;
  background:rgba(255,255,255,.72);
}
.map-detail>button:hover{border-color:var(--ink);background:#fff}
.map-detail>button svg{width:16px;height:16px}
.map-detail>p,.map-detail address{margin:11px 0 0;color:var(--muted);font-size:11px;font-style:normal;line-height:1.65}
.map-detail address{padding-left:14px;border-left:2px solid rgba(63,128,107,.28)}
.detail-meta{display:flex;gap:8px;margin-top:12px}
.detail-meta span{padding:4px 7px;border:1px solid rgba(20,35,28,.12);border-radius:4px;background:rgba(255,255,255,.62);color:var(--muted);font-size:8px;font-weight:800}
.map-detail>a{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  height:42px;
  margin-top:14px;
  border-radius:6px;
  background:var(--ink);
  color:#fff;
  font-size:10px;
  font-weight:900;
  text-decoration:none;
  transition:background-color .2s ease,color .2s ease;
}
.map-detail>a:hover{background:var(--lime);color:var(--ink)}
.map-detail>a svg{width:15px;height:15px}

.place-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;margin:0 -16px;background:rgba(255,255,255,.45);scrollbar-color:rgba(20,35,28,.24) transparent;scrollbar-width:thin}
.place-item{
  position:relative;
  display:grid;
  width:100%;
  min-height:76px;
  grid-template-columns:7px minmax(0,1fr) 30px;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  text-align:left;
  transition:background-color .18s ease;
}
.place-item:hover{background:rgba(233,240,236,.78)}
.place-item.active{background:#fff}
.place-item.active::before{content:"";position:absolute;inset:10px auto 10px 0;width:3px;border-radius:0 3px 3px 0;background:var(--place-color,var(--landmark))}
.place-item-dot{width:7px;height:28px;border-radius:4px;background:var(--place-color,var(--landmark));opacity:.78;transition:height .2s ease,opacity .2s ease}
.place-item.active .place-item-dot{height:42px;opacity:1}
.place-item-copy{min-width:0}
.place-item small{display:block;margin-bottom:4px;color:var(--place-color,var(--landmark));font-size:8px;font-weight:900}
.place-item strong{display:block;overflow:hidden;font-size:13px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.place-item-copy>span{display:block;margin-top:4px;overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.place-item-arrow{display:grid;place-items:center;width:28px;height:28px;border:1px solid transparent;border-radius:6px;color:#8d9892}
.place-item-arrow svg{width:14px;height:14px}
.place-item:hover .place-item-arrow,.place-item.active .place-item-arrow{border-color:var(--line);background:#fff;color:var(--ink)}
.place-empty{margin:0;padding:38px 26px;color:var(--muted);font-size:11px;line-height:1.8;text-align:center}

.map-campus-label{
  position:absolute;
  z-index:15;
  top:18px;
  right:78px;
  display:flex;
  align-items:center;
  gap:10px;
  height:48px;
  padding:0 15px 0 12px;
  border:1px solid rgba(20,35,28,.16);
  border-radius:7px;
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 24px rgba(20,35,28,.12);
  backdrop-filter:blur(14px);
  pointer-events:none;
}
.map-campus-label>i{width:9px;height:9px;border-radius:50%;background:var(--landmark);box-shadow:0 0 0 4px rgba(63,128,107,.13)}
.map-campus-label span{display:flex;flex-direction:column;gap:1px}
.map-campus-label strong{font-size:11px}
.map-campus-label small{color:var(--muted);font-size:8px}

.map-loading{
  position:absolute;
  z-index:50;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  background:#e8ede8;
}
.map-loading::before{content:"春";display:grid;place-items:center;width:46px;height:46px;margin-bottom:5px;border-radius:8px;background:var(--lime);font-size:20px;font-weight:900}
.map-loading strong{font-size:20px}
.map-loading span{color:var(--muted);font-size:10px}
.map-loading.hidden{display:none}
.map-status{
  position:absolute;
  z-index:35;
  left:430px;
  bottom:18px;
  max-width:min(460px,calc(100% - 470px));
  margin:0;
  padding:11px 14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:6px;
  background:rgba(20,35,28,.94);
  box-shadow:0 9px 24px rgba(20,35,28,.16);
  color:#fff;
  font-size:10px;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .25s ease,transform .25s ease;
}
.map-status.show{opacity:1;transform:none}
.mobile-list-button{display:none}

.campus-marker{
  position:relative;
  display:flex;
  align-items:center;
  gap:7px;
  height:34px;
  padding:0 10px 0 7px;
  border:1px solid rgba(20,35,28,.2);
  border-radius:6px;
  background:rgba(255,255,255,.96);
  box-shadow:0 6px 18px rgba(20,35,28,.18);
  color:var(--ink);
  white-space:nowrap;
  transform-origin:50% 100%;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.campus-marker::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-5px;
  width:8px;
  height:8px;
  border-right:1px solid rgba(20,35,28,.18);
  border-bottom:1px solid rgba(20,35,28,.18);
  background:inherit;
  transform:translateX(-50%) rotate(45deg);
}
.campus-marker i{position:relative;z-index:1;width:9px;height:9px;border-radius:50%;background:var(--marker-color,var(--landmark));box-shadow:0 0 0 3px color-mix(in srgb,var(--marker-color,var(--landmark)) 18%,transparent)}
.campus-marker span{position:relative;z-index:1;font-size:10px;font-weight:800}
.campus-marker:hover{border-color:var(--ink);transform:translateY(-2px)}
.campus-marker.selected{border-color:var(--ink);background:var(--ink);box-shadow:0 9px 26px rgba(20,35,28,.28);color:#fff;transform:translateY(-3px) scale(1.04)}
.campus-marker.selected::after{border-color:var(--ink)}

.campus-marker.compact-marker{width:32px;justify-content:center;padding:0}
.campus-marker.compact-marker i{margin:0}
.campus-marker.compact-marker span{
  position:absolute;
  top:0;
  left:38px;
  display:flex;
  align-items:center;
  max-width:220px;
  height:34px;
  overflow:hidden;
  padding:0 10px;
  border:1px solid rgba(20,35,28,.18);
  border-radius:6px;
  background:rgba(255,255,255,.97);
  box-shadow:0 6px 18px rgba(20,35,28,.16);
  color:var(--ink);
  opacity:0;
  visibility:hidden;
  text-overflow:ellipsis;
  transform:translateX(-4px);
  transition:opacity .18s ease,visibility .18s ease,transform .18s ease;
}
.campus-marker.compact-marker:hover span,.campus-marker.compact-marker.selected span{opacity:1;visibility:visible;transform:none}
.amap-sug-result{z-index:140!important;overflow:hidden!important;border:1px solid var(--line-strong)!important;border-radius:7px!important;box-shadow:0 16px 36px rgba(20,35,28,.14)!important}
.amap-sug-result .auto-item{padding:10px 13px;font-size:11px}
.amap-logo,.amap-copyright{z-index:6!important}
.amap-toolbar{border-radius:7px!important;box-shadow:0 7px 20px rgba(20,35,28,.14)!important}

button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid rgba(79,119,152,.32);outline-offset:2px}

@media(max-width:1100px) and (min-width:821px){
  .map-panel{width:360px}
  .map-status{left:398px;max-width:calc(100% - 438px)}
}
@media(max-width:820px){
  :root{--header:60px}
  .map-header{grid-template-columns:1fr auto;height:var(--header);padding:0 11px 0 12px}
  .map-brand{gap:9px}
  .map-brand-mark{width:34px;height:34px;font-size:15px}
  .map-brand-copy strong{font-size:12px}
  .map-brand-copy small{font-size:8px}
  .map-header-title{display:none}
  .map-header-actions{gap:6px}
  .header-button{width:38px;height:38px;padding:0}
  .header-button span{display:none}
  .header-button-dark{display:none}
  .map-shell{height:calc(100dvh - var(--header))}
  .map-panel{
    position:fixed;
    z-index:70;
    top:auto;
    right:8px;
    bottom:8px;
    left:8px;
    width:auto;
    height:min(70vh,610px);
    border-radius:8px;
    box-shadow:0 -12px 40px rgba(20,35,28,.19);
    transform:translateY(calc(100% - 82px));
    transition:transform .44s cubic-bezier(.22,.8,.24,1);
  }
  body.panel-open .map-panel{transform:none}
  .mobile-drawer-handle{position:absolute;z-index:2;top:8px;left:50%;display:block;width:34px;height:4px;border-radius:4px;background:rgba(20,35,28,.22);transform:translateX(-50%)}
  .map-panel-head{min-height:82px;padding:19px 14px 11px 16px}
  .map-panel-head h1{font-size:19px}
  .map-panel-head p{margin-top:5px;font-size:9px}
  .panel-toggle{display:grid}
  .map-panel-body{padding:13px 13px 0}
  .map-search{height:47px}
  .map-filters{display:flex;gap:6px;overflow-x:auto;margin:9px 0 13px;padding-bottom:2px;scrollbar-width:none}
  .map-filters::-webkit-scrollbar{display:none}
  .map-filters button{flex:0 0 82px}
  .map-detail{margin:0 -13px;padding:16px}
  .place-list{margin:0 -13px}
  .map-campus-label{top:12px;right:auto;left:12px;height:44px;padding:0 12px 0 10px}
  .map-status{right:12px;bottom:102px;left:12px;max-width:none}
  .mobile-list-button{
    position:absolute;
    z-index:38;
    right:12px;
    bottom:102px;
    display:flex;
    align-items:center;
    gap:7px;
    height:42px;
    padding:0 12px;
    border:0;
    border-radius:7px;
    background:var(--ink);
    box-shadow:0 8px 22px rgba(20,35,28,.2);
    color:#fff;
    font-size:10px;
    font-weight:900;
  }
  .mobile-list-button svg{width:16px;height:16px}
  .mobile-list-button b{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:4px;background:var(--lime);color:var(--ink);font-size:9px}
  body.panel-open .mobile-list-button{display:none}
  .campus-marker{height:32px;padding-right:8px}
  .campus-marker span{font-size:9px}
  .campus-marker.compact-marker span{max-width:170px}
  .amap-toolbar{top:12px!important;right:12px!important}
}
@media(max-width:430px){
  .map-brand-copy strong{font-size:11px}
  .map-panel{height:min(73vh,620px)}
  .map-panel-head h1{font-size:18px}
  .map-detail h2{font-size:19px}
  .place-item{min-height:72px;padding:11px 14px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}