/*
Theme Name: Japan727 買取サイト
Theme URI:
Author: One Page Lab / 古橋
Author URI:
Description: 買取専門店向けWordPressテーマ（ヘッダー・メニュー・フッター・スライドショー・投稿一覧）
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Private
Text Domain: japan727
*/

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

:root {
  --blue: #18a9e6;
  --blue-dark: #087db2;
  --blue-soft: #eaf8ff;
  --ink: #1f2b34;
  --muted: #65717a;
  --line: #dbe8ef;
  --paper: #ffffff;
  --bg: #f5f8fa;
  --green: #02b902;
  --green-dark: #008f20;
  --pink: #d62c7e;
  --pink-dark: #ac1f62;
  --gold: #c59b3b;
}

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

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

/* ===== PC HEADER ===== */

.pc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.98);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 8px 22px rgba(18,53,72,.10);
  backdrop-filter: blur(10px);
}

.pc-header-inner {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: 300px minmax(360px, 1fr) 290px 250px;
  align-items: stretch;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-right: 8px;
}

/* カスタムロゴ画像 */
.logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(300px, 100%);
  aspect-ratio: 3 / 1;
  height: auto;
  max-width: min(300px, 100%);
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
  flex: 0 1 auto;
}

.logo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--paper);
}

.logo-frame img.custom-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  background: transparent;
  object-fit: contain;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: linear-gradient(135deg, #fff 0%, #e5f7ff 100%);
  border: 2px solid var(--blue);
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px #fff;
  flex: 0 0 auto;
}

.brand-mark i { font-size: 23px; }

.brand-name {
  display: block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}

.main-nav a {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid var(--line);
  transition: color .18s, background .18s;
}

.main-nav a:last-child { border-right: 0; }

.main-nav a i {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 20px;
}

.main-nav a:hover { color: var(--blue-dark); background: var(--blue-soft); }

.header-cta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cta-button {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #fff;
  text-align: center;
  box-shadow: 0 7px 16px rgba(0,0,0,.12);
  transition: transform .18s, filter .18s, box-shadow .18s;
}

.cta-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(0,0,0,.16);
}

.cta-line { background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%); }
.cta-mail { background: linear-gradient(180deg, var(--pink) 0%, var(--pink-dark) 100%); }

.cta-icon { font-size: 26px; line-height: 1; flex: 0 0 auto; }

.cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.cta-main { font-size: 16px; font-weight: 900; white-space: nowrap; }
.cta-sub { margin-top: 2px; font-size: 11px; font-weight: 800; opacity: .9; white-space: nowrap; }

.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}

.utility-grid a {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: color .18s, background .18s;
}

.utility-grid a:nth-child(2n),
.utility-grid a:last-child { border-right: 0; }
.utility-grid a i { color: var(--blue-dark); font-size: 15px; }
.utility-grid a:hover { color: var(--blue-dark); background: var(--blue-soft); }

/* ===== SP HEADER ===== */

.sp-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.98);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 6px 18px rgba(18,53,72,.10);
}

.sp-top {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}

.sp-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
}

.sp-brand .logo-frame {
  width: min(42vw, 168px);
  max-width: min(42vw, 168px);
  min-width: 96px;
  flex: 0 1 168px;
}

.sp-brand .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 7px;
}

.sp-brand .brand-mark i { font-size: 18px; }

.sp-brand-name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.sp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.sp-line-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 5px 14px rgba(0,185,0,.24);
  white-space: nowrap;
}

.ham-btn {
  width: 48px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.ham-lines {
  width: 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ham-lines span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--ink);
  border-radius: 4px;
  transition: transform .25s, opacity .25s;
}

.ham-label { font-size: 10px; font-weight: 900; line-height: 1; }

.ham-btn.open .ham-lines span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.ham-btn.open .ham-lines span:nth-child(2) { opacity: 0; }
.ham-btn.open .ham-lines span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ===== SP LOWER NAV ===== */

