.home-main {
  min-height: calc(100vh - 150px);
  padding: 24px 0 40px;
  overflow: visible;
}

.home-layout {
  display: grid;
  width: min(100% - 20px, 1120px);
  gap: 26px;
}

.home-panel {
  max-width: 100%;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.home-section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #1e6a45;
  font-weight: 800;
}

.latest-update-copy h1,
.channel-panel h2 {
  margin: 0;
  color: #111827;
}

.latest-update-heading {
  grid-column: 1 / -1;
  padding: 6px 12px 0;
}

.latest-update-heading p,
.latest-update-copy p,
.channel-panel p {
  margin: 10px 0 0;
  color: #374151;
  line-height: 1.7;
}

.latest-update-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.home-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  color: #7a8595;
  background: #eef2f6;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
}

.latest-update-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  min-height: 0;
  background: transparent;
}

.latest-update-media img {
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.latest-update-copy {
  /* Adjust line limits, box widths, inner spacing, and gaps here. */
  --latest-title-lines: 2;
  --latest-excerpt-lines: 2;
  --latest-title-width: 100%;
  --latest-excerpt-width: 88%;
  --latest-box-padding: 4px 8px;
  --latest-copy-gap: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--latest-copy-gap);
  min-width: 0;
  min-height: 150px;
  padding: 12px;
  text-align: center;
}

.latest-update-title-box,
.latest-update-excerpt-box {
  box-sizing: border-box;
  align-self: center;
  flex-shrink: 0;
  max-width: 100%;
  padding: var(--latest-box-padding);
}

.latest-update-title-box {
  width: var(--latest-title-width);
}

.latest-update-excerpt-box {
  width: var(--latest-excerpt-width);
}

.latest-update-copy h1,
.latest-update-copy h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.latest-update-copy h1 {
  -webkit-line-clamp: var(--latest-title-lines);
  padding-block: 4px;
  font-size: clamp(1.1rem, 4.5vw, 2.8rem);
  line-height: 1.3;
}

.latest-update-copy h3 {
  -webkit-line-clamp: var(--latest-excerpt-lines);
  margin: 0;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  line-height: 1.45;
}

.latest-update-link {
  align-self: center;
  margin-top: auto;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgb(216, 62, 35);
  text-decoration: none;
}

.home-carousel {
  position: relative;
  display: grid;
  gap: 10px;
  width: calc(100% + 20px);
  margin-left: -10px;
  min-height: 0;
  padding: 20px 0 4px;
  border: 0;
  touch-action: pan-y;
  background: white;
}

.carousel-viewport {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel-track.is-no-transition {
  transition: none;
}

.carousel-card {
  flex: 0 0 45%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.carousel-card img {
  object-fit: cover;
}

.carousel-arrow {
  position: absolute;
  top: calc(50% - 12px);
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
}

.carousel-arrow::before {
  content: "";
  width: clamp(45px, 12vw, 50px);
  height: clamp(45px, 12vw, 50px);
  background: url("https://line-pttgroup.com/wp-content/uploads/2026/08/Arrow-Right.png")
    center / contain no-repeat;
}

.carousel-arrow:hover,
.carousel-arrow:focus,
.carousel-arrow:active,
.carousel-arrow:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: none;
  transform: translateY(-50%);
}

.carousel-arrow:first-of-type {
  left: 14px;
}

.carousel-arrow:first-of-type::before {
  transform: scaleX(-1);
}

.carousel-arrow:last-of-type {
  right: 14px;
}

.carousel-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
}

.carousel-dot {
  display: grid;
  place-items: center;
  width: 10px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-dot[hidden] {
  display: none;
}

.carousel-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #98a2b3;
}

.carousel-dot.is-active::before {
  background: var(--ptt-blue);
}

.home-feature-banner {
  display: block;
  width: 100%;
  padding: 0;
  background: #4a8ac6;
}

.tarot-banner {
  overflow: hidden;
  max-width: 100%;
  aspect-ratio: 16 / 7;
  background: url("https://line-pttgroup.com/wp-content/uploads/2026/09/tarotgodji.jpg")
    center / cover no-repeat;
}

.channel-panel {
  min-height: 120px;
  padding: 8px 0 0;
  color: #fff;
  background: transparent;
  text-align: center;
}

.channel-panel h2,
.channel-panel p {
  color: inherit;
}

.channel-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.channel-grid {
  display: grid;
  width: min(100%, 560px);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.channel-link {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
}

.channel-link img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 48px;
  object-fit: contain;
}

.channel-link:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc((100% - 10px) / 2);
  justify-self: center;
}

@media (min-width: 601px) and (max-width: 1024px) {
  .latest-update-panel {
    grid-template-columns: 1fr 1fr;
    min-height: 360px;
  }

  .latest-update-copy {
    min-height: 280px;
  }

  .home-carousel .carousel-card {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (min-width: 1025px) {
  .home-main {
    padding: 48px 0 70px;
  }

  .latest-update-panel {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    min-height: 360px;
  }

  .latest-update-copy {
    min-height: 320px;
  }

  .home-carousel {
    padding: 12px 0 4px;
  }

  .home-carousel .carousel-card {
    flex-basis: calc((100% - 28px) / 3);
  }
}
