/* =========================
   style.css (hilowish) — cleaned
   ========================= */

/* Reset / Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Hiragino Kaku Gothic Pro", "Yu Gothic", "Segoe UI", system-ui, sans-serif;
  color: #123456;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #123456;
  color: #fff;
  border-radius: 4px;
  z-index: 9999;
}

/* =========================
   Header
   ========================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 900;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
}

.logo-img {
  height: 24px;
  width: auto;
}

.gnav-list {
  list-style: none;
  display: flex;
  gap: 14px;
}

.gnav-list a {
  color: #123456;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* Hamburger */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #123456;
  border-radius: 2px;
}

/* Drawer */
.site-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 1000;
}

.site-drawer[aria-hidden="false"] {
  display: block;
}

.drawer-inner {
  width: min(320px, 85%);
  height: 100%;
  background: #fff;
  padding: 16px;
  box-shadow: 2px 0 14px rgba(0, 0, 0, 0.12);
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 28px;
  padding: 2px;
}

/* =========================
   Main
   ========================= */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  min-width: 0;
}

main,
#main,
.site-main {
  padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px));
}

/* =========================
   Hero
   ========================= */
.hero {
  padding: 28px 0 18px;
  background: #fbfbfb;
}

.hero-logo img {
  width: 120px;
  height: auto;
}

.hero-inner {
  text-align: center;
  padding: 20px;
  display: block;
}

.hero-main-logo {
  margin-bottom: 30px;
}

.hero-title {
  font-family: 'Klee One', cursive;
  font-weight: bold;
  font-size: 2.5rem;
  margin: 40px auto;
  text-align: center;
}

.hero-title .hero-line {
  display: inline;
  white-space: nowrap;
}

.hero-lead {
  font-family: 'Klee One', cursive;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
  color: #3b4752;
  text-align: left;
}

.hero-copy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  border: 10px solid #f2de41;
  border-radius: 10px;
  padding: 20px;
}

.hero-small-logo {
  text-align: center;
  flex-basis: 30%;
}

.chihiro-wrapper {
  position: relative;
  display: inline-block;
}

.chihiro-image {
  display: block;
  margin: auto;
}

.overlay-image {
  position: absolute;
  right: 10px;
  bottom: -10px;
  width: 25px;
  height: 10px;
  object-fit: contain;
  z-index: 1;
}


.hero-lead {
  flex-basis: 70%;
}

@media (max-width:768px) {
  .hero-inner {
    padding: 4px;
  }

  .hero-copy-row {
    border: none;
    outline: 5px solid #f2de41;
    padding: 16px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .hero-lead {
    flex-basis: auto;
    text-align: justify;
  }

  .hero-small-logo {
    flex-basis: auto;
    text-align: center;
  }

  .hero-title .hero-line {
    display: block;
    font-size: 1.8rem;
  }
}

/* =========================
   News / Programs
   ========================= */

.news {
  max-width: 780px;
  margin: 0 auto;
  /* ← ページ中央に配置 */
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

.section-title {
  font-size: 1.4em;
  font-weight: bold;
  color: #123456;
  margin-bottom: 20px;
  text-align: center;
}

.bordered-text {
  border-bottom: 2px solid #f2de41;
  padding: 0.2em 0;
}

@media (max-width:768px) {
  .section-title {
    font-size: 1.4em;
  }
}

.upcoming-item {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 12px;
  border: 1px solid #f0f0f0;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.upcoming-meta {
  width: 120px;
  text-align: left;
  color: #6b6b6b;
}

.upcoming-body {
  flex: 1;
  text-align: left;
}

.upcoming-body *,
.upcoming-title,
.upcoming-lead,
.upcoming-item details summary,
.upcoming-item a.btn-link {
  text-align: left !important;
}

.upcoming-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
  width: fit-content;
  /* ← ここがポイント！ */
}

.old-title {
  margin: 10px 1em;
}

ul {
  list-style-position: inside;
}

.past-list {
  margin-top: 20px;
}

.past-list li {
  padding-left: 20px;
  margin-bottom: 8px;
}

@media (max-width:768px) {
  .news-date {
    font-size: 10px;
  }

  .inner {
    margin-top: 24px;
    padding: 0 8px;
  }
}

/* =========================
   Footer（固定表示）
   ========================= */
footer.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-top: 1px solid #e9e9e9;
  padding-bottom: 0;
  /* padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px)); */
}

footer.site-footer>.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px;
  box-sizing: border-box;
}

footer.site-footer small {
  line-height: 1.6;
  white-space: nowrap;
  text-align: center;
}

footer.site-footer nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

