/*
Theme Name: Kinomyo
Template: twentytwentyone
*/
/* ===============================
   DEV MODE - Admin bar compact
   =============================== */


/* WPが勝手に入れる余白も合わせる */
body.admin-bar{
  margin-top: 0px !important;
}
body.admin-bar #wpadminbar{
  opacity: 0.6;
}
body.admin-bar #wpadminbar:hover{
  opacity: 1;
}

/* 基本設定 */
body {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  scroll-behavior: smooth;
  
}
.site{
  overflow: hidden;
}
h1, h2, h3, h4, h5, h6,
p {
  margin-top: 0;
}
ul, ol {
  padding-left: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
input,
select,
textarea,
button {
  font-size: 16px;
}
html {
  scroll-behavior: smooth;
}
/* 全体のメイン幅 */
.documents-archive,.documents-single,.documents-results {
  width: 100%;
  max-width: min(calc(100vw - 2 * 50px), 1400px);
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 24px;
  box-sizing: border-box;
}

.site-content{
 margin-top: 0;
}
.site-main {
  display: block;
  max-width: 1200px;
}
.home .site-main {
  margin-top: 0;
  display: block;
  max-width: none;
  width: 100% !important;
}

/* 相手の長いセレクタをそのままコピーして、最後に p をつける */
.entry-content p,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content ol {
    max-width:min(calc(100vw - 8 * 25px), 1200px) !important;
    /*padding:1rem;*/
    margin-top: 30px;
}
.entry-content ol {
  margin-top: -20px;
  margin-bottom: 30px;
  width: 1000px !important;
}
.entry-content h2{
  font-size: 20px;
  margin-bottom: 0 !important;
}
.entry-content p{
  margin-top: 10px;
}
/* ==============================
   共通ヘッダー
============================== */

.site-title a{
  display:block;
  width:260px;           /* ロゴ横幅 */
  height:80px;           /* ロゴ高さ */
  position: relative;
  text-indent:-9999px;
  overflow:hidden;
}

.site-title a::before{
  content:"";
  position:absolute;
  inset: 0;
  top:10px;
  background-image:url('/wp-content/themes/kinomonjyo/template-parts/img/logo.svg');
  background-size:contain;
  background-repeat:no-repeat;
  background-position:left center;
}

/* 親テーマの「リンク押下/フォーカス時に背景を塗る」挙動を無効化 */
.has-background-white .site a:focus,
.has-background-white .site a:active,
.has-background-white .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button),
.has-background-white .site a:active:not(.wp-block-button__link):not(.wp-block-file__button) {
 /* shorthandを潰す（黒復活対策） */
  background-color: rgba(0, 0, 0, 0) !important;
  color: #42210b;
}

/* 代わりに、キーボード操作のときだけ見える枠を出す（推奨） */
.has-background-white .site a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  color: #42210b;
}

.site-description{
  display:none;
}

.primary-navigation{
  justify-self:center;
}
.site-header{
  position: relative;
  height: 100px;
  width: 100%;
  display: flex;              /* ←これ追加 */
  align-items: center;        /* ←効くようになる */
  padding: 40px 0;
  
}
/* 左側の要素（ロゴなど） */
.site-header > .site-branding {
    position: absolute; 
    top: 0;
    left: 0;
    z-index: 10; 
    margin-top:0px;       
}

/* 右側の要素（ナビゲーションなど） */
.site-header > .primary-navigation {
    flex: 0 0 100%;    
    width: 100%;
    
}
#site-navigation .primary-menu-container{
  display: block;
  width:auto;
  margin: 0 auto; 
}
.site-header::before{
  content: "";
  position: absolute;
  display: block;
  width: 100vw;
margin-left: calc(50% - 50vw);
  inset: 0; 
  background:
  url('/wp-content/themes/kinomonjyo/template-parts/img/como-img-1.png')
  no-repeat right -40px center / 357px auto,
linear-gradient(
  to bottom,
  #fdfcfc 100%
);
  opacity: 0.9;
  pointer-events: none;
  height: 97px;
  
}

/* ==============================
   TOPページ ナビ
============================== */

