/* Source style 1 (v101176-desktop-header-single-source) */
/* =========================================================
   V101-176 DESKTOP HEADER — SINGLE SOURCE OF TRUTH
   Only >= 761px. Phone layout is intentionally untouched.
   ========================================================= */

@media (min-width:1181px){
  header .head{
    display:grid!important;
    grid-template-columns:240px minmax(255px,auto) minmax(650px,1fr)!important;
    align-items:center!important;
    column-gap:24px!important;
    width:calc(100% - 40px)!important;
    max-width:1500px!important;
    margin:0 auto!important;
    padding:14px 0!important;
  }

  header .head>.mainLogoLink{
    grid-column:1!important;
    width:240px!important;
    min-width:240px!important;
    max-width:240px!important;
    margin:0!important;
  }
  header .head>.mainLogoLink .headerMainLogo{
    width:100%!important;
    height:auto!important;
  }

  header .head>.primaryNav{
    grid-column:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:20px!important;
    min-width:255px!important;
    margin:0!important;
    white-space:nowrap!important;
  }

  header .head>.headerTools{
    grid-column:3!important;
    display:grid!important;
    grid-template-columns:minmax(250px,1fr) auto auto!important;
    align-items:center!important;
    justify-content:end!important;
    column-gap:20px!important;
    width:100%!important;
    min-width:650px!important;
    max-width:none!important;
    margin:0!important;
  }

  /* Search gets its own space and is no longer runtime-locked by JS. */
  header .head>.headerTools>.search{
    grid-column:1!important;
    position:relative!important;
    display:block!important;
    width:100%!important;
    min-width:250px!important;
    max-width:380px!important;
    justify-self:end!important;
    margin:0!important;
  }
  header .head>.headerTools>.search input{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:40px!important;
    padding:0 48px 0 15px!important;
    box-sizing:border-box!important;
    font-size:12px!important;
  }
  header .head>.headerTools>.search .searchIconBtn{
    position:absolute!important;
    top:4px!important;
    right:4px!important;
    left:auto!important;
    width:32px!important;
    height:32px!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    transform:none!important;
  }

  /* Identity group = language buttons + account.
     No outer language capsule: English and 日本語 are two separate controls. */
  header .headerIdentityStack{
    grid-column:2!important;
    position:relative!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:16px!important;
    width:auto!important;
    min-width:max-content!important;
    margin:0!important;
    white-space:nowrap!important;
  }

  header .headerIdentityStack .headerLangSwitch{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  header .headerIdentityStack .headerLangDivider{
    display:none!important;
  }
  header .headerIdentityStack .headerLangSwitch .siteLangBtn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:76px!important;
    max-width:none!important;
    height:38px!important;
    margin:0!important;
    padding:0 14px!important;
    border:1px solid #d8cec2!important;
    border-radius:12px!important;
    background:#fffdf9!important;
    box-shadow:none!important;
    white-space:nowrap!important;
  }
  header .headerIdentityStack .headerLangSwitch .siteLangBtn.active,
  header .headerIdentityStack .headerLangSwitch .siteLangBtn[aria-pressed="true"]{
    background:#f4ede4!important;
    border-color:#cdbda9!important;
  }

  header .headerAuthRow{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    margin:0!important;
  }

  /* Logged out. */
  header .head .headerAccountBtn:not(.signedIn){
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:100px!important;
    max-width:120px!important;
    height:38px!important;
    margin:0!important;
    padding:0 15px!important;
    border-radius:12px!important;
    white-space:nowrap!important;
  }

  /* Logged in: same identity information as phone. */
  .minnaSignedIn header .head .headerAccountBtn.signedIn,
  header .head .headerAccountBtn.signedIn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:9px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:175px!important;
    max-width:235px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    margin:0!important;
    padding:0 6px 0 2px!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
  .minnaSignedIn header .head .headerAccountBtn.signedIn .accountSignedAvatar,
  header .head .headerAccountBtn.signedIn .accountSignedAvatar{
    display:block!important;
    flex:0 0 40px!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    border-radius:50%!important;
    overflow:hidden!important;
  }
  .minnaSignedIn header .head .headerAccountBtn.signedIn .accountSignedAvatar img,
  header .head .headerAccountBtn.signedIn .accountSignedAvatar img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
    display:block!important;
    border:0!important;
    box-shadow:none!important;
    border-radius:50%!important;
  }
  .minnaSignedIn header .head .headerAccountBtn.signedIn .accountBtnLabel,
  header .head .headerAccountBtn.signedIn .accountBtnLabel{
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:165px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:11px!important;
    font-weight:750!important;
    line-height:1!important;
    text-align:left!important;
  }
  .minnaSignedIn header .head .headerAccountBtn.signedIn .accountMobileCaret,
  header .head .headerAccountBtn.signedIn .accountMobileCaret{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 12px!important;
    width:12px!important;
    height:12px!important;
  }

  /* Cart is a separate final control. */
  header .head>.headerTools>.headerCartBtn{
    grid-column:3!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:90px!important;
    max-width:104px!important;
    height:38px!important;
    margin:0!important;
    padding:0 12px!important;
    border-radius:12px!important;
    white-space:nowrap!important;
  }

  /* Desktop: one cart entry only. */
  #v104CartBtn,
  #v104CartPeek{
    display:none!important;
  }

  header .headerIdentityStack .accountQuickMenu{
    top:calc(100% + 10px)!important;
    right:0!important;
    left:auto!important;
    bottom:auto!important;
    width:210px!important;
    max-width:210px!important;
  }
}

