:root {
  --announcement-shadow-color: var(--wp--preset--color--announcement-shadow, rgba(30, 80, 162, 0.45));
  --calm-chip-color: var(--wp--preset--color--brand-primary);
  --calm-chip-bg: var(--wp--preset--color--chip-bg, rgba(30, 80, 162, 0.08));
  --site-header-announcement-offset: 0px;
}


label, .contact-form-text {
  color: var(--wp--preset--color--neutral-900);
  font-size: 0.8rem;
  font-weight: normal;
  margin-bottom: 0.75rem;
  text-align: left;
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--wp--preset--color--border);
  background-color: var(--wp--preset--color--surface-soft);
  color: var(--wp--preset--color--neutral-900);
  box-sizing: border-box;
  font-size: 1rem;
  font-weight: normal;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  height: auto;
  margin: 0;
}

input[type="submit"] {
  background-color: var(--wp--preset--color--brand-cta);
  color: var(--wp--preset--color--neutral-900);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

ul.is-style-unstyled {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 10; /* 必要に応じて */
}

.liquid-line-background {
    border: 1px solid var(--wp--preset--color--surface-blur) !important;
    backdrop-filter: blur(10px);
}

.custom-nav-cta, .custom-nav-cta > * {
    background-color: var(--wp--preset--color--brand-cta) !important;
    font-weight: 700;
    color: var(--wp--preset--color--neutral-900);
    border-radius: 0.5rem;
}

.custom-nav-cta:hover, .custom-nav-cta:hover > * {
    background-color: var(--wp--preset--color--brand-cta) !important;
    opacity: 0.8;
    font-weight: 700;
    color: var(--wp--preset--color--neutral-900);
    border-radius: 0.5rem;
}

/* フッターのtemplate-partブロック間余白を無効化 */
.wp-site-blocks > .wp-block-template-part[data-type="footer"] {
  margin-block-start: 0 !important;
}

.wp-site-blocks > main {
  margin-block-start: 0 !important;
}

/* より汎用的なフッターtemplate-part対応 */
.wp-site-blocks > .wp-block-template-part:last-child {
  margin-block-start: 0 !important;
}

.wp-block-navigation a {
    padding: 0.5rem 0.75rem;
}


.wp-block-navigation a:hover {
    background-color: var(--wp--preset--color--surface-soft);
    color: var(--wp--preset--color--brand-primary);
    text-decoration: none;
    border-radius: 0.5rem;
}

.announcement-bar {
  font-size: 1rem;
  font-weight: 600;
}

.announcement-bar__link,
.announcement-bar__text {
  display: inline-block;
}

.announcement-bar__link {
  color: inherit;
  text-decoration: none;
}

.announcement-bar p {
  padding: 0;
  margin: 0;
}

.announcement-bar a {
  color: inherit;
  text-decoration: none;
}

.announcement-bar--marquee {
  overflow: hidden;
  position: relative;
}

.announcement-bar--marquee .announcement-bar__marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.announcement-bar--marquee .announcement-bar__track {
  display: inline-block;
  padding-left: 100%;
  animation: announcement-bar-marquee var(--announcement-bar-marquee-duration, 12s) linear infinite;
}

.announcement-bar--marquee .announcement-bar__track > * {
  padding-inline: var(--wp--preset--spacing--lg);
}

.announcement-bar--marquee .announcement-bar__marquee::before,
.announcement-bar--marquee .announcement-bar__marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 2;
}

.announcement-bar--marquee .announcement-bar__marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--announcement-shadow-color, rgba(30, 80, 162, 0.45)), rgba(0, 0, 0, 0));
}

.announcement-bar--marquee .announcement-bar__marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--announcement-shadow-color, rgba(30, 80, 162, 0.45)), rgba(0, 0, 0, 0));
}

.cta-button-wrapper .wp-block-button {
  width: 100%;
}

@keyframes announcement-bar-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .announcement-bar--marquee .announcement-bar__track {
    animation: none;
    transform: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow-x: hidden;
  overflow: clip;
}

.site-header__inner {
  width: 100%;
  overflow-x: hidden;
  overflow: clip;
}

.site-header__toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 1001;
}

.site-header__toggle:hover,
.site-header__toggle:focus-visible {
  outline: none;
}

.site-header__toggle-line {
  display: block;
  width: 1.5rem;
  height: 3px;
  margin: 5px auto;
  background: var(--wp--preset--color--neutral-900);
  border-radius: 999px;
  transition: transform 0.2s ease;
}

body.is-site-menu-open .site-header__toggle-line:nth-of-type(1) {
  transform-origin: 50% 50%;
  margin: 0;
  transform: translateY(50%) rotate(45deg);
}

body.is-site-menu-open .site-header__toggle-line:nth-of-type(2) {
  transform-origin: 50% 50%;
  margin: 0;
  transform: translateY(-50%) rotate(-45deg);
}

.site-header__nav-container {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--wp--preset--spacing--sm);
  overflow-x: hidden;
  overflow: clip;
}

.site-header__menu .wp-block-navigation__responsive-container-open,
.site-header__menu .wp-block-navigation__responsive-container-close {
  display: none !important;
}

main .wp-block-button .wp-block-button__link:hover {
  opacity: 0.8;
}

.course-chip,
.post-chip,
.calm-pr-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--calm-chip-bg, rgba(30, 80, 162, 0.08));
  color: var(--calm-chip-color, var(--wp--preset--color--brand-primary));
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.course-filter {
  display: grid;
  gap: 16px;
}

.course-filter__fields {
  display: grid;
  gap: 12px;
}

.course-filter label span {
  display: block;
  font-size: 0.85rem;
  color: var(--wp--preset--color--neutral-600);
  margin-bottom: 4px;
  font-weight: 600;
}