footer.site-footer nav a {
  text-decoration: none;
  color: #123456;
  white-space: nowrap;
  line-height: 1.6;
}

@media (max-width:768px) {
  footer.site-footer>.wrap {
    flex-direction: column;
    align-items: center;
    justify-content: center !important;
    gap: 0px;
  }

  footer.site-footer nav {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  footer.site-footer nav::-webkit-scrollbar {
    display: none;
  }

  footer.site-footer nav {
    scrollbar-width: none;
  }
}

/* =========================
   Utilities / Others
   ========================= */
.external-link-button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #0b8;
  background: #0b87c6;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(11, 135, 198, .3);
  transition: background-color .3s, box-shadow .3s, opacity .3s;
}

.external-link-button:hover {
  opacity: 0.95;
}

/* 笛アイコン類（命名のtypoを統一：whistle） */
.whistle-area {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  max-width: 600px;
  margin: 40px auto 0;
  box-sizing: border-box;

}

.whistle {
  display: block;
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.whistle-02 {
  width: 200px;
}

@media (max-width:880px) {
  .gnav-list {
    display: none;
  }

  .hamburger {
    display: inline-block;
  }

  .whistle-area {
    gap: 5px;
    padding: 0 5px;
  }

  .whistle-02 {
    width: 90px;
  }
}

@media (max-width:360px) {
  .programs-grid {
    grid-template-columns: 1fr;
  }

  .program-thumb {
    height: 160px;
  }
}

/* === Program Feed (水平カルーセル) === */
.program-feed {
  margin: 24px 0;
}

.feed-viewport {
  position: relative;
  overflow: hidden;
  padding: 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-viewport::-webkit-scrollbar {
  height: 6px;
}

.feed-viewport::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

/* 両端をうっすらフェードして“まだある感”を出す */
.feed-viewport::before,
.feed-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 1;
}

.feed-viewport::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
}

.feed-viewport::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
}

.feed-track {
  display: flex;
  gap: 12px;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
}

@media (prefers-reduced-motion: reduce) {
  .feed-track {
    scroll-behavior: auto;
  }
}

.feed-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.feed-card .media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feed-card .body {
  padding: 10px 12px;
}

.feed-card .title {
  font-weight: 700;
  line-height: 1.4;
  color: #123456;
  font-size: 14px;
}

.feed-card .meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b6b6b;
  display: flex;
  gap: 8px;
  align-items: center;
}

.feed-card .badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f4f4f4;
}

.badge {
  color: #ff03f2;
  background-color: #f5f50594;
}

/* === Banners === */
.program-banners {
  margin: 24px 0;
}

.program-banners .banner-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.program-banners .banner-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.program-banners .banner-list.no-snap {
  scroll-snap-type: none;
}

.program-banners .banner-card {
  flex: 0 0 auto;
  width: clamp(240px, 80vw, 300px);
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  scroll-snap-align: center;
}

.program-banners .banner-card img {
  display: block;
  width: 100%;
  height: auto;
}

.banner-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 0;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c9cfd6;
  border: none;
  cursor: pointer;
}

.banner-dot.is-active {
  background: #123456;
}

.back-to-top {
  width: 60px;
  height: 60px;
  padding: 0;
  display: none;
  position: fixed;
  bottom: 72px;
  right: 20px;
  background-color: #333;
  border-radius: 50%;
  z-index: 999;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.back-to-top img {
  width: 100%;
  height: auto;
  display: block;
}

.back-to-top:hover {
  opacity: 0.8;
}

@media screen and (max-width: 767px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 64px;
    right: 15px;
  }
}

/* ===== Endless Slider ===== */
.slider {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  --gap: 12px;
  /* スライド間隔 */
  --visible: 3;
  /* 同時表示枚数（PC） */
  --duration: 45s;
  /* 1周の時間（短いほど速い） */
}

.slider__track {
  display: flex;
  gap: var(--gap);
  will-change: transform;
  animation: none;
  /* 幅が確定してから開始 */
  backface-visibility: hidden;
}

.slide {
  /* (コンテナ幅 - ギャップ合計) / 枚数 */
  flex: 0 0 calc((100% - (var(--gap) * (var(--visible) - 1))) / var(--visible));
}

.slider__track.is-ready {
  animation: marquee var(--duration) linear infinite;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-1 * var(--loop, 0px)), 0, 0);
  }
}

/* レスポンシブ */
@media (max-width: 900px) {
  .slider {
    --visible: 2;
  }
}

@media (max-width: 560px) {
  .slider {
    --visible: 1;
  }

  .banner-card img {
    width: 80%;
    margin: 0 auto;
  }
}