/*
Theme Name: HitomiBlog
Theme URI: https://example.com/hitomiblog
Author: HitomiBlog
Description: 漫画レビュー・漫画紹介・アフィリエイト記事に向いた、親しみやすいブログ用WordPressテーマです。
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: hitomiblog
*/

:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #262a31;
  --muted: #6f7580;
  --line: #eceef2;
  --accent: #e85874;
  --accent-dark: #cc3c5f;
  --accent-soft: #ffe7ec;
  --shadow: 0 18px 45px rgba(37, 42, 51, 0.08);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(232, 88, 116, 0.09), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 32%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(236, 238, 242, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  margin: 0 auto;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(38, 42, 49, 0.14);
  flex: 0 0 auto;
}

.brand-title {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.35rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.global-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.92rem;
  color: #555b66;
}

.global-nav ul {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.global-nav a:hover,
.global-nav .current-menu-item > a {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 20px 64px;
}

.hero {
  display: grid;
  gap: 24px;
  align-items: center;
  min-height: 330px;
  padding: clamp(30px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 245, 247, 0.92)),
    repeating-linear-gradient(45deg, rgba(232, 88, 116, 0.08) 0 2px, transparent 2px 14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid #ffd4dd;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 10px 20px rgba(232, 88, 116, 0.25);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  white-space: nowrap;
}

.button:hover {
  color: #ffffff;
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 14px 28px rgba(232, 88, 116, 0.32);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 52px 0 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.article-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(37, 42, 51, 0.05);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: #ffd1da;
  box-shadow: var(--shadow);
}

.cover {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 22px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, var(--cover-a), var(--cover-b));
}

.cover span {
  display: grid;
  width: min(132px, 55%);
  aspect-ratio: 2 / 3;
  place-items: center;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
  line-height: 1.45;
}

.post-cover {
  min-height: auto;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f1a0b0, #d84b6a);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.article-card:hover .post-cover img {
  transform: scale(1.04);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.article-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.article-card h3 a:hover {
  color: var(--accent-dark);
}

.article-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.post-meta {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-excerpt {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.card-excerpt p {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.tag-list li,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.card-footer {
  margin-top: auto;
  padding-top: 4px;
}

.card-footer .button {
  width: 100%;
  min-height: 42px;
  box-shadow: none;
}

.text-link {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.empty-message {
  margin: 0;
  padding: 22px;
  border: 1px dashed #f0b8c4;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff8fa;
}

.info-area {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 18px;
  margin-top: 54px;
}

.info-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.info-box h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.ranking li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #464c56;
  font-size: 0.93rem;
}

.ranking li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ranking li::before {
  counter-increment: rank;
  content: counter(rank);
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.08rem;
}

.inner-page {
  min-height: 65vh;
}

.page-hero {
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #fff4f7);
  box-shadow: 0 12px 30px rgba(37, 42, 51, 0.06);
}

.page-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
}

.inner-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.popular-page-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: popular-page-rank;
}

.popular-page-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(37, 42, 51, 0.04);
}

.popular-rank {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font-size: 1.1rem;
  font-weight: 800;
  counter-increment: popular-page-rank;
}

.popular-rank::before {
  content: counter(popular-page-rank);
}

.popular-page-item h3 {
  margin: 8px 0 2px;
  font-size: 1.2rem;
}

.popular-page-item p {
  margin: 0;
  color: var(--muted);
}

.tag-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tag-template-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(37, 42, 51, 0.05);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.tag-template-card:hover {
  transform: translateY(-4px);
  border-color: #ffd1da;
  box-shadow: var(--shadow);
}

.tag-template-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.tag-template-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.tag-template-card span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-panel,
.content-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(37, 42, 51, 0.05);
}

.contact-panel h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.contact-note {
  margin: 0;
  padding: 16px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 0.92rem;
}

.search-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(37, 42, 51, 0.05);
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-page-form input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-page-form input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 88, 116, 0.14);
}

.search-page-form .button {
  min-height: 48px;
}

.search-results-list {
  margin-top: 28px;
}

.search-result-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.search-result-item:first-child {
  padding-top: 0;
}

.search-result-item h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.search-result-item h3 a:hover {
  color: var(--accent-dark);
}

.search-result-excerpt,
.search-result-excerpt p,
.search-empty-message {
  margin: 0;
  color: var(--muted);
}

.single-post-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(37, 42, 51, 0.05);
}

.single-post-header {
  margin-bottom: 24px;
}

.single-post-header h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.28;
  letter-spacing: 0;
}

.single-featured-image {
  margin: 0 0 28px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
}

.single-featured-image img {
  width: 100%;
  height: auto;
}

.single-post-content {
  color: #343943;
}

.single-post-content p {
  margin: 0 0 1.3em;
}

.single-post-content img {
  height: auto;
  border-radius: var(--radius);
}

.single-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.single-post-nav a {
  color: var(--accent-dark);
}

.archive-description {
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
}

.navigation.pagination {
  margin-top: 24px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  display: grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.page-numbers.current,
.page-numbers:hover {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.js-enabled .fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js-enabled .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .article-grid,
  .info-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tag-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-area .info-box:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 14px 16px 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .global-nav,
  .global-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .global-nav::-webkit-scrollbar,
  .global-nav ul::-webkit-scrollbar {
    display: none;
  }

  .site-main {
    padding: 26px 16px 48px;
  }

  .hero {
    min-height: auto;
    padding: 28px 20px;
  }

  .button {
    width: 100%;
  }

  .section-heading {
    display: block;
    margin-top: 38px;
  }

  .article-grid,
  .info-area,
  .inner-card-grid,
  .tag-template-grid {
    grid-template-columns: 1fr;
  }

  .info-area .info-box:last-child {
    grid-column: auto;
  }

  .cover {
    min-height: 190px;
  }

  .popular-page-item {
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 18px;
  }

  .popular-rank {
    width: 38px;
    height: 38px;
  }

  .search-page-form {
    grid-template-columns: 1fr;
  }

  .single-post-nav {
    display: grid;
  }
}
