/* =========================================
           カスタマイズ設定エリア (CSS)
           色を変更したい場合はここを編集してください
           ========================================= */

.webp-card img, 
#modal-img {
    /* 右クリックによる操作の制限・選択の禁止 */
    -webkit-touch-callout: none; /* iOS Safariで長押しメニューを禁止 */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* IE/Edge */
    user-select: none;           /* 標準（テキストや画像選択を禁止） */
    
    /* ドラッグ＆ドロップでの保存を禁止 */
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* ★クリックイベント以外のマウス操作を無効化 */
}
:root {
    /* アクセントカラー (文字色や強調に使われます) */
    --accent-color: #f2ff00;

    /* 基本の文字色 */
    --text-color: #111;
    --bg-color: #ffffff;

    /* グリッド線の色 */
    --grid-color: #eee;
    --tag-height: 150px;
    /* 画像の高さに合わせて調整してください */
    --visible-bottom: 0px;
    /* 残しておきたい高さ */
}

h3 {
    margin: 0;
}

.click-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 15px; /* 線の長さ */
    background-color: #ff2600; /* 線の色 */
    pointer-events: none;
    z-index: 9999;
    border-radius: 3px;
    transform-origin: center;
    opacity: 0;
  }

/* --- 基本設定 --- */
body {
     font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-image: url('/image/HP_back.png');
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative; /* 追加 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    min-height: 100vh;
}
main {
    flex: 1;
    margin: auto;
}

.work-link {
    text-decoration: none;
    /* 下線を消す */
    color: inherit;
    /* 文字色を親要素から引き継ぐ */
    display: block;
    /* 項目全体をクリック可能にする */
}

/* ホバー（マウスを乗せた時）の演出 */
.work-item:hover .work-img {
    transform: scale(1.05);
    /* 少し拡大 */
    filter: grayscale(0%);
    /* 白黒からカラーへ（お好みで） */
}

.sticky-clock {
    position: fixed;
    top: 10px;
    right: 5px;
    z-index: 99;
    border: solid 1px;
    background: rgba(247, 255, 16);
    color: #000000;
    padding: 3px 12px;
    border-radius: 6px;
    font-family: "DotGothic16", sans-serif;
    font-size: 0.95rem;
    white-space: nowrap;
    /* 折り返しを禁止 */
    box-shadow: 0 2px 10px rgba(72, 72, 72, 0.3);
    padding: 1px 12%;
}
.tag {
    position: fixed;
    margin-left: 20px;
    z-index: 99;
}

a.work-link {
    width: 130px;
}

a.work-link img {
    width: 130px;
}
/* --- news --- */
.news_contents {
    background: rgba(247, 255, 16);
    width: 95%;
    margin: auto;
    position: relative; /* 基準点にする */
    overflow: hidden;
    border: 1px solid #000;
}

.newst {
    font-family: "Alfa Slab One", serif;
    font-weight: 400;
    font-style: normal;
}
.newsT {
    display: flex;
    justify-content: end;
    flex-wrap: nowrap;
    padding-right: 1rem;
}

.newsT span {
    width: 150px;
    align-self: center;
    border: #000 solid 9px;
}

h1.newst {
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    font-size: 3.3rem;
    text-align: end;
    color: blue;
    -webkit-text-stroke: 1px black;
    margin: 0px;
    line-height: 45px;
    padding-top: 5px;
    padding-right: 1rem;
}

.newspaper {
    font-family: "Kiwi Maru", serif;
    font-weight: 400;
    font-style: normal;
    padding: 1rem;
    border: 1px solid #000;
    width: 85%;
    margin: 1rem auto;
    padding-bottom: 13rem;
}
h2.newstitle {
    font-weight: bold;
    font-size: 1.5rem;
}

.honbun {
    font-size: 0.8rem;
    line-height: 2rem;
}
.honbun a {
    font-weight: 900;
    color: #1e9bba;
    text-decoration: none;
    font-family: "DotGothic16", sans-serif;
}

/* フッター */
footer {
    position: relative;
    bottom: -11rem;
    width: 100%;
    background-color: #f7ff13;
    font-family: "DotGothic16", sans-serif;
    text-align: center;
    padding-bottom: 1rem;
    z-index: 1;
}
.F_c {
    display: flex;
    justify-content: space-around;
}

.F_c p a {
    text-decoration: none;
    font-family: "DotGothic16", sans-serif;
    color: #000000;
    font-size: 1.5rem;
}

/* =========================================
   PBWアコーディオン設定（完全に元の形を維持）
   ========================================= */
.pbw-content {
  display: none; /* jQueryのslideDownで表示させるため初期は非表示 */
  font-size: 0.85rem;
  line-height: 1.6;
    font-size: 0.85rem;
  line-height: 1.6;
  padding: 0rem 0rem 1rem 1rem;
  margin: 0;
}
/* 中身の解説テキストエリア */

/* details要素全体の枠組み */
.pbw-details {
  display: block;
  width: 100%;
}

/* 見出し部分（クリック領域）元のflex配置を継承 */
.pbw-summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding-left: 18px;
    outline: none; /* フォーカス時の枠線を消す */
}
.pbw-summary:hover {
    cursor: pointer;
    opacity: 0.8;
}

/* Safari向けの矢印消去 */
.pbw-summary::-webkit-details-marker {
  display: none;
}

p.PBWshort {
  margin: 0;
}

