/*
Theme Name:   n_studio Portfolio
Theme URI:    https://note.com/n_studio
Author:       n.tsukuda
Author URI:   https://note.com/n_studio
Description:  フリーランス向けポートフォリオテーマ。制作実績カスタム投稿タイプ・note RSS連携対応。
Version:      1.4.2
License:      GPL-2.0-or-later
Text Domain:  nstudio
*/

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

:root {
  --bg:          #f5f5f2;
  --bg-alt:      #eceee9;
  --white:       #fff;
  --text:        #1e1c19;
  --text-mid:    #4a4840;
  --text-light:  #868a82;
  --brown:       #6b8a85;
  --brown-light: #82a39d;
  --brown-pale:  rgba(107,138,133,0.08);
  --border:      #d6dbd6;
  --serif:       'Cormorant Garamond', serif;
  --sans:        'Noto Sans JP', sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --en:          'Be Vietnam Pro', 'Noto Sans JP', sans-serif;
  --accent:      #0f7f75;   /* 1.3.0 差し色 */
  --accent-ink:  #0c635b;   /* 差し色を文字に使うとき */
  --header-bg:   rgba(245,245,242,0.88);
}

html {
  scroll-behavior: smooth;
  /* 固定ヘッダーの下に見出しが隠れないよう、ページ内リンクの着地位置を下げる */
  scroll-padding-top: 100px;
}
/* ログイン中は管理バーの分も足す */
html:has(body.admin-bar) { scroll-padding-top: 132px; }

body {
  font-family: var(--sans);
  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; }


/* ============================================================
   Layout
   ============================================================ */
.l-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}


/* ============================================================
   Header / Navigation（1.3.0：明るいヘッダー）
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(37,37,37,0.06);
}
body.home { --header-bg: rgba(236,236,234,0.86); }

/* ログイン中：黒い管理バーの下にヘッダーを置く（1.3.1） */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
/* 600px以下では管理バーが画面と一緒に流れるため、ヘッダーは上端に戻す */
@media (max-width: 600px) { body.admin-bar .site-header { top: 0; } }

.site-header .l-wrap {
  max-width: 1244px;
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-name {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  color: #252525;
  letter-spacing: 0.5px;
  margin-right: auto;
}

.site-name a { color: #252525; }
.site-name em { font-style: normal; color: var(--accent-ink); }

.site-name small {
  display: block;
  font-family: var(--en);
  font-size: 10px;
  font-weight: 400;
  color: #555a55;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* WP nav menu reset */
.header-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  font-family: var(--en);
  font-size: 13px;
  font-weight: 600;
  color: #252525;
  letter-spacing: 0.5px;
  transition: color 0.2s, filter 0.2s;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] { color: var(--accent-ink); }

/* メニューの「Contact」は丸いボタンに */
.header-nav a[href$="#contact"],
.header-nav .menu-item-contact > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}
.header-nav a[href$="#contact"]:hover,
.header-nav .menu-item-contact > a:hover { color: #fff; filter: brightness(1.08); }

/* スマホ用：ヘッダー右上のContactボタン（PCでは非表示） */
.header-cta { display: none; }

/* スマホ用メニューボタン（PCでは非表示） */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid rgba(37,37,37,0.25);
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  position: relative;
}

.nav-toggle__bar {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 1.5px;
  background: #252525;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}

.nav-toggle__bar:nth-child(1) { top: 17px; }
.nav-toggle__bar:nth-child(2) { opacity: 0; top: 21px; }
.nav-toggle__bar:nth-child(3) { top: 24px; }

.site-header.is-open .nav-toggle__bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle__bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.nav-toggle:focus-visible,
.header-cta:focus-visible,
.header-nav a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }


/* ============================================================
   Divider
   ============================================================ */
.c-divider {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.c-divider hr {
  border: none;
  border-top: 1px solid var(--border);
}


/* ============================================================
   Section Common
   ============================================================ */
.c-sec { padding: 72px 0; }

.c-sec__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.c-sec__num {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  color: var(--border);
  line-height: 1;
}

.c-sec__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
}


/* ============================================================
   Hero
   ============================================================ */
.p-hero {
  padding-top: 130px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.p-hero__main { padding-top: 24px; }

.p-hero__title {
  font-family: var(--sans);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.p-hero__title strong { font-weight: 900; color: var(--brown); font-style: normal; }

.p-hero__desc {
  font-size: 16px;
  color: var(--text-mid);
  max-width: 440px;
  line-height: 2;
  margin-bottom: 32px;
}

.p-hero__meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.p-hero__meta dt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.p-hero__meta dd {
  font-size: 15px;
  color: var(--text);
}

.p-hero__meta dd a {
  color: var(--brown);
}

/* Hero image */
.p-hero__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
}

.p-hero__photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border-radius: 4px;
}


/* ============================================================
   Skills Section（アクセントカラー背景）
   ============================================================ */
.p-skills-section {
  background: var(--brown);
}

.p-skills-section .c-sec__num {
  color: rgba(255,255,255,0.2);
}

.p-skills-section .c-sec__title {
  color: #fff;
}

/* ============================================================
   Skills Table
   ============================================================ */
.p-skills { width: 100%; border-collapse: collapse; }
.p-skills tr { border-bottom: 1px solid rgba(255,255,255,0.15); }
.p-skills tr:first-child { border-top: 1px solid rgba(255,255,255,0.15); }
.p-skills td { padding: 24px 0; vertical-align: top; }

.p-skills__name {
  width: 200px;
  font-size: 17px;
  font-weight: 600;
  padding-right: 24px;
  color: #fff;
}

.p-skills__desc {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  padding-right: 32px;
  line-height: 1.8;
}

.p-skills__tech { width: 240px; text-align: left; padding-top: 2px; }

.c-tech-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 3px;
  margin: 2px 4px 2px 0;
}


