/* LEAF TRIP MANUAL V2 */

.manual-trip-entry{
  width:calc(100% - 32px);
  margin:8px 16px 14px;
  height:44px;
  border:0;
  border-radius:14px;
  background:#17251e;
  color:#fff;
  font-size:14px;
  font-weight:700;
  letter-spacing:.2px;
  box-shadow:0 6px 18px rgba(22,37,30,.12);
}

#mTripApp{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  background:#f5f7f6;
  color:#18231d;
  overflow:hidden;
}

#mTripApp.show{display:block}

.mt-page{
  height:100%;
  display:flex;
  flex-direction:column;
}

.mt-header{
  flex:0 0 auto;
  height:58px;
  padding:env(safe-area-inset-top) 14px 0;
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid #e8ece9;
  backdrop-filter:blur(16px);
}

.mt-back{
  width:38px;
  height:38px;
  border:0;
  border-radius:11px;
  background:#f2f5f3;
  font-size:22px;
  line-height:1;
}

.mt-head-title{
  flex:1;
  font-size:17px;
  font-weight:750;
}

.mt-close{
  border:0;
  background:none;
  font-size:13px;
  color:#66736b;
  padding:10px;
}

.mt-scroll{
  flex:1;
  overflow:auto;
  padding:16px 16px 120px;
  -webkit-overflow-scrolling:touch;
}

.mt-section{
  margin-bottom:14px;
  padding:15px;
  background:#fff;
  border:1px solid #e7ece9;
  border-radius:17px;
}

.mt-section-title{
  margin-bottom:11px;
  font-size:12px;
  font-weight:750;
  color:#27382f;
}

.mt-label{
  display:block;
  margin:11px 0 6px;
  font-size:11px;
  color:#68746d;
}

.mt-input,
.mt-select,
.mt-textarea{
  box-sizing:border-box;
  width:100%;
  border:1px solid #dfe6e2;
  border-radius:11px;
  outline:0;
  background:#fafcfb;
  color:#1d2922;
  font-size:14px;
}

.mt-input,
.mt-select{
  height:43px;
  padding:0 11px;
}

.mt-textarea{
  min-height:80px;
  padding:10px 11px;
  resize:vertical;
}

.mt-input:focus,
.mt-select:focus,
.mt-textarea:focus{
  border-color:#8ea89a;
  background:#fff;
}

.mt-grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.mt-grid3{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}

.mt-types{
  display:grid;
  gap:10px;
}

.mt-type{
  border:1px solid #e4eae6;
  background:#fff;
  border-radius:17px;
  min-height:82px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  gap:13px;
  text-align:left;
}

.mt-type-icon{
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#f0f5f2;
  font-size:25px;
}

.mt-type-main{flex:1}

.mt-type-main b{
  display:block;
  font-size:15px;
  margin-bottom:4px;
}

.mt-type-main span{
  display:block;
  font-size:11px;
  color:#758079;
}

.mt-type-arrow{
  font-size:22px;
  color:#a0aaa4;
}

.mt-mode{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  padding:4px;
  border-radius:12px;
  background:#edf1ef;
}

.mt-mode button{
  height:36px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#617068;
  font-size:12px;
}

.mt-mode button.active{
  background:#fff;
  color:#18231d;
  font-weight:700;
  box-shadow:0 1px 5px rgba(0,0,0,.07);
}

.mt-segment{
  margin-top:10px;
  padding:13px;
  border-radius:15px;
  background:#f8faf9;
  border:1px solid #e5eae7;
}

.mt-segment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}

.mt-segment-head b{font-size:12px}

.mt-remove{
  border:0;
  background:none;
  color:#9a5e5e;
  font-size:11px;
}

.mt-route{
  position:relative;
  margin-top:8px;
}

.mt-route-line{
  width:1px;
  height:20px;
  margin-left:18px;
  border-left:1px dashed #aebbb4;
}

.mt-add{
  width:100%;
  height:40px;
  margin-top:10px;
  border:1px dashed #b9c6bf;
  border-radius:11px;
  background:#fff;
  color:#496256;
  font-size:12px;
  font-weight:650;
}

.mt-more{
  margin-top:11px;
}

.mt-more summary{
  cursor:pointer;
  list-style:none;
  font-size:11px;
  color:#52685c;
}

.mt-more summary::-webkit-details-marker{display:none}

.mt-nextday{
  margin-top:7px;
  border:0;
  padding:7px 9px;
  border-radius:9px;
  background:#eef4f1;
  color:#496256;
  font-size:10px;
}

.mt-bottom{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:11px 16px calc(11px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96);
  border-top:1px solid #e3e9e5;
}