.sp-lower-nav {
  display: none;
  position: sticky;
  top: 73px;
  z-index: 950;
  grid-template-columns: repeat(4, 1fr);
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(8,125,178,.14);
}

.sp-lower-nav a {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.25);
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.sp-lower-nav a:last-child { border-right: 0; }
.sp-lower-nav i { font-size: 16px; }
.sp-lower-nav a:hover { background: var(--blue-dark); }

/* ===== DRAWER ===== */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: rgba(12,28,38,.55);
}

.overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1900;
  width: min(88vw, 360px);
  height: 100%;
  overflow-y: auto;
  background: #fff;
  box-shadow: -16px 0 32px rgba(0,0,0,.18);
  transform: translateX(105%);
  visibility: hidden;
  /* 閉じるときはスライドアウトが終わってから非表示にする */
  transition: transform .28s ease, visibility 0s linear .28s;
  -webkit-overflow-scrolling: touch;
}

.drawer.open { transform: translateX(0); visibility: visible; transition: transform .28s ease; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  color: #fff;
  background: var(--blue);
  font-size: 16px;
  font-weight: 900;
}

.drawer-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 5px;
  cursor: pointer;
}

.drawer-cta {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #f7fbfd;
  border-bottom: 1px solid var(--line);
}

.drawer-cta .cta-button { min-height: 54px; justify-content: flex-start; }

.drawer-section { padding: 14px 18px 4px; }

.drawer-label {
  padding-bottom: 8px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.drawer-section a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
}

