@charset "UTF-8";
.grid-container {
  max-width: 100% !important; }

header .inside-header {
  display: flex;
  align-items: center;
  justify-content: center; }

#main .page-header {
  background-color: white; }
  #main .page-header .searchandfilter {
    text-align: center; }

.archive-image #main .photo-archive-grid {
  display: flex;
  justify-content: flex-start;
  align-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  flex-direction: row; }
  .archive-image #main .photo-archive-grid article {
    position: relative;
    width: 330px;
    height: 220px;
    margin: 10px; }
    .archive-image #main .photo-archive-grid article div.entry-content {
      box-shadow: 4px 4px 10px #ccc;
      position: relative;
      width: 100%;
      height: 100%; }
      .archive-image #main .photo-archive-grid article div.entry-content a {
        position: absolute; }
      .archive-image #main .photo-archive-grid article div.entry-content a:first-child {
        display: inline-block;
        z-index: 1;
        display: block;
        position: absolute;
        width: 100%;
        height: 0;
        overflow: hidden;
        /* はみ出した部分を隠す */
        padding-top: 66.66%; }
        .archive-image #main .photo-archive-grid article div.entry-content a:first-child img {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          object-fit: cover; }
      .archive-image #main .photo-archive-grid article div.entry-content h2.entry-title {
        font-size: 1em;
        position: absolute;
        font-weight: bold;
        bottom: 4px;
        left: 8px;
        z-index: 2;
        color: white;
        width: auto;
        text-shadow: 0px 0px 4px #000; }
      .archive-image #main .photo-archive-grid article div.entry-content div.file-format-labels {
        color: white;
        position: absolute;
        height: 20px;
        top: 4px;
        right: 4px;
        z-index: 10; }
      .archive-image #main .photo-archive-grid article div.entry-content a.download-button {
        position: absolute;
        z-index: 1; }
      .archive-image #main .photo-archive-grid article div.entry-content .file-format-labels {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 5;
        /* 画像より手前に表示 */ }
      .archive-image #main .photo-archive-grid article div.entry-content .file-format-label {
        display: inline-block;
        padding: 6px 10px;
        background-color: #ff3333;
        color: #ffffff;
        font-size: 12px;
        font-weight: bold;
        line-height: 1;
        text-transform: uppercase;
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

/* 背景のオーバーレイ */
.modal-overlay {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  transition: opacity 0.3s ease, visibility 0.3s ease; }
  .modal-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1; }

/* モーダルウィンドウ本体 */
.modal-dialog {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 1010;
  transform: translateY(-30px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease; }
  .modal-overlay.is-open .modal-dialog {
    transform: translateY(0);
    opacity: 1; }

/* モーダルのヘッダー */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0; }
  .modal-header .modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }

/* 閉じるボタン */
.modal-close {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
  color: #555;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease; }
  .modal-close:hover {
    color: #2f2f2f; }

/* コンテンツエリア */
.modal-content {
  padding: 1.5rem;
  overflow-y: auto;
  min-height: 200px; }
  .modal-content > :last-child {
    margin-bottom: 0; }
  .modal-content.is-loading {
    display: flex;
    align-items: center;
    justify-content: center; }
  .modal-content .entry-header .entry-title {
    display: none; }
  .modal-content .entry-content {
    margin-top: 0px !important; }
  .modal-content .download-button {
    text-decoration: none;
    background-color: #FF9800;
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 16px; }

.loading-spinner {
  display: none;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite; }
  .modal-content.is-loading .loading-spinner {
    display: block; }

@keyframes spin {
  to {
    transform: rotate(360deg); } }
/* モーダル表示時に背景のスクロールを禁止するためのクラス */
body.is-modal-open {
  overflow: hidden; }

.modal-content p {
  line-height: 1.7; }
.modal-content img, .modal-content figure {
  max-width: 100%;
  height: auto; }

.post-meta-container {
  margin-top: 0em;
  margin-bottom: 1.0em;
  padding: 1em 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  /* 各項目間の余白 */ }

.meta-label {
  font-weight: bold;
  margin-right: 0.5em; }

.file-format-icons {
  display: flex;
  align-items: center;
  gap: 0.5em;
  /* アイコン間の余白 */ }

.format-icon {
  width: 24px;
  /* アイコンのサイズ */
  height: 24px; }

.tag-links a {
  display: inline-block;
  background-color: #f0f0f0;
  color: #333;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
  margin-right: 0.4em; }

.tag-links a:hover {
  background-color: #e0e0e0; }

/* ===== Modal 基本（トグル）===== */
/* 初期は全体を非表示 */
#detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999; }

/* 開いたら表示 */
#detail-modal.is-open {
  display: block; }

/* オーバーレイ：初期は隠す */
#detail-modal .modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); }

/* 開いたらオーバーレイ表示 */
#detail-modal.is-open .modal-overlay {
  display: block;
  opacity: 1;
  visibility: visible; }

/* ダイアログ本体：中央に */
#detail-modal .modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(90vw, 900px);
  width: 100%;
  max-height: 85vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }

