/* TOP本文専用。テーマ、Shakyo Blocks、Elementorの全体スタイルを上書きしない。 */
body.tanba-top-preview-page { overflow-x: clip; }
body.tanba-top-preview-page h1.entry-title { display: none; }
.tanba-top,
.tanba-top * { box-sizing: border-box; }
.tanba-top {
  --tanba-top-main: #8CBC57;
  --tanba-top-dark: #557B38;
  --tanba-top-ink: #343b33;
  --tanba-top-line: #82BB5B;
  --tanba-top-soft: #f1f8e9;
  --tanba-top-border: #a5cf88;
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--tanba-top-ink);
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  padding-bottom: 36px;
  line-height: 1.55;
  background: #fff;
}
.tanba-top :is(h2,p) { margin-top: 0; }
.tanba-top a { text-decoration: none; }
.tanba-top img { display: block; max-width: 100%; height: auto; }
.tanba-top__hero {
  width: 100%;
  background: #fff url("../images/ta-haikei.webp") center center / cover no-repeat;
  padding: clamp(100px, 8.4vw, 128px) 22px clamp(50px, 5vw, 76px);
}
.tanba-top__hero-inner {
  position: relative;
  width: min(1340px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .82fr);
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  margin: 0 auto;
}
.tanba-top__photo-wrap { min-width: 0; }
.tanba-top__carousel { position: relative; padding-bottom: 19px; }
.tanba-top__slides {
  position: relative;
  border: 5px solid #fff;
  border-radius: 21px;
  overflow: hidden;
  background: #e7f0dd;
  aspect-ratio: 4 / 3;
  box-shadow: 0 3px 14px rgba(36,76,42,.11);
}
.tanba-top__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.tanba-top__slide.is-active { opacity: 1; visibility: visible; }
.tanba-top__photo { width: 100%; height: 100% !important; object-fit: cover; }
.tanba-top__carousel-dots { position: absolute; bottom: -9px; inset-inline: 0; display: flex; justify-content: center; gap: 11px; }
.tanba-top__carousel-dot { width: 11px; height: 11px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: #bcbcbc; cursor: pointer; transition: background .2s, transform .2s; }
.tanba-top__carousel-dot.is-active { background: var(--tanba-top-dark); transform: scale(1.08); }
.tanba-top__carousel-dot:focus-visible { outline: 3px solid #2571aa; outline-offset: 3px; }
.tanba-top__hero-copy { display: flex; flex-direction: column; gap: clamp(15px, 3vw, 36px); align-items: center; justify-content: center; min-width: 0; }
.tanba-top .tanba-top__hero-message { max-width: min(100%, 370px); width: 100%; object-fit: contain; }
.tanba-top .tanba-top__hero-town { max-width: min(100%, 390px); width: 100%; object-fit: contain; }
.tanba-top__main { width: min(1340px, calc(100% - 48px)); margin: 24px auto 0; }
.tanba-top__panel { border-radius: 24px; background: var(--tanba-top-soft); padding: 12px clamp(16px, 2.3vw, 30px) 28px; }
.tanba-top__section-heading { display: flex; gap: 18px; align-items: center; justify-content: center; color: #fff; margin: -27px auto 25px; font-size: clamp(19px,2vw,27px); font-weight: 750; line-height: 1.35; text-align: center; }
.tanba-top__section-heading::before,.tanba-top__section-heading::after { content: ''; height: 2px; width: clamp(30px,11vw,145px); background: var(--tanba-top-line); flex: 0 1 145px; }
.tanba-top__section-heading span { display: inline-block; flex: 0 0 auto; padding: 9px 33px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #7fbf4c 0%, #5c9b34 100%); box-shadow: 0 2px 3px rgba(48,104,43,.08); }
.tanba-top__fields { margin-top: 52px; }
.tanba-top__buttons { display: grid; align-items: center; justify-items: stretch; }
.tanba-top__buttons--three { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(810px,100%); gap: 13px; margin: 0 auto 17px; }
.tanba-top__buttons--four { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(980px, 100%); margin: 0 auto; gap: 13px; }
.tanba-top__button { display: block; min-width: 0; border-radius: 6px; background: #fff; transition: transform .16s, box-shadow .16s; }
.tanba-top__button img { width: 100%; height: auto; object-fit: contain; }
.tanba-top__button:hover,.tanba-top__button:focus-visible { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(29,92,45,.13); }
.tanba-top__button:focus-visible { outline: 3px solid #2771ab; outline-offset: 3px; }
.tanba-top__lower { display: grid; grid-template-columns: minmax(0, 7fr) minmax(284px, 3fr); width: min(1200px, calc(100vw - 40px)); margin: 48px auto 0; gap: 28px; align-items: stretch; }
.tanba-top__news { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; }
.tanba-top__news-empty { font-size: 15px; padding: 24px 5px; }
.tanba-top__purposes { min-width: 0; }
.tanba-top__section-heading--compact { font-size: clamp(18px,1.55vw,23px); margin: 7px auto 18px; gap: 8px; }
.tanba-top__section-heading--compact::before,.tanba-top__section-heading--compact::after { flex-basis: 54px; width: 54px; }
.tanba-top__section-heading--compact span { padding: 8px 15px; }
.tanba-top__buttons--vertical { grid-template-columns: 1fr; gap: 12px; width: 100%; max-width: 285px; margin: 0 auto; }
@media (max-width: 1024px) {
  .tanba-top__hero-inner { gap: 25px; }
  .tanba-top__hero { padding-block: 105px 62px; }
  .tanba-top__main { width: min(1340px, calc(100% - 32px)); }
}
@media (max-width: 767px) {
  .tanba-top { padding-bottom: 22px; }
  .tanba-top__hero { padding: 28px 16px 40px; background-size: auto 100%; }
  .tanba-top__hero-inner { grid-template-columns: minmax(0,1fr); gap: 25px; max-width: 580px; }
  .tanba-top__carousel { padding-bottom: 15px; }
  .tanba-top__slides { border-width: 3px; border-radius: 15px; }
  .tanba-top__hero-copy { gap: 14px; }
  .tanba-top .tanba-top__hero-message { width: 40%; }
  .tanba-top .tanba-top__hero-town { width: 88%; }
  .tanba-top__main { margin-top: 8px; width: min(640px, calc(100% - 24px)); }
  .tanba-top__fields { margin-top: 16px; }
  .tanba-top__panel { border-radius: 16px; padding: 11px 10px 20px; }
  .tanba-top__section-heading { font-size: 19px; gap: 8px; margin-top: -30px; margin-bottom: 16px; }
  .tanba-top__section-heading::before,.tanba-top__section-heading::after { flex: 1 1 auto; width: 15px; }
  .tanba-top__section-heading span { padding: 8px 22px; }
  .tanba-top__buttons--three, .tanba-top__buttons--four { grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 10px; margin-bottom: 10px; }
  .tanba-top__buttons--three .tanba-top__button:first-child { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
  .tanba-top__lower { width: 100%; margin-top: 33px; grid-template-columns: minmax(0,1fr); gap: 28px; }
  .tanba-top__purposes { order: -1; }
  .tanba-top__buttons--vertical { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 100%; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
 .tanba-top__slide, .tanba-top__button, .tanba-top__carousel-dot { transition-duration: 0.01ms !important; }
}

/* Scoped adjustments for Elementor's theme button rules. */
.tanba-top .tanba-top__carousel-dot,
.tanba-top .tanba-top__carousel-dot:hover,
.tanba-top .tanba-top__carousel-dot:focus {
  appearance: none; -webkit-appearance: none;
  display: block; flex: 0 0 11px; width: 11px; height: 11px;
  min-width: 11px; min-height: 11px; max-width: 11px; max-height: 11px;
  padding: 0; margin: 0; border: none; border-radius: 50%;
  background: #c5c5c5; box-shadow: none; font-size: 0; line-height: 0;
}
.tanba-top .tanba-top__carousel-dot.is-active,
.tanba-top .tanba-top__carousel-dot.is-active:hover { background: var(--tanba-top-dark); }
.tanba-top__hero-signature {
  position: absolute; right: 0; bottom: -40px; width: min(38%, 515px); z-index: 2;
}
.tanba-top__signature-image { display: block; width: 100%; height: auto; }
/* Shared Shakyo News owns the list, categories, pins and publication schedule. */
.tanba-top__news .shakyo-news { max-width: 100%; min-width: 0; }
/* TOP test page only: move existing Elementor header over the hero background. */
body.tanba-top-preview-page header.elementor-location-header {
  position: absolute; top: 0; left: 0; right: 0; width: 100%; z-index: 20;
  background: transparent !important;
}
body.tanba-top-preview-page header.elementor-location-header > .e-con {
  background-color: transparent !important;
  background-image: none !important;
}
body.tanba-top-preview-page header.elementor-location-header .elementor-shape {
  display: none !important;
}
/* Avoid styling the entire site's Elementor headers. */
@media (max-width: 767px) {
  body.tanba-top-preview-page header.elementor-location-header { position: absolute; }
  .tanba-top__hero { padding-top: 104px; }
  .tanba-top__hero-signature { position: static; width: min(72%, 300px); margin: 4px auto -12px; grid-column: 1; }
  .tanba-top__hero-inner { gap: 12px; }
  .tanba-top__carousel-dots { bottom: -11px; }
  .tanba-top .tanba-top__hero-message { max-width: 190px; }
}

/* Narita Top Layout 0.2.15: 7:3, 28px gap, tablet 274px/16px.
   The TOP already spans the viewport, so center breakout relative to its main. */
@media (min-width: 1200px) {
  .tanba-top__lower { margin-inline: calc((100% - min(1200px, calc(100vw - 40px))) / 2); }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .tanba-top__lower { width: calc(100vw - 40px); margin-inline: calc(50% - 50vw + 20px); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .tanba-top__lower { width: calc(100vw - 24px); margin-inline: calc(50% - 50vw + 12px); grid-template-columns: minmax(0,1fr) 274px; gap: 16px; }
}
/* Reuse Shakyo News 1.1.1 Narita card geometry; only local palette overrides.
   No global variables, no category color overrides (managed by Shakyo News). */
.tanba-top__lower {
  --ntn-site-blue: #557B38;
  --ntn-deep-blue: #3F5C30;
  --ntn-border: #B4D18E;
  --ntn-card-bg: rgba(255,255,255,.95);
}
.tanba-top__lower .ntn-card,
.tanba-top__lower .tanba-top__purposes.narita-card-frame {
  min-width: 0;
  border: 1px solid #B4D18E;
  box-shadow: 0 12px 32px rgba(76,114,58,.12);
  color: #343B33;
}
/* Right frame uses the same Narita card radius and white background;
   match the Facebook frame padding, with purpose content in place of iframe. */
.tanba-top__lower .tanba-top__purposes.narita-card-frame {
  height: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
@media (min-width: 768px) and (max-width: 1024px) {
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding: 6px; }
}
@media (max-width: 767px) {
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding: 18px 16px 16px; }
  .tanba-top__lower .tanba-top__section-heading--compact { margin: 0 auto 16px; }
}
.tanba-top__lower .ntn-heading h2 { color: #3F5C30; }
.tanba-top__lower .ntn-heading-icon { color: #557B38; }
.tanba-top__lower .ntn-card .ntn-archive-link { border-color: #8CBC57; color: #3F5C30; }
.tanba-top__lower .ntn-card .ntn-archive-link:is(:hover,:focus-visible) { background: #EFF6E8; color: #3F5C30; border-color: #557B38; box-shadow: 0 0 0 2px #D8E9C8; }
.tanba-top__lower .ntn-tabs { border-bottom-color: #B4D18E; }
.tanba-top__lower .ntn-tab[data-category="all"] { color: #557B38; border-color: #8CBC57; }
.tanba-top__lower .ntn-tab[data-category="all"].is-active { background: #EFF6E8; color: #3F5C30; border-color: #8CBC57; box-shadow: 0 4px 10px rgba(76,114,58,.10); }
.tanba-top__lower .ntn-tab[data-category="all"]:is(:hover,:focus-visible) { background: #E2EFD6; color: #3F5C30; border-color: #557B38; box-shadow: 0 6px 14px rgba(76,114,58,.14); }
.tanba-top__lower .ntn-row { border-bottom-color: #C7DBB4; color: #343B33; }
.tanba-top__lower .ntn-row:is(:hover,:focus-visible) { background: #F1F8E9; }
.tanba-top__lower .ntn-date { color: #4F5D47; }
.tanba-top__lower .ntn-post-title { color: #343B33; }
.tanba-top__lower .ntn-row-arrow { color: #557B38; }
.tanba-top__lower .ntn-row:is(:hover,:focus-visible) .ntn-row-arrow { color: #3F5C30; }
.tanba-top__lower .ntn-empty,.tanba-top__lower .ntn-page-ellipsis { color: #65765D; }
.tanba-top__lower .ntn-page-link { background: #EFF6E8; color: #3F5C30; }
.tanba-top__lower .ntn-page-link:is(:hover,:focus-visible) { background: #D8E9C8; color: #3F5C30; }
.tanba-top__lower .ntn-page-link.is-current { background: #557B38; color: #fff; }
.tanba-top__lower .ntn-loading span { background: #8CBC57; }
/* Shared SVG arrows must not inherit the theme's generic image sizing. */
.tanba-top__lower .ntn-card a { text-decoration: none !important; }

/* 1.0.5: match the Narita desktop visual-height reference (682px)
   to the Tanba hero itself, not the distance to the news section. */
@media (min-width: 768px) {
  .tanba-top__hero { min-height: 682px; padding: 100px 22px 90px; display: flex; align-items: center; }
  .tanba-top__hero-inner { width: min(1120px, 100%); grid-template-columns: minmax(0, 1.32fr) minmax(0, .82fr); gap: clamp(24px, 3vw, 44px); }
  .tanba-top__photo-wrap { width: 100%; max-width: 600px; justify-self: center; }
  .tanba-top__hero-copy { gap: 28px; }
  .tanba-top .tanba-top__hero-message { max-width: min(100%, 370px); }
  .tanba-top .tanba-top__hero-town { max-width: min(100%, 390px); }
  .tanba-top__hero-signature { bottom: -40px; width: min(38%, 420px); }
  .tanba-top__main { width: min(1200px, calc(100% - 40px)); margin-top: 0; --tanba-nav-width: min(235.25px, calc((100vw - 40px - 2 * clamp(16px, 2.3vw, 30px) - 39px) / 4)); }
  .tanba-top__fields { margin-top: 8px; padding-block: 8px 10px; }
  .tanba-top__fields .tanba-top__section-heading { font-size: 23px; margin: 0 auto 8px; }
  .tanba-top__fields .tanba-top__section-heading span { padding: 6px 28px; }
  .tanba-top__lower { width: 100%; margin: 12px auto 0; }
  /* Both field rows and the purpose buttons share the same desktop button width. */
  .tanba-top__buttons--three { width: min(calc(3 * var(--tanba-nav-width) + 26px), 100%); margin-bottom: 10px; }
  .tanba-top__buttons--vertical { max-width: var(--tanba-nav-width); gap: 10px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .tanba-top__hero { min-height: auto; padding: 92px 22px 72px; }
  .tanba-top__main { width: calc(100% - 24px); --tanba-nav-width: min(235.25px, calc((100vw - 24px - 2 * clamp(16px, 2.3vw, 30px) - 39px) / 4)); }
}
/* Narita's archive pill, locally reinforced against theme/Elementor link styles. */
.tanba-top .tanba-top__lower .ntn-card .ntn-heading { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.tanba-top .tanba-top__lower .ntn-card .ntn-heading h2 { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.tanba-top .tanba-top__lower .ntn-card a.ntn-archive-link {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
  flex: 0 0 auto; margin-left: auto; padding: 7px 10px;
  border: 1px solid #8CBC57 !important; border-radius: 999px !important;
  background: #fff; color: #3F5C30; text-decoration: none !important;
  font-size: .84rem; font-weight: 700; line-height: 1.25;
  white-space: nowrap !important; word-break: normal; overflow-wrap: normal;
}
.tanba-top .tanba-top__lower .ntn-card a.ntn-archive-link:is(:hover,:focus-visible) { background: #EFF6E8; border-color: #557B38 !important; }
.tanba-top .tanba-top__lower .ntn-card a.ntn-archive-link span { font-size: 1.25em; line-height: 1; }
@media (max-width: 767px) {
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding-inline: 9px; }
  .tanba-top__buttons--vertical { gap: 10px; }
  .tanba-top .tanba-top__lower .ntn-card .ntn-heading { gap: 9px; }
  .tanba-top .tanba-top__lower .ntn-card a.ntn-archive-link { padding: 6px 9px; font-size: .82rem; }
}

/* 1.0.6: space around and inside the two navigation panels only.
   Keep the hero, shared card widths, button aspect ratios and column ratio. */
@media (min-width: 768px) {
  .tanba-top__main {
    --tanba-field-pad: clamp(24px, 3.2vw, 44px);
    --tanba-nav-width: min(235.25px, calc((100vw - 40px - 2 * var(--tanba-field-pad) - 39px) / 4));
  }
  .tanba-top__fields { margin-top: 32px; padding: 24px var(--tanba-field-pad) 26px; }
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding: 26px 28px 24px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .tanba-top__main { --tanba-nav-width: min(235.25px, calc((100vw - 24px - 2 * var(--tanba-field-pad) - 39px) / 4)); }
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding-inline: 22px; }
}
@media (max-width: 767px) {
  .tanba-top__main { margin-top: 0; }
  .tanba-top__fields { margin-top: 36px; padding: 22px 18px 26px; }
  .tanba-top__lower .tanba-top__purposes.narita-card-frame { padding: 26px 17px 24px; }
}


/* Utility navigation: independent from saved page content. */
.tanba-utility-nav { display:grid; gap:10px; width:100%; min-width:0; }
.tanba-utility-nav a.tanba-utility-link { box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:48px; padding:10px 14px; border:1px solid #8CBC57; border-radius:10px; background:#fff; color:#3F5C30; font-size:16px; font-weight:700; line-height:1.5; text-decoration:none; overflow-wrap:anywhere; }
.tanba-utility-nav a.tanba-utility-link:is(:hover,:focus-visible) { background:#EFF6E8; color:#3F5C30; border-color:#557B38; text-decoration:none; }
.tanba-utility-nav a.tanba-utility-link:focus-visible { outline:2px solid #557B38; outline-offset:2px; }
.tanba-utility-link > span:last-child { flex:none; font-size:22px; line-height:1; }

.tanba-top__right { display:flex; flex-direction:column; gap:14px; min-width:0; }
@media(max-width:767px) { .tanba-top__right { order:-1; } }