/* Laptop / narrow desktop: two-row desktop header.
   Still not phone layout, and controls never collapse into each other. */
@media (min-width:761px) and (max-width:1180px){
  header .head{
    display:grid!important;
    grid-template-columns:220px 1fr!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    column-gap:18px!important;
    row-gap:10px!important;
    width:calc(100% - 28px)!important;
    max-width:none!important;
    margin:0 auto!important;
    padding:12px 0!important;
  }
  header .head>.mainLogoLink{
    grid-column:1!important;
    grid-row:1!important;
    width:220px!important;
    max-width:220px!important;
  }
  header .head>.primaryNav{
    display:none!important;
  }
  header .head>.headerTools{
    grid-column:1 / -1!important;
    grid-row:2!important;
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) auto auto!important;
    align-items:center!important;
    column-gap:14px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  header .head>.headerTools>.search{
    width:100%!important;
    min-width:220px!important;
    max-width:none!important;
    margin:0!important;
  }
  header .headerIdentityStack{
    display:flex!important;
    gap:12px!important;
    min-width:max-content!important;
  }
  header .headerIdentityStack .headerLangSwitch{
    display:flex!important;
    gap:8px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  header .headerIdentityStack .headerLangDivider{display:none!important;}
  header .headerIdentityStack .headerLangSwitch .siteLangBtn{
    min-width:68px!important;
    height:36px!important;
    padding:0 11px!important;
    border:1px solid #d8cec2!important;
    border-radius:10px!important;
    background:#fffdf9!important;
  }
  #v104CartBtn,
  #v104CartPeek{
    display:none!important;
  }
}
/* Source style 2 (v101177-ai-staff-restored) */
/* V101-137 Shiba-san identity and bilingual launcher label */
#v44SupportBtn{position:relative!important;overflow:visible!important}
#minnaAiLauncherLabel{
  display:block!important;
  position:absolute!important;
  right:calc(100% + 8px)!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  white-space:nowrap!important;
  background:#fffaf5!important;
  color:#3a332d!important;
  border:1px solid #ddcdbd!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.2!important;
  box-shadow:0 3px 12px rgba(41,31,23,.10)!important;
  pointer-events:none!important;
  z-index:5!important;
}
#minnaAiRole{font-size:11px;color:#75695f;margin:3px 0}