/* タイトル/本文/閉じる */
#detail-modal .modal-title {
  margin: 0;
  padding: 16px 56px 16px 20px;
  font-size: 18px; }

#detail-modal .modal-content {
  padding: 20px;
  overflow: auto;
  max-height: calc(85vh - 60px); }

#detail-modal .modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 20px;
  background: none;
  border: 0;
  cursor: pointer; }

/* 背景スクロール止め（JSが body に付けているなら） */
body.is-modal-open {
  overflow: hidden; }

#detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* 最前面へ */ }

#detail-modal.is-open {
  display: block; }

/* オーバーレイ */
#detail-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: block;
  /* is-open時に確実に見せたいならここは block のままでOK */
  opacity: 1;
  visibility: visible;
  z-index: 1;
  /* ダイアログより下 */
  pointer-events: auto; }

/* ダイアログ本体 */
#detail-modal .modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 900px);
  max-height: 85vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 2;
  /* オーバーレイより上 */
  display: block !important;
  /* どこかで display:none されても勝つ */
  opacity: 1 !important;
  /* どこかで opacity:0 されても勝つ */
  visibility: visible !important; }

#detail-modal .modal-title {
  margin: 0;
  padding: 16px 56px 16px 20px;
  font-size: 18px; }

#detail-modal .modal-content {
  padding: 20px;
  overflow: auto;
  max-height: calc(85vh - 60px); }

#detail-modal .modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 20px;
  background: none;
  border: 0;
  cursor: pointer; }

/* 背景スクロール止め（JSが body に付与） */
body.is-modal-open {
  overflow: hidden; }

/* =================================================================
   スライド式サイドバーのスタイル
   ================================================================= */
/* 開閉ボタン */
.sidebar-toggle-button {
  position: fixed;
  top: 100px;
  left: 20px;
  z-index: 1001;
  /* サイドバーより手前に表示 */
  width: 40px;
  height: 40px;
  background: #333;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0; }

.sidebar-toggle-icon,
.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  margin: 4px auto;
  transition: all 0.3s; }

.sidebar-is-open .sidebar-toggle-icon {
  background: transparent;
  /* 開いている時は真ん中の線を消す */ }

.sidebar-is-open .sidebar-toggle-icon::before {
  transform: translateY(6px) rotate(45deg); }

.sidebar-is-open .sidebar-toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg); }

/* サイドバー本体 */
.slide-out-filter-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  /* サイドバーの幅 */
  height: 100vh;
  /* 画面の高さ一杯に */
  background: #f9f9f9;
  border-right: 1px solid #ddd;
  z-index: 1000;
  transform: translateX(-100%);
  /* 初期状態では左に隠す */
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* 滑らかなアニメーション */
  overflow-y: auto;
  /* 内容が多い場合はスクロール */ }

.sidebar-is-open .slide-out-filter-sidebar {
  transform: translateX(0);
  /* 表示状態 */ }

.sidebar-inner {
  padding: 20px; }

.sidebar-title {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.2em; }

/* 背景オーバーレイ */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  /* 操作もできなくする */
  transition: opacity 0.4s, visibility 0.4s; }

