/* 全站统一：把顶部导航里的搜索框移到第二排（2026-11-18）
 * 作用域仅限 .header-top 内的 .search-box，不改动其它搜索框。
 * 由各页 </head> 前引入，晚于页面内联样式，故可覆盖页面自带的 .header-top / .search-box 规则。
 */
.header .header-top,
.header-top{
  flex-wrap:wrap;
  height:auto;
  padding:8px 0;
  row-gap:8px;
}

.header .header-top > .search-box,
.header-top > .search-box{
  order:20;              /* 排到第一排所有元素之后，独占第二排 */
  flex:1 1 100%;
  max-width:100%;
  min-width:0;
  margin:0;
}

/* 第二排左对齐排布，输入框不再拉伸到 1280 全宽 */
.header-top > .search-box > input{
  max-width:640px;
  display:block;
  margin:0;
}

/* 桌面/平板：第一排全部元素左对齐紧凑排布，间距统一 8px */
@media (min-width:769px){
  .header .header-top,
  .header-top{
    justify-content:flex-start;
    gap:8px;
  }
  /* 导航组紧跟“회사 소개”，语言切换紧跟“도움말 센터”，全部取消右推与额外外边距 */
  .header-top > .nav,
  .header-top .lang-dropdown{margin-left:0}
  /* 客服/教程/关于 按钮在韩文站是第一排直接子级，在英/日站位于 .logo 内，两处都要收掉外边距 */
  .header-top .tg-chat,
  .header-top .tut-chat,
  .header-top .about-chat{margin-left:0}
  .header-top > .logo{gap:8px}
  .header-top > .nav{gap:8px}
}

/* 窄屏防横向溢出：logo 行允许换行，长文案（英/日）不再撑破视口 */
@media (max-width:768px){
  .header-top > .logo{flex-wrap:wrap;min-width:0;max-width:100%}
  .header-top > .logo > *{min-width:0}
}

/* 手机端沿用竖排：搜索框保持在导航下方，宽度通栏 */
@media (max-width:480px){
  .header .header-top,
  .header-top{flex-direction:column;align-items:stretch}
  .header-top > .search-box{order:20;flex:1 1 auto;max-width:100%}
  .header-top > .search-box > input{max-width:100%}
}
