.home-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 118px;
  background:
    radial-gradient(circle at 8% 14%, rgba(22, 135, 217, 0.09) 0 120px, transparent 121px),
    linear-gradient(180deg, #f7fbfe 0%, #eef7fb 100%);
}

.home-hero::after {
  position: absolute;
  right: -130px;
  bottom: -310px;
  width: 520px;
  height: 520px;
  border: 90px solid rgba(120, 168, 145, 0.10);
  border-radius: 50%;
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  align-items: center;
  gap: 50px;
}

.hero-copy h1 {
  margin-bottom: 22px;
}

.hero-title-line {
  display: inline-block;
}

@media (min-width: 901px) {
  .hero-grid {
    grid-template-columns: 0.96fr 1.04fr;
    gap: 44px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 3.9vw, 56px);
  }

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

.hero-copy h1 em {
  position: relative;
  color: var(--blue-dark);
  font-style: normal;
}

.hero-copy h1 em::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 7px;
  border-radius: 99px;
  background: rgba(243, 201, 105, 0.68);
  content: "";
  transform: rotate(-1deg);
}

.hero-copy p {
  max-width: 500px;
  margin-bottom: 30px;
  color: #526b7e;
  font-size: 16px;
  line-height: 2;
}

.hero-facts {
  display: flex;
  gap: 24px;
}

.hero-fact {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #526b7e;
  font-size: 12px;
  font-weight: 700;
}

.hero-fact b {
  color: var(--blue-dark);
  font-size: 19px;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border: 10px solid #fff;
  border-radius: 34px 34px 90px 34px;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1.72;
  object-fit: cover;
  object-position: right center;
}

.hero-floating {
  position: absolute;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 14px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.hero-floating i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px var(--sage-pale);
}

.search-dock {
  position: relative;
  z-index: 5;
  margin-top: -62px;
}

.search-panel {
  padding: 24px 28px 28px;
  border: 1px solid #e4edf3;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.search-tab {
  padding: 8px 16px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-tab.active {
  background: var(--blue-pale);
  color: var(--blue-dark);
}

.main-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-input {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 13px;
  padding: 0 20px;
  border: 2px solid #c9dfea;
  border-radius: 15px;
}

.search-input span {
  color: var(--blue);
  font-size: 25px;
}

.search-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-input input::placeholder {
  color: #8a9aa6;
  opacity: 1;
}

.search-input p {
  margin: 0;
  color: #8a9aa6;
  font-size: 15px;
}

.main-search .btn {
  min-width: 160px;
  min-height: 62px;
}

.search-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.search-hint b {
  margin-right: 8px;
  color: #526b7e;
}

.recent-libraries-section {
  padding-bottom: 68px;
}

.recent-library-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.recent-library-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.recent-library-card:hover {
  border-color: #b9d5e6;
  box-shadow: 0 12px 30px rgba(23, 50, 77, .11);
  transform: translateY(-3px);
}

.recent-library-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: #eef4f7;
}

.recent-library-photo img {
  width: 100%;
  aspect-ratio: 1.46;
  object-fit: cover;
  transition: transform .35s ease;
}

.recent-library-card:hover .recent-library-photo img {
  transform: scale(1.025);
}

.recent-library-date {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 3px 12px rgba(23, 50, 77, .14);
  color: var(--blue-dark);
  font-size: 9px;
  font-weight: 800;
}

.recent-library-body {
  display: flex;
  min-height: 210px;
  flex: 1;
  flex-direction: column;
  padding: 17px 17px 16px;
}

.recent-library-body h3 {
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.55;
}

.recent-library-body h3 a:hover {
  color: var(--blue-dark);
}

.recent-library-body p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.recent-library-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 0 13px;
  border-radius: 11px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.recent-library-link:hover {
  background: #d9effc;
}

.search-methods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.method-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.method-card::after {
  position: absolute;
  right: -20px;
  bottom: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--blue-pale);
  content: "";
}

.method-card:nth-child(2)::after {
  background: var(--sage-pale);
}

.method-card:nth-child(3)::after {
  background: #fff1e7;
}

.method-card:nth-child(4)::after {
  background: #f3f0fa;
}

.method-card:nth-child(5)::after {
  background: #fff5cf;
}

.method-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 15px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
}

.method-card:nth-child(2) .method-icon {
  background: var(--sage-pale);
  color: #4c7f68;
}

.method-card:nth-child(3) .method-icon {
  background: #fff1e7;
  color: #b36a37;
}