.front-content{
  max-width: min(calc(100vw - 2 * 50px), 1200px);
  margin: 0 auto;
  padding: 24px 100px;
}
/* TOP：ナビのコンテナ幅を100%にして中央寄せ */
.home .site-header{
  display: block;
  background: none;
  height:75px;
  padding: 0px 0px;
  background-color: #f7f7f0;
}
 .site-header, .site-main{
  padding-top:0;;
 } 
 .home .site-header::before{
  background: none;
 }
.home #site-navigation.primary-navigation{
  width: 100%;
  display: block;
}

.home #site-navigation .primary-menu-container{
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ul自体を中央に */

#site-navigation .menu-wrapper {
    width: auto;
    /* display: inline-flex;*/
    justify-content: center;
    gap: 78px;
    margin: 0 auto;
    padding-top: 20px;
}
#site-navigation .menu-wrapper li a{ 
  font-weight: 500;
}
.home #site-navigation .menu-wrapper{
  width: auto;
  display: inline-flex;
  justify-content: center;
  gap: 78px;
  margin: 0 auto;
  padding-top: 25px;
}
/* 余計な左paddingを潰す（テーマ由来対策） */
.home #site-navigation .primary-menu-container,
.home #site-navigation .menu-wrapper{
  padding-left: 0;
}

/* リンクの見た目 */
.home #site-navigation .menu-wrapper a{
  color: #42210b;
  text-decoration: none;
  font-weight: 500;
}

.home #site-navigation .menu-wrapper a:hover{
  text-decoration: underline;
}

.home #site-navigation .current-menu-item > a{
  font-weight: 500;
  text-decoration: underline;
}
.home #site-navigation{
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

/* メニュー横並び中央 */
.home .primary-menu-container{
  display: flex;
  justify-content: center;
}

.home .menu-wrapper{
  display: flex;
  gap: 40px;
  padding: 14px 0;
  margin: 0;
}

/* li余白リセット */
.home .menu-wrapper li{
  margin: 0;
}

/* リンクデザイン統一 */
.home .menu-wrapper a{
  text-decoration: none;
  color: #42210b;
  font-weight: 600;
  padding: 0;
  border: none;
}

/* hover */
.home .menu-wrapper a:hover{
  text-decoration: underline;
}

/* current */
.home .current-menu-item > a{
  font-weight: 700;
  text-decoration: underline;
}


/* ==============================
   トップページ　メインエリア
============================== */
/* ヒーロー全体 */
.front-page .hero {
  position: relative;
  min-height: 44vh; /* 高さ調整 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/*ヘッダーを消す*/
.home .site-branding{ display:none; }

/* 固定背景レイヤー */

.front-page .hero{
  position: relative;
  background-image: url("template-parts/img/hiro-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom:3vh;
}

.front-page .hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.25); /* 濃さ調整 */
}

.front-page .hero__inner{
  position: relative;
  z-index: 1; /* 暗幕より前 */
}
.hero__inner img{
  width:540px;
  }
/* トップ検索エリア */
.documents-search{
  padding-top:3rem;
}
.documents-search__formwrap{
  display:flex;
  gap:12px;
  align-items:flex-start;
  
}
.documents-search__row--form .documents-search__formwrap{
  align-items:center;
}


/* タイトル中央 */
.front-page .hero__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}


/* =========================
   木野DB 検索UI
   ========================= */

/* --- キーワード --- */
#documents-keyword{
  width: 100%;
  padding: 10px ;
  margin-top:5px;
  border: none;
  border-bottom: 2px solid #42210b;
  background: #ffffff;
  font-size: 1rem;
  box-sizing: border-box;
  max-width: 100%;
}

/* ======================
   2カラム
   ====================== */
   .documents-search__row{
    margin-bottom: 2rem;
   }

/* 年号・形態・actions を横一列に並べる（古典inline-block） */
.documents-search__row--era,
.documents-search__row--form,
.documents-search__actions{
  display: inline-block;
  vertical-align: top;
}

/* 幅配分（必要なら微調整） */
.documents-search__row--era{ width: 200px; margin-top: 10px; }
.documents-search__row--form{ width: 157px; margin-right: 20px; margin-top: 10px;}

/* actions は残り幅で */
.documents-search__actions{
  width: calc(100% - 407px);
  margin-top: 34px;
  margin-bottom: 34px;   
  white-space: nowrap; 
  text-align: right;
}

