/*
Theme Name: Tanabe Official
Description: 田辺まい official blog 用オリジナルテーマ（白〜アイボリー＋黄色アクセント、写真と記事が主役のシンプル構成）
Version: 1.0.0
Author: BulmaLLC
Text Domain: tanabe-official
*/

:root {
  --bg: #fdfbf6;
  --surface: #ffffff;
  --text: #2b2622;
  --text-soft: #4a433d;
  --muted: #8b8378;
  --rule: #ece6d8;
  --accent: #ecbd1d;
  --accent-soft: #fbf1c9;
  --line-green: #06c755;
  --line-green-dark: #05a948;
  --radius: 8px;
  --serif-jp: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --serif-en: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.drawer-open { overflow: hidden; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main { flex: 1 0 auto; width: 100%; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter); }

/* --------------------------------- header -------------------------------- */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 14px 0 12px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header.is-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--accent);
  flex-shrink: 0;
}

.icon-flower { width: 40px; height: 40px; }

.header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--serif-jp);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title .ht-suffix {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 1.12em;
  letter-spacing: 0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--line-green);
}

.header-line .icon-line { width: 32px; height: 32px; }

.menu-toggle {
  position: relative;
  width: 44px;
  height: 44px;
}

.menu-toggle span {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 29px; }

/* --------------------------------- drawer -------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(43, 38, 34, 0.32);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.drawer-backdrop.is-open { opacity: 1; }

.site-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(84vw, 340px);
  padding: 0 0 40px;
  background: var(--bg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
  visibility: hidden;
}

.site-drawer.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.3s ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid var(--rule);
}

.drawer-logo { color: var(--accent); display: flex; }
.drawer-logo .icon-flower { width: 30px; height: 30px; }

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-soft);
}

.icon-close { width: 24px; height: 24px; }

.drawer-heading {
  padding: 26px 24px 6px;
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.drawer-list { padding: 0 8px; }

.drawer-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
  font-size: 15px;
}

.drawer-list a:active { background: var(--accent-soft); }
.drawer-label { flex: 1; }
.icon-menu { width: 21px; height: 21px; flex-shrink: 0; color: var(--text-soft); }
.drawer-list .is-line .icon-menu { color: var(--line-green); }
.drawer-list .icon-chevron { width: 16px; height: 16px; color: var(--muted); }

/* ---------------------------------- hero --------------------------------- */

.hero {
  position: relative;
  height: clamp(230px, 64vw, 470px);
  overflow: hidden;
  background: linear-gradient(180deg, #f7f1e3 0%, var(--bg) 100%);
}

.hero-ambient,
.hero-photo {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--hero-pos, 50% 30%);
}

.hero.has-image .hero-ambient,
.hero.has-image .hero-photo { background-image: var(--hero-image); }

/* 写真の周りに、同じ写真をぼかした淡い色を敷く（幅の広い画面で左右になじませる） */
.hero-ambient {
  inset: -60px;
  filter: blur(42px) saturate(1.05);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 72%);
          mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 72%);
}

/* 上はヘッダーへ、下は背景へフェードさせる */
.hero-photo {
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, #000 22%, #000 58%, transparent 100%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, #000 22%, #000 58%, transparent 100%);
}

@media (min-width: 760px) {
  .hero-photo {
    left: 50%;
    right: auto;
    width: min(100%, 1120px);
    transform: translateX(-50%);
    -webkit-mask-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, #000 22%, #000 58%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, #000 22%, #000 58%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
            mask-composite: intersect;
  }
}

/* ------------------------------- branding -------------------------------- */

.site-branding {
  position: relative;
  z-index: 1;
  margin-top: -34px;
  padding: 0 var(--gutter) 8px;
  text-align: center;
}

.site-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.32em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.st-name {
  font-family: var(--serif-jp);
  font-weight: 700;
  font-size: clamp(30px, 8.6vw, 46px);
  letter-spacing: 0.08em;
}

.st-suffix {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(33px, 9.4vw, 50px);
  letter-spacing: -0.005em;
}

.st-rule {
  display: block;
  width: 46px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--accent);
}

.st-sub {
  margin-top: 14px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--muted);
}

/* ------------------------------ LINE button ------------------------------ */

.line-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  min-height: 56px;
  margin: 26px auto 0;
  padding: 8px 24px;
  border-radius: 999px;
  background: var(--line-green);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  transition: background-color 0.15s ease;
}

