/* ============================================================
   20-header.css — ヘッダー・サイドメニュー・検索窓
   ============================================================ */

/* v5.1.0：使われていない古い検索窓（.rl-header__search / __searchbar）の指定を消し、
   Cocoon に詳細度で勝てている !important も外した。 */
.rl-header { position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 1000; }
.rl-header__inner { max-width: 1680px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.rl-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.rl-header__logo img { height: 32px; width: auto; display: block; }
.rl-header__menu-btn { margin-left: auto; background: none; border: 0; cursor: pointer; padding: 10px; display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
@media (max-width: 600px) {
  .rl-header__inner { padding: 0 16px; gap: 12px; }
  .rl-header__logo img { height: 28px; }
}
.rl-header__cta { flex-shrink: 0; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-family: var(--ff-body); font-size: var(--fs-sm); font-weight: 600; }
@media (max-width: 600px) {
  .rl-header__cta { display: none; }
}
.rl-header__cta { transition: background .2s ease, transform .2s ease; }
.rl-header__cta:hover { transform: translateY(-1px); }
.rl-header--apple { position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 1000; }
.rl-header--apple .rl-header__inner { max-width: 1680px; height: 100%; margin: 0 auto; padding: 0 22px; display: flex; gap: 0; }
.rl-header--apple .rl-header__logo { flex-shrink: 0; }
.rl-header--apple .rl-header__logo img { height: 32px; width: auto; display: block; }
.rl-header--apple .rl-header__logo-txt { font-family: var(--ff-display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.rl-header--apple .rl-header__nav { display: flex; align-items: center; }
.rl-header--apple .rl-header__nav-link { text-decoration: none; white-space: nowrap; }
.rl-header--apple .rl-header__actions { flex-shrink: 0; display: flex; align-items: center; }
.rl-header--apple .rl-header__cta { flex-shrink: 0; display: inline-flex; align-items: center; border-radius: 999px; background: #1a1a1a; color: var(--rl-bg); text-decoration: none; transition: background .15s; }
.rl-header--apple .rl-header__cta:hover { background: #000; }
@media (max-width: 833px) {
  .rl-header--apple .rl-header__nav { display: none; }
}
.admin-bar .rl-header--apple { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .rl-header--apple { top: 46px; }
}
.rl-header--apple .rl-header__inner { align-items: center; }
.rl-header--apple .rl-header__logo { display: inline-flex; align-items: center; height: 100%; }
.rl-header__searchform { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: #f4f4f2; border: 1px solid #e6e6e4; border-radius: 999px; }
.rl-header__searchform-ico { display: flex; flex-shrink: 0; }
.rl-header__searchform input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-family: var(--ff-body); font-size: 13px; color: #1c1c1e; padding: 0; -webkit-appearance: none; appearance: none; }
.rl-header__searchform input::placeholder { color: #a5a5a5; }
.rl-header__searchform input::-webkit-search-cancel-button { -webkit-appearance: none; }
@media (max-width: 600px) {
  .rl-header__searchform { display: none; }
}
.rl-header--apple .rl-header__actions { gap: 14px; }
.rl-header--apple .rl-header__cta { font-family: var(--ff-body); font-size: 13px; font-weight: 600; letter-spacing: var(--ls-normal); padding: 9px 18px; }
.rl-header--apple .rl-header__nav { flex: 0 1 auto; justify-content: flex-start; margin-left: 36px; gap: 28px; }
.rl-header--apple .rl-header__actions { margin-left: auto; }
.rl-header--apple .rl-header__nav-link { font-family: var(--ff-body); font-size: 14px; font-weight: 500; letter-spacing: var(--ls-normal); position: relative; padding: 6px 0; transition: color .15s ease; }
.rl-header--apple .rl-header__nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; display: block; }
.rl-header--apple .rl-header__nav-link:hover::after { transform: scaleX(1); }
.rl-header--apple .rl-header__nav-link.is-current { font-weight: 600; }
.rl-header--apple .rl-header__nav-link.is-current::after { transform: scaleX(1); }
.rl-header__searchform { width: 210px; transition: width .22s cubic-bezier(.4,0,.2,1), background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.rl-header__searchform:focus-within { width: 290px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.rl-header, .rl-header--apple { background: var(--rl-text); border-bottom: 1px solid #1e1e21; -webkit-backdrop-filter: none; backdrop-filter: none; }
.rl-header__logo img, .rl-header--apple .rl-header__logo img { filter: invert(1) grayscale(1) brightness(2.2); }
.rl-header--apple .rl-header__logo-txt { color: var(--rl-bg); }
.rl-header--apple .rl-header__nav-link { color: rgba(255,255,255,.66); }
.rl-header--apple .rl-header__nav-link:hover { color: var(--rl-bg); }
.rl-header--apple .rl-header__nav-link.is-current { color: var(--rl-bg); }
.rl-header--apple .rl-header__nav-link::after { background: var(--rl-bg); }
body .rl-header__searchform { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); color: var(--rl-bg); }
.rl-header__searchform:focus-within { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.34); }
.rl-header__cta { background: var(--rl-bg); color: var(--rl-text); }
.rl-header__cta:hover { background: #e8e8e4; color: var(--rl-text); }
.rl-header__menu-btn { color: var(--rl-bg); }
body .rl-header__searchform input[type="search"] { color: var(--rl-bg); -webkit-text-fill-color: var(--rl-bg); caret-color: var(--rl-bg); }
body .rl-header__searchform input::placeholder { color: rgba(255,255,255,.5); }
.rl-header__searchform-ico { color: rgba(255,255,255,.6); }
body .rl-header__searchform input:-webkit-autofill, body .rl-header__searchform input:-webkit-autofill:hover, body .rl-header__searchform input:-webkit-autofill:focus { -webkit-text-fill-color: var(--rl-bg); -webkit-box-shadow: 0 0 0 1000px #1c1c1f inset; caret-color: var(--rl-bg); }
.rl-header__searchbtn { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; background: transparent; border: 0; border-radius: 50%; color: var(--rl-bg); cursor: pointer; }
.rl-header__searchbtn svg { width: 20px; height: 20px; display: block; }
.rl-header__searchbtn:hover { background: rgba(255,255,255,.12); }
.rl-header__drawer { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: var(--rl-text); border-bottom: 1px solid #1e1e21; padding: 12px 20px 14px; opacity: 0; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease; }
.rl-header__drawer.is-open { opacity: 1; transform: none; }
.rl-header__drawer[hidden] { display: none; }
.rl-header__drawerform { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; }
.rl-header__drawer-ico { flex: 0 0 auto; display: grid; place-items: center; width: 18px; height: 18px; color: rgba(255,255,255,.6); }
.rl-header__drawer-ico svg { width: 18px; height: 18px; }
.rl-header__drawerform input[type="search"] { flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0; background: transparent; border: 0; outline: 0; font-family: var(--ff-body); font-size: 16px; color: var(--rl-bg); -webkit-appearance: none; appearance: none; }
.rl-header__drawerform input::placeholder { color: rgba(255,255,255,.5); }
.rl-header__drawer-close { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.12); border: 0; color: var(--rl-bg); cursor: pointer; }
.rl-header__drawer-close svg { width: 14px; height: 14px; display: block; }
@media (max-width: 833px) {
  .rl-header__searchbtn { display: inline-flex; }
}
.rl-header__me { flex-shrink: 0; position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #3a3a3f; box-shadow: 0 0 0 2px rgba(255,255,255,.22); text-decoration: none; transition: box-shadow .16s ease, transform .16s ease; }
.rl-header__me:hover { box-shadow: 0 0 0 2px #fff; transform: translateY(-1px); }
.rl-header__me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rl-header__me-initial { font-family: var(--ff-display); font-size: 14px; font-weight: 600; color: var(--rl-bg); }
@media (max-width: 600px) {
  .rl-header__me-initial { font-size: 13px; }
}
.rl-side-menu { position: fixed; top: 0; right: 0; bottom: 0; z-index: 999; width: min(340px, 86vw); display: flex; flex-direction: column; background: var(--rl-bg); box-shadow: -12px 0 40px rgba(0,0,0,.16); transform: translateX(100%); transition: transform .26s cubic-bezier(.22,.61,.36,1); overscroll-behavior: contain; }
.rl-side-menu.is-open { transform: none; }
.rl-side-menu__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 10px 0 22px; border-bottom: 1px solid #f0f0ee; }
.rl-side-menu__brand { font-family: var(--ff-display); font-size: 11px; font-weight: 700; letter-spacing: .2em; color: #a8a8a1; }
.rl-side-menu__close { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: none; border: 0; cursor: pointer; color: #77776f; transition: background .15s ease, color .15s ease; }
.rl-side-menu__close svg { width: 17px; height: 17px; display: block; }
.rl-side-menu__close:hover { background: #f2f2f0; color: var(--rl-text); }
.rl-side-menu__body { flex: 1 1 auto; overflow-y: auto; padding: 18px 16px 24px; }
.rl-side-menu__search { position: relative; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 16px; margin: 0 0 20px; background: #f4f4f2; border: 1px solid transparent; border-radius: 999px; transition: background .15s ease, border-color .15s ease; }
.rl-side-menu__search:focus-within { background: var(--rl-bg); border-color: var(--rl-text); }
.rl-side-menu__search-ico { flex: 0 0 auto; display: grid; place-items: center; width: 17px; height: 17px; color: #a8a8a1; }
.rl-side-menu__search-ico svg { width: 17px; height: 17px; display: block; }
.rl-side-menu__search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0; background: none; border: 0; outline: 0; font-family: var(--ff-body); font-size: 15px; color: #1c1c1e; -webkit-appearance: none; appearance: none; }
.rl-side-menu__search input::placeholder { color: #a8a8a1; }
.rl-side-menu__search button { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--rl-text); border: 0; color: var(--rl-bg); cursor: pointer; transition: background .15s ease, transform .15s ease; }
.rl-side-menu__search button svg { width: 15px; height: 15px; display: block; }
.rl-side-menu__search button:hover { background: #2a2a2a; transform: translateX(1px); }
.rl-side-menu__you { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 18px; background: var(--rl-text); border-radius: 14px; text-decoration: none; transition: background .15s ease; }
.rl-side-menu__you:hover { background: #232323; }
.rl-side-menu__you-av { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #3a3a3f; }
.rl-side-menu__you-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rl-side-menu__you-initial { font-family: var(--ff-display); font-size: 16px; font-weight: 500; color: var(--rl-bg); }
.rl-side-menu__you-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rl-side-menu__you-name { font-family: var(--ff-display); font-size: 14.5px; font-weight: 600; color: var(--rl-bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-side-menu__you-sub { font-family: var(--ff-body); font-size: 11.5px; color: rgba(255,255,255,.56); }
.rl-side-menu__you-chev { flex: 0 0 auto; display: grid; place-items: center; width: 16px; height: 16px; color: rgba(255,255,255,.5); }
.rl-side-menu__you-chev svg { width: 16px; height: 16px; display: block; }
.rl-side-menu__nav { display: flex; flex-direction: column; gap: 2px; margin: 0 0 20px; }
.rl-side-menu__link { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 11px; text-decoration: none; color: #1c1c1e; transition: background .15s ease; }
.rl-side-menu__link:hover { background: #f4f4f2; }
.rl-side-menu__link-ico { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; color: #85857f; }
.rl-side-menu__link-ico svg { width: 19px; height: 19px; display: block; }
.rl-side-menu__link-txt { flex: 1 1 auto; min-width: 0; font-family: var(--ff-body); font-size: 14.5px; font-weight: 500; color: #1c1c1e; }
.rl-side-menu__link-chev { flex: 0 0 auto; display: grid; place-items: center; width: 15px; height: 15px; color: #cfcfc9; }
.rl-side-menu__link-chev svg { width: 15px; height: 15px; display: block; }
.rl-side-menu__link.is-current { background: #f4f4f2; }
.rl-side-menu__link.is-current .rl-side-menu__link-txt { font-weight: 700; }
.rl-side-menu__link.is-current .rl-side-menu__link-ico { color: var(--rl-text); }
.rl-side-menu__cta { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 20px; margin: 0 0 10px; background: var(--rl-text); color: var(--rl-bg); border-radius: 999px; text-decoration: none; font-family: var(--ff-display); font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; transition: background .15s ease; }
.rl-side-menu__cta:hover { background: #2a2a2a; color: var(--rl-bg); }
.rl-side-menu__cta-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 11px; }
.rl-side-menu__sub { display: block; text-align: center; padding: 8px 0 16px; font-family: var(--ff-body); font-size: 13px; color: #8f8f8a; text-decoration: none; }
.rl-side-menu__sub:hover { color: var(--rl-text); }
.rl-side-menu__bottom { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f0f0ee; }
.rl-side-menu__logout { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; font-family: var(--ff-body); font-size: 13.5px; color: #8f8f8a; text-decoration: none; transition: background .15s ease, color .15s ease; }
.rl-side-menu__logout svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.rl-side-menu__logout:hover { background: #f4f4f2; color: var(--rl-text); }
@media (max-width: 600px) {
  .rl-side-menu { width: min(320px, 88vw); }
  .rl-side-menu__body { padding: 16px 14px 22px; }
}
.rl-header--apple .rl-header__menu-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; margin-left: 6px; padding: 0; background: none; border: 0; border-radius: 10px; cursor: pointer; transition: background .15s ease; }
.rl-header--apple .rl-header__menu-btn:hover { background: rgba(255,255,255,.12); }
.rl-header--apple .rl-header__menu-btn span { display: block; transition: transform .2s ease, opacity .2s ease; }
.rl-header--apple .rl-header__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.rl-header--apple .rl-header__menu-btn span, .rl-header__menu-btn span { width: 18px; height: 2px; margin: 0; border-radius: 2px; background: var(--rl-bg); flex: 0 0 auto; }
.rl-header--apple .rl-header__menu-btn { gap: 4px; }
.rl-header--apple .rl-header__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.rl-header--apple .rl-header__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 600px) {
  .rl-header--apple .rl-header__actions { gap: 4px; }
  .rl-header__me, .rl-header__searchbtn, .rl-header--apple .rl-header__menu-btn { width: 38px; height: 38px; margin-left: 0; }
  .rl-header__me { border-radius: 50%; }
}
