:root{
  --bg:#0b1220;
  --card-bg: rgba(255,255,255,.08);
  --card-brd: rgba(255,255,255,.18);
  --text: rgba(233,248,242,1);
  --muted: rgba(233,248,242,.72);
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  display:grid;
  grid-template-columns:220px minmax(260px, 1fr) 64px;
  gap:18px;
  align-items:center;
  padding:14px 0 16px;
  margin-bottom:18px;
}

.site-header.is-scrolled::before{
  content:"";
  position:fixed;
  left:0;
  right:0;
  top:0;
  height:82px;
  z-index:-1;
  background:rgba(8,18,33,.62);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  pointer-events:none;
}

.brand-block{
  min-width:0;
}

.brand-logo{
  margin:0;
  line-height:1;
}

.brand-logo a{
  display:inline-block;
  color:#f8fafc;
  text-decoration:none;
  font-size:30px;
  line-height:1;
  font-weight:950;
  letter-spacing:.02em;
  text-shadow:
    0 0 14px rgba(57,255,136,.18),
    0 2px 10px rgba(0,0,0,.45);
}

.brand-logo span{
  color:#39ff88;
}

.brand-sub{
  margin-top:6px;
  color:rgba(233,248,242,.72);
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.header-search{
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
}

.header-search input{
  flex:1;
  min-width:0;
  padding:12px 13px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.28);
  background:#0b0f14 !important;
  color:#f8fafc !important;
  font-size:15px;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-text-fill-color:#f8fafc;
  caret-color:#39ff88;
}

.header-search input::placeholder{
  color:rgba(248,250,252,.48);
}

.header-search button{
  border:0;
  border-radius:12px;
  padding:12px 18px;
  color:#062016;
  font-weight:900;
  cursor:pointer;
  background:linear-gradient(135deg,#39ff88,#6ea8ff);
  box-shadow:0 10px 20px rgba(0,0,0,.25);
}

.header-menu{
  position:relative;
  justify-self:end;
}

.menu-button{
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.20);
  background:rgba(11,15,20,.72);
  color:#f8fafc;
  font-size:22px;
  cursor:pointer;
}

.menu-dropdown{
  display:none;
  position:absolute;
  right:0;
  top:52px;
  min-width:220px;
  padding:8px;
  border-radius:14px;
  background:#0b0f14;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 18px 40px rgba(0,0,0,.42);
}

.header-menu:hover .menu-dropdown,
.header-menu:focus-within .menu-dropdown{
  display:block;
}

.menu-dropdown a{
  display:block;
  padding:10px 12px;
  color:#e9f8f2;
  text-decoration:none;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
}

.menu-dropdown a:hover{
  background:rgba(57,255,136,.12);
}

.menu-user{
  padding:10px 12px;
  color:#39ff88;
  font-size:13px;
  font-weight:900;
  border-bottom:1px solid rgba(255,255,255,.12);
  margin-bottom:6px;
}

.footer{
  margin-top:34px;
  padding:22px 0;
  text-align:center;
  color:rgba(233,248,242,.58);
  font-size:12px;
}



.site-header.no-search{
  grid-template-columns:220px 1fr;
}

.site-header.no-search .header-menu{
  grid-column:2;
  justify-self:end;
}

.site-header.no-search .header-search{
  display:none;
}





/* =========================================================
   ヘッダー最終レイアウト
   ========================================================= */

.site-header{
  position:sticky;
  top:0;
  z-index:50;

  display:flex;
  flex-wrap:nowrap;
  align-items:center;

  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;

  gap:18px;
  padding:14px 0 16px;
  margin-bottom:18px;
}

.brand-block{
  flex:0 0 220px;
  width:220px;
  min-width:0;
  overflow:hidden;
}

.header-main-row{
  flex:1 1 auto;

  display:flex;
  flex-wrap:nowrap;
  align-items:center;

  width:0;
  min-width:0;
  gap:8px;
}

.header-search{
  flex:1 1 auto;

  display:flex;
  flex-wrap:nowrap;
  align-items:center;

  width:0;
  min-width:0;
  gap:8px;
  margin:0;
}

.header-search input{
  flex:1 1 auto;

  width:0;
  min-width:0;
  box-sizing:border-box;
}

.header-search > button[type="submit"]{
  flex:0 0 auto;
  white-space:nowrap;
}

.header-menu{
  position:relative;

  flex:0 0 44px;
  width:44px;
  min-width:44px;

  margin-left:auto;
}


/* =========================================================
   連続読み取りボタン
   ========================================================= */

.continuous-scan-actions{
  flex:0 0 auto;

  display:flex;
  flex-wrap:nowrap;
  align-items:center;

  gap:5px;
}

.continuous-scan-btn{
  position:relative;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  flex:0 0 36px;
  width:36px;
  min-width:36px;
  height:38px;

  box-sizing:border-box;
  padding:6px;
  margin:0;

  border:1px solid rgba(255,255,255,.20);
  border-radius:10px;

  background:rgba(11,15,20,.72);
  color:#f8fafc;

  text-decoration:none;
  cursor:pointer;
}

