:root {
  --ink: #17231f;
  --ink-soft: #4e574a;
  --paper: #d8c296;
  --paper-light: #f1e5c7;
  --paper-dark: #9c7f4e;
  --copper: #a6522d;
  --hero: #061817;
  --hero-line: #71c5a6;
  --glass: rgba(241, 229, 199, 0.9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; background: var(--hero); color: #f6f0df; font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select, input { color: inherit; }
main { width: 100%; }

.hero, .atlas { position: relative; width: 100%; min-height: 100svh; scroll-snap-align: start; overflow: hidden; }

.hero { display: grid; align-items: end; isolation: isolate; padding: 0; border: 0; background: radial-gradient(circle at 72% 42%, #123f39 0, #082421 34%, #041312 72%); }
#network-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(3, 14, 13, .94) 0%, rgba(3, 14, 13, .67) 42%, rgba(3, 14, 13, .12) 76%), linear-gradient(0deg, rgba(2, 10, 9, .78), transparent 45%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .16; background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.035) 4px); mix-blend-mode: overlay; }

.hero-header { position: absolute; z-index: 2; inset: 0 0 auto; height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 76px); border-bottom: 1px solid rgba(229, 242, 224, .13); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: Georgia, "Times New Roman", serif; font-size: 15px; letter-spacing: .02em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font: 700 11px/1 Inter, sans-serif; letter-spacing: .08em; }
.source-link { font-size: 10px; font-weight: 750; letter-spacing: .18em; color: rgba(246, 240, 223, .7); transition: color .2s ease; }
.source-link:hover { color: #fff; }

.hero-copy { width: min(800px, calc(100% - 48px)); margin: 0 0 clamp(100px, 14vh, 150px) clamp(24px, 8vw, 124px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; color: #9ed6be; font-size: 10px; font-weight: 750; letter-spacing: .28em; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.hero h1 { margin: 0; max-width: 760px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(46px, 6.2vw, 88px); font-weight: 400; line-height: 1.05; letter-spacing: -.035em; }
.hero h1 em { color: #d8b979; font-weight: 400; }
.hero-copy > p { max-width: 560px; margin: 27px 0 34px; color: rgba(242, 240, 224, .68); font-size: clamp(14px, 1.4vw, 17px); line-height: 1.9; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-links a { min-width: 215px; padding: 13px 16px 14px; border: 1px solid rgba(232, 240, 218, .18); background: rgba(4, 21, 19, .4); backdrop-filter: blur(12px); transition: border-color .2s ease, background .2s ease; }
.hero-links a:hover { border-color: rgba(216, 185, 121, .72); background: rgba(10, 38, 34, .66); }
.hero-links small, .hero-links b { display: block; }
.hero-links small { margin-bottom: 6px; color: #8fbaa6; font-size: 8px; letter-spacing: .18em; }
.hero-links b { font-family: Georgia, serif; font-size: 14px; font-weight: 400; }
.scroll-cue { position: absolute; right: clamp(24px, 5vw, 76px); bottom: 42px; display: flex; align-items: center; gap: 14px; color: rgba(244, 239, 221, .6); font-size: 9px; letter-spacing: .2em; }
.scroll-cue i { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; font-style: normal; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(5px); } }

.atlas { height: 100svh; min-height: 640px; background: #2b2117; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; background: radial-gradient(circle, #d8c498 0 38%, #3a2d1f 68%); }
.map .maplibregl-canvas { filter: sepia(.12) saturate(.96) contrast(1.04) brightness(.98); }
.map::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .12; mix-blend-mode: multiply; background-image: radial-gradient(circle at 20% 30%, rgba(74,45,18,.22) 0 1px, transparent 2px), radial-gradient(circle at 70% 65%, rgba(74,45,18,.18) 0 1px, transparent 2px); background-size: 19px 23px, 31px 29px; }
.map-status { position: absolute; z-index: 8; inset: 50% auto auto 50%; transform: translate(-50%, -50%); padding: 10px 14px; border: 1px solid rgba(72, 48, 26, .24); background: rgba(242, 228, 191, .9); color: #4c3824; font-size: 11px; letter-spacing: .08em; box-shadow: 0 8px 30px rgba(30, 20, 11, .2); }

.map-brand { position: absolute; z-index: 6; top: 22px; left: 22px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; color: var(--ink); background: rgba(239, 225, 190, .86); border: 1px solid rgba(72, 48, 26, .2); box-shadow: 0 8px 28px rgba(36, 25, 14, .15); backdrop-filter: blur(10px); }
.map-brand .brand-mark { width: 31px; height: 31px; }
.map-brand b, .map-brand small { display: block; }
.map-brand b { font: 16px/1 Georgia, serif; }
.map-brand small { margin-top: 5px; color: rgba(23,35,31,.6); font-size: 8px; letter-spacing: .08em; }

.filter-bar { position: absolute; z-index: 7; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(1040px, calc(100% - 44px)); display: grid; grid-template-columns: 1fr 2fr 1fr 1.25fr auto auto; align-items: end; gap: 8px; margin: 0; padding: 10px; color: var(--ink); background: var(--glass); border: 1px solid rgba(66, 44, 22, .25); box-shadow: 0 14px 40px rgba(30, 20, 10, .22); backdrop-filter: blur(14px); transition: opacity .22s ease, transform .22s ease; }
.filter-bar label { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.filter-bar label > span { padding-left: 4px; color: rgba(23,35,31,.62); font-size: 8px; font-weight: 750; letter-spacing: .14em; }
.filter-bar select, .filter-bar input { width: 100%; min-width: 0; height: 38px; border: 1px solid rgba(58, 45, 26, .2); border-radius: 0; outline: none; background: rgba(255, 250, 231, .7); color: #263129; padding: 0 10px; font-size: 11px; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--copper); }
.date-filter > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.date-filter i { color: rgba(23,35,31,.42); font-style: normal; }
#result-count { min-width: 92px; height: 38px; display: grid; place-items: center; padding: 0 10px; color: #5f4a2c; font-size: 10px; white-space: nowrap; }
.reset-filter, .filter-toggle { border: 1px solid rgba(58, 45, 26, .25); background: #28372e; color: #f5e8c9; cursor: pointer; }
.reset-filter { width: 38px; height: 38px; font-size: 16px; }
.filter-toggle { position: absolute; z-index: 8; right: 22px; top: 22px; display: none; padding: 10px 14px; font-size: 10px; letter-spacing: .12em; }

.conference-marker { position: relative; width: 1px; height: 1px; border: 0; padding: 0; overflow: visible; background: transparent; color: #302418; cursor: pointer; }
.marker-badge { --marker-x: 0px; --marker-y: 0px; position: absolute; left: 0; top: 0; display: flex; align-items: center; transform: translate(var(--marker-x), var(--marker-y)); animation: marker-float 3.6s ease-in-out infinite; animation-delay: var(--marker-delay, 0s); filter: drop-shadow(0 2px 2px rgba(39, 24, 9, .28)); }
.marker-pin { width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid #f0dfb7; background: var(--marker-color, #9d4f2d); transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(72,45,20,.55); }
.marker-name { margin-left: 7px; padding: 4px 6px 4px 5px; border-left: 1px solid rgba(69,45,22,.38); background: rgba(238, 223, 186, .82); color: #2d241a; font: 700 9px/1.1 Georgia, serif; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 3px 10px rgba(45, 29, 12, .14); backdrop-filter: blur(4px); }
.conference-marker:hover, .conference-marker:focus-visible { z-index: 20 !important; outline: none; }
.conference-marker:hover .marker-badge, .conference-marker:focus-visible .marker-badge { transform: translate(var(--marker-x), calc(var(--marker-y) - 5px)) scale(1.12); }
.conference-marker:hover .marker-name, .conference-marker:focus-visible .marker-name { background: #fff1cb; color: #6d2f1d; }
@keyframes marker-float { 50% { margin-top: -3px; } }

.maplibregl-popup { z-index: 30; }
.maplibregl-popup-content { width: min(350px, calc(100vw - 38px)); padding: 0 !important; border: 1px solid rgba(70, 44, 20, .34); border-radius: 0 !important; background: #f1e3bd !important; color: var(--ink) !important; box-shadow: 0 18px 50px rgba(37, 24, 10, .3) !important; }
.maplibregl-popup-tip { border-top-color: #f1e3bd !important; border-bottom-color: #f1e3bd !important; }
.maplibregl-popup-close-button { width: 32px; height: 32px; z-index: 2; color: #4c3824; font-size: 20px; }
.conference-popup { padding: 21px; background-image: linear-gradient(rgba(96,66,30,.055) 1px, transparent 1px); background-size: 100% 25px; }
.conference-popup header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.conference-popup .popup-rank { padding: 4px 7px; background: var(--copper); color: #fff7df; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.conference-popup time { color: #745f3e; font: 13px Georgia, serif; }
.conference-popup h2 { margin: 17px 0 4px; color: #282419; font: 400 30px/1 Georgia, serif; }
.conference-popup > p { margin: 0 0 16px; color: #655b45; font-size: 11px; line-height: 1.55; }
.conference-popup dl { margin: 0; border-top: 1px solid rgba(71,48,22,.18); }
.conference-popup dl div { display: grid; grid-template-columns: 50px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(71,48,22,.14); font-size: 10px; }
.conference-popup dt { color: #91764c; }
.conference-popup dd { margin: 0; word-break: break-word; }
.conference-popup > a { display: flex; justify-content: space-between; margin-top: 16px; color: #8c3f24; font-size: 10px; font-weight: 800; letter-spacing: .06em; }

.maplibregl-ctrl-group { border-radius: 0 !important; background: rgba(240,225,189,.88) !important; box-shadow: 0 5px 18px rgba(40,25,10,.18) !important; }
.maplibregl-ctrl-group button + button { border-top-color: rgba(66,44,22,.18) !important; }
.maplibregl-ctrl-attrib { background: rgba(239,225,193,.72) !important; color: #4d412d !important; }
.maplibregl-ctrl-attrib a { color: #704b2b !important; }

@media (max-width: 900px) {
  .hero-copy { margin-left: 7vw; }
  .filter-bar { grid-template-columns: 1fr 1.8fr 1fr; }
  .filter-bar label:nth-of-type(4) { grid-column: 1 / 2; }
  #result-count { grid-column: 2 / 3; }
}

@media (max-width: 640px) {
  html { scroll-snap-type: none; }
  .hero-header { height: 70px; padding: 0 18px; }
  .brand > span:last-child { display: none; }
  .source-link { font-size: 8px; }
  .hero-copy { width: calc(100% - 36px); margin: 0 18px 104px; }
  .hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero-copy > p { line-height: 1.7; }
  .hero-links { display: grid; grid-template-columns: 1fr; }
  .hero-links a { min-width: 0; }
  .scroll-cue { right: 18px; bottom: 25px; }
  .scroll-cue span { display: none; }
  .map-brand { top: 14px; left: 14px; }
  .filter-toggle { display: block; top: 14px; right: 14px; }
  .filter-bar { bottom: 12px; width: calc(100% - 24px); max-height: calc(100% - 76px); overflow: auto; grid-template-columns: 1fr; align-items: stretch; transform: translateX(-50%); }
  .filter-bar label:nth-of-type(4), #result-count { grid-column: auto; }
  .atlas.filters-hidden .filter-bar { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
  .marker-name { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue i, .marker-badge { animation: none; }
}
