
:root{
  --bg:#eef1ef;
  --surface:#fbfcfa;
  --surface-strong:#ffffff;
  --ink:#172126;
  --muted:#69757a;
  --muted-2:#889398;
  --line:rgba(24,45,52,.13);
  --line-strong:rgba(24,45,52,.23);
  --deep:#142a33;
  --deep-2:#1b3741;
  --accent:#356f72;
  --accent-2:#517f76;
  --accent-soft:#e5efec;
  --safe:#377359;
  --safe-soft:#e5f0e9;
  --danger:#a6443d;
  --danger-soft:#f6e8e5;
  --warning:#a6742b;
  --warning-soft:#f6efdf;
  --route:#d64b3f;
  --blue:#397b9c;
  --glass:rgba(251,252,250,.92);
  --glass-dark:rgba(19,40,49,.93);
  --shadow:0 18px 50px rgba(23,36,40,.14);
  --shadow-soft:0 8px 28px rgba(23,36,40,.10);
  --radius-lg:24px;
  --radius-md:16px;
  --radius-sm:11px;
  --header-h:68px;
  font-size:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth;background:var(--bg)}
body{
  margin:0;
  color:var(--ink);
  background:var(--bg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body[data-ui="v40"]{overflow:hidden}
button,input,select,summary{font:inherit}
button,summary{cursor:pointer}
button{color:inherit}
button:disabled{cursor:not-allowed;opacity:.48}
a{color:inherit}
[hidden]{display:none!important}
.skip-link{
  position:fixed;
  z-index:10000;
  left:18px;
  top:-80px;
  padding:10px 14px;
  border-radius:10px;
  background:#fff;
  color:var(--deep);
  box-shadow:var(--shadow-soft);
}
.skip-link:focus{top:12px}
.visually-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.site-header{
  position:relative;
  z-index:3000;
  height:var(--header-h);
  display:grid;
  grid-template-columns:minmax(250px,330px) minmax(240px,1fr) auto;
  align-items:center;
  gap:18px;
  padding:0 18px;
  color:#f6faf8;
  background:linear-gradient(110deg,#112831 0%,#17323c 58%,#1c3a43 100%);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 6px 24px rgba(11,26,32,.18);
}
.header-left{display:flex;align-items:center;gap:11px;min-width:0}
.brand-mark{
  position:relative;
  width:40px;
  height:40px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.28);
  border-radius:14px;
  background:rgba(255,255,255,.09);
  color:#fff;
  font-weight:900;
  font-size:1rem;
  letter-spacing:-.04em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}
.brand-mark:before{content:"鎌"}
.brand-mark:after{
  content:"";
  position:absolute;
  right:6px;
  bottom:6px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#84b79e;
  box-shadow:0 0 0 3px rgba(132,183,158,.15);
}
.brand-copy{min-width:0}
.brand-copy h1{
  margin:0;
  font-size:.97rem;
  line-height:1.2;
  font-weight:760;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-copy p{
  margin:4px 0 0;
  color:rgba(239,247,244,.60);
  font-size:.68rem;
  letter-spacing:.06em;
}
.header-alert{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  justify-self:center;
  width:min(100%,720px);
  padding:8px 12px;
  border:1px solid rgba(236,207,137,.22);
  border-radius:12px;
  background:rgba(244,222,166,.08);
  color:#f5e4bb;
}
.header-alert-mark{
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:8px;
  background:#b88939;
  color:#fff;
  font-size:.74rem;
  font-weight:900;
}
.header-alert strong{
  flex:0 0 auto;
  font-size:.71rem;
  letter-spacing:.02em;
}
.header-alert span:last-child{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(248,236,207,.72);
  font-size:.69rem;
}
.utility-actions{
  display:flex;
  align-items:center;
  gap:5px;
  height:100%;
}
.header-action-button,.header-menu>summary{
  min-width:58px;
  height:38px;
  padding:0 11px;
  border:1px solid transparent;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  color:rgba(247,251,249,.82);
  font-size:.73rem;
  font-weight:700;
  transition:.18s ease;
}
.header-action-button:hover,.header-menu>summary:hover{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.09);
  color:#fff;
}
.install-app-button{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.12);
}
.header-menu{position:relative}
.header-menu>summary{list-style:none}
.header-menu>summary::-webkit-details-marker{display:none}
.header-menu-panel{
  position:absolute;
  z-index:5000;
  top:calc(100% + 12px);
  right:0;
  width:228px;
  padding:7px;
  display:grid;
  gap:3px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.98);
  color:var(--ink);
  box-shadow:0 22px 55px rgba(16,28,32,.22);
  transform-origin:top right;
  animation:v40-menu-in .16s ease-out;
}
.header-menu-panel button{
  min-height:39px;
  padding:0 11px;
  border:0;
  border-radius:10px;
  background:transparent;
  text-align:left;
  color:#273339;
  font-size:.78rem;
  font-weight:650;
}
.header-menu-panel button:hover{background:#eef3f1}
@keyframes v40-menu-in{
  from{opacity:0;transform:translateY(-5px) scale(.98)}
  to{opacity:1;transform:none}
}

.protocol-warning{
  position:fixed;
  z-index:6000;
  left:50%;
  top:82px;
  width:min(760px,calc(100vw - 28px));
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:9px 12px;
  padding:11px 13px;
  border:1px solid #d7bd75;
  border-radius:14px;
  background:#fff8df;
  color:#634c18;
  box-shadow:var(--shadow-soft);
}
.protocol-warning strong{font-size:.78rem}
.protocol-warning span{font-size:.72rem}
.protocol-warning button{
  width:30px;
  height:30px;
  border:0;
  border-radius:9px;
  background:rgba(99,76,24,.08);
  color:#634c18;
}

#main{
  height:calc(100vh - var(--header-h));
  overflow:hidden;
}
.screen-section{display:none}
.screen-section.is-active{display:block;animation:v40-screen-in .22s ease-out}
@keyframes v40-screen-in{
  from{opacity:.01}
  to{opacity:1}
}

