/*
Theme Name: 星の方舟 コラム
Description: Twenty Twenty-Fiveの子テーマ。標準ブロックで編集できるコラム用の表示調整。
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: hakobune-column
*/

:root { --hakobune-line: #ded2c4; --hakobune-muted: #76614f; }
html { scroll-behavior: smooth; }
body { overflow-wrap: anywhere; }
a { text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #806247; outline-offset: 4px;
}
.hakobune-header { border-bottom: 1px solid var(--hakobune-line); }
.hakobune-header-inner { max-width: 1080px; margin-inline: auto; }
.hakobune-brand a { text-decoration: none; }
.hakobune-brand small { display: block; font-family: sans-serif; font-size: .7rem; letter-spacing: .12em; }
.hakobune-nav { gap: 1rem; font-size: .875rem; }
.hakobune-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.hakobune-masthead { text-align: center; }
.hakobune-masthead h1 { margin: 0; font-family: Georgia, 'Yu Mincho', serif; font-weight: 700; }
.hakobune-masthead p { color: var(--hakobune-muted); font-size: .9rem; }
.wp-site-blocks > main.alignwide { max-width: 1080px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); box-sizing: border-box; }
.hakobune-article { padding: clamp(24px, 5vw, 56px); border: 1px solid var(--hakobune-line); border-radius: 4px; }
.hakobune-article .wp-block-post-title { font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 1.6; }
.hakobune-article .wp-block-post-date { font-size: .85rem; color: var(--hakobune-muted); }
.hakobune-article .wp-block-post-terms { font-size: .8rem; }
.hakobune-article .wp-block-post-terms a { display: inline-block; padding: .2em .6em; border: 1px solid var(--hakobune-line); text-decoration: none; border-radius: 3px; }
.hakobune-article .hakobune-featured img { width: 100%; height: auto; object-fit: contain; }
.hakobune-article .wp-block-post-content { font-size: 1rem; line-height: 1.95; }
.hakobune-article .wp-block-post-content p { margin-block: 0 .65em; }
.hakobune-article .wp-block-post-content h4:first-child,
.hakobune-article .wp-block-post-content .column-lead {
  font-size: 1.05rem; font-weight: 500; line-height: 1.85; color: #806247;
  border-bottom: 1px solid var(--hakobune-line); padding-bottom: 1.25rem; margin-bottom: 1.5rem;
}
.hakobune-article .wp-block-post-content img { max-width: 100%; height: auto; }
.hakobune-article .wp-block-post-content table { display: block; max-width: 100%; overflow-x: auto; }
.hakobune-post-navigation { border-top: 1px solid var(--hakobune-line); padding-top: 1.5rem; }
.hakobune-post-navigation a { display: inline-block; padding-block: .5rem; min-height: 24px; }
.hakobune-tools { padding: 1.25rem; background: #f8f3eb; border-radius: 4px; }
.hakobune-tools .wp-block-search { width: 100%; }
.hakobune-tools .wp-block-search__input { min-width: 0; border-radius: 3px; border: 1px solid #9d8773; }
.hakobune-tools .wp-block-search__button { white-space: nowrap; margin-left: .5rem; padding-inline: 1rem; min-height: 44px; border-radius: 3px; }
.hakobune-tools .wp-block-categories-list { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; list-style: none; font-size: .85rem; }
.hakobune-tools .wp-block-categories-list li { margin: 0; }
.hakobune-tools details { font-size: .85rem; }
.hakobune-tools summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.hakobune-tools .wp-block-archives-list { columns: 3; padding-left: 1.3rem; }
.hakobune-tools .wp-block-archives-list li { break-inside: avoid; }
.hakobune-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.hakobune-list > li { min-width: 0; margin-block-start: 0 !important; padding-bottom: 1.5rem; border-bottom: 1px solid var(--hakobune-line); }
.hakobune-list .wp-block-post-featured-image { margin: 0 0 .85rem; }
.hakobune-list .wp-block-post-featured-image img { aspect-ratio: 1; width: 100%; height: auto; object-fit: cover; border-radius: 3px; }
.hakobune-list .wp-block-post-title { margin-block: .5rem; font-size: 1.1rem; line-height: 1.7; }
.hakobune-list .wp-block-post-title a { text-decoration: none; }
.hakobune-list .wp-block-post-title a:hover { text-decoration: underline; }
.hakobune-list .wp-block-post-date { color: var(--hakobune-muted); font-size: .8rem; }
.hakobune-list .hakobune-read-more { display: inline-block; color: var(--hakobune-muted); font-size: .85rem; line-height: 1.8; padding-block: .5rem; }
.hakobune-list > li:nth-child(n+7), .paged .hakobune-list > li { grid-column: 1 / -1; padding-bottom: 1rem; }
.hakobune-list > li:nth-child(n+7) .wp-block-post-featured-image,
.hakobune-list > li:nth-child(n+7) .hakobune-read-more,
.paged .hakobune-list .wp-block-post-featured-image,
.paged .hakobune-list .hakobune-read-more { display: none; }
.hakobune-list > li:nth-child(n+7) .hakobune-card-text,
.paged .hakobune-list .hakobune-card-text { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.hakobune-list > li:nth-child(n+7) .wp-block-post-title,
.paged .hakobune-list .wp-block-post-title { margin: 0; font-size: 1rem; }
.wp-block-query-pagination { flex-wrap: wrap; gap: .75rem; margin-top: 2rem; font-size: .9rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; padding-inline: .4rem; border: 1px solid var(--hakobune-line); border-radius: 3px; text-decoration: none; }
.wp-block-query-pagination .current { background: #81664b; color: white; }
.hakobune-footer { margin-top: 4rem; background: #81664b; color: white; }
.hakobune-footer a { color: white; }
.hakobune-footer p { font-size: .85rem; }
@media (max-width: 700px) {
  .hakobune-header-inner { gap: .25rem; justify-content: center; text-align: center; }
  .hakobune-nav { justify-content: center; }
  .hakobune-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .hakobune-article { border: 0; padding: 0; }
  .hakobune-tools .wp-block-archives-list { columns: 2; }
}
@media (max-width: 480px) {
  .hakobune-list { grid-template-columns: minmax(0, 1fr); }
  .hakobune-list > li:nth-child(n+7) .hakobune-card-text,
  .paged .hakobune-list .hakobune-card-text { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .hakobune-list .wp-block-post-featured-image img { max-height: 360px; object-fit: contain; background: #f8f3eb; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