/* ============================================================
   Works More Link
   ============================================================ */
.p-works-more {
  margin-top: 28px;
  text-align: right;
}

.p-works-more a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brown);
  letter-spacing: 0.5px;
  transition: opacity 0.2s;
}

.p-works-more a:hover { opacity: 0.7; }


/* ============================================================
   Works List（実績一覧アーカイブページ用）
   ============================================================ */
.p-works-list { display: flex; flex-direction: column; }

.p-works__item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  align-items: start;
  transition: background 0.2s;
  color: inherit;
  text-decoration: none;
}

.p-works__item:first-child { border-top: 1px solid var(--border); }
.p-works__item:hover { background: rgba(107,138,133,0.03); }

.p-works__thumb {
  width: 220px;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.p-works__item:hover .p-works__thumb { border-color: var(--brown-light); }

.p-works__thumb img { width: 100%; height: 100%; object-fit: cover; }

.p-works__thumb--empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.p-works__header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 4px; }

.p-works__body { min-width: 0; overflow: hidden; }

.p-works__num { font-family: var(--serif); font-size: 22px; color: var(--border); }

.p-works__cat {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brown);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.p-works__title { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; overflow-wrap: break-word; }

.p-works__desc { font-size: 15px; color: var(--text-mid); line-height: 1.8; margin-bottom: 10px; overflow-wrap: break-word; }

.p-works__tags { display: flex; flex-wrap: wrap; gap: 4px; }

.p-works__tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 2px;
}


/* ============================================================
   note Blog Section
   ============================================================ */
.p-note-sec { background: var(--bg-alt); }

.p-note__intro {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 2;
}

.p-note__intro a {
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-note__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.p-note__card {
  background: var(--white);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.p-note__card:hover { background: #fdfcfa; }

.p-note__thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg);
}

.p-note__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.p-note__card:hover .p-note__thumb img { transform: scale(1.03); }

.p-note__body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.p-note__date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.p-note__card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 6px;
  flex: 1;
}

.p-note__card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.p-note__more {
  margin-top: 28px;
  text-align: right;
}

.p-note__more a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brown);
  letter-spacing: 0.5px;
  transition: opacity 0.2s;
}

.p-note__more a:hover { opacity: 0.7; }


/* ============================================================
   Contact
   ============================================================ */