.sidebar-is-open .sidebar-overlay {
  opacity: 1;
  visibility: visible;
  /* 操作可能にする */ }

/* screen-reader-text は視覚的に隠す */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important; }

/* ===== Slide-in Filter Sidebar（既存 sidebar-script.js 連動） ===== */
:root {
  --sf-side-w: 320px;
  --sf-z: 9999;
  --sf-radius: 6px; }

/* オーバーレイ（#page-overlay を既存JSが制御） */
#page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: var(--sf-z);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s; }

body.sidebar-is-open #page-overlay {
  opacity: 1;
  pointer-events: auto; }

/* サイドバー本体 */
.sf-side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sf-side-w);
  background: #fff;
  transform: translateX(-100%);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
  z-index: calc(var(--sf-z) + 1);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease; }

body.sidebar-is-open .sf-side {
  transform: none; }

body.sidebar-is-open {
  overflow: hidden; }

/* 背景スクロール防止 */
/* ヘッダー */
.sf-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee; }

.sf-side__head h2 {
  font-size: 16px;
  margin: 0; }

.sf-side__close {
  background: #eee;
  border: none;
  border-radius: var(--sf-radius);
  cursor: pointer;
  font-size: 16px; }

/* 中身 */
.sf-side__body {
  padding: 16px;
  overflow: auto; }

/* 管理バー対策 */
@media (min-width: 783px) {
  .admin-bar .sf-side {
    top: 32px; }

  .admin-bar #page-overlay {
    top: 32px; } }
/* —— サイドバー内の Search & Filter を縦UIに最適化 —— */
.sf-side .searchandfilter ul {
  display: block !important; }

.sf-side .searchandfilter h4 {
  font-size: 13px !important;
  color: #555 !important;
  margin: 14px 0 6px !important; }

.sf-side .searchandfilter input[type="text"],
.sf-side .searchandfilter input[type="search"],
.sf-side .searchandfilter select {
  width: 100% !important;
  height: 40px !important;
  box-sizing: border-box !important;
  border: 1px solid #222 !important;
  border-radius: var(--sf-radius) !important;
  padding: 0 12px !important;
  background: #fff !important; }

.sf-side .searchandfilter li::before,
.sf-side .searchandfilter li::after {
  content: none !important; }

/* 送信ボタンは全幅 */
.sf-side .searchandfilter input[type="submit"] {
  width: 100% !important;
  height: 42px !important;
  margin-top: 14px !important;
  background: #222 !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--sf-radius) !important;
  cursor: pointer !important; }

/* キーワード：丸チップ */
.sf-side .searchandfilter li ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  list-style: none !important; }

.sf-side .searchandfilter li ul li {
  margin: 0 !important;
  padding: 0 !important; }

.sf-side .searchandfilter li ul input[type="checkbox"] {
  position: absolute !important;
  left: -9999px !important; }

.sf-side .searchandfilter li ul input[type="checkbox"] + label,
.sf-side .searchandfilter li ul label:has(> input[type="checkbox"]) {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #ddd !important;
  border-radius: 999px !important;
  background: #f7f7f7 !important;
  color: #222 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: .15s !important; }

.sf-side .searchandfilter li ul input[type="checkbox"]:checked + label,
.sf-side .searchandfilter li ul label:has(> input[type="checkbox"]:checked) {
  background: #222 !important;
  color: #fff !important;
  border-color: #222 !important; }

/* 幅調整（スマホで画面の88%幅） */
@media (max-width: 480px) {
  :root {
    --sf-side-w: 88vw; } }
/* ==== 左上固定の「☰ フィルター」ボタン ==== */
#open-sidebar-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  height: 40px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease; }
  #open-sidebar-btn span {
    font-size: 2em;
    alignment-baseline: text-top; }

#open-sidebar-btn:hover {
  background: #000; }

/* スクロール中も常に表示 */
body.sidebar-is-open #open-sidebar-btn {
  position: fixed;
  z-index: 10001; }

/* WordPress 管理バー対応 */
@media (min-width: 783px) {
  .admin-bar #open-sidebar-btn {
    top: 48px;
    /* 管理バー分下げる */ } }
