.header .search .s-form {
  max-width: calc(100vw - 20px);
}

@media (min-width: 901px) {
  .h-fix .container {
    display: flex !important;
    align-items: center;
    gap: 18px;
  }

  .header .logo {
    flex: 0 0 180px;
    margin-right: 10px;
  }

  .header .nav-bar {
    order: 2;
    float: none;
    flex: 1 1 auto;
    margin-left: 0;
  }

  .header .search {
    order: 3;
    position: relative !important;
    display: block !important;
    float: none !important;
    flex: 0 0 248px;
    width: 248px !important;
    margin-left: auto !important;
  }

  .header .search > .s-btn,
  .header .search .s-form .arrow {
    display: none !important;
  }

  .header .search .s-form {
    position: static !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .header .search .s-form .sform {
    display: flex !important;
    align-items: center;
    width: 100%;
    height: 40px;
    overflow: hidden;
    border: 1px solid rgba(20, 30, 36, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }

  .header .search .s-form .sform:focus-within {
    border-color: rgba(123, 189, 205, 0.72);
    box-shadow: 0 0 0 4px rgba(123, 189, 205, 0.14);
  }

  .header .search .s-form .sinput {
    flex: 1 1 auto;
    width: 100% !important;
    height: 40px !important;
    padding: 0 14px !important;
    border: 0 !important;
    background: transparent !important;
    color: #223039;
    font-size: 13px;
    line-height: 40px !important;
  }

  .header .search .s-form .sinput::placeholder {
    color: #7d8b93;
  }

  .header .search .s-form button {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    background: transparent !important;
    color: #2c3a42;
    opacity: 1 !important;
  }

  .header .search .s-form button:hover {
    background: rgba(123, 189, 205, 0.12) !important;
    color: #e8894f !important;
  }

  .header .search .s-form button i.fa {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 15px !important;
    line-height: 1 !important;
  }
}

@media (max-width: 900px) {
  .header .search {
    margin-left: auto;
  }
}


/* Legacy header navigation icons fed by data/takefu/nav-data.json. */
.header .nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header .nav .sub-menu a {
  justify-content: flex-start;
}

.takefu-legacy-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(30, 122, 220, 0.08);
  color: #1f6fd3;
  font-size: 11px;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.header .nav a:hover .takefu-legacy-nav-icon,
.header .nav a:focus-visible .takefu-legacy-nav-icon,
.header .nav .active > a .takefu-legacy-nav-icon {
  background: rgba(30, 122, 220, 0.14);
  color: currentColor;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .header .nav a {
    justify-content: flex-start;
  }
}