.line-button:hover { background: var(--line-green-dark); }
.line-button:active { transform: translateY(1px); }
.line-button-mark { display: flex; }
.line-button .icon-line { width: 30px; height: 30px; color: #ffffff; }
.line-button .icon-chevron { width: 18px; height: 18px; margin-left: 2px; }

/* -------------------------------- entries -------------------------------- */

.site-main { padding-bottom: 56px; }
.site-main.is-sub { padding-top: 12px; }

.entries { margin-top: 44px; }
.site-main.is-sub .entries:first-child { margin-top: 20px; }

.section-heading {
  position: relative;
  padding-left: 16px;
  font-family: var(--serif-jp);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.entry-list { margin-top: 14px; }
.entry-item { border-bottom: 1px solid var(--rule); }
.entry-item:last-child { border-bottom: 0; }

.entry-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.entry-thumb {
  flex-shrink: 0;
  width: 116px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f3ede0;
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.entry-link:hover .entry-thumb img { transform: scale(1.03); }

.entry-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: 0.55;
}

.entry-thumb-placeholder .icon-flower { width: 30px; height: 30px; }

.entry-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.entry-date {
  font-family: var(--serif-en);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.entry-link > .icon-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-soft);
}

.entries-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

.more-wrap { margin-top: 24px; text-align: center; }

.more-link {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
}

.more-wrap.is-loading .more-link { opacity: 0.5; pointer-events: none; }

@media (min-width: 640px) {
  .entry-link { gap: 24px; padding: 20px 0; }
  .entry-thumb { width: 200px; }
  .entry-title { font-size: 17px; }
  .entry-date { font-size: 16px; }
}

/* -------------------------------- article -------------------------------- */

.article { padding-top: 16px; }

.article-date {
  display: block;
  font-family: var(--serif-en);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.article-title {
  margin-top: 4px;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.article-header { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }

.article-thumb { margin-top: 24px; }
.article-thumb img { width: 100%; border-radius: var(--radius); }

.article-body {
  margin-top: 28px;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.article-body > * + * { margin-top: 1.5em; }
.article-body a { color: #1f6fb2; text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { font-weight: 700; }
.article-body img { border-radius: var(--radius); }
.article-body figure { margin-left: 0; margin-right: 0; }
.article-body figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body ul { list-style: disc; }

.article-body h2 {
  position: relative;
  margin-top: 2.4em;
  padding-left: 14px;
  font-size: 19px;
  line-height: 1.6;
}

.article-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.article-body h3 { margin-top: 2em; font-size: 17px; line-height: 1.6; }

.article-body blockquote {
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--rule);
  color: var(--text-soft);
}

.article-body hr { border: 0; border-top: 1px solid var(--rule); }

.article-body .wp-block-embed iframe,
.article-body video { max-width: 100%; }

.page-links { margin-top: 32px; text-align: center; }

.article-line {
  margin-top: 48px;
  padding-top: 8px;
}

.article-line .line-button { margin-top: 0; }

.post-nav {
  display: grid;
  gap: 10px;
  margin-top: 44px;
}

.post-nav-item {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.post-nav-dir {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.post-nav-title {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.6;
}

/* -------------------------------- profile -------------------------------- */

.profile { padding-top: 20px; text-align: center; }

.profile-label {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--muted);
}

.profile-photo {
  width: min(64vw, 260px);
  aspect-ratio: 1;
  margin: 22px auto 0;
  border-radius: 50%;
  overflow: hidden;
}

.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-name {
  margin-top: 22px;
  font-family: var(--serif-jp);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.profile-body { text-align: left; }

.profile-sns {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.profile-sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
}

.profile-sns .icon-menu { width: 22px; height: 22px; }

/* --------------------------------- 404 ----------------------------------- */

.notfound { padding: 60px var(--gutter); text-align: center; }
.notfound p + p { margin-top: 16px; }
.nf-code { font-family: var(--serif-en); font-size: 64px; line-height: 1; color: var(--accent); }

/* --------------------------------- footer -------------------------------- */

.site-footer {
  padding: 36px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.footer-logo { display: inline-flex; color: var(--accent); }
.footer-logo .icon-flower { width: 28px; height: 28px; }

.footer-title {
  margin-top: 8px;
  font-family: var(--serif-jp);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.footer-title span { font-family: var(--serif-en); font-style: italic; font-size: 1.12em; letter-spacing: 0; }

.copyright {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* -------------------------------- comments ------------------------------- */

.comments { margin-top: 52px; }

.comments-count {
  margin-left: 10px;
  font-family: var(--serif-en);
  font-size: 18px;
  color: var(--muted);
}

.comment-list { margin-top: 12px; list-style: none; }
.comment-list .children { list-style: none; margin-left: 20px; padding-left: 14px; border-left: 2px solid var(--accent-soft); }
.comment-list > li,
.comment-list .children > li { border-bottom: 1px solid var(--rule); }
.comment-list .children > li:last-child { border-bottom: 0; }

.comment-body { position: relative; padding: 18px 0; }

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
}

.comment-author .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.comment-author .says { display: none; }
.comment-author .fn { font-style: normal; }
.comment-author .fn a { text-decoration: none; }

.comment-meta.commentmetadata {
  margin: 2px 0 0 50px;
  font-family: var(--serif-en);
  font-size: 13px;
  color: var(--muted);
}

.comment-meta.commentmetadata a { color: inherit; }
.comment-meta .comment-edit-link { margin-left: 8px; font-family: var(--sans); font-size: 12px; }

.comment-awaiting-moderation {
  display: block;
  margin: 8px 0 0 50px;
  font-size: 12.5px;
  color: #a07d0c;
}

.comment-body > p,
.comment-content p {
  margin: 10px 0 0 50px;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.comment-list .reply { margin: 8px 0 0 50px; }

.comment-reply-link {
  display: inline-block;
  padding: 2px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-soft);
}

.bypostauthor > .comment-body .fn::after {
  content: '本人';
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  color: #8a6a00;
  vertical-align: 1px;
}

.comment-respond {
  margin-top: 28px;
  padding: 22px 20px 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.comment-list .comment-respond { margin: 4px 0 18px; }

.comment-reply-title {
  font-family: var(--serif-jp);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
}

.comment-reply-title small { margin-left: 10px; font-family: var(--sans); font-size: 12.5px; font-weight: 400; }
.comment-reply-title small a { color: var(--muted); text-decoration: underline; }

.comment-notes,
.logged-in-as { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.logged-in-as a { text-decoration: underline; }

.comment-form p + p { margin-top: 14px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.comment-form .required { color: #c4532f; }

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #ddd5c4;
  border-radius: 6px;
  background: var(--bg);
  font: inherit;
  font-size: 16px; /* iOS で入力時に拡大されないように */
  color: var(--text);
}

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.comment-form .form-submit { margin-top: 18px; text-align: center; }

.comment-form .submit {
  min-width: 200px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.comment-form .submit:hover { background: var(--text-soft); }

.comments-closed { margin-top: 14px; font-size: 13px; color: var(--muted); }

.comment-navigation .nav-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