.searchandfilter .sf-field-taxonomy-format .sf-input,
.searchandfilter .sf-field-taxonomy-format .sf-options,
.searchandfilter .sf-field-taxonomy-format .sf-option-wrap {
  display: flex;
  flex-wrap: wrap;
  /* 画面幅が狭い時は折り返す */
  gap: 10px;
  align-items: center; }

/* ボタンのベース見た目 */
.searchandfilter .sf-field-taxonomy-format .sf-option > label,
.searchandfilter .sf-field-taxonomy-format label {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  line-height: 1.2;
  cursor: pointer;
  background: #fff;
  user-select: none; }

/* ネイティブチェックボックスは隠す（ラベルをボタン化） */
.searchandfilter .sf-field-taxonomy-format input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none; }

/* 選択時（黒ボタン） */
.searchandfilter .sf-field-taxonomy-format input[type="checkbox"]:checked + label,
.searchandfilter .sf-field-taxonomy-format .sf-option.sf-active > label,
.searchandfilter .sf-field-taxonomy-format .sf-option.sf-selected > label {
  background: #000;
  color: #fff;
  border-color: #000; }

/* 余白微調整（見出しと距離をとる） */
.searchandfilter .sf-field-taxonomy-format {
  margin-top: 8px; }

.searchandfilter form .sf-field-taxonomy-format .sf-options,
.searchandfilter form .sf-field-taxonomy-format .sf-input,
.searchandfilter form .sf-field-taxonomy-format .sf-option-wrap,
.searchandfilter form .sf-field .sf-options {
  /* フォールバック（全フィールドに適用） */
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important; }

/* 2) ネイティブinputは隠して label をボタン化 */
.searchandfilter form .sf-field input[type="checkbox"],
.searchandfilter form .sf-field input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important; }

/* 3) ボタンの見た目 */
.searchandfilter form .sf-field .sf-option > label,
.searchandfilter form .sf-field label[for^="sf-"] {
  display: inline-block !important;
  padding: 8px 14px !important;
  border: 1px solid #ccc !important;
  border-radius: 9999px !important;
  /* pill */
  background: #fff !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  margin: 0 !important; }

/* 4) 選択されたら黒反転 */
.searchandfilter form .sf-field input[type="checkbox"]:checked + label,
.searchandfilter form .sf-field input[type="radio"]:checked + label,
.searchandfilter form .sf-field .sf-option.sf-active > label,
.searchandfilter form .sf-field .sf-option.sf-selected > label {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important; }

/* 5) 見出しとの余白（お好みで） */
.searchandfilter form .sf-field-taxonomy-format {
  margin-top: 8px !important; }

/* ボタンの見た目 */
/* ボタン押下時（選択状態） */
/* カウントの見た目 */
/* スマホで折り返ししやすく */
/* 各ボタン */
/* 選択時（黒反転） */
/* フォーム全体を画面幅いっぱいに */
.search-form-container {
  width: 100% !important;
  max-width: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start; }

.search-form-container .search-filter {
  flex: 1 1 auto;
  min-width: 180px; }

/* ファイル形式のボタン群が入るエリアを広げる */
/* ==== 検索フォームの横幅調整（ID=2=ファイル形式だけ広げる） ==== */
.search-form-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
  width: 100%;
  max-width: none; }

.search-form-container .search-filter-field--id-2 {
  grid-column: 1 / -1;
  /* ファイル形式の行をフォーム全幅に */
  width: 100% !important;
  max-width: none !important; }

.search-form-container .search-filter-field--id-2 .search-filter-input-button-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start; }

.search-form-container .search-filter-field--id-2 .search-filter-input-button {
  flex: 0 0 auto !important;
  /* ボタンを内容幅に */
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid #ccc;
  background: #fff;
  line-height: 1.2;
  cursor: pointer; }

.search-form-container .search-filter-field--id-2 .search-filter-input-button[aria-pressed="true"] {
  background: #000;
  color: #fff;
  border-color: #000; }

.js-output-container {
  display: none !important; }

.sfp-figma-keyword-items > span + span {
  display: none !important; }