/* actions内のボタンはすでに143×50でOKな前提 */
.documents-search__actions button,
.documents-search__actions a{
  margin-right: 12px;
}

.documents-search__row--era{
  margin-right: 20px;
}

/* --- select + input 横並び --- */
.documents-search__formwrap{
  display: inline-block;
  margin-top:5px;
  width: 100%;
}

.documents-search__formwrap select{
  display: inline-block;
  vertical-align: top;
}

/* 年号リスト */
#documents-era-select{
  width: 110px;
  background: #e7c6a5;
  border: none;
  padding: 8px;
  color: #111;
  font-size: 18px;
}
.documents-search__form #documents-keyword{
  margin: 0;
}
.era-selected,.era-selected-text{ 
  font-size: 18px;
  font-weight: 600;
 }
/* 形態プルダウン */
#documents-form-select,#refine-form-select{
  width: 110px;
  height: 42px;
  background: #e7c6a5;
  border: none;
  padding: 6px 10px;
  color: #111;
  font-size: 18px;
}
/* 年号セレクトのフォーカス枠 */
#documents-era-select:focus{
  outline: 2px solid #42210b;   /* 好きな色に */
  outline-offset: 2px;
}

/* クリック中の青いハイライトが気になる場合のベース色 */
#documents-era-select{
  caret-color: transparent; /* テキストカーソルが出るのが気になる時だけ */
}
#documents-era-select:focus{
  outline: none;
}
/* 選択中（効くブラウザでは反映される） */
#documents-era-select option:checked{
  background: #e7c6a5;
  color: #42210b;
}

/* hover/focus（効く環境向け） */
#documents-era-select option:hover,
#documents-era-select option:focus{
  background: #f2d8bf;
  color: #42210b;
}
/* option背景（効く環境のみ） */
#documents-era-select option,
#documents-form-select option{
  background: #e7c6a5;
}

/* Safariのデフォ見た目を潰す */
select{
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0 !important;
  background-clip: padding-box;
}

select{
  border: 1px solid #e7c6a5;
  background-color: #e7c6a5; 
  color: #3b2a1a;
}

/* テキスト入力（短め下線） */
#documents-era,
#documents-form-type,#refine-txt{
  display: inline-block;
  vertical-align: top;
  width: 125px;
  height: 43px;
  margin-left: 1px;
  padding: 7px 10px;
  border: none;
  border-bottom: 2px solid #42210b;
  background-color: #ffffff;
  font-size: 0.8rem;
}
#refine-txt{
  width: 400px;
  margin: 5px 15px 0 5px;
}
.documents-results__refine{
  margin-bottom:2vw;
}
.kmj-hl{
  background: rgba(255, 220, 120, 0.45);
  padding: 0 .12em;
  border-radius: 2px;
}

/* =========================
   Documents results - table like layout
   ========================= */

/* ページ全体の余白（必要なら） */
.documents-archive{
  padding: 0 24px;
}

/* h1 */
.documents-archive__header h1{ display: none; }

/* ===== 検索結果ヘッダー（スクショの帯） ===== */
.documents-results__meta{
  margin: 12px 0 16px;
  font-size: 14px;
  color: #333;
}

