/* ==============================================
   wherethereislike-thereislife.site
   UI Kit colors:
     bg-dark  : #1C2A3A
     hero-green: #2E4A38
     blue-pri : #3B72B3
     blue-sec : #4A80BF
     divider  : #E8E2DC
     text-dark: #333333
     text-mid : #666666
     text-light: #999999
   ============================================== */

:root {
  --bg-dark:    #1C2A3A;
  --hero-green: #2E4A38;
  --blue-pri:   #3B72B3;
  --blue-sec:   #4A80BF;
  --divider:    #E8E2DC;
  --text-dark:  #333333;
  --text-mid:   #666666;
  --text-light: #999999;
  --white:      #ffffff;
  --thumb-bg:   #C8D8E8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }

/* ── Hero ─────────────────────────────────── */
.site-hero {
  position: relative;
  background: var(--hero-green);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 50px;
  overflow: hidden;
  text-align: center;
}

.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 42, 0.6);
}

.site-hero * { position: relative; z-index: 1; }

.site-hero__en {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--white);
  opacity: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.site-hero__ja {
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
}

/* ── Global Nav ───────────────────────────── */
.site-nav {
  background: var(--white);
  border-bottom: 2px solid var(--blue-pri);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  height: 44px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav__inner::-webkit-scrollbar { display: none; }

.site-nav__item {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-dark);
  white-space: nowrap;
  transition: background 0.15s;
}

.site-nav__item:hover,
.site-nav__item.active {
  background: #E8F0FA;
  color: var(--blue-pri);
}

/* ── Layout ───────────────────────────────── */
.site-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ── Section header ───────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-sec);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  margin-bottom: 0;
}

.section-header__bar {
  width: 3px;
  height: 18px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header__label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Article list ─────────────────────────── */
.post-list {
  border-top: 1px solid var(--divider);
}

.post-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
}

.post-item__thumb {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  background: var(--thumb-bg);
  border-radius: 4px;
  overflow: hidden;
  object-fit: cover;
}

.post-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-item__body {
  flex: 1;
  min-width: 0;
}

.post-item__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.post-item__cat {
  font-size: 0.72rem;
  color: var(--white);
  background: var(--blue-pri);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.post-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-pri);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item__title:hover { text-decoration: underline; }

.post-item__excerpt {
  font-size: 0.82rem;
  color: var(--text-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.post-item__meta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ── Category page heading ────────────────── */
.category-section {
  margin-bottom: 40px;
}

.category-section + .category-section {
  margin-top: 48px;
}

/* ── Single post ──────────────────────────── */
.post-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 32px;
}

.post-header__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.post-header__cat {
  font-size: 0.75rem;
  color: var(--white);
  background: var(--blue-pri);
  padding: 3px 10px;
  border-radius: 3px;
}

.post-header__title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.post-header__meta {
  font-size: 0.82rem;
  color: var(--text-light);
}

.post-thumbnail {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 400px;
}

.post-thumbnail img { width: 100%; object-fit: cover; }

/* ── Post body ────────────────────────────── */
.post-body {
  font-size: 0.97rem;
  line-height: 1.9;
  color: var(--text-dark);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2em 0 0.75em;
  line-height: 1.4;
  color: var(--text-dark);
}

.post-body h1 { font-size: 1.5rem; border-left: 4px solid var(--blue-pri); padding-left: 12px; }
.post-body h2 { font-size: 1.25rem; border-bottom: 2px solid var(--divider); padding-bottom: 6px; }
.post-body h3 { font-size: 1.1rem; }

.post-body p { margin-bottom: 1.2em; }

.post-body ul,
.post-body ol {
  margin: 1em 0 1.2em 1.5em;
}

.post-body li { margin-bottom: 0.4em; }

.post-body strong { color: var(--text-dark); }

.post-body blockquote {
  border-left: 3px solid var(--blue-sec);
  padding: 12px 16px;
  margin: 1.5em 0;
  background: #F0F6FF;
  border-radius: 0 4px 4px 0;
  color: var(--text-mid);
  font-style: italic;
}

.post-body pre,
.post-body code {
  font-family: "SF Mono", Consolas, monospace;
  background: #F5F5F5;
  border-radius: 4px;
}

.post-body code { padding: 2px 6px; font-size: 0.88em; }
.post-body pre  { padding: 16px; overflow-x: auto; margin: 1.2em 0; }
.post-body pre code { background: none; padding: 0; }

.post-body img {
  border-radius: 6px;
  margin: 1em auto;
}

.post-body a { color: var(--blue-pri); text-decoration: underline; }
.post-body a:hover { opacity: 0.75; }

.post-body .wp-block-image { margin: 1.5em 0; }

/* ── Back link ────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-pri);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.back-link:hover { text-decoration: underline; }
.back-link::before { content: '←'; }

/* ── Tags ─────────────────────────────────── */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.post-tag {
  font-size: 0.78rem;
  color: var(--blue-pri);
  border: 1px solid var(--blue-pri);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Footer ───────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--blue-pri);
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--blue-pri);
  margin-top: 40px;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 600px) {
  .post-item { gap: 14px; }
  .post-item__thumb { width: 80px; height: 56px; }
  .post-item__title { font-size: 0.9rem; }
  .post-item__excerpt { display: none; }
  .site-hero { padding: 40px 16px 36px; }
}


