/*
Theme Name: Katsunuma de Konna Kanji
Theme URI: https://blog.budouyasan.com/
Author: Amano / OpenAI draft
Description: 写真と文章を静かに残す個人Weblog向けのシンプルなWordPressテーマ。
Version: 0.6.0
Text Domain: katsunuma-blog
*/

:root{
  --bg:#fff;
  --text:#1f1f1f;
  --muted:#777;
  --line:#e8e8e8;
  --accent:#7aa6b4;
  --max:1180px;
  --content:760px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;line-height:1.9;font-size:16px}
a{color:inherit;text-decoration:none}
a:hover{opacity:.72}
img{max-width:100%;height:auto;display:block}
.container{width:min(calc(100% - 40px),var(--max));margin:auto}
.site-header{background:#fff;border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;min-height:112px;gap:30px}
.site-branding{min-width:260px}
.site-title{font-size:34px;letter-spacing:.08em;margin:0;font-weight:400}
.title-font-soft .site-title{font-family:"Zen Kurenaido","Yu Mincho","Hiragino Mincho ProN",serif}
.title-font-standard .site-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-weight:600}
.site-description{font-size:13px;margin:7px 0 0;color:#444;letter-spacing:.06em}
.main-nav ul{display:flex;gap:34px;list-style:none;margin:0;padding:0;align-items:center}
.main-nav a{font-size:14px}
.menu-toggle{display:none;border:0;background:transparent;font-size:24px;padding:8px;cursor:pointer}

.hero{position:relative;min-height:330px;background:#f4f4f2 center/cover no-repeat;display:flex;align-items:flex-end;overflow:hidden}
.hero.has-image::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.02) 28%,rgba(0,0,0,var(--hero-overlay,.38)) 100%)}
.hero.no-image{min-height:190px;align-items:center;border-bottom:1px solid var(--line)}
.hero.no-image .hero-inner{color:#333;padding:42px 0}
.hero-inner{position:relative;z-index:1;color:#fff;padding:0 0 34px}
.hero-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:28px;letter-spacing:.08em;margin:0 0 4px}
.hero-text{font-size:14px;margin:0}

.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:58px;padding:38px 0 70px}
.section-title,.widget-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:18px;border-bottom:1px solid #222;padding-bottom:10px;margin:0 0 24px;letter-spacing:.05em}
.post-list{display:flex;flex-direction:column;gap:22px}
.post-card{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;border-bottom:1px solid var(--line);padding-bottom:22px;align-items:start}
.post-card:last-child{border-bottom:0}
.post-thumb{aspect-ratio:16/9;overflow:hidden;background:#f1f1f1}
.post-thumb img{width:100%;height:100%;object-fit:cover}
.post-cat{font-size:11px;color:#4b7f8c;background:#edf7f9;display:inline-block;padding:2px 7px;margin-bottom:8px}
.post-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:21px;line-height:1.55;margin:0 0 6px}
.post-meta{font-size:12px;color:var(--muted);margin-bottom:10px}
.post-excerpt{font-size:14px;color:#444;margin:0}
.pagination{margin-top:38px}

.sidebar .widget{margin-bottom:42px}
.profile-card{text-align:center}
.profile-photo{width:104px;height:104px;border-radius:50%;overflow:hidden;margin:0 auto 14px;background:#eee}
.profile-name{font-weight:700;margin:0 0 8px}
.profile-text{font-size:13px;line-height:1.8;color:#555;text-align:left}
.sidebar ul{list-style:none;padding:0;margin:0}
.sidebar li{border-bottom:1px solid var(--line);padding:10px 0;font-size:14px}

.breadcrumb{font-size:12px;color:#777;margin-bottom:22px}
.single-header{margin-bottom:18px}
.single-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:32px;line-height:1.5;margin:6px 0 8px;letter-spacing:.02em}
.single-meta{font-size:12px;color:#666}
.single-featured{margin:0 0 24px}
.single-content{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:17px;line-height:2.15}
.single-content p{margin:0 0 1.5em}
.single-content h2{font-size:24px;margin:2.4em 0 .9em;line-height:1.6}
.single-content h3{font-size:20px;margin:2em 0 .7em}
.single-content blockquote{margin:2em 0;padding:18px 24px;border-left:3px solid #bbb;background:#fafafa}
.single-content figure{margin:2em 0}
.related{border-top:1px solid var(--line);margin-top:54px;padding-top:28px}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.related-item img{aspect-ratio:4/3;object-fit:cover;width:100%}
.related-item h3{font-size:13px;line-height:1.6;margin:8px 0 0}

.site-footer{border-top:1px solid var(--line);padding:28px 0 45px;color:#777;font-size:12px;text-align:center}

@media (max-width:820px){
  body{font-size:15px}
  .container{width:min(calc(100% - 28px),var(--max))}
  .header-inner{min-height:88px;justify-content:center;position:relative}
  .site-branding{text-align:center;min-width:0}
  .site-title{font-size:25px}
  .site-description{font-size:11px}
  .menu-toggle{display:block;position:absolute;left:0;top:24px}
  .main-nav{display:none;position:absolute;top:88px;left:0;right:0;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);z-index:20}
  .main-nav.open{display:block}
  .main-nav ul{display:block;padding:14px 28px}
  .main-nav li{padding:11px 0;border-bottom:1px solid var(--line)}
  .hero{min-height:210px}
  .hero-inner{padding-bottom:20px}
  .hero-title{font-size:20px}
  .hero-text{font-size:12px}
  .page-grid{grid-template-columns:1fr;gap:42px;padding:30px 0 52px}
  .sidebar{border-top:1px solid var(--line);padding-top:34px}
  .post-card{grid-template-columns:105px minmax(0,1fr);gap:16px;padding-bottom:20px}
  .post-title{font-size:16px;line-height:1.55}
  .post-excerpt{display:none}
  .post-meta{font-size:11px}
  .single-title{font-size:25px}
  .single-content{font-size:16px;line-height:2.05}
  .related-grid{grid-template-columns:1fr}
  .related-item{display:grid;grid-template-columns:105px 1fr;gap:14px;align-items:start}
  .related-item h3{margin:0}
}

/* Profile card */
.profile-card .widget-title{text-align:left}
.profile-photo img{width:100%;height:100%;object-fit:cover;display:block}
.profile-text p{margin:0 0 8px}
.profile-more{margin:12px 0 0;font-size:13px;text-align:left}
.profile-more a{font-weight:600;text-decoration:none}
.profile-more a:hover{text-decoration:underline}


/* v0.3 sidebar: recent posts stay compact so the article list remains dominant */
.sidebar .widget_recent_entries ul,
.sidebar .wp-block-latest-posts{margin:0;padding:0;list-style:none}
.sidebar .widget_recent_entries li,
.sidebar .wp-block-latest-posts li{padding:11px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.55}
.sidebar .widget_recent_entries li a,
.sidebar .wp-block-latest-posts__post-title{font-weight:600;display:block}
.sidebar .widget_recent_entries .post-date,
.sidebar .wp-block-latest-posts__post-date{font-size:11px;color:var(--muted);margin-top:3px;display:block}
.sidebar .wp-block-latest-posts__post-excerpt{display:none!important}
.sidebar .wp-block-latest-posts__featured-image{float:left;margin:0 10px 4px 0}
.sidebar .wp-block-latest-posts__featured-image img{width:72px!important;height:54px!important;object-fit:cover}
.sidebar .wp-block-latest-posts li::after{content:"";display:block;clear:both}

/* Avoid oversized content accidentally inserted into sidebar widgets */
.sidebar .widget p{font-size:13px;line-height:1.75;margin:.5em 0}
.sidebar .widget img{max-width:100%;height:auto}
.sidebar .widget:not(.profile-card) .wp-block-post-excerpt,
.sidebar .widget:not(.profile-card) .wp-block-post-excerpt__excerpt{display:none!important}

@media (max-width:820px){
  .hero.has-image{min-height:220px}
  .hero.no-image{min-height:145px}
  .hero.no-image .hero-inner{padding:28px 0}
}


/* v0.4 dedicated category navigation */
.category-feature-list{list-style:none!important;margin:0!important;padding:0!important}
.category-feature-item{padding:0!important;border-bottom:1px solid var(--line)!important}
.category-feature-item a{display:grid;grid-template-columns:34px minmax(0,1fr) auto 18px;align-items:center;gap:8px;min-height:48px;padding:7px 0;font-size:14px}
.category-feature-icon{font-size:18px;line-height:1;text-align:center;filter:grayscale(.15)}
.category-feature-name{font-weight:500}
.category-feature-count{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.category-feature-count:not(:empty)::before{content:"("}
.category-feature-count:not(:empty)::after{content:")"}
.category-feature-arrow{font-size:20px;color:#999;text-align:right;line-height:1}
.category-feature-item a:hover{opacity:1}
.category-feature-item a:hover .category-feature-name{opacity:.65}
.category-feature-about{margin-top:4px}

@media (max-width:820px){
  .category-feature-item a{min-height:52px;padding:8px 2px}
  .category-feature-icon{font-size:19px}
}