/* 3カラム：左（タイトル/条件）・中央（件数）・右（ボタン） */
.documents-results__bar{
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* 左 */
.documents-results__left{
  min-width: 220px; /* 必要なら調整 */
}

.documents-results__title{
  margin: 0;
  font-size: 20px; /* h2の見た目調整用 */
  line-height: 1.2;
}

.documents-results__filters{
  margin: 6px 0 0;
  font-size: 14px;
}

/* 中央：件数を中央寄せ */
.documents-results__count{
  flex: 1;
  text-align: center;
  margin-top: 4px; /* タイトルとの視覚合わせ */
  white-space: nowrap;
}

/* 右：ボタン群 */
.documents-results__meta .documents-results__actions{
  display: flex;
  gap: 12px;
  align-items: center;
}

/* a も button も同じ見た目・同じ箱にする */
.documents-results__meta .documents-results__actions a,
.documents-results__meta .documents-results__actions button{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 50px;         
  min-width: 143px;      
  padding: 0 18px;

  border: 1px solid #d8a98a;
  background: #fff;
  color: #111;

  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;

  border-radius: 0;      
  box-shadow: none;
}
.archive .documents-results__meta .documents-results__actions a,
.archive .documents-results__meta .documents-results__actions button{
  height: 30px;         
  min-width: 103px; 
  font-weight: 400;
}

.documents-results__actions a.btn--secondary{ color:#fff ; }

/* 親テーマが button に黒背景を当ててるのを確実に潰す */
.documents-results__meta .documents-results__actions button{
  background: #fff !important;
}

/* hover / focus（好みで） */
.documents-results__meta .documents-results__actions a:hover,
.documents-results__meta .documents-results__actions button:hover{
  background: #faf7f2;
}

.documents-results__meta .documents-results__actions a:focus-visible,
.documents-results__meta .documents-results__actions button:focus-visible{
  outline: 2px solid #d8a98a;
  outline-offset: 2px;
}


/* 一覧を“表”っぽく */
.documents-results__list{
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #7b4a34; /* 罫線色 */
}

/* 1行＝1レコード */
.documents-results__item{
  display: grid;
  grid-template-columns: 1fr 180px 120px; /* 表題 / 年月日 / 形態 */
  gap: 0;
  border-left: 1px solid #7b4a34;
  border-right: 1px solid #7b4a34;
  border-bottom: 1px solid #7b4a34;
  background: #fff;
}

/* 表題（内容） */
.documents-results__title{
  display: block;
  padding: 0px 16px　18px 0px;
  color: #111;
  text-decoration: none;
  font-weight: 600;

}

/* hover */
.documents-results__title:hover{
  text-decoration: underline;
}
/* hover */
.documents-results__left .documents-results__title:hover{
  text-decoration: none;
}

/* サブ情報は右側2列に配置 */
.documents-results__sub{
  display: contents; /* gridの列へ流し込む */
}

/* 年月日 */
.documents-results__date{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 16px;
  border-right: 1px solid #7b4a34;
  font-weight: 600;
}

/* 形態 */
.documents-results__form{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 16px;
  font-weight: 600;
}

/* from_to は表題列の下に入れる（今のHTMLだと同じsub内なので、見せ方だけ調整） */
.documents-results__fromto{
  grid-column: 1 / 2;             /* 左列に寄せる */
  padding: 0 16px 6px;
  margin-top: -10px;
  display: block;
  color: #444;
  font-size: 13px;
}

/* レスポンシブ：狭い画面は縦積み */


/* =====================================
   共通ボタンデザイン（全体適用）
===================================== */

/* ===== ボタン共通（見た目の骨格） ===== */
.btn{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 50px;          /* 例：50px */
  min-width: 123px;      /* 例：143px */
  padding: 0 18px;
  color: #111;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .05s ease;
}

.btn:active{
  transform: translateY(1px);
}

.btn:focus-visible{
  outline: 2px solid #d8a98a;
  outline-offset: 2px;
}

/* 主ボタン（検索） */
.btn--secondary{
  background: #6b3b00 !important;
  color: #fff;
  border: 1px solid #6b3b00;
}
.btn--secondary a{
  color: #fff;
}
.btn--secondary:hover{
  color: #111;
  background-color: #d8a98a !important;
  border-color: #7a4706;
}

/* 副ボタン（リセット：白＋枠） */
.btn--primary{
  background: #fff;
  color: #111;
  border: 1px solid #d8a98a;
}
.btn--primary:hover{
  background: #faf7f2;
  border-color: #c98e68;
}


/* 準主ボタン（全件検索：薄塗り） */
.btn--tertiary{
  background: #e7c6a5;
  color: #111;
  border: 1px solid #e7c6a5;
 
}
.btn.btn--tertiary{
  margin-right: 0;
}
.btn--tertiary:hover{
  background: #ddb892;
  border-color: #ddb892;
}
button#toggle-refine{
  color: #111;
}
button#toggle-refine:active{
  background: #ddb892;
}
/* ===== テーブル本体 ===== */
.documents-results__table{
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
/*  テーブル文字色 */
.documents-results__table tbody,
.documents-results__table tbody a{
  color: #42210b;
}

.documents-results__table tbody a{
  text-decoration: none;
  font-weight: 600;
}

.documents-results__table tbody a:hover{
  text-decoration: underline;
}
/* テーブルヘッダー */
.documents-results__table thead th{
  background: transparent;
  border: none;
  color: #42210b;
  padding: 10px 8px 14px; /* 少し下に余白 */
  font-weight: 600;
}

/* ===== tbody：線は上下だけ・色は #42210b ===== */
.documents-results__table{
  width: 100%;
  border-collapse: collapse; /* これで行線が綺麗 */
}

/* ===== 横線（行の上下のみ） ===== */
.documents-results__table tbody tr{
  border-top: 1px solid #42210b;
  border-bottom: 1px solid #42210b;
}

/* ヘッダーの下にだけ線を入れる */
.documents-results__table thead tr{
  border-bottom: 1px solid #42210b;
}

/* ===== 縦線は「右だけ」 ===== */
.documents-results__table td{
  border-right: 1px solid #42210b;
  padding: 4px 7px;
}

/* 左端の縦線を消す */
.documents-results__table td:first-child{
  border-left: none;
}

/* 右端の縦線を消す（重要） */
.documents-results__table td:last-child{
  border-right: none;
}

/* ===== 交互背景（tbodyだけ） ===== */
.documents-results__table tbody tr:nth-child(odd){
  background: #ffffff;
}
.documents-results__table tbody tr:nth-child(even){
  background: #faf7f2; /* ここはデザインに合わせて調整可 */
}

/* 表題リンク */
.documents-results__table td a{
  font-weight: 600;
  text-decoration: none;
  color: #111;
}

.documents-results__table td a:hover{
  text-decoration: underline;
}

/* from_to（表題下） */
.documents-results__fromto{
  margin-top: 2px;
  font-size: 14px;
  color: #555;
}

/* 列幅（PC） */
.col-box   { width: 60px; text-align: center; }
.col-no    { width: 60px; text-align: center; }
.col-date  { width: 120px; white-space: nowrap; }
.col-form  { width: 100px; white-space: nowrap; text-align: center;  }
.col-title { width: auto; }



/* ページネーション全体 */
.documents-pagination{
  margin: 24px 0;
  text-align: center;
}

/* paginate_links(type=plain) + 自前のa/span（first/last/prev/next） */
.documents-pagination .page-numbers{
  margin: 0 8px;            /* 間隔 */
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;

  color: #42210b;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  display: inline;
}

/* hover（ボタン化しないで下線だけ） */
.documents-pagination a.page-numbers:hover{
  text-decoration: underline;
}

/* 現在ページ（数字だけ強調） */
.documents-pagination .page-numbers.current{
  font-weight: 700;
  text-decoration: underline;
}

/* … */
.documents-pagination .page-numbers.dots{
  font-weight: 600;
}

/* 無効状態（うっすら表示） */
.documents-pagination .page-numbers.disabled{
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

/* 下部の○○件中 ○〜○件 */
.documents-results__range{
  text-align: center;
  margin: 18px 0 10px;
  color: #42210b;
  font-weight: 600;
}

/* ==============================
   single: meta (dlをテーブル風)
============================== */
h1.documents-single__title{ 
    display: block;
    margin-top: 1vw;
    padding: 18px 16px 18px 0;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 22px;
    
 }
/* 一覧に戻る */
.documents-single__header a,
.documents-single__footer a{
  color: #42210b;
  text-decoration: none;
  font-weight: 600;
}
.documents-single__header a:hover,
.documents-single__footer a:hover{
  text-decoration: underline;
}
.documents-single__meta{
  margin: 24px 0;
  background-color: #fff;
  border-top: 1px solid #42210b; 
  border-bottom: 1px solid #42210b; 
}

/* dl全体を2列グリッドに */
.documents-single__dl{
  display: grid;
  grid-template-columns: 160px 1fr; /* 左：項目名 / 右：値 */
  border: none;                     /* 外枠なし */
  color: #42210b;
  background: transparent;
}

/* dt,ddを“セル”として扱う */
.documents-single__dl dt,
.documents-single__dl dd{
  margin: 0;
  padding: 16px 14px;
  border-bottom: 1px solid #42210b;   /* 横線（中だけ） */
}

/* 縦線（中だけ）＝左列の右線だけ */
.documents-single__dl dt{
  font-weight: 700;
  border-right: 1px solid #42210b;    /* 中の縦線 */
  white-space: nowrap;
}

/* ddの右側外枠は作らない */
.documents-single__dl dd{
  font-weight: 600;
}

/* 最終行の下線を消す（外枠回避） */
.documents-single__dl dt:last-of-type,
.documents-single__dl dd:last-of-type{
  border-bottom: none;
}
/* PDFアイコン部分 */
.documents-single__dl .pdf-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #42210b;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.documents-single__dl .pdf-link:hover{
  text-decoration: underline;
}

.documents-single__dl .pdf-icon img{
  display: block;
}
/* =========================
 privacy-policy＆database-overview
========================= */
.singular h1.entry-title{
  font-size: 23px;
  font-weight: 500;
}
.singular .entry-header{
  border: none;
  padding-bottom: 5px;
  padding-top: 20px;
  margin-bottom: 20px;
}
.entry-title{
  width: auto;
  text-align: center;
}
/* =========================
 Footer
========================= */

.site-footer {
  
  padding: 40px 20px;
  text-align: center;
  
}

.site-footer .footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.site-footer .footer-privacy {
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.site-footer .footer-privacy a {
  text-decoration: none;
  color: #6e6458;
}

.site-footer .footer-privacy a:hover {
  text-decoration: underline;
}

.site-footer .footer-copy {
  font-size: 13px;
  color: #6e6458;
}

/* ページトップへ */

.page-top{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: 1px solid #d8a98a;
  border-radius: 5px;
  background: hsla(30, 58%, 78%, 0.788);
  border: none;
  cursor: pointer;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  transform: translateY(6px);
}
.page-top:hover{
background: hsla(29, 67%, 23%, 0.671);
}

.page-top.is-visible{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* 山形（^） */
.page-top::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:16px;
  height:16px;
  border-top:3px solid #fff;
  border-right:3px solid #fff;
  transform: translate(-50%, -30%) rotate(-45deg);
}

/* ===============================
   Media Queries (grouped)
   =============================== */
   @media (max-width: 1400px){
  .documents-search__actions{
    width: auto !important;
    display: block;         /* inline-blockやめる */
    max-width: 100%;
    margin-top: 12px;       
    white-space: normal;    /* ← 折り返し禁止を解除（重要） */
  }

  /* ボタンは横並び維持したいなら flex にする */
  .documents-search__actions{
    display: flex;
    flex-wrap: wrap;        /* 狭ければ2段になる */
    gap: 12px;
    justify-content: flex-start; /* 右なら flex-end、中央なら center */
  }

  .documents-search__actions button,
  .documents-search__actions a{
    margin-right: 0;        
  }
  
}
@media (max-width: 1200px){
  /* 古文書イメージOFF（グラデだけ残すなら背景だけ差し替え） */
  .site-header::before{
    background: linear-gradient(to bottom, #fdfcfc 100%);
  }
  #site-navigation{
    padding-left: 280px;
  }
  /* ナビを右寄せ */
  #site-navigation .primary-menu-container{
    margin: 0 !important;
    width: 100%;
  }

  /* メニューの間隔を少し詰める（クラス名は実環境で調整） */
  #site-navigation .primary-menu-container > ul{
    display: flex;
    justify-content: flex-end;
    gap: 18px; 
    padding-right: 14px;
    padding-top:20px;
  }
    .primary-navigation a{
    font-size: 16px;
    font-weight: 600;       /* 太すぎなら500でも */
  }
}