.drawer-section a i {
  width: 22px;
  color: var(--blue);
  text-align: center;
  font-size: 16px;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 62px;
  color: rgba(255,255,255,.76);
  background:
    radial-gradient(circle at 94% 54%, rgba(255,255,255,.12), transparent 0 4px, transparent 5px),
    linear-gradient(135deg, #182027 0%, #202932 48%, #151b21 100%);
}

.page-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  color: #fff;
  background: var(--blue);
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.page-top:hover { background: var(--blue-dark); }

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 42px 24px 36px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

.footer-logo {
  margin-bottom: 18px;
}

.footer-logo a {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.footer-logo .logo-frame {
  width: min(300px, 100%);
  max-width: min(300px, 100%);
  background: inherit;
  border-radius: 0;
  box-shadow: none;
}

.footer-logo .logo-placeholder {
  background: transparent;
}

.footer-line-card {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 20px 18px;
  color: #fff;
  background: var(--footer-line-color, #5abf85);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 12px 26px rgba(0,0,0,.22);
  text-align: center;
}

.footer-line-card:hover {
  color: #fff;
  transform: translateY(-1px);
}

.footer-line-label {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .04em;
}

.footer-line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  color: #eafff0;
  background: rgba(0,90,44,.42);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 5px rgba(0,0,0,.24);
}

.footer-line-button .fa-line {
  color: var(--footer-line-icon-color, #fff);
}

.footer-brand p {
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.9;
}

.footer-info { display: grid; gap: 8px; font-size: 12.5px; line-height: 1.6; }
.footer-info i { width: 18px; color: #84d9ff; text-align: center; margin-right: 6px; }
.footer-info strong { color: #fff; }

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1.45fr 1fr;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col h3 {
  margin-bottom: 14px;
  padding-bottom: 11px;
  color: #fff;
  border-bottom: 1px solid rgba(83, 194, 235, .28);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
}

.footer-col ul,
.footer-col .j727-footer-menu {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
  transition: color .18s, transform .18s;
}

.footer-col a::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: .62em;
  border-top: 2px solid #84d9ff;
  border-right: 2px solid #84d9ff;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.footer-col a i {
  width: 16px;
  color: #dfe7eb;
  margin-top: .12em;
}

.footer-col a:hover {
  color: #fff;
  transform: translateX(2px);
}

.footer-bottom {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}

.footer-bottom p,
.footer-legal a { color: rgba(255,255,255,.38); font-size: 11.5px; }

.footer-legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ===== POST ARCHIVES ===== */
.j727-archive-wrap { padding: 56px 20px; background: var(--bg); }
.j727-archive-inner { width: min(900px, 100%); margin: 0 auto; }
.j727-archive-kicker { margin: 0 0 6px; color: #168fbe; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.j727-archive-inner h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 4vw, 38px); }
.j727-archive-lead { margin: 12px 0 28px; color: var(--muted); }
.j727-post-list { display: grid; gap: 18px; }
.j727-post-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 18px rgba(20, 45, 63, .06); }
.j727-post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.j727-post-categories { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.j727-post-categories span { padding: 3px 8px; color: #177eaa; background: #eaf8fe; border-radius: 999px; font-size: 12px; font-weight: 700; }
.j727-post-card h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.5; }
.j727-post-card h2 a { color: var(--ink); text-decoration: none; }
.j727-post-card h2 a:hover { color: #1494c6; }
.j727-post-excerpt { color: #4d5d67; line-height: 1.8; }
.j727-post-more { display: inline-block; margin-top: 14px; color: #168fbe; font-weight: 800; text-decoration: none; }
.j727-post-more:hover { text-decoration: underline; }
.j727-empty-message { padding: 28px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.j727-pagination { margin-top: 28px; }
.j727-pagination .page-numbers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.j727-pagination a, .j727-pagination .current { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 0 10px; color: #177eaa; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-weight: 800; text-decoration: none; }
.j727-pagination .current { color: #fff; background: #168fbe; border-color: #168fbe; }

/* ===== MAIN CONTENT ===== */

.site-main { min-height: 60vh; scroll-margin-top: 150px; }

/* ===== RESPONSIVE ===== */

@media (max-width: 1280px) {
  .pc-header-inner {
    grid-template-columns: 260px minmax(330px, 1fr) 250px 220px;
    gap: 8px;
    padding-inline: 12px;
  }
  .brand-name { font-size: 19px; }
  .main-nav a { font-size: 11px; }
  .cta-main { font-size: 14px; }
  .utility-grid a { font-size: 11px; padding-inline: 5px; }
}

@media (max-width: 1140px) and (min-width: 769px) {
  .pc-header-inner {
    grid-template-columns: 240px 1fr 236px;
    grid-template-areas:
      "brand nav cta"
      "utility utility utility";
  }
  .brand { grid-area: brand; }
  .main-nav { grid-area: nav; }
  .header-cta { grid-area: cta; }
  .utility-grid { grid-area: utility; grid-template-columns: repeat(4, 1fr); }
  .utility-grid a { min-height: 34px; }
  .utility-grid a:last-child { border-right: 0; }

  .footer-inner {
    grid-template-columns: 260px 1fr;
    gap: 28px;
  }

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

@media (min-width: 769px) {
  .pc-header { display: block; }
  .sp-header, .sp-lower-nav { display: none !important; }
}

@media (max-width: 768px) {
  .pc-header { display: none !important; }
  .sp-header { display: block; }
  .sp-lower-nav { display: grid; }

  .footer { margin-top: 48px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 18px 28px;
  }

  .footer-brand {
    max-width: 360px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 18px;
  }
}

@media (max-width: 390px) {
  .sp-brand .logo-frame {
    width: 132px;
    max-width: 132px;
    flex-basis: 132px;
  }
  .sp-brand-name { font-size: 15px; }
  .sp-line-btn { padding-inline: 9px; font-size: 11px; }
  .ham-btn { width: 44px; }
  .sp-lower-nav a { font-size: 10px; }
}

/* PC幅ではドロワー・オーバーレイを完全に無効化する（開いたままの取り残し防止） */
@media (min-width: 769px) {
  .overlay, .drawer { display: none !important; }
}

/* ===== SLIDESHOW（トップページ・メニュー下） ===== */

.j727-slideshow {
  position: relative;
  width: min(1200px, 100%);
  aspect-ratio: 1200 / 546;
  margin: 0 auto;
  overflow: hidden;
  background: #f3f5f6;
}

.j727-slide-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.j727-slide-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform .65s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.j727-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.j727-slide-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.j727-slide-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #33434c;
  background: rgba(255,255,255,.72);
  border: 0;
  cursor: pointer;
  font-size: 26px;
  transform: translateY(-50%);
  transition: color .18s, background .18s;
}

.j727-slide-prev { left: 0; }
.j727-slide-next { right: 0; }
.j727-slide-arrow:hover { color: var(--blue-dark); background: rgba(255,255,255,.94); }

.j727-front-page-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.j727-front-page:empty,
.j727-front-page .j727-content:empty {
  display: none;
}

.j727-slide-controls {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 5;
  transform: translateX(-50%);
}

.j727-slide-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.j727-slide-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 50%;
  cursor: pointer;
}

.j727-slide-dot.is-active { background: var(--blue); }

.j727-slide-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(13,21,26,.72);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
}

/* ===== ACCESSIBILITY ===== */

.skip-link {
  position: absolute;
  top: -56px;
  left: 8px;
  z-index: 2100;
  padding: 10px 16px;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 0 0 6px 6px;
  font-weight: 800;
  transition: top .15s;
}

.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue-dark);
  outline-offset: 2px;
}

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

@media (max-width: 768px) {
  .j727-slide-arrow {
    width: 34px;
    height: 44px;
    font-size: 20px;
  }
  .j727-slide-controls { bottom: 8px; }
  .j727-slide-toggle { width: 28px; height: 28px; }
  .j727-front-page-wrap { padding: 28px 16px 48px; }
}

/* ===== 管理バー表示時の固定ヘッダー位置調整 ===== */

body.admin-bar .pc-header,
body.admin-bar .sp-header { top: 32px; }
body.admin-bar .sp-lower-nav { top: 105px; }

@media (max-width: 782px) {
  body.admin-bar .pc-header,
  body.admin-bar .sp-header { top: 46px; }
  body.admin-bar .sp-lower-nav { top: 119px; }
}

/* ===== 固定ページ・投稿本文 ===== */

.j727-content-wrap {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 56px 20px;
}

.j727-article {
  padding: 34px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(20, 45, 63, .06);
}

.j727-article-title {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--blue);
  color: var(--ink);
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.4;
}

.j727-content { color: #37454f; line-height: 1.9; }
.j727-content > * + * { margin-top: 1em; }
.j727-content h2 {
  margin-top: 2em;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
  font-size: 20px;
  line-height: 1.5;
}
.j727-content h3 {
  margin-top: 1.6em;
  padding-bottom: 6px;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  font-size: 17px;
}
.j727-content h4 { margin-top: 1.4em; color: var(--ink); font-size: 15.5px; }
.j727-content ul,
.j727-content ol { padding-left: 1.5em; }
.j727-content li + li { margin-top: .3em; }
.j727-content a { color: #0f7fb0; text-decoration: underline; }
.j727-content a:hover { color: var(--blue-dark); }
.j727-content img { max-width: 100%; height: auto; }
.j727-content table { width: 100%; border-collapse: collapse; }
.j727-content th,
.j727-content td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.j727-content th { background: var(--blue-soft); }
.j727-content blockquote {
  padding: 12px 16px;
  color: var(--muted);
  background: var(--bg);
  border-left: 4px solid var(--line);
}

/* 本文内のボタンブロック（初期本文のCTAで使用） */
.j727-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.j727-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s;
}
.j727-content .wp-block-button__link:hover {
  color: #fff;
  background: var(--blue-dark);
}

.j727-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  font-weight: 800;
}
.j727-post-nav a { color: #168fbe; }
.j727-post-nav a:hover { text-decoration: underline; }
.j727-post-nav-next { text-align: right; }

.j727-back-home {
  display: inline-flex;
  margin-top: 8px;
  padding: 12px 22px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 800;
  transition: background .18s;
}
.j727-back-home:hover { color: #fff; background: var(--blue-dark); }

@media (max-width: 768px) {
  .j727-content-wrap { padding: 36px 16px; }
  .j727-article { padding: 22px 16px; }
}
