/* tanoshimo-site 固有の上書き（Super.so の JS 依存を静的で補う最小限の調整） */

/* --- 動画/iframe 埋め込み（Super.so は JS で高さを後付けするため、静的では崩れる） --- */
.notion-embed__container__wrapper { position: relative; }
.notion-embed__container {
  position: absolute;
  inset: 0;
  height: 100% !important;
  min-height: 0 !important;
}
.notion-embed__container > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* ローダー（スピナー）が iframe を覆い続けるのを解除 */
.notion-embed__loader { display: none !important; }

/* --- 移住 CTA 画像リンク3点（移住相談 / LINE / メルマガ）のサイズ統一 ---
   notion-column-list の横並び。列内で等幅・中央寄せに揃える
   （item18の .notion-image.page-width 上書きより強い指定にする） --- */
.notion-column .notion-image img[alt^="https://timerex"],
.notion-column .notion-image img[alt^="https://line"],
.notion-column .notion-image img[alt^="https://share.hsforms"],
img[alt^="https://timerex"],
img[alt^="https://line.me"],
img[alt^="https://share.hsforms"] {
  width: 240px !important;
  max-width: 100% !important;
  height: 56px !important;
  max-height: 56px !important;
  object-fit: contain !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

/* --- TOP あたらしい記事: 全記事フィルタ一覧（自前コンポーネント） --- */
.tano-index { margin: 8px 0 8px; font-family: 'Shippori Mincho B1', 'Noto Serif JP', serif; }
.tix-controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tix-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tix-chip {
  font: inherit; font-size: 0.8rem; cursor: pointer;
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid #D6CEC2; background: #fff; color: #48483E;
  transition: background .15s, color .15s, border-color .15s;
}
.tix-chip:hover { border-color: #7DAF60; color: #2A4D14; }
.tix-chip.on { background: #2A4D14; border-color: #2A4D14; color: #fff; }
.tix-chip .tix-c { opacity: .6; font-size: .7rem; margin-left: 2px; }
.tix-sort { font-size: 0.8rem; color: #48483E; }
.tix-sort select { font: inherit; font-size: 0.8rem; padding: 5px 10px; border: 1px solid #D6CEC2; border-radius: 6px; background: #fff; color: #1A1A18; }
.tix-count { font-size: 0.75rem; color: #888878; margin: 0 0 14px; }

.tix-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 20px; }
.tix-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.tix-cover {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  background: #EAE5DC center/cover no-repeat; border-radius: 4px;
}
.tix-tbody { display: block; padding: 10px 2px 0; }
.tix-title { display: block; font-size: 0.92rem; font-weight: 600; line-height: 1.5; color: #1A1A18; }
.tix-card:hover .tix-title { color: #2A4D14; }
.tix-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tix-pill { font-size: 0.66rem; color: #3F6B26; background: #EEF4E8; padding: 2px 8px; border-radius: 999px; }

.tix-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.tix-pager button {
  font: inherit; font-size: 0.8rem; cursor: pointer;
  padding: 8px 18px; border: 1px solid #D6CEC2; border-radius: 6px; background: #fff; color: #2A4D14;
}
.tix-pager button:hover:not([disabled]) { background: #2A4D14; color: #fff; border-color: #2A4D14; }
.tix-pager button[disabled] { opacity: .4; cursor: default; }
.tix-pageinfo { font-size: 0.8rem; color: #48483E; }

@media (max-width: 900px) { .tix-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tix-grid { grid-template-columns: 1fr; } }

/* --- テキストサイズ切替（コンテンツ領域にzoom。navbarは非対象） --- */
.tano-fs-s .notion-root { zoom: 0.92; }
.tano-fs-m .notion-root { zoom: 1; }
.tano-fs-l .notion-root { zoom: 1.15; }

/* --- navbar ツール（文字サイズ + ブックマーク） --- */
.tano-nav-tools { display: flex; align-items: center; gap: 10px; margin-right: 6px; }
.tano-fsswitch { display: flex; border: 1px solid #D6CEC2; border-radius: 6px; overflow: hidden; }
.tano-fsswitch button {
  font: inherit; cursor: pointer; background: #fff; border: 0; color: #48483E;
  padding: 3px 8px; font-size: 0.8rem; line-height: 1.4; border-left: 1px solid #EAE5DC;
}
.tano-fsswitch button:first-child { border-left: 0; }
.tano-fsswitch button small { font-size: 0.6em; vertical-align: super; }
.tano-fsswitch button.on { background: #2A4D14; color: #fff; }
.tano-bm-open {
  position: relative; font: inherit; cursor: pointer; background: none; border: 0;
  color: #C05A28; font-size: 1.05rem; line-height: 1; padding: 4px;
}
.tano-bm-count {
  position: absolute; top: -4px; right: -6px; background: #C05A28; color: #fff;
  font-size: 0.6rem; min-width: 14px; height: 14px; line-height: 14px; text-align: center;
  border-radius: 999px; padding: 0 3px;
}

/* --- オーバーレイ共通 --- */
.tano-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(26,26,24,0.4); display: flex; }
.tano-panel { background: #fff; margin-left: auto; width: min(360px, 88vw); height: 100%; overflow: auto; box-shadow: -4px 0 24px rgba(0,0,0,0.15); font-family: 'Shippori Mincho B1', serif; }
.tano-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #EAE5DC; font-weight: 600; color: #2A4D14; }
.tano-close { font: inherit; cursor: pointer; background: none; border: 0; font-size: 1.4rem; line-height: 1; color: #888878; }
.tano-bm-list { list-style: none; margin: 0; padding: 8px 0; }
.tano-bm-list li { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid #F2EFE8; }
.tano-bm-list a { flex: 1; color: #1A1A18; font-size: 0.86rem; line-height: 1.5; text-decoration: none; }
.tano-bm-list a:hover { color: #2A4D14; }
.tano-bm-del { font: inherit; cursor: pointer; background: none; border: 0; color: #B4B0A6; font-size: 1.1rem; }
.tano-empty { padding: 28px 20px; color: #888878; font-size: 0.85rem; line-height: 1.7; }

/* --- モバイルドロワー --- */
.tano-drawer-inner { background: #2A4D14; width: min(300px, 82vw); height: 100%; margin-left: auto; padding: 56px 0 24px; position: relative; }
.tano-drawer-inner .tano-close { position: absolute; top: 14px; right: 16px; color: rgba(255,255,255,0.8); }
.tano-drawer-inner nav { display: flex; flex-direction: column; }
.tano-drawer-inner nav a { color: #fff; padding: 14px 26px; font-family: 'Shippori Mincho B1', serif; font-size: 0.95rem; border-bottom: 1px solid rgba(255,255,255,0.08); text-decoration: none; }
.tano-drawer-inner nav a:hover { background: rgba(255,255,255,0.06); }

/* --- 記事ページ: ブックマーク + 共有バー --- */
.tano-artbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 6px; }
.tano-bm-btn {
  font: inherit; cursor: pointer; font-size: 0.82rem; padding: 7px 16px; border-radius: 999px;
  border: 1px solid #D6CEC2; background: #fff; color: #48483E; font-family: 'Shippori Mincho B1', serif;
}
.tano-bm-btn:hover { border-color: #7DAF60; color: #2A4D14; }
.tano-bm-btn.on { background: #2A4D14; border-color: #2A4D14; color: #fff; }
.tano-share { display: flex; align-items: center; gap: 7px; }
.tano-sh {
  font: inherit; cursor: pointer; font-size: 0.72rem; height: 30px; min-width: 30px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none;
  border: 1px solid #E6E0D6; background: #fff; color: #48483E;
}
.tano-sh.x:hover { background: #000; color: #fff; border-color: #000; }
.tano-sh.fb:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.tano-sh.line:hover { background: #06C755; color: #fff; border-color: #06C755; }
.tano-sh.copy:hover { background: #2A4D14; color: #fff; border-color: #2A4D14; }
.tix-date { display: block; font-size: 0.68rem; color: #888878; margin-bottom: 3px; font-family: 'DM Mono', monospace; }

/* --- 検索オーバーレイ --- */
.tano-search { align-items: flex-start; justify-content: center; }
.tano-search-box { background: #fff; width: min(640px, 92vw); margin-top: 8vh; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.25); font-family: 'Shippori Mincho B1', serif; max-height: 80vh; display: flex; flex-direction: column; }
.tano-search-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #EAE5DC; }
.tano-search-input { flex: 1; font: inherit; font-size: 1rem; border: 0; outline: none; padding: 8px 6px; background: none; color: #1A1A18; }
.tano-search-results { overflow: auto; padding: 6px 0; }
.tano-search-hint { color: #888878; font-size: 0.85rem; padding: 22px 18px; }
.tano-search-results a { display: flex; align-items: center; gap: 12px; padding: 9px 16px; text-decoration: none; color: #1A1A18; }
.tano-search-results a:hover { background: #F2EFE8; color: #2A4D14; }
.tano-sr-cover { flex-shrink: 0; width: 52px; height: 36px; border-radius: 4px; background: #EAE5DC center/cover no-repeat; }
.tano-sr-t { font-size: 0.86rem; line-height: 1.45; }

/* --- 記事内の見やすさ最適化（画像・余白） --- */
/* 記事本文の大きすぎる写真だけ高さを抑える。
   align-start（3本柱/CTA等のリンク・カラム画像）やリンク内画像は対象外にして元サイズを保つ。 */
.notion-root .notion-image.page-width:not(.align-start) img {
  max-height: 460px !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  object-fit: contain;
}
.notion-root .notion-image.page-width:not(.align-start) { text-align: center; }
/* 記事ヘッダのカバー画像も抑える */
.notion-header__cover { max-height: 420px !important; }
/* 過大な空白ブロックを圧縮 */
.notion-root .notion-blank { min-height: 0 !important; height: 12px !important; }

/* --- 全記事一覧: 左サムネのリスト表示（フルモード） --- */
.tix-list { display: flex; flex-direction: column; }
.tix-list .tix-card {
  flex-direction: row; align-items: center; gap: 18px;
  padding: 16px 4px; border-bottom: 1px solid #EAE5DC;
}
.tix-list .tix-card:first-child { border-top: 1px solid #EAE5DC; }
.tix-list .tix-cover {
  flex-shrink: 0; width: 150px; aspect-ratio: 16 / 10; border-radius: 4px;
}
.tix-list .tix-tbody { flex: 1; padding: 0; }
.tix-list .tix-title { font-size: 0.98rem; }
.tix-list .tix-date { margin-bottom: 4px; }
@media (max-width: 560px) {
  .tix-list .tix-card { gap: 12px; padding: 12px 2px; }
  .tix-list .tix-cover { width: 96px; }
  .tix-list .tix-title { font-size: 0.9rem; }
}

/* --- ヘッダのナビリンクをコンパクトに（字間・左右余白を詰める） --- */
.super-navbar__item {
  letter-spacing: 0 !important;
  padding-left: 11px !important;
  padding-right: 11px !important;
  font-size: 0.84rem !important;
}
.super-navbar__item-list { gap: 0 !important; }
.tano-nav-tools { gap: 7px; margin-right: 4px; }

/* --- ヘッダロゴをふた周り大きく（幅ベースで拡大。元PNGは横長wordmark） --- */
.super-navbar__logo-image, .super-navbar__logo-image span { height: auto !important; max-height: none !important; }
.super-navbar__logo img, .super-navbar__logo-image img {
  width: 150px !important; min-width: 150px !important; max-width: none !important;
  height: auto !important; max-height: none !important; object-fit: contain;
}

/* --- ヘッダ: ナビ/ツールを中心線に縦中央揃え --- */
.super-navbar__content { align-items: center !important; }
.super-navbar__item-list { display: flex !important; align-items: center !important; }
.super-navbar__item { display: flex !important; align-items: center !important; line-height: 1.1 !important; }
.tano-nav-tools { align-items: center; }
.super-navbar__actions { align-items: center !important; }

/* === レスポンシブ navbar（モバイルは全メニュー＋ツールを自前ハンバーガーへ格納） === */
.super-navbar__menu-open { display: none !important; } /* Super.so純正は使わず自前ボタンに統一 */
.tano-hamburger {
  display: none; background: none; border: 0; cursor: pointer; padding: 6px;
  color: #2A4D14; align-items: center; justify-content: center;
}
@media (max-width: 860px) {
  .super-navbar__item-list,
  .super-navbar__item,
  .tano-nav-tools,
  .super-navbar__actions,
  .super-navbar__search { display: none !important; }
  .super-navbar__content { display: flex !important; align-items: center !important; width: 100%; }
  .tano-hamburger {
    display: inline-flex !important;
    position: fixed !important; top: 9px; right: 16px; z-index: 600;
  }
}

/* モバイルドロワー内のツール（文字サイズ/ブックマーク/検索） */
.tano-drawer-tools { padding: 18px 26px; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 8px; display: flex; flex-direction: column; gap: 14px; }
.tano-drawer-tools .tano-dt-row { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 0.85rem; }
.tano-drawer-tools button { font: inherit; cursor: pointer; }
.tano-drawer-tools .tano-fsswitch { border-color: rgba(255,255,255,0.3); }
.tano-drawer-tools .tano-fsswitch button { background: transparent; color: #fff; border-left-color: rgba(255,255,255,0.2); }
.tano-drawer-tools .tano-fsswitch button.on { background: #fff; color: #2A4D14; }
.tano-drawer-tools .tano-dt-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 8px 14px; text-align: left; }
.tano-drawer-tools .tano-dt-btn:hover { background: rgba(255,255,255,0.18); }
