/* ============================================
   Components
   ============================================ */

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  color: var(--color-primary-dark);
  line-height: var(--line-height-tight);
}

.header__logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ヘッダーロゴラップ（Gakkenロゴ＋雑誌ロゴ） */
.header__logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__gakken-link {
  display: inline-block;
  line-height: 1;
}

.header__gakken-logo {
  height: 12px;
  width: auto;
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.header__gakken-logo:hover {
  opacity: 1;
}

/* テキストロゴ */
.header__logo-sub {
  font-size: 0.85rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  letter-spacing: 0.1em;
  font-family: "Zen Maru Gothic", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", sans-serif;
}

.header__logo-main {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  letter-spacing: 0.02em;
  font-family: "Zen Maru Gothic", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", sans-serif;
}

@media (min-width: 768px) {
  .header__logo-img {
    height: 50px;
  }

  .header__logo-sub {
    font-size: 0.85rem;
  }

  .header__logo-main {
    font-size: 1.5rem;
  }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__cta {
  display: none;
}

@media (min-width: 768px) {
  .header__inner {
    height: 72px;
  }

  .header__logo {
    font-size: var(--font-size-base);
  }

  .header__cta {
    display: inline-flex;
  }
}

/* Hamburger button */
.hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius-md);
}

.hamburger:hover {
  background-color: var(--color-bg-light);
}

.hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* Desktop nav */
.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
  }

  .nav-desktop__link {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
  }

  .nav-desktop__link:hover,
  .nav-desktop__link.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    opacity: 1;
  }
}

/* Mobile nav overlay */
.nav-mobile {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: var(--z-overlay);
  padding: var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile__link {
  display: block;
  padding: var(--space-md) 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
}

.nav-mobile__link:hover {
  color: var(--color-primary);
  opacity: 1;
}

.nav-mobile__cta {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .nav-mobile {
    display: none;
  }
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(180deg, #fef6da 0%, #fef3ce 100%);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.hero__cover {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  flex-shrink: 0;
}

/* 背景装飾：書影の後ろにグラデーション円 */
.hero__cover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 156, 18, 0.10) 0%, rgba(255, 213, 79, 0.08) 60%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}

.hero__cover-img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  background-color: var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.hero__cover:hover .hero__cover-img {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

/* ---- Slider (subcover swipe) ---- */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.slider__track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.slider__slide {
  flex: 0 0 100%;
  min-width: 0;
}

.slider__slide img {
  width: 100%;
  display: block;
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0 var(--space-md);
}

/* コントロールエリア（← ドット →） */
.slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) 0 0;
}

.slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.slider__dot:hover {
  background: var(--color-text-muted);
}

.slider__dot.is-active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* 矢印ナビゲーションボタン */
.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  z-index: 2;
}

.slider__arrow:hover {
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.slider__arrow--prev {
  left: -18px;
}

.slider__arrow--next {
  right: -18px;
}

.hero__badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #ff6b6b, var(--color-accent));
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(230, 81, 0, 0.3);
  z-index: 2;

  letter-spacing: 0.05em;
}

@keyframes badge-pulse {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  50% {
    transform: translateX(-50%) scale(1.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

.hero__content {
  text-align: center;
}

.hero__label {
  display: inline-block;
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: var(--font-size-xl);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #3d2e1e;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-sm);
}

.hero__feature-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  font-family: "Noto Sans JP", sans-serif;
  color: var(--color-primary-dark);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
}

.hero__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-loose);
  margin-bottom: var(--space-lg);
}

.hero__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3xl);
  }

  .hero__cover {
    max-width: 400px;
  }

  .hero__content {
    text-align: left;
  }

  .hero__title {
    font-size: var(--font-size-2xl);
  }

  .hero__feature-title {
    font-size: var(--font-size-xl);
  }

  .hero__description {
    font-size: var(--font-size-base);
  }

  .hero__cta {
    flex-direction: row;
  }
}

/* ---- Feature Compact List (特集内容) ---- */
.feature-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: #fff;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-compact__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  padding: var(--space-xs) 0;
}

.feature-compact__label {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-sm);
  line-height: 1.4;
  white-space: nowrap;
}

.feature-compact__label--primary {
  background-color: var(--color-primary-bg);
  color: var(--color-primary-dark);
}

.feature-compact__label--accent {
  background-color: var(--color-accent-bg);
  color: var(--color-accent);
}

.feature-compact__text {
  font-weight: var(--font-weight-medium);
}