.p-contact {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.p-contact__heading {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
}

.p-contact__text {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 2;
}

.p-contact__links { display: flex; flex-direction: column; padding-top: 12px; }

.p-contact__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.p-contact__link:first-child { border-top: 1px solid var(--border); }
.p-contact__link:hover { color: var(--brown); }

.p-contact__link span { font-size: 16px; font-weight: 500; }

.p-contact__link em {
  font-family: var(--mono);
  font-size: 13px;
  font-style: normal;
  color: var(--text-light);
}


/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .l-wrap {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
}

.site-footer small {
  font-size: 13px;
  color: var(--text-light);
}


/* ============================================================
   Single Works (個別実績ページ)
   ============================================================ */
.p-single-work {
  padding-top: 120px;
  padding-bottom: 80px;
}

.p-single-work__header { margin-bottom: 40px; }

.p-single-work__cat {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brown);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.p-single-work__title {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.p-single-work__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.p-single-work__featured {
  margin-bottom: 40px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.p-single-work__featured img {
  width: 100%;
  height: auto;
}

.p-single-work__body {
  font-size: 17px;
  line-height: 2;
  color: var(--text-mid);
  max-width: 720px;
}

.p-single-work__body p { margin-bottom: 1.5em; }

.p-single-work__link {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.p-single-work__link a {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.p-single-work__back {
  margin-top: 48px;
}

.p-single-work__back a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.2s;
}

.p-single-work__back a:hover { color: var(--brown); }


/* ============================================================
   Works Archive Page（実績一覧）
   ============================================================ */
.p-archive-works {
  padding-top: 120px;
  padding-bottom: 80px;
}

.p-archive-works__label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brown);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.p-archive-works__title {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 48px;
}

.p-archive-works__back {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.p-archive-works__back a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-light);
  transition: color 0.2s;
}

.p-archive-works__back a:hover { color: var(--brown); }

/* レスポンシブ対応 */
@media (max-width: 900px) {
  .p-works-slider { margin: 0 -20px; padding: 0 20px; }
}


/* ============================================================
   Generic Page
   ============================================================ */
.p-page {
  padding-top: 120px;
  padding-bottom: 80px;
}

.p-page__title {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
}

.p-page__body {
  font-size: 17px;
  line-height: 2;
  color: var(--text-mid);
  max-width: 720px;
}

.p-page__body p { margin-bottom: 1.5em; }
.p-page__body h2 { font-size: 22px; font-weight: 600; margin: 2em 0 1em; color: var(--text); }
.p-page__body h3 { font-size: 19px; font-weight: 600; margin: 1.5em 0 0.8em; color: var(--text); }
.p-page__body ul, .p-page__body ol { padding-left: 1.5em; margin-bottom: 1.5em; }


/* ============================================================
   Contact Page
   ============================================================ */
.p-contact-page {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 640px;
}

.p-contact-page__label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brown);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.p-contact-page__title {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.p-contact-page__lead {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.p-contact-page__back {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.p-contact-page__back a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-light);
  transition: color 0.2s;
}

.p-contact-page__back a:hover { color: var(--brown); }


/* ============================================================
   Contact Form 7
   ============================================================ */
.wpcf7 { margin-top: 0; }

.wpcf7 p { margin-bottom: 24px; }

.wpcf7 label {
  display: block;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.wpcf7 textarea {
  resize: vertical;
  min-height: 160px;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 textarea:focus {
  border-color: var(--brown);
}

.wpcf7 input[type="submit"] {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 14px 52px;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.wpcf7 input[type="submit"]:hover { background: var(--brown-light); }

.wpcf7 .wpcf7-not-valid-tip {
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
  display: block;
}

.wpcf7 .wpcf7-not-valid { border-color: #c0392b !important; }

.wpcf7 .wpcf7-response-output {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  border: none;
}

.wpcf7 .wpcf7-mail-sent-ok {
  background: rgba(107,138,133,0.1);
  color: var(--brown);
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-spam-blocked {
  background: rgba(192,57,43,0.08);
  color: #c0392b;
}

.wpcf7 abbr[title] {
  color: var(--brown);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 4px;
}


/* ============================================================
   Blog Section（トップ：コラム＋note の2段）
   ============================================================ */
.p-blog__group + .p-blog__group { margin-top: 64px; }

.p-blog__sub {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.p-blog__sub span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--brown);
  letter-spacing: 3px;
  text-transform: uppercase;
}


/* ============================================================
   Column List（/column/・カテゴリ一覧）
   ============================================================ */
.p-column {
  padding-top: 120px;
  padding-bottom: 80px;
}

.p-column__header .p-archive-works__title { margin-bottom: 16px; }

.p-column__lead {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 2;
  max-width: 560px;
  margin-bottom: 40px;
}

.p-column__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.p-column__cats a {
  font-size: 13px;
  color: var(--text-mid);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 4px 14px;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

.p-column__cats a:hover { border-color: var(--brown); color: var(--brown); }
.p-column__cats a.is-current { background: var(--brown); border-color: var(--brown); color: #fff; }

.p-column__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 件数が少なくても空きマスが目立たないよう、カード自体に枠線を付ける */
.p-column__list .p-column__card {
  border: 1px solid var(--border);
}

.p-column__card .p-works__thumb--empty { background: var(--bg-alt); }

.p-column__card-cat {
  margin-left: 10px;
  color: var(--brown);
  letter-spacing: 1px;
}

.p-column__empty { color: var(--text-light); font-size: 15px; }

/* ページ送り（the_posts_pagination） */
.p-column__pagination { margin-top: 40px; }
.p-column__pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.p-column__pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  border-radius: 4px;
}
.p-column__pagination .page-numbers.current { background: var(--brown); border-color: var(--brown); color: #fff; }
.p-column__pagination a.page-numbers:hover { border-color: var(--brown); color: var(--brown); }
.p-column__pagination .screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}


/* ============================================================
   Single Post（コラム記事ページ）
   ============================================================ */
.p-post {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 880px;
}

.p-post__header { margin-bottom: 36px; }

.p-post__label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brown);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.p-post__label a:hover { opacity: 0.7; }
.p-post__label-sep { margin: 0 8px; color: var(--border); }

.p-post__title {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 16px;
}

.p-post__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-light);
}

.p-post__featured {
  margin-bottom: 40px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.p-post__featured img { width: 100%; height: auto; }

/* 本文（通常の投稿用。HTMLを丸ごと貼った記事は記事側のCSSが優先される） */
.p-post__body {
  font-size: 16px;
  line-height: 2;
  color: var(--text-mid);
}

.p-post__body > p { margin-bottom: 1.5em; }
.p-post__body > h2 { font-size: 22px; font-weight: 600; margin: 2.2em 0 1em; padding-left: 14px; border-left: 4px solid var(--brown); color: var(--text); line-height: 1.5; }
.p-post__body > h3 { font-size: 18px; font-weight: 600; margin: 1.8em 0 0.8em; color: var(--text); }
.p-post__body > ul, .p-post__body > ol { padding-left: 1.5em; margin-bottom: 1.5em; }
.p-post__body > blockquote { border-left: 3px solid var(--border); padding: 4px 16px; color: var(--text-light); margin-bottom: 1.5em; }
.p-post__body a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.p-post__body img { border: 1px solid var(--border); margin: 1.5em 0; }
.p-post__body code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-alt); padding: 0.1em 0.4em; border-radius: 3px; }

.p-post__tags { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 6px; }

.p-post__pager {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.p-post__pager > div { background: var(--white); }
.p-post__pager a { display: block; padding: 18px 20px; font-size: 14px; line-height: 1.6; height: 100%; transition: background 0.2s; }
.p-post__pager a:hover { background: #fdfcfa; }
.p-post__pager span { display: block; font-family: var(--mono); font-size: 11px; color: var(--brown); letter-spacing: 1px; margin-bottom: 4px; }
.p-post__pager-next { text-align: right; }

/* シェアボタン（1.4.0）：コラム記事・制作実績の下 */
.c-share {
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}
.c-share__title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.c-share__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.c-share__list li { margin: 0; }
.c-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 96px; padding: 0 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--white); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.c-share__btn:hover { border-color: var(--accent, #0f7f75); color: var(--accent-ink, #0c635b); background: #f3faf9; }
.c-share__btn:focus-visible { outline: 2px solid var(--accent, #0f7f75); outline-offset: 2px; }
.c-share__btn.is-x { background: #111; border-color: #111; color: #fff; }
.c-share__btn.is-x:hover { background: #333; color: #fff; }
.c-share__status { min-height: 1.4em; margin-top: 10px; font-size: 13px; color: var(--accent-ink, #0c635b); }
.p-single-work .c-share { margin-bottom: 8px; }
@media (max-width: 600px) {
  .c-share { padding: 20px 16px; }
  .c-share__list { display: grid; grid-template-columns: 1fr 1fr; }
  .c-share__btn { width: 100%; padding: 0 10px; }
}

/* 画面には出さず、読み上げソフトにだけ読ませる文字 */
.u-visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.p-post__back {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.p-post__back a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-light);
  transition: color 0.2s;
}

.p-post__back a:hover { color: var(--brown); }


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .l-wrap { padding-left: 20px; padding-right: 20px; }

  /* スマホ：ボタンで開閉するメニュー */
  .nav-toggle { display: block; }

  .site-header .l-wrap { gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .site-name { font-size: 18px; }
  .site-name small { display: none; }

  .header-cta {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    background: var(--accent);
    color: #fff;
    font-family: var(--en);
    font-weight: 600;
    font-size: 13px;
    border-radius: 999px;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #f7f7f5;
    border-top: 1px solid rgba(37,37,37,0.08);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .site-header.is-open .header-nav { display: block; }

  .header-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; }
  .header-nav li { border-bottom: 1px solid rgba(37,37,37,0.1); }
  .header-nav li:last-child { border-bottom: 0; }
  .header-nav a { display: block; padding: 14px 4px; font-size: 16px; color: #252525; }
  .header-nav a[href$="#contact"],
  .header-nav .menu-item-contact > a { display: flex; justify-content: center; margin-top: 12px; min-height: 50px; }

  html { scroll-padding-top: 84px; }
  html:has(body.admin-bar) { scroll-padding-top: 130px; }

  .p-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 100px;
  }
  .p-hero__photo { order: -1; }
  .p-hero__photo img,
  .p-hero__photo-placeholder { aspect-ratio: 16 / 9; }
  .p-hero__title { font-size: 36px; }

  .p-works__item { grid-template-columns: 1fr; gap: 16px; }
  .p-works__thumb { width: 100%; height: 180px; }

  .p-skills td { display: block; padding-right: 0; }
  .p-skills__name { width: auto; padding-bottom: 0; }
  .p-skills__tech { width: auto; text-align: left; padding-top: 8px; }

  .p-note__grid { grid-template-columns: 1fr; }

  .p-contact { grid-template-columns: 1fr; gap: 40px; }

  .p-column__list { grid-template-columns: 1fr; }
  .p-post__title { font-size: 24px; }
  .p-post__pager { grid-template-columns: 1fr; }
  .p-post__pager-next { text-align: left; }

  .site-footer .l-wrap { flex-direction: column; gap: 4px; }
}


/* ==========================================================
   1.4.2 本文中のボタン（ブロックエディタの「ボタン」）
   ヘッダーの Contact と同じ緑の丸ボタンにそろえる
   ========================================================== */
.wp-block-buttons { margin: 28px 0; gap: 12px; }
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--accent, #0f7f75);
  border-radius: 999px;
  background: var(--accent, #0f7f75);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: filter .2s ease, background-color .2s ease, color .2s ease;
}
.wp-block-button .wp-block-button__link::after { content: "→"; font-weight: 400; }
.wp-block-button .wp-block-button__link[target="_blank"]::after { content: "↗"; }
.wp-block-button .wp-block-button__link:hover { color: #fff; filter: brightness(1.08); }
.wp-block-button .wp-block-button__link:focus-visible { outline: 2px solid var(--accent-ink, #0c635b); outline-offset: 3px; }
/* 「アウトライン」スタイルを選んだボタンは、緑の線の丸ボタン */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--accent-ink, #0c635b); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: #f3faf9; color: var(--accent-ink, #0c635b); filter: none; }
@media (max-width: 600px) {
  .wp-block-buttons > .wp-block-button { width: 100%; }
  .wp-block-button .wp-block-button__link { width: 100%; }
}