/* ハンバーガーメニューボタン（見た目は元のまま維持） */
.hamburger-menu {
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background-color: #000000;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  z-index: 1001;
  margin-left: 8px; /* テキストとの余白 */
  pointer-events: none; /* 親のsummaryにクリック判定を任せる */
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: #fffcd7;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}

/* 初期状態の線の角度 */
.hamburger-line:nth-child(1) {
  transform: rotate(90deg) translate(3px, 0px);
}

.hamburger-line:nth-child(2) {
  transform: rotate(358deg) translate(1px, -3px);
}

/* =========================================
   アコーディオン展開時のアニメーション
   ========================================= */

/* 開いたときの、ハンバーガーアイコンのアニメーション */
.pbw-details[open] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(2px, 2px);
}

.pbw-details[open] .hamburger-line:nth-child(2) {
  transform: rotate(-45deg) translate(2px, -2px);
}

/* アコーディオンが開いたときに「ぬるっと」させる効果 */
.pbw-details[open] .pbw-content {
  animation: slide-down 0.3s ease-out forwards;
}

@keyframes slide-down {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 閉じる時のアニメーション（上方向へフェードアウト） */
@keyframes slide-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ギャラリー全体の背景（画像に合わせて黄色に設定） */

.category-header {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* 2列グリッド（スマホ最適化） */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 画像カード */
.webp-card {
  overflow: hidden; /* はみ出しをカット */
  background: #000; /* 隙間が見える場合は黒で引き締める */
  border: 1px solid #000;
  aspect-ratio: 16 / 9;
}

.webp-card img {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}
.webp-card:hover img {
  transform: scale(1.3); /* ホバーでさらに寄る演出 */
}

/* ページネーション */
.pagination {
    text-align: center;
    margin-top: 1.5rem;
    font-family: sans-serif;
    margin-bottom: 3rem;
}

.pagination span {
  margin: 0 5px;
  cursor: pointer;
}

.pagination .current {
  font-weight: bold;
  text-decoration: underline;
}

/* モーダル基本スタイル */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
/* ギミック：白い線から面へ */
.modal-content-wrapper::before {
  display: none !important;
}

.modal.is-open .modal-content-wrapper::before {
  animation: modal-reveal 0.8s ease forwards;
}

@keyframes modal-reveal {
  0% {
    width: 0;
    height: 2px;
  }
  40% {
    width: 90%; /* 横に伸びきる */
    height: 2px;
  }
  100% {
    width: 90%;
    height: 80%; /* 上下に広がる（画面の8割程度） */
  }
}

.modal-main {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 90%;
  background: #ffffff; /* 白い背景 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px; /* 白い縁取り（余白） */
  
  /* 初期状態のマスク：中央の高さ50%位置で、幅0%、高さ2pxの横線 */
  clip-path: inset(calc(50% - 1px) 50% calc(50% - 1px) 50%);
  opacity: 0;
}

#modal-img {
  width: 90%;
  height: auto;
  max-height: 70vh; /* 画面縦幅からはみ出さない制限 */
  object-fit: contain;
  display: block;
  opacity: 0;
}
.modal.is-open {
  display: block;
}
/* マスクが開くと同時に、中の画像も自然に表示する */
.modal.is-open #modal-img {
  animation: img-fade-in 0.4s ease forwards 0.4s; /* マスクが上下に開き始める瞬間に開始 */
}
/* モーダルが開いたときのアニメーション */
.modal.is-open .modal-main {
  animation: modal-mask-reveal 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes modal-mask-reveal {
  0% {
    opacity: 1;
    clip-path: inset(calc(50% - 1px) 50% calc(50% - 1px) 50%);
  }
  40% {
    opacity: 1;
    clip-path: inset(calc(50% - 1px) 5% calc(50% - 1px) 5%); /* 左右5%＝幅90%まで伸びる */
  }
  100% {
    opacity: 1;
    clip-path: inset(0 5% 0 5%); /* 上下に全開する */
  }
}
@keyframes img-fade-in {
  to {
    opacity: 1;
  }
}

/* =========================================
   前後移動ボタン（両脇に配置）
   ========================================= */
.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s ease, opacity 0.3s ease;
  opacity: 0;
}

/* モーダル表示時にふわっと出す */
.modal.is-open .modal-prev,
.modal.is-open .modal-next {
  opacity: 1;
}

.modal-prev:hover,
.modal-next:hover {
  background-color: #fff;
  color: #000;
}

/* 画面の両脇（左右4%の位置） */
.modal-prev {
  left: 4%;
}

.modal-next {
  right: 4%;
}

/* スマホ最適化：押しやすい位置へ */
@media (max-width: 768px) {
  .modal-prev { left: 2%; }
  .modal-next { right: 2%; }
  .modal-prev, .modal-next {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}
/* 日付・いいねパーツ（画像の下に配置され、一緒に展開） */
.modal-date,
.like-btn,
.like-message {
  color: #111; /* 白背景の上なので視認性を考慮して黒に */
  text-align: center;
}
span.heart-icon {
    color: #ffea37;
    font-size: 1rem;
}
/* いいねボタンのデザイン */
.like-btn {
  background: none;
  border-radius: 20px;
  padding: 5px 20px;
  cursor: pointer;
  margin-top: 10px;
}

.like-message {
  color: #fffcd7;
  font-size: 0.8rem;
  font-family: "DotGothic16", sans-serif;
  height: 1.2rem;
   opacity: 0;
  transform: translateY(-5px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    min-height: 1.2rem; /* メッセージが出てもガタつかないように高さを確保 */
}

/* メッセージを表示する時のクラス */
.like-message.is-show {
    opacity: 1;
    transform: translateY(0);
}

/* ハートアイコンが押された時のちょっとしたアニメーション */
.like-btn:active .heart-icon {
    transform: scale(1.5);
    display: inline-block;
    transition: transform 0.1s;
}

