/* ===================================================================
   ほいくパーク — Ghost Theme v1.0
   Design: Warm, soft, approachable. For nursery teachers.
   Font: Zen Maru Gothic (JA round gothic)
   Mobile-first.
   =================================================================== */

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== VARIABLES ===== */
:root {
  --font: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  --bg: #FAF7F4;
  --bg-white: #FFFFFF;
  --accent: #D4735A;
  --accent-light: #FFF5F0;
  --accent-border: #F0C8B8;
  --accent-hover: #C0624B;
  --text: #2D2D2D;
  --text-2: #6B6B6B;
  --text-3: #999;
  --border: #E8E2DC;
  --max-w: 680px;
  --feed-w: 1000px;
}

/* ===== BASE ===== */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== HEADER ===== */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--accent);
  padding: 16px 24px;
}

.header-inner {
  max-width: var(--feed-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.site-logo img { height: 32px; width: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--accent); }

/* ===== HOME HERO ===== */
.home-hero {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: center;
}

.home-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.home-sub {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
}

/* ===== WAVE DIVIDER ===== */
.section-wave {
  width: 100%;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,20 C360,45 720,0 1080,25 C1260,38 1380,15 1440,20 L1440,40 L0,40 Z'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.footer-wave {
  width: 100%;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%232D2D2D' d='M0,20 C360,45 720,0 1080,25 C1260,38 1380,15 1440,20 L1440,40 L0,40 Z'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* ===== POST FEED ===== */
.post-feed-wrap {
  background: var(--bg);
  padding: 40px 24px 60px;
  position: relative;
  overflow: hidden;
}

.site-main {
  position: relative;
  overflow: hidden;
}

/* ===== 両サイドの装飾 ===== */
.deco {
  position: absolute;
  width: 75px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.deco-r {
  /* right positioned items use right instead of left */
}

@media (max-width: 768px) {
  .deco {
    width: 55px;
    opacity: 0.2;
  }
}

.post-feed {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ===== POST CARD ===== */
.post-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 20px rgba(212,115,90,0.12);
  transform: translateY(-2px);
}

.post-card-link {
  display: block;
}

.post-card-image-wrap {
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-image {
  transform: scale(1.03);
}

.post-card-content {
  padding: 12px 16px 16px;
}

.post-card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.post-card-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  gap: 12px;
}

/* ===== TAG HEADER ===== */
.tag-header {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.tag-title { font-size: 24px; font-weight: 700; }
.tag-description { margin-top: 8px; font-size: 14px; color: var(--text-2); }

/* ===== ARTICLE ===== */
.post {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.post-header {
  padding: 48px 0 24px;
}

.post-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.post-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
}

.post-meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}

.post-meta-sep { margin: 0 6px; }

/* Feature Image */
.post-feature {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}

.post-feature img { border-radius: 12px; }

/* ===== POST CONTENT ===== */
.post-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.post-content p { margin-bottom: 1.8em; }

/* H2: left border + soft background */
.post-content h2 {
  font-size: 22px;
  font-weight: 700;
  padding: 14px 18px;
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  margin: 48px 0 20px;
}

/* H3: bottom accent */
.post-content h3 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  margin: 40px 0 16px;
}

/* Strong */
.post-content strong { font-weight: 700; }

/* Lists */
.post-content ul, .post-content ol {
  margin-bottom: 1.8em;
  padding-left: 1.4em;
}

.post-content li { margin-bottom: 0.6em; line-height: 1.8; }

/* ===== BLOCKQUOTE (キャラ吹き出し) ===== */
.post-content blockquote {
  background: var(--accent-light);
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px 24px;
  margin: 28px auto;
  max-width: 560px;
  text-align: center;
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
}

.post-content blockquote p { margin-bottom: 0; }

.post-content blockquote strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ===== TABLES ===== */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.post-content th {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}

.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.post-content tr:nth-child(even) {
  background: rgba(212,115,90,0.03);
}

@media (max-width: 768px) {
  .post-content table { font-size: 13px; display: block; overflow-x: auto; }
  .post-content th, .post-content td { padding: 8px 10px; white-space: nowrap; }
}

/* ===== LINKS ===== */
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212,115,90,0.3);
}

.post-content a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent);
}

/* ===== CTA BUTTON (affiliate) ===== */
.post-content a[rel="nofollow"] {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 8px rgba(212,115,90,0.3);
  transition: background 0.2s, box-shadow 0.2s;
}

.post-content a[rel="nofollow"]:hover {
  background: var(--accent-hover);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212,115,90,0.4);
}

@media (max-width: 768px) {
  .post-content a[rel="nofollow"] {
    display: block;
    text-align: center;
    padding: 16px 24px;
  }
}

/* HR */
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Code */
.post-content code {
  font-size: 14px;
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== POST FOOTER ===== */
.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 48px;
}

.post-footer-tag {
  font-size: 14px;
  color: var(--accent);
  transition: opacity 0.2s;
}

.post-footer-tag:hover { opacity: 0.7; }

/* ===== NEXT POST ===== */
.post-next {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--border);
}

.post-next-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 4px;
}

.post-next-link {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.2s;
}

.post-next-link:hover { color: var(--accent); }

/* ===== PAGINATION ===== */
.pagination {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-3);
}

.pagination-link { color: var(--accent); font-weight: 500; }
.pagination-link:hover { opacity: 0.7; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 24px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 12px;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.footer-nav a {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-nav a:hover { color: rgba(255,255,255,0.9); }

/* ===== ERROR PAGE ===== */
.error-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px 24px;
  text-align: center;
}

.error-code { font-size: 72px; font-weight: 700; color: var(--border); }
.error-message { margin-top: 16px; font-size: 16px; color: var(--text-2); }
.error-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent);
  font-weight: 700;
}

/* ===== GHOST KOENIG WIDTH ===== */
.kg-width-wide { max-width: var(--max-w); margin: 0 auto; }
.kg-width-full { max-width: 100%; margin: 0 auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header { padding: 12px 16px; }
  .site-nav ul { gap: 12px; }
  .site-nav a { font-size: 13px; }
  .home-hero { padding: 32px 16px 16px; }
  .home-title { font-size: 22px; }
  .post-feed-wrap { padding: 24px 16px 40px; }
  .post { padding: 0 16px; }
  .post-header { padding: 32px 0 16px; }
  .post-title { font-size: 22px; }
  .post-content h2 { font-size: 19px; padding: 12px 14px; }
  .post-content h3 { font-size: 16px; }
  .tag-header { padding: 32px 16px 16px; }
}
