@charset "utf-8";

/* ==================================================
 * base
 * ================================================== */



/* 画面リーダー専用テキスト */
.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  position: absolute;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
}

/* ==================================================
 * common: 背景スクロールロック
 *  - html / body の overflow / height を握る
 *  - iOS のオーバースクロールを overscroll-behavior で抑止
 * ================================================== */

html.is-scroll-locked,
body.is-scroll-locked {
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* ==================================================
 * common: search-form
 * ================================================== 

.search-form {
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 4rem;
  border-bottom: 1px solid #e6e7e8;
  border-radius: var(--radius-none);
  transition: border-color 0.2s ease;
}

search-form ...（省略：原文のコメントアウト部はそのまま維持） 
}*/

/* ==================================================
 * common: modal
 * ================================================== */

.modal-overlay {
  background: rgba(0, 0, 0, 0.4);
  position: fixed;
  inset: 0;
  transition: opacity 0.2s ease;
  opacity: 0;
  z-index: 19000;
  pointer-events: none;
  touch-action: none;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay[hidden] {
  display: none;
}

/* モーダル本体
   JS から更新される CSS 変数 --spb-vh を使って高さを制御 */
.modal-panel {
  background: #fff;
  position: fixed;
  inset: 0;
  height: calc(var(--spb-vh, 1vh) * 100) !important;
  max-height: calc(var(--spb-vh, 1vh) * 100) !important;
  transform: translate3d(0, -12%, 0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow: auto;
  touch-action: pan-y;
  will-change: transform, opacity;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: auto;
}

.modal-panel.is-open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.modal-panel.is-closing {
  transform: translate3d(0, 0, 0);
  opacity: 0;
}

.modal-panel__header {
  background: #fff;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 72px;
}

.modal-panel__title {
  font-size: 1.266rem;
  font-weight: 600;
  padding: 0 24px;
}

.modal-panel__close { color: #111827; 
  background: #fff;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  position: relative;
  z-index: 1;
}

.modal-panel__close-bar {
  background: currentColor;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  position: absolute;
}

.modal-panel__close-bar:first-child {
  transform: rotate(45deg);
}

.modal-panel__close-bar:last-child {
  transform: rotate(-45deg);
}

.modal-panel__content {
  max-width: 480px;
  padding: 24px;
  margin: 0 auto;
}

.modal-panel__menu-list {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

.modal-panel__menu-item {
  border-bottom: 1px solid #e6e7e8;
}

.modal-panel__menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.modal-panel__menu-link-button {
  width: 100%;
}

.modal-panel__menu-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.modal-panel__menu-link-icon svg{
  width: 16px;
  height: 16px;
}
.modal-panel__menu-link-icon--arrow {
  width: 16px;
  height: 16px;
}

.modal-panel__menu-link-icon--check {
  width: 16px;
  height: 16px;
}

.modal-panel__menu-link-icon--search {
  width: 24px;
  height: 24px;
}

/* ==================================================
 * header-structure
 * ================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 16000;
}

.header__wrap {
  background: #FFF;
  display: grid;
  grid-template-columns: auto 1fr auto;
  width: 100%;
  height: 72px;
}

.header__item-left {
  display: flex;
  align-items: center;
}

.header__item-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* ==================================================
 * header-title
 * ================================================== */

.header-title__logo {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
}

.header-title__logo-img {
  width: 160px;
  height: 32px;
}

.header-title__logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



/* ==================================================
 * header-account & common icon buttons
 * ================================================== */

.header-account {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  position: relative;
}

/* 共通：ヘッダー内の小さなアイコンボタン（検索・ログインなど） */
.header-icon-button {
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e6e6e6;
  border-radius: var(--radius-pill);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.header-icon-button:hover {
  background: #f6f7f8;
  border-color: #d0d1d2;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.header-icon-button:active {
  transform: translateY(1px);
}

.header-icon-button:focus-visible {
  outline: 2px solid #28a0e2;
  outline-offset: 2px;
}

/* アカウント：PC のアバター（クリック領域はヘッダー高に合わせて少し広め） */
.header-account__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 72px;
}

.header-account__avatar-icon img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.header-account__button:hover .header-account__avatar-icon img {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* アカウントドロップダウンメニュー */

.header-account__menu {
  position: absolute;
  top: 100%;
  right: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.1));
  z-index: 2;
}

.header-account__menu[hidden] {
  display: none;
}

.header-account__menu-arrow {
  background: #fff;
  width: 12px;
  height: 12px;
  position: absolute;
  top: 0;
  right: 14px;
  transform: translateY(-50%) rotate(45deg);
  z-index: 0;
}

.header-account__menu-list {
  background: #fff;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 1;
}

.header-account__menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.header-account__menu-link:hover {
  background: #f6f7f8;
}

/* 未ログイン時のログインボタン（共通アイコンボタンを利用） */

.header-account__login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-account__login-icon {
  width: 22px;
  height: 22px;
}

/* ==================================================
 * header-account-modal
 * ================================================== */

@media (min-width: 960px) {
  .modal-overlay.header-account-modal__overlay {
    display: none !important;
  }
}

/* ==================================================
 * header-nav-modal
 * ================================================== */

.header-nav-modal__trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.header-nav-modal__trigger:hover {
  background: #f6f7f8;
  border-color: #e6e6e6;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.header-nav-modal__trigger:active {
  transform: translateY(1px);
}

.header-nav-modal__trigger:focus-visible {
  outline: 2px solid #28a0e2;
  outline-offset: 2px;
}

.header-nav-modal__trigger-bar {
  background: #16181c;
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 1px;
}

.header-nav-modal__overlay .header-nav-modal__panel {
  width: 100vw;
  position: absolute;
  right: 0;
  left: auto;
  overflow: auto;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.25s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-overflow-scrolling: touch;
}

.header-nav-modal__overlay.is-open .header-nav-modal__panel {
  transform: translate3d(0, 0, 0);
}

.header-nav-modal__auth-list {
  margin-top: 2rem;
}

.header-nav-modal__auth-item {
  border-bottom: none;
}

.header-nav-modal__auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
}

.header-nav-modal__auth-list--out {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.header-nav-modal__auth-list--in {
  display: block;
}

a.header-nav-modal__auth-link--login {
  color: #fff;
  background: #E6E8EC;
}

a.header-nav-modal__auth-link--signup {
  color: #fff;
  background: #dc2222;
}

a.header-nav-modal__auth-link--logout {
  background: #e6e7e8;
}

@media (min-width: 768px) {
  .header-nav-modal__panel {
    max-width: 480px;
  }
}

/* =======================================================
 * SP: Header auto-hide only
 * - body.is-header-auto-hidden is toggled by /assets/js/site-global.js
 * - teams-search 連動（sticky / margin 調整等）は行わない
 * ======================================================= */

:root{
  --spb-header-h: 72px; /* JSで実測上書き（固定高でも安全） */
}

/* ヘッダー：下スクロールで退避 → 上スクロールで復帰 */
.header{
  transition: transform .22s ease;
  will-change: transform;
}

body.is-header-auto-hidden .header{
  transform: translate3d(0, calc(-1 * var(--spb-header-h, 72px)), 0);
}

/* Reduced motion: 余計なアニメーションを止める（JS側停止の保険） */
@media (prefers-reduced-motion: reduce){
  .header{
    transition: none !important;
  }
}

/* PC/SP 統一：無効化は行わない（同一挙動にする） */