.continuous-scan-btn svg{
  display:block;
  width:22px;
  height:22px;
}

.barcode-reader-scan-btn svg{
  width:24px;
  height:24px;
}

.continuous-scan-lock{
  position:absolute;
  right:-3px;
  bottom:-3px;

  display:flex;
  align-items:center;
  justify-content:center;

  width:15px;
  height:15px;

  border-radius:50%;

  font-size:8px;
  line-height:1;
}


/* =========================================================
   PC
   ロゴ ｜ 検索欄 ｜ 検索 ｜ リーダー ｜ メニュー
   ========================================================= */

@media (min-width:721px){
  /*
   * 単体カメラはPCでは非表示
   */
  .header-search .barcode-scan-btn{
    display:none !important;
  }

  /*
   * カメラ連続読み取りはPCでは非表示
   */
  .continuous-scan-actions
  > [data-purchase-barcode-scan]{
    display:none !important;
  }

  /*
   * バーコードリーダー連続読み取りはPCでも表示
   */
  .continuous-scan-actions
  > [data-purchase-barcode-reader],
  .continuous-scan-actions
  > .barcode-reader-scan-btn{
    display:inline-flex !important;
  }
}


/* =========================================================
   スマホ
   1行目：ロゴ ｜ メニュー
   2行目：検索欄 ｜ 検索 ｜ カメラ ｜ 連続カメラ ｜ リーダー
   ========================================================= */

@media (max-width:720px){
  .site-header{
    display:flex;
    flex-wrap:wrap;
    align-items:center;

    width:100%;
    max-width:100%;
    min-width:0;

    column-gap:6px;
    row-gap:9px;

    box-sizing:border-box;
    padding:10px 6px 12px;

    overflow:visible;
  }

  /*
   * 上段左
   */
  .brand-block{
    order:1;

    flex:1 1 0;
    width:0;
    min-width:0;

    overflow:hidden;
  }

  /*
   * 上段右
   */
  .header-menu{
    order:2;

    flex:0 0 40px;
    width:40px;
    min-width:40px;

    margin-left:0;
  }

  .menu-button{
    display:block;

    width:40px;
    height:40px;
    padding:0;

    box-sizing:border-box;
  }

  /*
   * 下段全体
   */
  .header-main-row{
    order:3;

    flex:0 0 100%;

    display:flex;
    flex-wrap:nowrap;
    align-items:center;

    width:100%;
    max-width:100%;
    min-width:0;

    gap:3px;
    box-sizing:border-box;
  }

  /*
   * 下段の検索フォーム
   */
  .header-search{
    flex:1 1 auto;

    display:flex;
    flex-wrap:nowrap;
    align-items:center;

    width:0;
    min-width:0;

    gap:3px;
  }

  .header-search input{
    flex:1 1 auto;

    width:0;
    min-width:0;
    height:34px;

    box-sizing:border-box;
    padding:0 5px;

    border-radius:8px;

    font-size:12px;
  }

  .header-search > button[type="submit"]{
    flex:0 0 38px;

    width:38px;
    min-width:38px;
    height:34px;

    box-sizing:border-box;
    padding:0;

    border-radius:8px;

    font-size:11px;
  }

  .header-search .barcode-scan-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;

    flex:0 0 30px;

    width:30px;
    min-width:30px;
    height:34px;

    box-sizing:border-box;
    padding:0;

    border-radius:8px;

    font-size:14px;
    line-height:1;
  }

  /*
   * 連続読み取り2個を検索フォームの右へ固定
   */
  .continuous-scan-actions{
    flex:0 0 63px;

    display:flex;
    flex-wrap:nowrap;
    align-items:center;

    width:63px;
    min-width:63px;

    gap:3px;
  }

  .continuous-scan-actions
  > .continuous-scan-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;

    flex:0 0 30px;

    width:30px;
    min-width:30px;
    height:34px;

    box-sizing:border-box;
    padding:4px;

    border-radius:8px;
  }

  .continuous-scan-actions
  > .continuous-scan-btn svg{
    width:19px;
    height:19px;
  }

  .continuous-scan-actions
  > .barcode-reader-scan-btn svg{
    width:21px;
    height:21px;
  }

  .continuous-scan-lock{
    right:-2px;
    bottom:-2px;

    width:13px;
    height:13px;

    font-size:7px;
  }

  .brand-logo{
    max-width:100%;
    overflow:hidden;
  }

  .brand-logo a{
    max-width:100%;
    font-size:26px;
  }

  .brand-sub{
    max-width:100%;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;

    font-size:11px;
  }
}


/* =========================================================
   検索を表示しないページ
   ========================================================= */

.site-header.no-search .header-main-row{
  display:none;
}

.site-header.no-search .header-menu{
  margin-left:auto;
}