/* Home layout for 気まぐれお金相談室 */
.home .header-container {
  overflow: hidden;
}

.home .header-container-in,
.home .header-in {
  position: relative;
  isolation: isolate;
}

.home .header-container-in::before,
.home .header-container-in::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.home .header-container-in::before {
  top: 18%;
  left: 6%;
  width: 78px;
  height: 78px;
  background: rgba(245, 196, 57, .16);
  box-shadow: 34px 42px 0 -25px rgba(36, 95, 78, .14);
}

.home .header-container-in::after {
  right: 7%;
  bottom: 14%;
  width: 92px;
  height: 92px;
  background: rgba(126, 183, 158, .13);
}

.home .logo-text {
  position: relative;
  z-index: 2;
}

.kms-header-mascot {
  position: absolute;
  z-index: 3;
  right: max(22px, calc((100vw - 1260px) / 2));
  bottom: -34px;
  width: clamp(155px, 18vw, 255px);
  pointer-events: none;
  filter: drop-shadow(0 10px 10px rgba(35, 80, 62, .14));
}

.kms-header-mascot img {
  display: block;
  width: 100%;
  height: auto;
}

.kms-mascot-bubble {
  position: absolute;
  top: 4px;
  right: 78%;
  width: max-content;
  max-width: 190px;
  padding: 8px 12px;
  border: 1px solid #d9e8df;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #245f4e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(35, 80, 62, .1);
}

.kms-mascot-bubble::after {
  position: absolute;
  right: -8px;
  bottom: 6px;
  width: 14px;
  height: 14px;
  border-top: 1px solid #d9e8df;
  border-right: 1px solid #d9e8df;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.home #content-in {
  align-items: flex-start;
}

.home #main {
  background: transparent;
  padding: 0;
}

.kms-home-guide {
  position: relative;
  display: flex;
  min-height: 280px;
  align-items: center;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 30px 230px 30px 30px;
  border: 1px solid #eadfae;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffdf3 0%, #f3faf5 100%);
  box-shadow: 0 10px 28px rgba(35, 80, 62, .08);
}

.kms-home-guide::before {
  position: absolute;
  top: -65px;
  right: 95px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(240, 200, 75, .13);
  content: "";
}

.kms-guide-copy {
  position: relative;
  z-index: 2;
}

.kms-guide-label {
  display: inline-block;
  margin: 0 0 8px !important;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f0c84b;
  color: #51420b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.kms-home-guide h2 {
  margin: 0 0 12px;
  color: #1f4f41;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
}

.kms-home-guide .kms-guide-copy > p:not(.kms-guide-label) {
  margin: 0 0 8px;
  color: #53635d;
  font-size: 14px;
  line-height: 1.8;
}

.kms-guide-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 11px 17px;
  border-radius: 999px;
  background: #245f4e;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(36, 95, 78, .2);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.kms-guide-button:hover {
  transform: translateY(-2px);
  background: #174a3c;
  box-shadow: 0 9px 20px rgba(36, 95, 78, .25);
}

.kms-guide-mascot {
  position: absolute;
  right: 12px;
  bottom: -28px;
  z-index: 1;
  width: 225px;
  height: auto;
  filter: drop-shadow(0 9px 10px rgba(35, 80, 62, .12));
}

.kms-home-finder {
  margin: 0 0 28px;
  padding: 28px;
  border: 1px solid #dce9df;
  border-radius: 22px;
  background: linear-gradient(135deg, #f7fbf7 0%, #fffaf0 100%);
  box-shadow: 0 10px 28px rgba(35, 80, 62, 0.08);
}

.kms-finder-copy .kms-eyebrow {
  margin: 0 0 4px;
  color: #b67700;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.kms-finder-copy h2 {
  margin: 0 0 8px;
  color: #1f4f41;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
}

.kms-finder-copy p:last-child {
  margin: 0;
  color: #56645f;
  font-size: 15px;
  line-height: 1.75;
}

.kms-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.kms-category-card {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
  padding: 15px 14px;
  border: 1px solid #e2e7e3;
  border-radius: 14px;
  background: #fff;
  color: #2c3c36;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(35, 80, 62, 0.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.kms-category-card:hover {
  transform: translateY(-2px);
  border-color: #7eb79e;
  background: #fff;
  box-shadow: 0 8px 20px rgba(35, 80, 62, 0.11);
}

.kms-category-icon {
  flex: 0 0 auto;
  font-size: 25px;
}

.kms-category-card span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.kms-category-card strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kms-category-card small {
  margin-top: 3px;
  color: #75817d;
  font-size: 11px;
}

.kms-home-search {
  margin-top: 20px;
}

.kms-home-search label {
  display: block;
  margin-bottom: 7px;
  color: #3c514a;
  font-size: 13px;
  font-weight: 700;
}

.kms-home-search > div {
  display: flex;
  gap: 8px;
}

.kms-home-search input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #cfd9d3;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}

.kms-home-search button {
  flex: 0 0 auto;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #245f4e;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.kms-list-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.kms-list-heading span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0c84b;
  color: #4e400c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.kms-list-heading h2 {
  margin: 0;
  color: #234c40;
  font-size: 23px;
}

.home #list.ect-entry-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.home #list .entry-card-wrap {
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid #e4e8e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(40, 60, 52, 0.07);
  transition: transform .2s ease, box-shadow .2s ease;
}