.feature-compact__author {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

/* ---- Recruit Banner (募集系) ---- */
.recruit-section {
  background: linear-gradient(135deg, var(--color-recruit-bg) 0%, #e8eaf6 100%);
}

.recruit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .recruit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.recruit-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-recruit);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.recruit-card__icon {
  width: 40px;
  height: 40px;
  background: var(--color-recruit-bg);
  color: var(--color-recruit);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.recruit-card__body {
  flex: 1;
  min-width: 0;
}

.recruit-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-recruit);
  margin-bottom: 2px;
}

.recruit-card__desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

.recruit-card__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-recruit);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.recruit-card__link::after {
  content: "\2192";
}

/* ---- Book Card ---- */
.book-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.book-card__img-wrap {
  position: relative;
  padding: var(--space-lg);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rank badge for bestseller cards */
.book-card__rank {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  border-radius: 50%;
  background: var(--color-ranking);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.book-card__img {
  width: 180px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.book-card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card__tag {
  margin-bottom: var(--space-sm);
}

.book-card__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-base);
  margin-bottom: var(--space-sm);
}

.book-card__desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
  margin-bottom: var(--space-md);
  flex: 1;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card__footer {
  margin-top: auto;
}

/* ---- Seminar Card ---- */
.seminar-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  border: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  transition: box-shadow var(--transition-fast);
}

.seminar-card:hover {
  box-shadow: var(--shadow-sm);
}

.seminar-card__date {
  flex-shrink: 0;
  text-align: center;
  background: var(--color-seminar-bg);
  color: var(--color-seminar);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  line-height: 1;
}

.seminar-card__date-month {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  display: block;
  margin-bottom: 2px;
}

.seminar-card__date-day {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  display: block;
}

.seminar-card__body {
  flex: 1;
  min-width: 0;
}

.seminar-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
}

.seminar-card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ---- Best Seller List ---- */
.bestseller-list {
  counter-reset: rank;
}

.bestseller-item {
  counter-increment: rank;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.bestseller-item:last-child {
  border-bottom: none;
}

.bestseller-item__rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  border-radius: 50%;
  background: var(--color-bg-light);
  color: var(--color-text-secondary);
}

.bestseller-item:nth-child(1) .bestseller-item__rank,
.bestseller-item:nth-child(2) .bestseller-item__rank,
.bestseller-item:nth-child(3) .bestseller-item__rank {
  background: var(--color-ranking);
  color: #fff;
}

.bestseller-item__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  flex: 1;
  min-width: 0;
}

.bestseller-item__author {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ---- CTA Banner (中間) ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: var(--space-2xl) 0;
}

.cta-banner__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

.cta-banner__desc {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-base);
}

.cta-banner .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
}

.cta-banner .btn--primary:hover {
  background: var(--color-primary-bg);
}

