/* まんがストーリー — WordPress Cocoon inspired lightweight static theme */
:root {
  color-scheme: light;
  --bg: #f6f6f7;
  --surface: #ffffff;
  --text: #222222;
  --muted: #666666;
  --border: #e5e5e8;
  --link: #0b57d0;
  --accent: #e06c75;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.site-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-brand:hover { opacity: 0.8; }
.site-tagline {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.layout {
  max-width: 1100px;
  margin: 20px auto 48px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    padding: 0 20px;
  }
}

.main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 18px 32px;
}
@media (min-width: 720px) {
  .main-card { padding: 30px 34px 40px; }
}

.pr-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 1px 10px;
  border: 1px solid #999;
  color: #555;
  font-size: 0.78rem;
  line-height: 1.45;
  letter-spacing: 0.04em;
}
h1.entry-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 4.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.entry-meta {
  margin: 0 0 22px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
}
.introduction {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.works {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.work-link {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.link-prefix {
  font-weight: 500;
  margin-right: 2px;
}
.link-arrow {
  display: inline-block;
  margin-right: 4px;
  color: #1a73e8;
}
.work-link a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.arrow-up {
  margin: 6px 0 4px;
  font-size: 1.15rem;
  line-height: 1.2;
}
.guide-line {
  margin: 0 0 22px;
  font-size: 0.96rem;
  line-height: 1.75;
}

.article-images {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
}
.article-image { margin: 0; }
.article-image img {
  width: min(100%, 340px);
  height: auto;
  border-radius: 2px;
  border: 1px solid #ececef;
}

.related {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.related h2 { margin: 0 0 10px; font-size: 1rem; }

.archive-heading {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  font-size: 1.35rem;
  font-weight: 600;
}
.post-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.post-card {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.post-card:last-child { border-bottom: 0; padding-bottom: 0; }
.post-card-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  text-decoration: none;
  color: var(--text);
}
@media (min-width: 600px) {
  .post-card-link { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
}
.post-card-link:hover .post-card-title { color: var(--link); text-decoration: underline; }
.post-card-thumb {
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: #eee;
  border: 1px solid #ececef;
}
.post-card-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.post-card-date { margin: 0; font-size: 0.8rem; color: var(--muted); }

.pagination { margin-top: 26px; }
.pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination a {
  display: inline-block;
  min-width: 34px;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-size: 0.88rem;
}
.pagination a:hover { background: #f0f2f5; }
.pagination a[aria-current="page"] {
  background: #333;
  color: #fff;
  border-color: #333;
  font-weight: 600;
}

.sidebar { display: grid; gap: 20px; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px;
}
.widget-title {
  margin: 0 0 14px;
  padding: 8px 6px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--border);
}
.search-label { display: block; margin: 0 0 6px; font-size: 0.88rem; color: var(--muted); }
.search-row { display: flex; gap: 6px; }
.search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.92rem;
}
.search-btn {
  padding: 8px 14px;
  background: #333;
  color: #fff;
  border: 0;
  border-radius: 3px;
  font-size: 0.88rem;
  cursor: pointer;
}
.search-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}
.search-results:empty { display: none; }
.search-results a { text-decoration: none; color: var(--text); }
.search-results a:hover { color: var(--link); text-decoration: underline; }

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sidebar-list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.sidebar-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: #555;
  font-size: 0.8rem;
}
.sidebar-list a { color: var(--text); text-decoration: none; }
.sidebar-list a:hover { color: var(--link); text-decoration: underline; }

.site-footer {
  text-align: center;
  padding: 20px 14px 36px;
  font-size: 0.8rem;
  color: var(--muted);
}