.map-section.is-active{
  position:relative;
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  background:#dfe6e2;
}
.center-stage{
  position:absolute;
  inset:0;
  z-index:1;
}
.map-card,.map-wrap,#map{
  position:absolute;
  inset:0;
}
.map-card{background:#dfe6e2}
#map{width:100%;height:100%;background:#dfe6e2}
.map-footer{display:none}

.leaflet-control-zoom{
  border:0!important;
  border-radius:14px!important;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(19,34,38,.15)!important;
}
.leaflet-control-zoom a{
  width:34px!important;
  height:34px!important;
  line-height:34px!important;
  border:0!important;
  border-bottom:1px solid rgba(20,42,50,.08)!important;
  background:rgba(255,255,255,.95)!important;
  color:#26373c!important;
}
.leaflet-control-attribution{
  padding:2px 7px!important;
  border-radius:7px 0 0 0;
  background:rgba(255,255,255,.78)!important;
  color:#647176!important;
  font-size:9px!important;
}
.leaflet-popup-content-wrapper{
  border-radius:16px!important;
  box-shadow:0 16px 44px rgba(16,32,38,.18)!important;
}
.leaflet-popup-content{margin:14px 16px!important}
.popup-route-button{
  width:100%;
  margin-top:8px;
  padding:8px 12px;
  border:0;
  border-radius:9px;
  background:var(--deep);
  color:#fff;
  font-weight:750;
}

.map-toolbar{
  position:absolute;
  z-index:1150;
  top:16px;
  left:50%;
  width:min(650px,calc(100% - 760px));
  min-width:370px;
  min-height:46px;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:7px 9px 7px 13px;
  border:1px solid rgba(31,56,63,.13);
  border-radius:17px;
  background:rgba(252,253,251,.91);
  backdrop-filter:blur(18px) saturate(1.15);
  box-shadow:0 10px 34px rgba(20,35,39,.12);
}
.map-status-main,.route-status-wrap{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.map-status-label{
  color:var(--muted-2);
  font-size:.66rem;
  font-weight:720;
  letter-spacing:.02em;
}
.map-toolbar strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#23343a;
  font-size:.78rem;
}
#mapModeLabel{display:none}
.route-status-wrap{
  max-width:48%;
  padding:6px 9px;
  border-radius:10px;
  background:#eef3f1;
}
.route-service-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#3d555d;
  font-size:.71rem;
  font-weight:720;
}