.method-card:nth-child(4) .method-icon {
  background: #f3f0fa;
  color: #6d5c96;
}

.method-card:nth-child(5) .method-icon {
  background: #fff5cf;
  color: #8b6a17;
}

.method-card h3 {
  margin-bottom: 6px;
}

.method-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.method-arrow {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 19px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 900;
}

.region-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.35fr;
  gap: 36px;
}

.japan-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,255,255,.86) 0 55px, transparent 56px),
    var(--blue-pale);
}

.japan-card::before {
  position: absolute;
  top: 62px;
  right: 88px;
  width: 190px;
  height: 300px;
  border: 28px solid var(--blue);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 47% 46% 58% 34%;
  content: "";
  opacity: .9;
  transform: rotate(29deg);
  display: none;
}

.japan-card::after {
  position: absolute;
  right: 57px;
  bottom: 44px;
  width: 76px;
  height: 30px;
  border-bottom: 18px solid var(--sage);
  border-radius: 50%;
  content: "";
  transform: rotate(-16deg);
  display: none;
}

.japan-card > img {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 92%;
  height: 78%;
  object-fit: contain;
}

.map-note {
  position: absolute;
  z-index: 2;
  top: 30px;
  left: 30px;
  width: 190px;
}

.map-note h3 {
  margin-bottom: 7px;
  font-size: 23px;
}

.map-note p {
  color: var(--muted);
  font-size: 12px;
}

.map-badge {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 76px;
  height: 36px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 99px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}

.map-badge.kanto {
  right: 50px;
  bottom: 104px;
}

.map-badge.kansai {
  right: 170px;
  bottom: 65px;
}

.map-badge.hokkaido {
  top: 52px;
  right: 40px;
}

.region-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.region-block {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.region-block h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
}

.region-block h3 span {
  color: var(--blue);
  font-size: 12px;
}

.pref-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  color: #526b7e;
  font-size: 12px;
}

.feature-search {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.feature-chip {
  position: relative;
  display: grid;
  min-height: 112px;
  place-items: center;
  padding: 18px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.feature-chip:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-pale);
  box-shadow: 0 0 0 3px rgba(22, 135, 217, 0.10);
}

.feature-chip input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.feature-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 9px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-weight: 900;
}

.feature-chip:nth-child(even) .feature-symbol {
  background: var(--sage-pale);
  color: #4c7f68;
}

.feature-chip span:last-child {
  color: #415c71;
  font-size: 12px;
  font-weight: 800;
}

.feature-chip span:last-child small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.discover-form {
  max-width: 1040px;
  margin: 0 auto;
}

.discover-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.discover-toolbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.discover-match-mode {
  display: flex;
  gap: 9px;
}

.discover-match-mode label {
  cursor: pointer;
}

.discover-match-mode input {
  position: absolute;
  opacity: 0;
}