.mt-save{
  width:100%;
  height:47px;
  border:0;
  border-radius:14px;
  background:#17251e;
  color:#fff;
  font-size:14px;
  font-weight:750;
}

.mt-save:disabled{
  opacity:.45;
}

.mt-owner{
  padding:13px;
  margin-bottom:14px;
  border-radius:15px;
  background:#edf5f1;
}

.mt-owner-name{
  font-size:13px;
  font-weight:700;
}

.mt-hint{
  margin-top:4px;
  font-size:10px;
  color:#78857e;
}

.mt-journey-title{
  display:flex;
  align-items:center;
  gap:7px;
  margin:14px 0 6px;
  font-size:13px;
  font-weight:750;
}

.mt-transfer{
  text-align:center;
  padding:8px 0 0;
  font-size:10px;
  color:#718078;
}

@media (min-width:700px){
  #mTripApp{
    left:50%;
    width:430px;
    transform:translateX(-50%);
    border-left:1px solid #e1e7e3;
    border-right:1px solid #e1e7e3;
  }
}

/* ===== 6 NAV + SCHEDULE IN APP ===== */

.leaf-nav-six{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
}

.leaf-nav-six > *{
  width:auto !important;
  min-width:0 !important;
  flex:none !important;
  padding-left:2px !important;
  padding-right:2px !important;
}

#leafScheduleOverlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:999999;
  background:#f4f7f5;
}

#leafScheduleOverlay.show{
  display:block;
}

#leafScheduleFrame{
  display:block;
  width:100%;
  height:100%;
  border:0;
  background:#f4f7f5;
}

/* 电脑打开主App时，日程仍保持手机App宽度 */
@media(min-width:761px){
  #leafScheduleOverlay{
    width:480px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    box-shadow:0 0 30px rgba(0,0,0,.08);
  }
}

/* ===== LEAF FIXED 6 NAV ===== */

#leafFixedNav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:999900;

  height:72px;
  padding-bottom:env(safe-area-inset-bottom);

  display:grid;
  grid-template-columns:repeat(6,1fr);

  background:#fff;
  border-top:1px solid #e1e8e4;
}

#leafFixedNav button{
  min-width:0;
  border:0;
  background:#fff;
  padding:7px 1px 4px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;

  color:#87938d;
}

#leafFixedNav b{
  height:24px;
  line-height:24px;
  font-size:19px;
  font-weight:500;
}

#leafFixedNav span{
  font-size:10px;
  white-space:nowrap;
}


#leafScheduleOverlay{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  background:#f4f7f5;
}

#leafScheduleOverlay iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}


@media(min-width:600px){

  #leafFixedNav{
    width:480px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
  }

  #leafScheduleOverlay{
    width:480px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    box-shadow:0 0 30px rgba(0,0,0,.12);
  }
}

/* 撤销旧实验导航 */
#leafFixedNav,
#leafScheduleDirectBtn,
#scheduleEntryFixed,
#scheduleV1Entry,
#leafScheduleOverlay{
  display:none !important;
}


/* ===== SCHEDULE NAV FINAL ===== */

#leafFixedNav,
#leafScheduleDirectBtn,
#scheduleEntryFixed,
#scheduleV1Entry{
  display:none !important;
}

#leafScheduleOverlay{
  position:fixed;
  top:0;
  z-index:9990;
  display:none;
  background:#f4f7f5;
  overflow:hidden;
}

#leafScheduleOverlay iframe{
  display:block;
  width:100%;
  height:100%;
  border:0;
  background:#f4f7f5;
}

#leafScheduleNavItem.leaf-schedule-active{
  color:#14271d !important;
}

#leafScheduleNavItem.leaf-schedule-active span{
  color:#14271d !important;
  font-weight:700;
}

/* ===== REAL 6 NAV ===== */

.nav.leaf-nav-6{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
}

.nav.leaf-nav-6 > button{
  width:100% !important;
  min-width:0 !important;
  padding-left:1px !important;
  padding-right:1px !important;
}

.nav.leaf-nav-6 .nav-ico{
  margin-left:auto;
  margin-right:auto;
}


/* ===== SCHEDULE REAL PAGE ===== */

#schedule.schedule-page{
  padding:0 !important;
  overflow:hidden !important;
}

.schedule-main-frame{
  display:block;
  width:100%;
  height:calc(100dvh - 78px);
  min-height:500px;
  border:0;
  background:#f4f7f5;
}


/* 删除之前所有实验组件 */
#leafFixedNav,
#leafScheduleOverlay,
#leafScheduleDirectBtn,
#scheduleEntryFixed,
#scheduleV1Entry,
#leafScheduleNavItem{
  display:none !important;
}