/* ==============================================
   WordPress / Sango decoration compatibility
   ============================================== */

/* ── keiko マーカー ────────────────────────── */
.keiko_red    { background: linear-gradient(transparent 60%, #ffb3b3 60%); }
.keiko_blue   { background: linear-gradient(transparent 60%, #b3d4ff 60%); }
.keiko_green  { background: linear-gradient(transparent 60%, #b3f0c8 60%); }
.keiko_yellow { background: linear-gradient(transparent 60%, #fff59d 60%); }

/* ── sgb-label (インラインバッジ) ─────────── */
.sgb-label-main-c {
  display: inline-block;
  background: var(--blue-pri);
  color: #fff;
  font-size: 0.78em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.sgb-label-accent-c {
  display: inline-block;
  background: #e87b3a;
  color: #fff;
  font-size: 0.78em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── 吹き出し (sgb-say) ───────────────────── */
.wp-block-sgb-say { margin: 1.8em 0; }

.sgb-block-say {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sgb-block-say--right {
  flex-direction: row-reverse;
}

.sgb-block-say-avatar {
  flex-shrink: 0;
  text-align: center;
  width: 72px;
}

.sgb-block-say-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eaedf2;
  display: block;
  margin: 0 auto 4px;
}

.sgb-block-say-avatar__name {
  font-size: 0.72rem;
  color: var(--text-mid);
  text-align: center;
}

.sgb-block-say-text {
  position: relative;
  flex: 1;
}

.sgb-block-say-text__content {
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-dark);
  position: relative;
}

/* 吹き出し三角（左向き） */
.sgb-block-say--left .sgb-block-say-text__content::before {
  content: '';
  position: absolute;
  top: 16px;
  left: -10px;
  border: 5px solid transparent;
  border-right-color: #d5d5d5;
}
.sgb-block-say--left .sgb-block-say-text__content::after {
  content: '';
  position: absolute;
  top: 17px;
  left: -8px;
  border: 4px solid transparent;
  border-right-color: #fff;
}

/* 吹き出し三角（右向き） */
.sgb-block-say--right .sgb-block-say-text__content::before {
  content: '';
  position: absolute;
  top: 16px;
  right: -10px;
  border: 5px solid transparent;
  border-left-color: #d5d5d5;
}
.sgb-block-say--right .sgb-block-say-text__content::after {
  content: '';
  position: absolute;
  top: 17px;
  right: -8px;
  border: 4px solid transparent;
  border-left-color: #fff;
}

/* 既存WPクラスの __before/__after は非表示（CSSで再現するため） */
.sgb-block-say-text__before,
.sgb-block-say-text__after { display: none; }

/* ── 情報ボックス (sgb-box-simple) ─────────── */
.wp-block-sgb-block-simple,
.sgb-box-simple {
  border: 2px solid var(--blue-pri);
  border-radius: 6px;
  margin: 1.8em 0;
  overflow: hidden;
}

.sgb-box-simple__title {
  background: var(--blue-pri);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 14px;
}

.sgb-box-simple__body {
  padding: 14px 16px;
  font-size: 0.93rem;
  line-height: 1.8;
}

.sgb-box-simple__body > *:first-child { margin-top: 0; }
.sgb-box-simple__body > *:last-child  { margin-bottom: 0; }

/* ── 参考リンクカード (sgb-e-link) ──────────── */
.wp-block-sgb-sanko { margin: 1.8em 0; }

.sgb-e-link {
  display: flex;
  align-items: center;
  border: 1px solid #d8e4f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbff;
  text-decoration: none !important;
  transition: box-shadow 0.15s;
}

.sgb-e-link:hover { box-shadow: 0 2px 10px rgba(59,114,179,0.15); }

.sgb-e-link--vertical { flex-direction: row; }

.sgb-e-link__image {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  overflow: hidden;
  background: var(--thumb-bg);
}

.sgb-e-link__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sgb-e-link__text {
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
}

.sgb-e-link__catchy {
  display: block;
  font-size: 0.72rem;
  color: var(--blue-pri);
  margin-bottom: 3px;
}

.sgb-e-link__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sgb-e-link__sitename {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 3px;
}

/* ── FAQ (sgb-faq) ─────────────────────────── */
.wp-block-sgb-faq,
.sgb-faq-container { margin: 1.8em 0; }

.wp-block-sgb-faq-item { margin-bottom: 12px; }

dt.hhq {
  background: var(--blue-pri);
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px 6px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

dt.hhq::before {
  content: 'Q';
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1em;
  opacity: 0.85;
}

dd.hha {
  background: #f8fbff;
  border: 1px solid #d8e4f0;
  border-top: none;
  padding: 10px 14px 10px 22px;
  border-radius: 0 0 6px 6px;
  font-size: 0.92rem;
  line-height: 1.75;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

dd.hha::before {
  content: 'A';
  flex-shrink: 0;
  font-weight: 700;
  color: var(--blue-sec);
}

/* ── 装飾見出し (sgb-heading) ───────────────── */
.wp-block-sgb-headings { margin: 1.8em 0 0.8em; }

.sgb-heading__inner.sgb-heading--type1 {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid var(--blue-pri);
  padding-left: 10px;
}

.sgb-heading__text { color: var(--text-dark); }

/* fa-check アイコン（Font Awesome なしでも最低限表示） */
.sgb-heading__inner .fa { display: none; }

/* ── 区切り線 ────────────────────────────────── */
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 2em 0;
}

/* ── pullquote ───────────────────────────────── */
.wp-block-pullquote {
  border-top: 3px solid var(--blue-pri);
  border-bottom: 3px solid var(--blue-pri);
  padding: 1em 1.5em;
  margin: 2em 0;
  text-align: center;
}
.wp-block-pullquote blockquote { margin: 0; }
.wp-block-pullquote p {
  font-size: 1.1em;
  font-style: italic;
  color: var(--text-dark);
}

/* ── テーブル ─────────────────────────────────── */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}
.post-body th {
  background: var(--blue-pri);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
}
.post-body td {
  padding: 8px 12px;
  border: 1px solid var(--divider);
}
.post-body tr:nth-child(even) td { background: #f5f8ff; }

/* ── カスタム記法（新規.mdから生成） ─────────── */

/* ::: say */
.md-say {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 1.8em 0;
}
.md-say--right { flex-direction: row-reverse; }

.md-say__avatar {
  flex-shrink: 0;
  text-align: center;
  width: 72px;
}
.md-say__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eaedf2;
  display: block;
  margin: 0 auto 4px;
}
.md-say__name {
  font-size: 0.72rem;
  color: var(--text-mid);
}

/* アバター画像なし時のイニシャルアイコン */
.md-say__initial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-sec);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}
.md-say__bubble {
  flex: 1;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.93rem;
  line-height: 1.7;
  position: relative;
}
.md-say--left .md-say__bubble::before {
  content: '';
  position: absolute;
  top: 16px; left: -10px;
  border: 5px solid transparent;
  border-right-color: #d5d5d5;
}
.md-say--left .md-say__bubble::after {
  content: '';
  position: absolute;
  top: 17px; left: -8px;
  border: 4px solid transparent;
  border-right-color: #fff;
}
.md-say--right .md-say__bubble::before {
  content: '';
  position: absolute;
  top: 16px; right: -10px;
  border: 5px solid transparent;
  border-left-color: #d5d5d5;
}
.md-say--right .md-say__bubble::after {
  content: '';
  position: absolute;
  top: 17px; right: -8px;
  border: 4px solid transparent;
  border-left-color: #fff;
}

/* ::: box */
.md-box {
  border: 2px solid var(--blue-pri);
  border-radius: 6px;
  margin: 1.8em 0;
  overflow: hidden;
}
.md-box__title {
  background: var(--blue-pri);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 14px;
}
.md-box__body {
  padding: 14px 16px;
  font-size: 0.93rem;
  line-height: 1.8;
}
.md-box__body > *:first-child { margin-top: 0; }
.md-box__body > *:last-child  { margin-bottom: 0; }

/* ::: faq */
.md-faq { margin: 1.8em 0; }
.md-faq__item { margin-bottom: 12px; }
.md-faq__q {
  background: var(--blue-pri);
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px 6px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  gap: 8px;
}
.md-faq__q::before { content: 'Q'; opacity: 0.85; }
.md-faq__a {
  background: #f8fbff;
  border: 1px solid #d8e4f0;
  border-top: none;
  padding: 10px 14px;
  border-radius: 0 0 6px 6px;
  font-size: 0.92rem;
  display: flex;
  gap: 8px;
}
.md-faq__a::before { content: 'A'; color: var(--blue-sec); font-weight: 700; }

/* {color} マーカー */
.mk-red    { background: linear-gradient(transparent 60%, #ffb3b3 60%); }
.mk-blue   { background: linear-gradient(transparent 60%, #b3d4ff 60%); }
.mk-green  { background: linear-gradient(transparent 60%, #b3f0c8 60%); }
.mk-yellow { background: linear-gradient(transparent 60%, #fff59d 60%); }

/* ── Responsive（装飾） ───────────────────────── */
@media (max-width: 600px) {
  .sgb-block-say, .md-say { gap: 10px; }
  .sgb-block-say-avatar, .md-say__avatar { width: 56px; }
  .sgb-block-say-avatar img, .md-say__avatar img { width: 52px; height: 52px; }
  .sgb-e-link__image { width: 80px; height: 56px; }
}