.course-filter select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--surface);
}

.course-filter__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.course-filter__reset {
  color: var(--wp--preset--color--brand-primary);
  font-size: 0.9rem;
}

.course-features {
  margin: 0;
  margin-top: 16px;
  padding-left: 20px;
  color: var(--wp--preset--color--neutral-600);
  font-size: 0.95rem;
}

.course-meta-panel {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 20px;
  padding: 24px;
  background: var(--wp--preset--color--surface-soft);
  display: grid;
  gap: 16px;
}

.course-meta-panel__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.course-meta-panel__label {
  display: block;
  font-size: 0.8rem;
  color: var(--wp--preset--color--neutral-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-meta-panel__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wp--preset--color--neutral-900);
}

.course-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--wp--preset--spacing--sm);
}

.course-inline-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--calm-chip-bg, rgba(30, 80, 162, 0.08));
  color: var(--wp--preset--color--neutral-900);
  font-size: 0.9rem;
  font-weight: 600;
}

.course-inline-meta__label {
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--wp--preset--color--neutral-600);
  letter-spacing: 0.08em;
}

.course-inline-meta__item--badge {
  background: var(--wp--preset--color--brand-cta);
  color: var(--wp--preset--color--neutral-900);
}

.course-inline-meta__item--badge .course-inline-meta__label {
  color: var(--wp--preset--color--neutral-900);
}

.course-meta-panel__features .course-features {
  padding-left: 16px;
  margin-top: 8px;
}

.results-table table,
.results-table th,
.results-table td {
  color: var(--wp--preset--color--neutral-900) !important;
}

.results-table th {
  font-weight: 700;
}

.related-posts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-posts-grid__item {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  padding: 16px 20px;
  background: var(--wp--preset--color--surface);
  transition: box-shadow 0.2s ease;
}

.related-posts-grid__item:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.related-posts-grid__date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--wp--preset--color--neutral-600);
  margin-bottom: 4px;
}

.related-posts-grid__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.course-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.course-card:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.teacher-grid .wp-block-column {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-grid .wp-block-column:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.footer-map iframe {
  border-radius: 16px;
}

.cta-buttons-nowrap {
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.cta-buttons-nowrap .wp-block-button {
  width: 80%;
}

@media (max-width: 768px) {
  body.is-site-menu-open {
    overflow: hidden;
  }

  body.is-site-menu-open .site-header {
    position: fixed !important;
    inset: 0;
    z-index: 1002;
  }

  .site-header__toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .site-header__nav-container {
    position: fixed;
    height: 100vh;
    inset: 0;
    padding: calc(var(--site-header-announcement-offset, 0px) + var(--wp--preset--spacing--xl) + 1rem)
      var(--wp--preset--spacing--lg)
      calc(var(--wp--preset--spacing--xl) + 1rem)
      var(--wp--preset--spacing--lg);
    background: rgba(255, 255, 255, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--wp--preset--spacing--md);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
  }

  body.is-site-menu-open .site-header__nav-container {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-site-menu-open .site-header__inner {
    margin-top: var(--site-header-announcement-offset, 0px);
  }

  .site-header__nav-container.is-transition-disabled {
    transition: none !important;
  }

  .site-header__menu {
    width: 100%;
  }

  .site-header__menu .wp-block-navigation__responsive-container {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .site-header__menu .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wp--preset--spacing--md);
    margin: 0;
    padding: 0;
  }

  .site-header__menu .wp-block-navigation__container > li {
    text-align: center;
  }

  .site-header__menu a {
    display: inline-flex;
    width: 100%;
    font-size: 1.125rem;
    padding: 0.5rem 1rem;
  }
}

@media (min-width: 768px) {
  .course-filter {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .course-filter__fields {
    display: flex;
    gap: 16px;
  }

  .course-filter__fields label {
    flex: 1;
  }
}

.related-posts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-posts-grid__item {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  padding: 16px 20px;
  background: var(--wp--preset--color--surface);
  transition: box-shadow 0.2s ease;
}

.related-posts-grid__item:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.related-posts-grid__date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--wp--preset--color--neutral-600);
  margin-bottom: 4px;
}

.related-posts-grid__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.course-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.course-card:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.teacher-grid .wp-block-column {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-grid .wp-block-column:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.footer-map iframe {
  border-radius: 16px;
}

/* Footer Navigation - Mobile */
@media (max-width: 425px) {
  .footer-nav-wrapper {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .footer-nav ul {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }
  
  .footer-nav .wp-block-navigation__container {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .footer-nav .wp-block-navigation-item {
    width: 100%;
    text-align: center;
    justify-content: center !important;
  }
}

@media (min-width: 768px) {
  .course-filter {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .course-filter__fields {
    display: flex;
    gap: 16px;
  }

  .course-filter__fields label {
    flex: 1;
  }
}

.card-flex {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Home carousel (2枚構成時) */
.calm-home-carousel--single {
  max-width: 600px;
  margin: 0 auto;
  margin-top: var(--wp--preset--spacing--2-xl);
}

.calm-home-carousel--double .calm-home-carousel__double-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(16px, 4vw, 24px);
  max-width: 1200px;
  margin: 0 auto;
}

.calm-home-carousel--double .calm-home-carousel__double-item {
  display: flex;
}

.calm-home-carousel--single .calm-home-carousel__link,
.calm-home-carousel--double .calm-home-carousel__link {
  display: block;
  width: 100%;
}

.calm-home-carousel--single .calm-home-carousel__figure,
.calm-home-carousel--double .calm-home-carousel__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f0f4ff;
}

.calm-home-carousel--single .calm-home-carousel__figure img,
.calm-home-carousel--double .calm-home-carousel__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
