/*
Theme Name: Diary Theme
Theme URI: https://yourname.com
Author: Your Name
Author URI: https://yourname.com
Description: シンプルな個人日記サイト用テーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: diary-theme
Tags: blog, minimal, japanese
*/

/* ===== リセット ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== ベース ===== */
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-size: 14px;
  line-height: 1.9;
  color: #000;
  background: #fff;
}

a {
  color: #000;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== レイアウト ===== */
.site-wrapper {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== ヘッダー ===== */
.site-header {
  padding: 40px 0 10px;
  position: relative;
}

.site-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}
.site-title a {
  color: #000;
}

.site-description {
  font-size: 13px;
  color: #444;
  margin-bottom: 10px;
}

/* ===== ナビゲーション（ハンバーガーメニュー） ===== */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: 40px;
  right: 0;
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 1px;
  background: #000;
}

/* ×閉じるボタン */
.menu-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #000;
  padding: 4px;
}

/* 右からスライドインパネル */
.main-navigation {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  padding: 56px 28px 30px;
  box-shadow: -2px 0 16px rgba(0,0,0,0.1);
  border-left: 4px solid #eee;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.main-navigation.toggled {
  transform: translateX(0);
}
.main-navigation ul {
  list-style: none;
}
.main-navigation ul li a {
  font-size: 13px;
  line-height: 1.4;
  display: block;
  color: #000;
  padding: 10px 0 12px;
  border-bottom: 1px solid #eee;
}

/* ===== メインコンテンツ ===== */
.site-content {
  margin-top: 24px;
}

/* ===== 記事一覧 ===== */
.post {
  margin-bottom: 48px;
}

.entry-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 20px;
  padding-bottom: 16px;
  margin-bottom: 36px;
  border-bottom: 4px solid #eee;
}

.entry-content {
  font-size: 16px;
  line-height: 2.0;
  /* PC（700px幅）: 1行約40文字 */
  letter-spacing: 1.25px;
  color: #000;
}
.entry-content p {
  margin-bottom: 1em;
}
.entry-content p:last-child {
  margin-bottom: 0;
}
/* 引用：最外側のみボーダー1本 */
.entry-content blockquote {
  margin: 2em 0;
  padding-left: 1.2em;
  border-left: 3px solid #eee;
  color: #555 !important;
}
.entry-content blockquote blockquote {
  border-left: none;
  padding-left: 0;
  margin: 0;
}

/* h3見出し */
.entry-content h3 {
  font-size: 18px;
  font-weight: bold;
  margin-top: 36px;
  margin-bottom: 16px;
}

/* 本文中の脚注番号：「1」→「[1]」 */
.entry-content sup.fn > a::before {
  content: "[";
}
.entry-content sup.fn > a::after {
  content: "]";
}

/* 脚注リスト：「1.」→「[1]」、引用テキスト先頭（1.2em）に揃える */
.entry-content .wp-block-footnotes {
  list-style: none;
  counter-reset: fn-counter;
  margin: 6em 0 1em 1.2em;
  padding-left: 0;
  font-size: 12px;
  color: #555;
}
.entry-content .wp-block-footnotes > li {
  counter-increment: fn-counter;
  padding-left: 2.5em;
  text-indent: -2.5em;
}
.entry-content .wp-block-footnotes > li::before {
  content: "[" counter(fn-counter) "] ";
}
.entry-content .wp-block-footnotes a {
  color: #555;
}
/* 脚注の「戻る」矢印：端末の絵文字フォントに影響されず、常にテキスト字形で統一表示する */
.entry-content .wp-block-footnotes a.diary-fn-back {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-variant-emoji: text;
  text-decoration: none;
}