.discover-match-mode label > span {
  display: grid;
  min-width: 150px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.discover-match-mode input:checked + span {
  border-color: var(--blue);
  background: var(--blue-pale);
  box-shadow: 0 0 0 3px rgba(22, 135, 217, .1);
}

.discover-match-mode b {
  color: var(--ink);
  font-size: 12px;
}

.discover-match-mode small {
  color: var(--muted);
  font-size: 10px;
}

.discover-group {
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.discover-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.discover-group-heading h2 {
  margin: 0;
  font-size: 20px;
}

.discover-group-heading > span {
  color: var(--muted);
  font-size: 11px;
}

.discover-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.discover-feature {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #dce6ec;
  border-radius: 15px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.discover-feature:hover {
  transform: translateY(-1px);
  border-color: #a9cce4;
}

.discover-feature:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-pale);
  box-shadow: 0 0 0 3px rgba(22, 135, 217, .09);
}

.discover-feature.is-empty {
  cursor: not-allowed;
  opacity: .5;
}

.discover-feature input {
  position: absolute;
  opacity: 0;
}

.discover-feature .feature-symbol {
  width: 38px;
  height: 38px;
  margin: 0;
  font-size: 11px;
}

.discover-feature-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.discover-feature-copy b {
  color: var(--ink);
  font-size: 14px;
}

.discover-feature-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.discover-feature-count {
  padding: 4px 8px;
  border-radius: 99px;
  background: #f2f6f8;
  color: #61798c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.discover-submit-bar {
  position: sticky;
  z-index: 5;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid #c7dce8;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(23, 50, 77, .16);
  backdrop-filter: blur(10px);
}

.discover-submit-bar p {
  margin: 0;
  font-size: 13px;
}

.discover-submit-bar p b {
  margin-right: 3px;
  color: var(--blue-dark);
  font-size: 22px;
}

.discover-data-note {
  max-width: 1040px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 700px) {
  .discover-toolbar,
  .discover-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .discover-match-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .discover-match-mode label > span {
    min-width: 0;
  }

  .discover-group {
    padding: 20px;
  }

  .discover-feature-grid {
    grid-template-columns: 1fr;
  }

  .discover-submit-bar .btn {
    width: 100%;
  }
}

.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.article-visual {
  position: relative;
  display: grid;
  overflow: hidden;
  height: 160px;
  place-items: center;
  background: var(--blue-pale);
}

.article-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.article-card:hover .article-visual img {
  transform: scale(1.035);
}

.article-card:nth-child(2) .article-visual {
  background: #fff1e7;
}

.article-card:nth-child(3) .article-visual {
  background: var(--sage-pale);
}

.article-book {
  position: relative;
  width: 118px;
  height: 76px;
  border-radius: 6px 18px 18px 6px;
  background: var(--blue);
  box-shadow: 12px 12px 0 rgba(23,50,77,.12);
  transform: rotate(-7deg);
}

.article-book::before {
  position: absolute;
  top: 11px;
  right: 9px;
  bottom: 11px;
  left: 15px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 3px 13px 13px 3px;
  content: "";
}

.article-card:nth-child(2) .article-book {
  background: var(--coral);
  transform: rotate(6deg);
}

.article-card:nth-child(3) .article-book {
  background: var(--sage);
  transform: rotate(-2deg);
}

.article-body {
  padding: 20px 21px 23px;
}

.article-meta {
  margin-bottom: 7px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.article-body h2,
.article-body h3 {
  margin-bottom: 7px;
}

.article-body h2 {
  font-size: 18px;
  line-height: 1.55;
}

.article-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .hero-grid,
  .region-layout {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding-top: 42px;
  }

  .hero-copy {
    max-width: 690px;
  }

  .search-methods {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .feature-search {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .home-hero {
    padding: 38px 0 96px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-copy h1 {
    margin-bottom: 15px;
    font-size: 37px;
  }

  .hero-copy p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
  }

  .hero-facts {
    gap: 13px;
  }

  .hero-fact {
    display: block;
  }

  .hero-fact b {
    display: block;
    font-size: 17px;
  }

  .hero-visual {
    border-width: 6px;
    border-radius: 23px 23px 55px 23px;
  }

  .hero-visual img {
    aspect-ratio: 1.38;
    object-position: right center;
  }

  .hero-floating {
    right: 12px;
    bottom: 12px;
  }

  .search-dock {
    margin-top: -52px;
  }

  .search-panel {
    padding: 17px;
    border-radius: 19px;
  }

  .search-tabs {
    overflow: hidden;
  }

  .search-tab {
    flex: 1 0 auto;
    padding: 7px 10px;
    text-align: center;
  }

  .main-search {
    grid-template-columns: 1fr;
  }

  .search-input {
    min-height: 55px;
  }

  .main-search .btn {
    min-height: 52px;
  }

  .recent-libraries-section {
    padding-bottom: 58px;
  }

  .recent-libraries-section .section-head {
    margin-bottom: 22px;
  }

  .recent-library-grid {
    display: flex;
    width: auto;
    margin-right: -24px;
    padding: 0 24px 18px 0;
    overflow-x: auto;
    gap: 13px;
    overscroll-behavior-inline: contain;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .recent-library-card {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: start;
  }

  .recent-library-body {
    min-height: 190px;
  }

  .search-methods {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .method-card {
    min-height: 165px;
    padding: 17px;
  }

  .method-icon {
    margin-bottom: 12px;
  }

  .region-layout {
    gap: 20px;
  }

  .japan-card {
    min-height: 320px;
  }

  .japan-card::before {
    top: 75px;
    right: 45px;
    width: 135px;
    height: 205px;
    border-width: 22px;
  }

  .map-note {
    top: 24px;
    left: 22px;
  }

  .map-note h3 {
    font-size: 19px;
  }

  .map-badge.hokkaido {
    top: 60px;
    right: 24px;
  }

  .map-badge.kanto {
    right: 26px;
    bottom: 70px;
  }

  .map-badge.kansai {
    right: 120px;
    bottom: 42px;
  }

  .region-list {
    grid-template-columns: 1fr;
  }

  .feature-search {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles {
    grid-template-columns: 1fr;
  }
}