.side-panel{
  position:absolute;
  z-index:1250;
  top:16px;
  bottom:16px;
  left:16px;
  width:306px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(29,54,61,.13);
  border-radius:22px;
  background:var(--glass);
  backdrop-filter:blur(22px) saturate(1.08);
  box-shadow:var(--shadow);
}
.side-brand{
  padding:16px 17px 12px;
  border-bottom:1px solid rgba(24,45,52,.08);
}
.side-brand strong{
  display:block;
  color:#213137;
  font-size:.91rem;
  font-weight:780;
}
.side-brand span{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:.69rem;
}
.side-nav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  padding:10px 11px;
  border-bottom:1px solid rgba(24,45,52,.08);
}
.side-nav-item{
  min-width:0;
  min-height:43px;
  padding:6px 9px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#536166;
  text-align:left;
  transition:.16s ease;
}
.side-nav-item strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.72rem;
  font-weight:720;
}
.side-nav-item:hover{
  background:#edf2f0;
  color:#203239;
}
.side-nav-item.is-active{
  border-color:rgba(53,111,114,.18);
  background:var(--accent-soft);
  color:#25595d;
}
.side-nav-item.admin-entry{grid-column:1/-1}
.action-panel{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:12px 13px 15px;
  scrollbar-width:thin;
  scrollbar-color:#b8c2be transparent;
}
.action-panel::-webkit-scrollbar,.candidate-list::-webkit-scrollbar,.safe-point-list::-webkit-scrollbar{width:5px}
.action-panel::-webkit-scrollbar-thumb,.candidate-list::-webkit-scrollbar-thumb,.safe-point-list::-webkit-scrollbar-thumb{background:#b9c3bf;border-radius:9px}
.action-group{
  margin:0 0 11px;
  padding:0;
  border:0;
}
.action-group legend{
  margin-bottom:8px;
  color:#4b595e;
  font-size:.69rem;
  font-weight:760;
}
.hazard-check-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}
.hazard-check{
  position:relative;
  min-height:39px;
  display:flex;
  align-items:center;
  padding:7px 29px 7px 9px;
  border:1px solid rgba(31,56,63,.11);
  border-radius:11px;
  background:#fff;
  color:#536066;
  font-size:.68rem;
  font-weight:650;
  transition:.15s ease;
}
.hazard-check:hover{border-color:rgba(53,111,114,.34)}
.hazard-check input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.hazard-check i{
  position:absolute;
  top:50%;
  right:9px;
  width:14px;
  height:14px;
  transform:translateY(-50%);
  border:1.5px solid #a3ada9;
  border-radius:5px;
  background:#fff;
}
.hazard-check input:checked+i{
  border-color:var(--accent);
  background:var(--accent);
  box-shadow:inset 0 0 0 3px #fff;
}
.hazard-check:has(input:checked){
  border-color:rgba(53,111,114,.28);
  background:#edf4f2;
  color:#275c60;
}
#clearHazardsButton{
  grid-column:1/-1;
  justify-self:start;
  margin-top:2px;
  border:0;
  background:transparent;
  color:#7b8588;
  font-size:.66rem;
  text-decoration:underline;
  text-underline-offset:3px;
}
.primary-button,.secondary-button,.scenario-button,.inline-button{
  min-height:42px;
  border-radius:12px;
  font-weight:730;
  transition:.16s ease;
}
.primary-button{
  border:1px solid var(--deep);
  background:var(--deep);
  color:#fff;
}
.primary-button:hover{background:#203b45}
.secondary-button{
  border:1px solid rgba(27,55,65,.15);
  background:#fff;
  color:#36474d;
}
.secondary-button:hover{background:#f0f4f2}
.locate-main-button{
  width:100%;
  min-height:48px;
  margin-top:2px;
  border-radius:14px;
  font-size:.82rem;
  box-shadow:0 8px 18px rgba(20,42,51,.13);
}
#trackButton,#resetMapButton,#offlinePrepareButton{
  width:calc(33.333% - 5px);
  min-height:36px;
  margin-top:7px;
  padding:0 5px;
  font-size:.66rem;
}
#trackButton{margin-right:4px}
#resetMapButton{margin-right:4px}
.demo-divider{
  margin:13px 0 8px;
  color:#929b9d;
  font-size:.61rem;
  text-align:center;
}
.scenario-button{
  width:100%;
  padding:9px 10px;
  border:1px solid rgba(166,68,61,.18);
  background:var(--danger-soft);
  color:#8e3b35;
  font-size:.7rem;
}
.demo-controls{
  margin-top:7px;
  border:1px solid rgba(27,55,65,.10);
  border-radius:11px;
  background:#f8faf9;
}
.demo-controls summary{
  padding:8px 10px;
  color:#6e797c;
  font-size:.66rem;
}
.demo-controls>div{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  padding:0 7px 7px;
}
.demo-controls button{
  min-height:32px;
  border:1px solid rgba(27,55,65,.11);
  border-radius:9px;
  background:#fff;
  font-size:.63rem;
}
.side-bottom{
  flex:0 0 auto;
  padding:10px 13px 12px;
  border-top:1px solid rgba(24,45,52,.08);
  background:rgba(246,249,247,.76);
}
.side-status{
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:1px 9px;
  padding-left:14px;
}
.side-status:before{
  content:"";
  position:absolute;
  left:0;
  top:7px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#64a37f;
  box-shadow:0 0 0 4px rgba(100,163,127,.12);
}
.side-status span{
  color:var(--muted-2);
  font-size:.62rem;
}
.side-status strong{
  color:#405055;
  font-size:.68rem;
}
.side-status small{
  grid-column:1/-1;
  color:#7a8588;
  font-size:.62rem;
}

.right-panel{
  position:absolute;
  z-index:1240;
  top:16px;
  right:16px;
  bottom:16px;
  width:366px;
  display:grid;
  grid-template-rows:minmax(0,1.12fr) minmax(210px,.78fr);
  gap:10px;
  pointer-events:none;
}
.candidate-panel,.tsunami-point-panel{
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  pointer-events:auto;
  border:1px solid rgba(29,54,61,.13);
  border-radius:22px;
  background:var(--glass);
  backdrop-filter:blur(22px) saturate(1.08);
  box-shadow:var(--shadow);
}
.candidate-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:15px 16px 9px;
}
.candidate-heading h3{
  margin:0;
  color:#203137;
  font-size:.94rem;
  font-weight:800;
}
.count-badge{
  min-width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:var(--deep);
  color:#fff;
  font-size:.71rem;
  font-weight:800;
}
.candidate-note{
  margin:0 16px 8px;
  display:flex;
  align-items:baseline;
  gap:8px;
}
.candidate-note strong{
  color:#536166;
  font-size:.67rem;
}
.candidate-note span{
  color:#8a9497;
  font-size:.62rem;
}
.candidate-list,.safe-point-list{
  min-height:0;
  overflow:auto;
  padding:2px 10px 12px;
}
.candidate-item{
  position:relative;
  margin:0 0 7px;
  padding:11px 11px 10px 13px;
  border:1px solid rgba(31,56,63,.10);
  border-radius:14px;
  background:rgba(255,255,255,.92);
  transition:.16s ease;
}
.candidate-item:hover{
  border-color:rgba(53,111,114,.24);
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(22,38,43,.07);
}
.candidate-item.is-selected{
  border-color:rgba(53,111,114,.45);
  box-shadow:inset 3px 0 0 var(--accent);
}
.candidate-title-line{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.candidate-title-line h4{
  margin:0;
  color:#223238;
  font-size:.76rem;
  font-weight:800;
  line-height:1.35;
}
.candidate-badges{display:flex;gap:4px;flex:0 0 auto}
.open-badge,.priority-badge,.official-type{
  border-radius:7px;
  font-size:.58rem;
  font-weight:700;
}
.open-badge{
  padding:2px 6px;
  background:var(--safe-soft);
  color:var(--safe);
}
.priority-badge{
  padding:2px 6px;
  background:var(--warning-soft);
  color:#8b6225;
}
.capacity-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:6px 0 0;
  padding:4px 8px;
  border:1px solid #b8dcd5;
  border-radius:8px;
  background:#e7f4f1;
  color:#16564f;
  font-size:.66rem;
  font-weight:700;
  line-height:1.25;
}
.capacity-badge strong{color:#103e39;font-size:.84rem;font-weight:850}
.popup-capacity-badge{margin:8px 0}
.candidate-item>p{
  margin:5px 0 0;
  color:#697579;
  font-size:.65rem;
}
.candidate-item .official-type{
  color:#929a9c;
  line-height:1.45;
}
.direction-info{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:5px;
  color:#49585d;
  font-size:.64rem;
}
.direction-arrow{
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  transform:rotate(var(--bearing));
  border-radius:8px;
  background:#edf3f1;
  color:#3d6e70;
  font-weight:900;
}
.candidate-actions{
  display:grid;
  grid-template-columns:1fr .78fr;
  gap:6px;
  margin-top:9px;
}
.focus-button,.route-button{
  min-height:33px;
  border-radius:9px;
  font-size:.64rem;
  font-weight:760;
}
.focus-button{
  border:1px solid rgba(31,56,63,.13);
  background:#f5f7f6;
  color:#435257;
}
.route-button{
  border:1px solid var(--deep);
  background:var(--deep);
  color:#fff;
}
.empty-state{
  padding:20px 13px;
  color:#879194;
  font-size:.7rem;
  text-align:center;
}
.safe-point-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  color:#657176;
  font-size:.63rem;
}
.safe-point-toggle input{accent-color:var(--accent)}
.safe-point-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 4px;
  border-bottom:1px solid rgba(27,55,65,.08);
}
.safe-point-item:last-child{border-bottom:0}
.safe-point-item strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#34444a;
  font-size:.69rem;
}
.safe-point-item span{
  display:block;
  margin-top:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#8a9497;
  font-size:.59rem;
}
.safe-point-item .capacity-badge{display:inline-flex;width:max-content;max-width:100%;margin-top:5px;overflow:visible;white-space:nowrap;text-overflow:clip;font-size:.62rem}
.safe-point-item .capacity-badge>span{display:inline;margin:0;overflow:visible;white-space:nowrap;color:#16564f;font-size:inherit}
.safe-point-item .capacity-badge>strong{display:inline;overflow:visible;color:#103e39;font-size:.78rem}
.safe-point-time{text-align:right}
.safe-point-time b{
  display:block;
  color:#285f63;
  font-size:.72rem;
}
.safe-point-time small{
  display:block;
  color:#90999b;
  font-size:.56rem;
}

.status-grid{
  position:absolute;
  z-index:1120;
  left:50%;
  bottom:17px;
  width:min(660px,calc(100% - 750px));
  min-width:390px;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  pointer-events:none;
}
.status-card{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  border:1px solid rgba(31,56,63,.11);
  border-radius:15px;
  background:rgba(252,253,251,.88);
  backdrop-filter:blur(16px);
  box-shadow:0 8px 24px rgba(20,35,39,.09);
}
.status-icon{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:9px;
  background:#e9efed;
  color:#365c61;
  font-size:.68rem;
  font-weight:900;
}
.status-card p{
  margin:0;
  color:#899396;
  font-size:.58rem;
}
.status-card strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#34444a;
  font-size:.66rem;
}
.legend-panel{
  position:absolute;
  z-index:1080;
  left:336px;
  bottom:17px;
  padding:8px 9px;
  border:1px solid rgba(31,56,63,.10);
  border-radius:13px;
  background:rgba(252,253,251,.88);
  backdrop-filter:blur(14px);
  box-shadow:0 8px 22px rgba(20,35,39,.08);
  color:#637075;
  font-size:.59rem;
}
.legend-panel strong{display:block;margin-bottom:3px;color:#46565b;font-size:.62rem}
.legend-panel ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.legend-panel li{display:flex;align-items:center;gap:5px}
.legend-color{width:18px;height:6px;border-radius:3px}
.legend-color.p1{background:#6c278f}.legend-color.p2{background:#8b43a6}.legend-color.p3{background:#a969bb}.legend-color.p4{background:#cf9dd6}.legend-color.p5{background:#ead4ec}

.user-pin{
  display:block;
  width:18px;
  height:18px;
  border:3px solid #fff;
  border-radius:50%;
  background:#3783ad;
  box-shadow:0 0 0 5px rgba(55,131,173,.18),0 4px 12px rgba(31,77,103,.24);
}
.candidate-pin,.safe-point-pin,.report-pin{
  display:grid;
  place-items:center;
  border:3px solid #fff;
  border-radius:50%;
  box-shadow:0 5px 14px rgba(28,43,48,.22);
}
.candidate-pin{
  width:28px;
  height:28px;
  background:var(--safe);
  color:#fff;
  font-size:.62rem;
  font-weight:900;
}
.candidate-pin.high-ground{background:#356f72}
.safe-point-pin{
  width:27px;
  height:27px;
  background:#356f72;
  color:#fff;
  font-size:.55rem;
}
.report-pin{
  width:29px;
  height:29px;
  background:var(--danger);
  color:#fff;
  font-weight:900;
}

.feature-section,.guidance-section{
  height:100%;
  overflow:auto;
  padding:54px max(24px,calc((100vw - 1080px)/2)) 70px;
  background:
    radial-gradient(circle at 15% 0%,rgba(84,127,118,.11),transparent 30%),
    radial-gradient(circle at 95% 20%,rgba(166,116,43,.08),transparent 23%),
    #f0f2ef;
}
.section-heading,.feature-header{
  width:min(100%,1080px);
  margin:0 auto 22px;
}
.section-heading h2,.feature-header h2{
  margin:0;
  color:#1c2b31;
  font-size:clamp(1.55rem,2.5vw,2.25rem);
  font-weight:790;
  letter-spacing:-.035em;
}
.section-kicker{display:none}
.feature-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
}
.demo-badge{
  padding:6px 10px;
  border:1px solid rgba(166,116,43,.20);
  border-radius:999px;
  background:#fbf5e9;
  color:#8d692e;
  font-size:.65rem;
  font-weight:760;
}
.feature-lead{
  width:min(100%,1080px);
  margin:-9px auto 22px;
  color:#697579;
  font-size:.84rem;
}
.guide-grid,.transport-grid,.offline-status-grid,.architecture-grid{
  width:min(100%,1080px);
  margin:0 auto;
  display:grid;
  gap:12px;
}
.guide-grid{grid-template-columns:repeat(4,1fr)}
.transport-grid{grid-template-columns:repeat(2,1fr)}
.offline-status-grid{grid-template-columns:repeat(3,1fr)}
.architecture-grid{grid-template-columns:repeat(4,1fr)}
.guide-grid article,.transport-card,.offline-status-grid article,.architecture-grid article{
  border:1px solid rgba(29,54,61,.10);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  box-shadow:0 8px 24px rgba(23,36,40,.05);
}
.guide-grid article{
  padding:17px;
}
.guide-grid article>span{
  display:block;
  margin-bottom:12px;
  color:#99a1a3;
  font-size:.62rem;
  font-weight:800;
}
.guide-grid article strong{
  display:block;
  margin-bottom:6px;
  color:#26373c;
  font-size:.82rem;
}
.guide-grid article p{
  margin:0;
  color:#748084;
  font-size:.72rem;
}
.guidance-card{
  width:min(100%,1080px);
  margin:0 auto 14px;
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  align-items:center;
  gap:22px;
  padding:24px;
  border:1px solid rgba(166,68,61,.14);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(249,241,238,.92));
  box-shadow:0 16px 44px rgba(61,38,34,.08);
}
.guidance-icon{
  width:76px;
  height:76px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:var(--danger);
  color:#fff;
  font-size:1.4rem;
  font-weight:900;
  box-shadow:0 12px 28px rgba(166,68,61,.18);
}
.guidance-tag{
  display:inline-flex;
  padding:4px 8px;
  border-radius:7px;
  background:var(--danger-soft);
  color:#913e38;
  font-size:.63rem;
  font-weight:800;
}
.guidance-card h3{
  margin:6px 0 5px;
  color:#2d2f30;
  font-size:1.12rem;
}
.guidance-card p{
  margin:0;
  color:#697579;
  font-size:.78rem;
}
.transport-card{padding:18px}
.transport-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.transport-line h3{margin:0;color:#27383e;font-size:.91rem}
.transport-card p{margin:9px 0 0;color:#758084;font-size:.74rem}
.transport-status{
  padding:5px 8px;
  border-radius:8px;
  font-size:.64rem;
  font-weight:800;
}
.transport-status.normal{background:var(--safe-soft);color:var(--safe)}
.transport-status.delay{background:var(--warning-soft);color:#8b6225}
.transport-status.stop{background:var(--danger-soft);color:var(--danger)}

.report-form,.offline-pack-card,.offline-metrics,.admin-summary,.admin-shelter-list,.report-list,.notification-list{
  width:min(100%,1080px);
  margin-left:auto;
  margin-right:auto;
}
.report-form{
  display:grid;
  grid-template-columns:1fr 2fr;
  gap:13px;
  padding:18px;
  border:1px solid rgba(29,54,61,.10);
  border-radius:22px;
  background:rgba(255,255,255,.80);
  box-shadow:0 10px 28px rgba(23,36,40,.05);
}
.report-form label>span{
  display:block;
  margin-bottom:5px;
  color:#647075;
  font-size:.66rem;
  font-weight:760;
}
.report-form input,.report-form select{
  width:100%;
  height:43px;
  padding:0 11px;
  border:1px solid rgba(29,54,61,.16);
  border-radius:11px;
  background:#fff;
  color:#2c3d42;
  outline:none;
}
.report-form input:focus,.report-form select:focus{
  border-color:rgba(53,111,114,.55);
  box-shadow:0 0 0 3px rgba(53,111,114,.10);
}
.report-coordinates{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.report-form>.feature-actions{grid-column:1/-1}
.report-list{margin-top:14px}
.report-item,.notification-item,.admin-shelter-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
  padding:13px 15px;
  border:1px solid rgba(29,54,61,.10);
  border-radius:15px;
  background:rgba(255,255,255,.82);
}
.report-item strong,.notification-item strong,.admin-shelter-item strong{color:#2b3c41;font-size:.77rem}
.report-item p,.notification-item p{margin:3px 0 0;color:#7a8588;font-size:.68rem}
.report-delete{
  flex:0 0 auto;
  padding:6px 9px;
  border:1px solid rgba(166,68,61,.16);
  border-radius:8px;
  background:#fff;
  color:var(--danger);
  font-size:.63rem;
}
.notification-item{
  position:relative;
  display:block;
  padding-left:19px;
}
.notification-item:before{
  content:"";
  position:absolute;
  top:14px;
  bottom:14px;
  left:7px;
  width:3px;
  border-radius:5px;
  background:#8ba4ad;
}
.notification-item.danger:before{background:var(--danger)}
.notification-item.warning:before{background:var(--warning)}
.notification-item.info:before{background:var(--accent)}
.notification-item p{margin-top:4px}

.offline-status-grid article{
  padding:17px;
}
.feature-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  margin-bottom:12px;
  border-radius:11px;
  background:var(--accent-soft);
  color:#2e6265;
  font-size:.65rem;
  font-weight:900;
}
.offline-status-grid strong,.architecture-grid strong{
  display:block;
  color:#293a40;
  font-size:.8rem;
}
.offline-status-grid p,.architecture-grid p{
  margin:6px 0 0;
  color:#758084;
  font-size:.7rem;
}
.offline-pack-card{
  margin-top:14px;
  padding:20px;
  border:1px solid rgba(29,54,61,.11);
  border-radius:23px;
  background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(234,242,239,.88));
  box-shadow:0 12px 34px rgba(23,36,40,.06);
}
.offline-pack-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.offline-pack-title strong{display:block;color:#213339;font-size:.93rem}
.offline-pack-title span:not(.offline-pack-version){
  display:block;
  margin-top:3px;
  color:#6e7a7e;
  font-size:.68rem;
}
.offline-pack-version{
  padding:4px 8px;
  border-radius:8px;
  background:var(--deep);
  color:#fff;
  font-size:.6rem;
  font-weight:800;
}
.offline-pack-card>p{
  margin:13px 0;
  color:#667277;
  font-size:.76rem;
}
.offline-pack-card>small{
  display:block;
  margin-top:10px;
  color:#808b8e;
  font-size:.65rem;
}
.offline-pack-progress{
  margin:13px 0;
  padding:11px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.72);
}
.offline-pack-progress>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
  color:#5d6a6e;
  font-size:.67rem;
}
.offline-pack-progress progress{
  width:100%;
  height:9px;
  accent-color:var(--accent);
}
.offline-pack-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.offline-metrics{
  margin-top:10px;
  padding:14px 16px;
  border:1px solid rgba(29,54,61,.09);
  border-radius:16px;
  background:rgba(255,255,255,.58);
  color:#718084;
  font-size:.69rem;
  line-height:1.65;
}
.offline-metrics strong{display:block;margin-bottom:4px;color:#34474c;font-size:.74rem}

.feature-actions{
  width:min(100%,1080px);
  margin:14px auto 0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.inline-button{
  min-height:39px;
  padding:0 13px;
  font-size:.7rem;
}
.implementation-note{
  width:min(100%,1080px);
  margin:13px auto 0;
  padding:12px 14px;
  border-left:3px solid #a2aba8;
  background:rgba(255,255,255,.48);
  color:#758084;
  font-size:.68rem;
}
.implementation-note strong{color:#4a585d}
.admin-summary{
  padding:15px 17px;
  border-radius:17px;
  background:var(--deep);
  color:#f4f8f6;
  font-size:.76rem;
}
.admin-shelter-list{margin-top:14px}
.admin-shelter-item small{
  display:block;
  margin-top:3px;
  color:#7d888b;
  font-size:.63rem;
}
.admin-switch{
  display:flex;
  align-items:center;
  gap:6px;
  color:#4c5c61;
  font-size:.67rem;
}
.admin-switch input{accent-color:var(--safe)}
.architecture-grid article{
  min-height:130px;
  padding:17px;
}
.site-footer{
  display:none;
}

.install-sheet-backdrop{
  position:fixed;
  inset:0;
  z-index:6900;
  background:rgba(12,25,30,.46);
  backdrop-filter:blur(3px);
}
.install-sheet{
  position:fixed;
  z-index:7000;
  top:88px;
  right:20px;
  width:min(390px,calc(100vw - 30px));
  overflow:hidden;
  border:1px solid rgba(255,255,255,.8);
  border-radius:22px;
  background:#fff;
  box-shadow:0 28px 80px rgba(12,25,30,.30);
  animation:v40-sheet-in .22s ease-out;
}
@keyframes v40-sheet-in{
  from{opacity:0;transform:translateY(-8px) scale(.98)}
  to{opacity:1;transform:none}
}
.install-sheet-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 17px 12px;
  border-bottom:1px solid rgba(29,54,61,.08);
}
.install-sheet-head strong{display:block;color:#213238;font-size:.87rem}
.install-sheet-head span{display:block;margin-top:2px;color:#7c878a;font-size:.65rem}
.install-sheet-head button{
  width:31px;
  height:31px;
  border:0;
  border-radius:10px;
  background:#eef2f0;
}
.install-sheet-body{padding:15px 17px 17px}
.install-app-preview{
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:13px;
}
.install-app-preview img{
  width:48px;
  height:48px;
  border-radius:13px;
  box-shadow:0 6px 16px rgba(20,37,42,.14);
}
.install-app-preview strong{display:block;color:#23343a;font-size:.79rem}
.install-app-preview span{display:block;margin-top:2px;color:#859093;font-size:.64rem}
.install-status,.install-instructions{
  margin:9px 0;
  color:#667277;
  font-size:.7rem;
}
.install-primary,.install-secondary{
  width:100%;
  min-height:41px;
  margin-top:7px;
  border-radius:11px;
  font-weight:740;
}
.install-primary{border:0;background:var(--deep);color:#fff}
.install-secondary{border:1px solid rgba(29,54,61,.13);background:#fff;color:#415056}

.back-to-top{display:none}
.toast{
  position:fixed;
  z-index:8000;
  left:50%;
  bottom:24px;
  max-width:min(540px,calc(100vw - 32px));
  transform:translate(-50%,24px);
  padding:11px 15px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:13px;
  background:rgba(18,38,47,.95);
  color:#fff;
  box-shadow:0 14px 40px rgba(10,25,31,.25);
  opacity:0;
  pointer-events:none;
  font-size:.72rem;
  transition:.22s ease;
}
.toast.show,.toast.is-visible{
  transform:translate(-50%,0);
  opacity:1;
}
.panel-attention{
  animation:v40-panel-attention 1.1s ease;
}
@keyframes v40-panel-attention{
  0%,100%{box-shadow:var(--shadow)}
  40%{box-shadow:0 0 0 4px rgba(53,111,114,.14),var(--shadow)}
}

.mobile-map-tabs{display:none}
.mobile-sheet-close{display:none}
.v40-ripple{
  position:absolute;
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(255,255,255,.30);
  transform:translate(-50%,-50%) scale(0);
  pointer-events:none;
  animation:v40-ripple .46s ease-out forwards;
}
@keyframes v40-ripple{
  to{transform:translate(-50%,-50%) scale(16);opacity:0}
}

@media(max-width:1180px){
  .site-header{grid-template-columns:minmax(210px,280px) 1fr auto}
  .header-alert span:last-child{display:none}
  .map-toolbar{left:326px;right:340px;width:auto;min-width:0;transform:none}
  .right-panel{width:324px}
  .status-grid{left:326px;right:340px;width:auto;min-width:0;transform:none}
  .legend-panel{display:none}
}

@media(max-width:860px){
  :root{--header-h:58px}
  body[data-ui="v40"]{overflow:hidden}
  .site-header{
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px;
    padding:0 9px 0 11px;
  }
  .brand-mark{width:35px;height:35px;border-radius:11px}
  .brand-copy h1{font-size:.82rem}
  .brand-copy p{display:none}
  .header-alert{display:none}
  .utility-actions{gap:1px}
  .header-action-button{
    min-width:43px;
    height:37px;
    padding:0 8px;
    font-size:0;
  }
  .header-action-button:before{
    font-size:1rem;
    line-height:1;
  }
  #headerTopButton:before{content:"⌂"}
  #headerGpsButton:before{content:"◎"}
  #installAppButton:before{content:"＋"}
  .header-menu>summary{
    min-width:50px;
    height:37px;
    padding:0 8px;
    font-size:.68rem;
  }
  .header-menu-panel{
    position:fixed;
    top:65px;
    right:9px;
    width:min(270px,calc(100vw - 18px));
  }
  #main{height:calc(100dvh - var(--header-h))}
  .map-toolbar{
    top:10px;
    left:10px;
    right:10px;
    width:auto;
    min-width:0;
    transform:none;
    min-height:43px;
    border-radius:14px;
  }
  .map-status-label{display:none}
  .map-toolbar strong{font-size:.72rem}
  .route-status-wrap{
    max-width:50%;
    padding:5px 7px;
  }
  .route-service-label{font-size:.64rem}

  .side-panel{
    z-index:1450;
    top:auto;
    left:8px;
    right:8px;
    bottom:73px;
    width:auto;
    height:auto;
    max-height:min(62dvh,520px);
    display:block;
    overflow:visible;
    border-radius:22px;
    transform:translateY(calc(100% + 90px));
    opacity:0;
    pointer-events:none;
    transition:transform .25s cubic-bezier(.22,.7,.24,1),opacity .2s ease;
  }
  .side-brand,.side-nav,.side-bottom{display:none}
  .action-panel{
    max-height:min(62dvh,520px);
    padding:44px 14px 16px;
    overflow:auto;
  }
  body.mobile-hazard-open .side-panel{
    transform:none;
    opacity:1;
    pointer-events:auto;
  }

  .right-panel{
    z-index:1450;
    top:auto;
    left:8px;
    right:8px;
    bottom:73px;
    width:auto;
    height:min(66dvh,550px);
    display:block;
    transform:translateY(calc(100% + 90px));
    opacity:0;
    pointer-events:none;
    transition:transform .25s cubic-bezier(.22,.7,.24,1),opacity .2s ease;
  }
  body.mobile-candidate-open .right-panel{
    transform:none;
    opacity:1;
    pointer-events:auto;
  }
  .candidate-panel,.tsunami-point-panel{
    position:absolute;
    inset:0;
    border-radius:22px;
    box-shadow:0 20px 55px rgba(15,28,33,.24);
  }
  .tsunami-point-panel{display:none}
  body.mobile-safe-open .candidate-panel{display:none}
  body.mobile-safe-open .tsunami-point-panel{display:flex}
  .candidate-heading{padding-top:44px}
  .candidate-list,.safe-point-list{padding-bottom:18px}

  .mobile-sheet-close{
    display:grid;
    place-items:center;
    position:absolute;
    z-index:4;
    top:9px;
    right:10px;
    width:30px;
    height:30px;
    border:0;
    border-radius:10px;
    background:#edf2f0;
    color:#4c5a5e;
    font-size:1rem;
  }

  .mobile-map-tabs{
    position:absolute;
    z-index:1500;
    left:50%;
    bottom:11px;
    width:min(430px,calc(100% - 16px));
    height:53px;
    transform:translateX(-50%);
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:3px;
    padding:4px;
    border:1px solid rgba(255,255,255,.50);
    border-radius:18px;
    background:rgba(20,42,51,.94);
    backdrop-filter:blur(20px);
    box-shadow:0 14px 36px rgba(14,29,35,.28);
  }
  .mobile-map-tabs button{
    border:0;
    border-radius:14px;
    background:transparent;
    color:rgba(245,250,248,.68);
    font-size:.64rem;
    font-weight:720;
  }
  .mobile-map-tabs button.is-active{
    background:rgba(255,255,255,.12);
    color:#fff;
  }

  .status-grid{
    top:61px;
    bottom:auto;
    left:10px;
    right:10px;
    width:auto;
    min-width:0;
    transform:none;
    grid-template-columns:1fr 1fr 1fr;
    gap:4px;
  }
  .status-card{
    min-height:37px;
    padding:6px 7px;
    border-radius:11px;
  }
  .status-icon{display:none}
  .status-card p{font-size:.51rem}
  .status-card strong{font-size:.57rem}
  .legend-panel{display:none}
  .leaflet-control-zoom{margin-left:10px!important;margin-bottom:76px!important}

  .feature-section,.guidance-section{
    padding:32px 14px 90px;
  }
  .section-heading h2,.feature-header h2{font-size:1.55rem}
  .guide-grid{grid-template-columns:1fr 1fr}
  .transport-grid,.offline-status-grid,.architecture-grid{grid-template-columns:1fr}
  .guidance-card{
    grid-template-columns:56px 1fr;
    gap:14px;
    padding:17px;
    border-radius:19px;
  }
  .guidance-icon{
    width:52px;
    height:52px;
    border-radius:16px;
    font-size:1rem;
  }
  .guidance-card h3{font-size:.95rem}
  .report-form{grid-template-columns:1fr;padding:14px}
  .report-coordinates{grid-column:auto;grid-template-columns:1fr 1fr}
  .report-form>.feature-actions{grid-column:auto}
  .install-sheet{
    top:auto;
    right:8px;
    bottom:8px;
    left:8px;
    width:auto;
    border-radius:23px;
    animation:v40-sheet-mobile .24s ease-out;
  }
  @keyframes v40-sheet-mobile{
    from{opacity:0;transform:translateY(20px)}
    to{opacity:1;transform:none}
  }
  .toast{bottom:75px}
}

@media(max-width:520px){
  .brand-copy h1{max-width:155px}
  .header-action-button#headerTopButton{display:none}
  .map-toolbar{right:10px}
  .route-status-wrap{max-width:52%}
  .status-grid{grid-template-columns:1fr 1fr}
  .status-card:nth-child(3){display:none}
  .hazard-check-grid{grid-template-columns:1fr 1fr}
  .guide-grid{grid-template-columns:1fr}
  .report-coordinates{grid-template-columns:1fr}
  .offline-pack-actions{display:grid;grid-template-columns:1fr}
  .feature-actions{display:grid;grid-template-columns:1fr}
  .inline-button{width:100%}
}

.freshness-chip{
  flex:0 0 auto;
  max-width:190px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding:5px 8px;
  border-radius:9px;
  font-size:.62rem;
  font-weight:760;
}
.freshness-chip.is-online{
  background:#e5f0e9;
  color:#377359;
}
.freshness-chip.is-offline{
  background:#f6efdf;
  color:#8b6225;
}
@media(max-width:860px){
  .freshness-chip{max-width:120px;padding:4px 6px;font-size:.54rem}
}