.home #list .entry-card-wrap:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 11px 26px rgba(40, 60, 52, 0.13);
}

.home #list .entry-card {
  height: 100%;
}

.home #list .entry-card-thumb {
  float: none;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.home #list .entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.home #list .entry-card-wrap:hover .entry-card-thumb img {
  transform: scale(1.025);
}

.home #list .entry-card-content {
  display: flex;
  min-height: 176px;
  flex-direction: column;
  margin: 0;
  padding: 16px 17px 14px;
}

.home #list .entry-card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: #26342f;
  font-size: 17px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home #list .entry-card-snippet {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #65716d;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home #list .entry-card-meta {
  margin-top: auto;
  padding-top: 12px;
  color: #85908c;
  font-size: 11px;
}

.home #list .cat-label {
  top: 10px;
  left: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(36, 95, 78, .92);
  color: #fff;
  font-size: 11px;
}

.home .pagination {
  margin-top: 30px;
}

.home .pagination .page-numbers {
  border-radius: 9px;
}

.home .sidebar {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(40, 60, 52, 0.06);
}

.home .sidebar .kms-hide-home-widget {
  display: none !important;
}

.home .sidebar h2,
.home .sidebar h3 {
  border-radius: 8px;
  background: #f3f2bd;
  color: #7a5700;
  font-size: 17px;
}

.home .sidebar .wp-block-categories a {
  display: block;
  padding: 10px 8px;
  border-bottom: 1px solid #edf0ee;
}

@media screen and (max-width: 1023px) {
  .kms-category-grid {
    grid-template-columns: 1fr;
  }

  .home #list.ect-entry-card {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 834px) {
  .kms-header-mascot {
    right: -14px;
    bottom: -26px;
    width: 165px;
  }

  .kms-mascot-bubble {
    top: 10px;
    right: 70%;
    max-width: 150px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .home .logo-text {
    padding-right: 110px;
  }

  .home #main {
    width: 100%;
    margin: 0;
  }

  .kms-home-guide {
    min-height: 0;
    padding: 24px 155px 24px 20px;
  }

  .kms-guide-mascot {
    right: -8px;
    bottom: -16px;
    width: 165px;
  }

  .kms-home-finder {
    padding: 22px 18px;
    border-radius: 17px;
  }

  .kms-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home #list.ect-entry-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media screen and (max-width: 599px) {
  .kms-header-mascot {
    right: -20px;
    bottom: -18px;
    width: 118px;
  }

  .kms-mascot-bubble {
    display: none;
  }

  .home .logo-text {
    padding-right: 76px;
  }

  .home .header-container-in::before {
    left: -18px;
    width: 58px;
    height: 58px;
  }

  .home .header-container-in::after {
    right: 4px;
    bottom: 8px;
    width: 58px;
    height: 58px;
  }

  .kms-home-guide {
    display: block;
    margin-bottom: 20px;
    padding: 21px 16px 128px;
    border-radius: 17px;
  }

  .kms-home-guide h2 {
    font-size: 22px;
  }

  .kms-home-guide .kms-guide-copy > p:not(.kms-guide-label) {
    font-size: 13px;
    line-height: 1.75;
  }

  .kms-guide-button {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    font-size: 13px;
  }

  .kms-guide-mascot {
    right: 4px;
    bottom: -20px;
    width: 140px;
  }

  .kms-category-grid,
  .home #list.ect-entry-card {
    grid-template-columns: 1fr;
  }

  .kms-home-finder {
    margin-bottom: 22px;
    padding: 20px 15px;
  }

  .kms-home-search > div {
    align-items: stretch;
  }

  .kms-home-search button {
    padding: 0 17px;
  }

  .kms-list-heading h2 {
    font-size: 21px;
  }

  .home #list .entry-card-content {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kms-category-card,
  .kms-guide-button,
  .home #list .entry-card-wrap,
  .home #list .entry-card-thumb img {
    transition: none;
  }
}