@media (max-width: 900px){
    .hero__inner img{
  width:64vw
  }

  .front-content{
  max-width: min(calc(100vw - 2 * 10px), 800px);
  padding: 5px 14px;
}
.documents-results__item{
    /*grid-template-columns: 1fr;*/
  }
  .documents-results__title{
    border-right: none;
    width: auto;
    /*border-bottom: 1px solid #7b4a34;*/
  }
  .documents-results__date,
  .documents-results__form{
    border-right: none;
    border-bottom: 1px solid #7b4a34;
    padding: 12px 16px;
  }
  .documents-results__fromto{
    margin-top: 0;
  }
    .documents-results__bar{
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* 左＋件数を同じ行に */
  .documents-results__left{
    min-width: 0;
    flex: 1 1 auto;
  }

  .documents-results__count{
    flex: 0 0 auto;
    text-align: right;
    margin-top: 0;
  }

  /* ボタンは次の行へ */
  .documents-results__meta .documents-results__actions{
    flex: 1 1 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }
    .site-header{
    height: auto;
    padding: 20px 0;
  }

  /* ロゴを少し小さく（ロゴが背景画像ならwidth/heightを縮める） */
  .site-title a{
    margin-top: 10px;
    width: 200px;
    height: 60px;
  }
  #site-navigation{
    padding-left: 130px;
  }
  /* ナビは右寄せ維持 */
  #site-navigation .primary-menu-container{
    padding-right: 12px;
  }
}