/* ===== 記事一覧ページ ===== */
.archive-list {
  margin: 24px 0;
}
.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  gap: 16px;
}
.archive-item a {
  color: #000;
  flex: 1;
}
.archive-item a:hover {
  text-decoration: underline;
}
.archive-date {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

/* ===== 記事一覧ボタン ===== */
.btn-archive {
  display: inline-block;
  margin: 28px 0;
  padding: 8px 24px;
  background: #eee;
  color: #000;
  font-size: 13px;
  text-decoration: none;
  border: none;
}
.btn-archive:hover {
  opacity: 0.75;
  text-decoration: none;
}

.entry-footer {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  text-align: center;
}
.entry-footer a {
  color: #666;
}

/* ===== アイキャッチ ===== */
.post-thumbnail {
  margin-bottom: 20px;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
}

/* スマホ：デバイス幅いっぱい（paddingを打ち消してフルブリード） */
@media (max-width: 480px) {
  .post-thumbnail {
    margin-left: -30px;
    margin-right: -30px;
  }
}

/* ===== 単一記事 ===== */
.single .entry-title {
  font-size: 24px;
  margin-top: 20px;
  padding-bottom: 16px;
  margin-bottom: 36px;
}

/* ===== ページナビ ===== */
.posts-navigation,
.post-navigation {
  margin: 20px 0 48px;
  font-size: 13px;
}
.posts-navigation a,
.post-navigation a {
  color: #000;
}
.nav-links {
  display: flex;
  gap: 16px;
}

.random-link-wrap {
  margin-bottom: 48px;
  font-size: 13px;
}

/* ===== ページ (固定ページ) ===== */
.page .entry-title {
  font-size: 18px;
  margin-bottom: 16px;
}

/* ===== ウィジェット ===== */
.widget-area {
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
  margin-top: 24px;
}

.widget {
  margin-bottom: 28px;
}

.widget-title {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 8px;
}

.widget ul {
  list-style: none;
}
.widget ul li a {
  font-size: 13px;
  line-height: 2.2;
  display: block;
}

/* 検索ウィジェット */
.widget_search .search-field {
  border: 1px solid #aaa;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  width: 200px;
}
.widget_search .search-submit {
  background: none;
  border: 1px solid #888;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: #000;
  margin-top: 6px;
  display: block;
}
.widget_search .search-submit:hover {
  background: #f0f0f0;
}

/* ===== コメント ===== */
.comments-area {
  margin-top: 48px;
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}
.comments-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 20px;
}
.comment-list {
  list-style: none;
  margin-bottom: 32px;
}
.comment {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}
.comment-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.comment-content p {
  font-size: 14px;
  line-height: 1.9;
}
.comment-form label {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  border: 1px solid #aaa;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  max-width: 400px;
  display: block;
  margin-bottom: 12px;
}
.comment-form textarea {
  height: 120px;
  resize: vertical;
  max-width: 100%;
}
.comment-form input[type="submit"] {
  background: none;
  border: 1px solid #888;
  padding: 6px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #000;
}
.comment-form input[type="submit"]:hover {
  background: #f0f0f0;
}

/* ===== 区切り線 ===== */
hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 40px 0;
}

/* ===== サイトフッター ===== */
.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 20px 0;
  margin-top: 8px;
  font-size: 12px;
  color: #888;
  text-align: center;
}
.site-footer a {
  color: #888;
}

/* ===== レスポンシブ ===== */

/* タブレット（481px〜699px）: 15.4px */
@media (max-width: 699px) {
  .entry-content {
    font-size: 15.4px;
    line-height: 2.0;
    letter-spacing: 1.25px;
    color: #000;
  }
}

/* スマホ（〜480px）: 参照サイト(1000ya)準拠 font-size:15.4px, letter-spacing:1.25px, 余白:30px */
@media (max-width: 480px) {
  .site-wrapper {
    padding: 0 30px;
  }
  .entry-content {
    font-size: 15.4px;
    line-height: 2.0;
    letter-spacing: 1.25px;
    color: #000;
  }
  .site-header {
    padding: 20px 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .site-title {
    flex: 1;
    margin-bottom: 0;
  }
  .menu-toggle {
    position: static;
    flex-shrink: 0;
  }
  .site-description {
    width: 100%;
    order: 3;
    margin-top: 4px;
  }
  .post {
    margin-bottom: 36px;
  }
}