#minnaAiLayer{
  position:fixed;inset:0;z-index:12050;display:none;
  background:rgba(20,17,14,.42);backdrop-filter:blur(3px);
  align-items:flex-end;justify-content:flex-end;padding:18px;
}
#minnaAiLayer.show{display:flex}
.minnaAiPanel{
  width:min(420px,calc(100vw - 36px));height:min(690px,calc(100dvh - 36px));
  background:#fbf8f4;border:1px solid #ddcdbd;border-radius:22px;
  box-shadow:0 24px 80px rgba(0,0,0,.28);overflow:hidden;
  display:flex;flex-direction:column;
}
.minnaAiHead{
  flex:0 0 auto;display:flex;align-items:center;gap:11px;padding:13px 14px;
  border-bottom:1px solid #e5d9cc;background:#fffaf5;
}
.minnaAiAvatar{
  width:42px;height:42px;border-radius:50%;overflow:hidden;background:#f3e6d9;
  border:1px solid #d9c3ae;display:grid;place-items:center;flex:0 0 auto;
}
.minnaAiAvatar img{width:100%;height:100%;object-fit:cover}
.minnaAiTitle{min-width:0;flex:1}
.minnaAiTitle b{display:block;font-size:14px;color:#2f2924}
.minnaAiTitle span{display:block;font-size:10px;color:#75695f;margin-top:2px}
.minnaAiBeta{
  display:inline-flex!important;width:max-content;padding:2px 6px;border-radius:999px;
  background:#e9f4e9;color:#3e6846!important;font-weight:800;letter-spacing:.04em
}
.minnaAiClose{
  border:1px solid #d7c7b8;background:#fff;border-radius:10px;width:36px;height:36px;
  cursor:pointer;font-size:18px;color:#3a332d;
}
.minnaAiBody{
  flex:1 1 auto;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px;
  overscroll-behavior:contain;
}
.minnaAiMsg{display:flex;gap:8px;align-items:flex-end}
.minnaAiMsg.user{justify-content:flex-end}
.minnaAiBubble{
  max-width:84%;padding:10px 12px;border-radius:15px;border:1px solid #e1d5c8;
  background:#fff;color:#342e29;font-size:12px;line-height:1.55;white-space:pre-wrap;
}
.minnaAiMsg.user .minnaAiBubble{background:#2f2924;color:#fff;border-color:#2f2924;border-bottom-right-radius:5px}
.minnaAiMsg.ai .minnaAiBubble{border-bottom-left-radius:5px}
.minnaAiQuick{
  display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 10px;background:#fbf8f4;
}
.minnaAiQuick button{
  border:1px solid #d8c6b5;background:#fff;border-radius:999px;padding:7px 9px;
  font-size:10px;font-weight:750;color:#4c4036;cursor:pointer;
}
.minnaAiComposer{
  flex:0 0 auto;border-top:1px solid #e3d7ca;background:#fff;padding:10px;
  display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;
}
#minnaAiInput{
  width:100%;min-height:42px;max-height:110px;resize:none;box-sizing:border-box;
  border:1px solid #d7c7b8;border-radius:13px;padding:11px 12px;background:#fff;
  font:inherit;font-size:12px;line-height:1.4;outline:none;
}
#minnaAiInput:focus{border-color:#9d7b5e;box-shadow:0 0 0 3px rgba(157,123,94,.12)}
#minnaAiSend{
  height:42px;border:0;border-radius:12px;padding:0 14px;background:#2f2924;color:#fff;
  font-weight:800;cursor:pointer;
}
.minnaAiFoot{
  flex:0 0 auto;padding:0 12px 9px;background:#fff;color:#918276;font-size:9px;text-align:center;
}
.minnaAiTyping .minnaAiBubble{color:#88786a}
.minnaAiDot{animation:minnaAiBlink 1.1s infinite}.minnaAiDot:nth-child(2){animation-delay:.15s}.minnaAiDot:nth-child(3){animation-delay:.3s}
@keyframes minnaAiBlink{0%,80%,100%{opacity:.25}40%{opacity:1}}
#v44SupportBtn .v105SupportBubble::after{
  content:"AI";position:absolute;right:-8px;top:-8px;background:#3f6e55;color:#fff;
  font-size:8px;font-weight:900;line-height:16px;min-width:16px;height:16px;padding:0 3px;
  border-radius:999px;border:2px solid #fff;
}
@media(max-width:680px){
  #minnaAiLayer{padding:0;align-items:flex-end}
  .minnaAiPanel{
    width:100%;height:min(78dvh,680px);border-radius:20px 20px 0 0;border-bottom:0;
  }
  .minnaAiBody{padding:12px}
}