@media (max-width: 782px){

body.admin-bar{
    margin-top: 24px !important; /* スマホ時のズレも抑える */
  }
  .front-content{
  max-width: min(calc(100vw - 2 * 10px), 750px);
  padding: 5px 14px;
}
  .site-title a{
    width: 170px;
    height: 52px;
  }
   #site-navigation .primary-menu-container > ul{
    padding-top:0px;
  }
}

@media (max-width: 768px){

  /* ---- merged block 1/2 ---- */
.home .menu-wrapper{
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  /* ---- merged block 2/2 ---- */
  /* ヘッダー非表示 */
  .documents-results__table thead{ display:none; }

  /* 行をカード化（grid→flexに変更） */
  .documents-results__table tr{
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-start;

    border: 1px solid #e6dfd7;
    padding: 12px;
    margin-bottom: 14px;
    background: #fff;
  }

  /* 交互背景はカードでも維持 */
  .documents-results__table tbody tr:nth-child(even){
    background: #faf7f2;
  }

  /* セル初期化 */
  .documents-results__table td{
    border: none;
    padding: 0;
  }

  /* 1段目：表題（左） */
  .documents-results__table td:nth-child(3){
    order: 1;
    flex: 1 1 auto;
    min-width: 0; /* 長いタイトル対策 */
  }

  /* 1段目：年月日（右） */
  .documents-results__table td:nth-child(4){
    order: 2;
    flex: 0 0 auto;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
  }

  /* 改行（ここで2段目に落とす） */
  .documents-results__table tr::after{
    content: "";
    order: 3;
    flex-basis: 100%;
    height: 0;
  }

  /* 2段目：箱・番号・形態を横並び */
  .documents-results__table td:nth-child(1),
  .documents-results__table td:nth-child(2),
  .documents-results__table td:nth-child(5){
    order: 4;
    flex: 0 0 auto;
    display: inline-flex;
    gap: 6px;
    margin-right: 12px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
  }

  /* ラベル追加（消さない仕様） */
  .documents-results__table td:nth-child(1)::before{
    content: "箱";
    font-weight: 600;
  }
  .documents-results__table td:nth-child(2)::before{
    content: "番号";
    font-weight: 600;
  }
  .documents-results__table td:nth-child(5)::before{
    content: "形態";
    font-weight: 600;
  }

  /* 表題強調 */
  .documents-results__table td:nth-child(3) a{
    font-size: 16px;
  }
  .col-box {
    width:auto;
}
.home #site-navigation .menu-wrapper{
    gap: 20px;
  }
  @media (max-width: 768px){
  .documents-results__bar{
    flex-direction: column;
    gap: 10px;
  }

  .documents-results__left,
  .documents-results__count,
  .documents-results__meta .documents-results__actions{
    width: 100%;
  }

  .documents-results__count{
    text-align: left;
    margin-top: 0;
  }

  .documents-results__meta .documents-results__actions{
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 782px) {
    body.admin-bar {
        margin-top: 0px !important;
    }
}
@media (min-width: 482px){
  .home #site-navigation .menu-wrapper{
    flex-direction: row;
    align-items: center;
  }
  .documents-results__meta .documents-results__actions a,
  .documents-results__meta .documents-results__actions button{
    min-width: 0;
    width: calc(50% - 6px);
    height: 42px; /* 指で押しやすい */
  }
}
@media (max-width: 481.98px){

  /* まずヘッダーを基準にする */
  .home .site-header{
    position: relative;
    height: 30px;
  }
.site-header::before{
  display: none;}


.primary-navigation {
  top: 0;
}
  /* ハンバーガーを右上へ */
  .menu-button-container{
    position: absolute;
    top: -10px;
    right: -12px;
    display: flex;
    align-items: center;
    z-index: 1000;
    padding-top:0;
  }
}