/* ---- News List ---- */
.news-item {
  display: flex;
  gap: var(--space-md);
  align-items: baseline;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item__date {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  min-width: 5.5em;
}

.news-item__title {
  font-size: var(--font-size-sm);
}

/* ---- Links Section ---- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .links-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .links-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  text-align: center;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.link-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
  opacity: 1;
}

.link-card__icon {
  font-size: var(--font-size-xl);
}

.link-card__icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.link-card__label {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

/* ハイライト定期購読カード */
.link-card--highlight {
  position: relative;
  background: linear-gradient(135deg, #fff0f5, #ffe0ec);
  border: 2px solid #e05090;
  box-shadow: 0 2px 12px rgba(224, 80, 144, 0.15);
}

.link-card--highlight:hover {
  border-color: #c03870;
  box-shadow: 0 4px 16px rgba(224, 80, 144, 0.25);
  transform: translateY(-2px);
}

.link-card--highlight .link-card__label {
  color: #c03870;
  font-weight: var(--font-weight-bold);
}

.link-card__badge {
  position: absolute;
  top: -10px;
  right: -6px;
  background: linear-gradient(135deg, #e84040, #cc2020);
  color: #fff;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(232, 64, 64, 0.3);
  line-height: 1.4;
}


/* ---- Footer ---- */
.footer {
  background-color: #fff;
  color: #555;
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid #e0e0e0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.footer__brand {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: #333;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: #777;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: #333;
  opacity: 1;
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  color: #777;
  font-size: var(--font-size-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.footer__social-link:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #333;
  opacity: 1;
}

/* フッターSNSアイコン画像 */
.footer__social-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer__bottom {
  border-top: 1px solid #e0d8cc;
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--font-size-xs);
  color: #999;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ---- Sticky CTA Bar (mobile) ---- */
.sticky-cta {
  display: none;
}

.sticky-cta .btn {
  flex: 1;
  font-size: var(--font-size-sm);
  min-height: 44px;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* ---- Page Header (sub pages) ---- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-bg) 0%, var(--color-bg-warm) 100%);
  padding: var(--space-xl) 0 var(--space-2xl);
}

.page-header__breadcrumb {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.page-header__title {
  margin-bottom: var(--space-sm);
}

.page-header__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* ---- Event Card (seminar page) ---- */
.event-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.event-card__header {
  padding: var(--space-md) var(--space-lg);
}

.event-card__header-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* タグが横幅いっぱいに伸びないようにする */
.event-card__tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.event-card__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.event-card__date {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-seminar);
}

/* チラ見せ：閉じた状態では高さ制限 */
.event-card__body {
  position: relative;
  max-height: 80px;
  overflow: hidden;
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  transition: max-height 0.3s ease;
}

/* 白いグラデーションでフェードアウト */
.event-card__body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(transparent, white);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 開いた状態 */
.event-card.is-open .event-card__body {
  max-height: 1000px;
}

.event-card.is-open .event-card__body::after {
  opacity: 0;
}

/* トグルボタン */
.event-card__toggle {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  border-top: 1px solid var(--color-border-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  text-align: center;
}

.event-card__meta-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.event-card__meta-item {
  display: flex;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.event-card__meta-item dt {
  flex-shrink: 0;
  width: 4.5em;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
}

.event-card__meta-item dd {
  flex: 1;
  min-width: 0;
}

.event-card__actions {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
}

@media (max-width: 639px) {
  .event-card__meta-item {
    flex-direction: column;
    gap: 2px;
  }

  .event-card__meta-item dt {
    width: auto;
    font-size: var(--font-size-xs);
  }
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  cursor: zoom-out;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  width: auto;
  height: auto;
  min-width: min(500px, 85vw);
  min-height: min(650px, 80vh);
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform var(--transition-base);
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background var(--transition-fast);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Make slider images zoomable */
.slider__slide img {
  cursor: zoom-in;
}

/* body padding-bottom は sticky-cta 表示時のみ必要
   sticky-cta が display:none のため、デフォルトでは padding なし */

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* ---- Serial List (連載目次 開閉式) ---- */
.serial-section {
  margin-top: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.serial-section__header {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  background: var(--color-primary-bg);
  border-bottom: 1px solid var(--color-border-light);
}

/* チラ見せ：閉じた状態では高さ制限 */
.serial-section__body {
  position: relative;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* グラデーションでフェードアウト（背景色に合わせる） */
.serial-section__body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, #ffffff);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 開いた状態 */
.serial-section.is-open .serial-section__body {
  max-height: 2000px;
}

.serial-section.is-open .serial-section__body::after {
  opacity: 0;
}

.serial-section__toggle {
  display: block;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  background: var(--color-primary-bg);
  border: none;
  border-top: 1px solid var(--color-border-light);
  cursor: pointer;
  text-align: center;
}

.serial-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.serial-list__item {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.serial-list__item:last-child {
  border-bottom: none;
}

.serial-list__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: var(--line-height-base);
}

.serial-list__entry {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.serial-list__author {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

/* ---- Next Issue Bar (次号予告) ---- */
.next-issue-bar {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #fdf8ee, #fef5e2);
  border: 2px dashed var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.next-issue-bar__icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.next-issue-bar__text {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

/* ---- Newbook Detail (新刊詳細ページ用) ---- */
.newbook-detail {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border-light);
  align-items: flex-start;
}

.newbook-detail:last-of-type {
  border-bottom: none;
}

.newbook-detail__img-wrap {
  flex-shrink: 0;
  width: 180px;
}

.newbook-detail__img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.newbook-detail__body {
  flex: 1;
  min-width: 0;
}

.newbook-detail__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
}

.newbook-detail__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-loose);
  margin-bottom: var(--space-lg);
}

/* 書籍ページ用ボタン（オレンジ角丸） */
.btn--book {
  display: inline-block;
  padding: 10px 28px;
  background-color: #e08e0b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease;
}

.btn--book:hover {
  background-color: #c57d0a;
}

@media (max-width: 639px) {
  .newbook-detail {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .newbook-detail__img-wrap {
    width: 200px;
  }
}

/* ---- Footer Gakken Logo ---- */
.footer__gakken-logo {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.footer__gakken-logo-img {
  height: 30px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer__gakken-logo-img:hover {
  opacity: 1;
}

/* ---- Grid 4 columns ---- */
.grid--4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- Button accent variant (バックナンバー等) ---- */
.btn--accent {
  background: linear-gradient(180deg, #e55281, #c04060);
  color: #fff;
  border: none;
}

.btn--accent:hover {
  background: linear-gradient(180deg, #c04060, #a03050);
  opacity: 1;
}

/* ---- カートアイコン（CTAボタン内のPNG画像） ---- */
.btn-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  position: relative;
  top: -2px;
}

/* ---- Brand CTA Buttons (ブランド別CTAボタン) ---- */
/* CTAバー：購入ボタン群のレイアウト */
.cta-buy-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.cta-buy-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.cta-buy-bar__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.cta-buy-bar__btn--shop {
  background: linear-gradient(180deg, #f5a623, #e08e0b);
}

.cta-buy-bar__btn--shop:hover {
  background: linear-gradient(180deg, #e09510, #cc8000);
}

.cta-buy-bar__btn--amazon {
  background: linear-gradient(180deg, #ffad33, #e89600);
}

.cta-buy-bar__btn--amazon:hover {
  background: linear-gradient(180deg, #e89600, #cc8000);
}

.cta-buy-bar__btn--subscribe {
  background: linear-gradient(180deg, #e8508a, #d13d75);
}

.cta-buy-bar__btn--subscribe:hover {
  background: linear-gradient(180deg, #d13d75, #b82f63);
}

/* キャンペーンバッジ（ボタン上に浮かぶ） */
.cta-badge-wrap {
  position: relative;
  display: inline-flex;
}

.cta-badge-wrap__label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #cc0000;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 12px;
  border: 1.5px solid #cc0000;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1;
  letter-spacing: 0.03em;
  animation: badge-pulse 2.5s ease-in-out infinite;
}

.cta-buy-bar__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}

/* スマホ：幅を揃えて中央寄せ */
@media (max-width: 639px) {
  .cta-buy-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .cta-buy-bar__btn {
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.95rem;
    width: 260px;
    max-width: 80%;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .cta-badge-wrap {
    width: 260px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .cta-badge-wrap__label {
    position: static;
    transform: none;
    margin-bottom: -6px;
    z-index: 1;
    align-self: center;
    animation: badge-pulse-mobile 2.5s ease-in-out infinite;
  }

  .cta-badge-wrap .cta-buy-bar__btn {
    width: auto;
    max-width: none;
  }
}

@keyframes badge-pulse-mobile {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

/* レガシー互換（他の場所でまだ使われている場合） */
/* ショップ学研＋ ・ Amazon = 統一オレンジ */
.btn--cta-orange {
  background: linear-gradient(180deg, #ff9900, #e08800);
  color: #fff;
  border: none;
  font-weight: var(--font-weight-bold);
}

.btn--cta-orange:hover {
  background: linear-gradient(180deg, #e08800, #cc7700);
  opacity: 1;
}

/* バックナンバー個別のAmazonリンクボタン（小型） */
.btn--amazon-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #ff9900, #e08800);
  color: #fff;
  font-size: 0.8rem;
  font-weight: var(--font-weight-bold);
  padding: 0.4em 1em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  margin-top: var(--space-sm);
  border: none;
}
.btn--amazon-sm:hover {
  background: linear-gradient(180deg, #e08800, #cc7700);
  transform: translateY(-1px);
  color: #fff;
}
.btn--amazon-sm:visited {
  color: #fff;
}

/* バックナンバー年別Amazon検索ボタン（アウトライン） */
.btn--amazon-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #e08800;
  font-size: 0.8rem;
  font-weight: var(--font-weight-bold);
  padding: 0.4em 1em;
  border-radius: var(--radius-sm);
  border: 2px solid #e08800;
  text-decoration: none;
  transition: background 0.2s, color 0.15s, transform 0.15s;
  margin-top: var(--space-sm);
}
.btn--amazon-outline:hover {
  background: #e08800;
  color: #fff;
  transform: translateY(-1px);
}
.btn--amazon-outline:visited {
  color: #e08800;
}
.btn--amazon-outline:visited:hover {
  color: #fff;
}

/* 選べる！購読方法 = ピンク */
.btn--subscribe {
  background: linear-gradient(180deg, #e05090, #c03870);
  color: #fff;
  border: none;
  font-weight: var(--font-weight-bold);
}

.btn--subscribe:hover {
  background: linear-gradient(180deg, #c03870, #a02860);
  opacity: 1;
}

/* ---- X (Twitter) タイムライン埋め込み ---- */
.x-timeline-wrap {
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ---- バナーセクション（フッター上部） ---- */
.banner-section {
  padding: var(--space-lg) 0;
}

.banner-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.banner-link {
  display: inline-block;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  opacity: 0.85;
}

.banner-link:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.banner-img {
  width: 140px;
  height: auto;
  border-radius: var(--radius-sm);
}