:root {
  --navy: #102957;
  --blue: #3978e8;
  --blue-soft: #eaf4ff;
  --pink: #f25a96;
  --pink-dark: #d83f7b;
  --pink-soft: #fff0f6;
  --yellow: #ffd75c;
  --text: #17243d;
  --muted: #667085;
  --line: #dce6f3;
  --surface: #ffffff;
  --page: #f7fbff;
  --radius-card: 20px;
  --shadow-card: 0 12px 32px rgba(36, 77, 135, 0.11);
  --shadow-hover: 0 18px 42px rgba(36, 77, 135, 0.17);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220,230,243,.9);
}
.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 58px);
}
.brand { flex: 0 1 auto; display: inline-flex; align-items: center; min-height: 48px; }
.brand-logo { display: block; width: 210px; height: auto; max-width: none; aspect-ratio: 376 / 116; object-fit: contain; }
.nav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: clamp(18px, 2.4vw, 34px); font-weight: 750; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-size: clamp(.82rem, 1vw, .94rem);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 12px; background: var(--blue-soft); }
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after { display: block; width: 22px; height: 2px; margin: auto; position: relative; background: var(--navy); border-radius: 2px; }
.menu-btn span::before,
.menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
.mobile-nav { display: none; padding: 10px 16px 18px; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav.open { display: grid; gap: 8px; }
.mobile-nav a { min-height: 44px; padding: 10px 14px; display: flex; align-items: center; border-radius: 12px; color: var(--navy); background: #f3f7fc; font-size: .86rem; font-weight: 750; }
.mobile-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }

.search-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(52px, 6vw, 82px) 0 clamp(40px, 5vw, 68px);
  background:
    radial-gradient(circle at 8% 20%, rgba(242,90,150,.18), transparent 23%),
    radial-gradient(circle at 91% 16%, rgba(57,120,232,.17), transparent 24%),
    linear-gradient(140deg, #fff 0%, #f2f8ff 52%, #fff8fb 100%);
  border-bottom: 1px solid var(--line);
}
.search-hero::before,
.search-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.search-hero::before { width: 180px; height: 180px; right: 8%; bottom: -105px; background: rgba(255,215,92,.32); }
.search-hero::after { width: 76px; height: 76px; right: 3%; top: 27%; border: 18px solid rgba(242,90,150,.12); }
.search-hero__inner { position: relative; z-index: 1; }
.search-hero__copy { max-width: 820px; }
.section-kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 10px; color: var(--pink-dark); font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.section-kicker span { color: var(--yellow); font-size: 1.05rem; }
.section-kicker--small { margin-bottom: 3px; color: var(--blue); font-size: .7rem; }
.search-hero h1 { margin: 0; color: var(--navy); font-size: clamp(2.25rem, 4.7vw, 4.4rem); line-height: 1.14; letter-spacing: -.055em; }
.search-hero h1 span { color: var(--pink); }
.search-hero__copy > p:last-child { margin: 18px 0 0; color: var(--muted); font-size: clamp(.96rem, 1.4vw, 1.08rem); }

.search-panel {
  margin-top: clamp(28px, 4vw, 42px);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(210px, 280px) auto;
  gap: 14px;
  align-items: end;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(196,216,240,.92);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(36,77,135,.13);
  backdrop-filter: blur(12px);
}
.search-field { min-width: 0; display: grid; gap: 7px; }
.search-field label { color: #455a74; font-size: .76rem; font-weight: 850; }
.search-input-wrap { position: relative; }
.search-input-wrap svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: #6d87a9; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-field input,
.search-field select { width: 100%; min-height: 52px; border: 1px solid #cbd9ea; border-radius: 14px; color: var(--text); background: #fff; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.search-field input { padding: 0 16px 0 47px; }
.search-field select { padding: 0 43px 0 15px; }
.search-field input::placeholder { color: #98a6ba; }
.search-field input:focus,
.search-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(57,120,232,.13); }
.search-actions { display: grid; grid-template-columns: 132px 110px; gap: 10px; }
.button { min-height: 52px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; font-weight: 850; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:focus-visible { outline: 3px solid rgba(57,120,232,.28); outline-offset: 3px; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--pink), #ee6aad); box-shadow: 0 10px 22px rgba(242,90,150,.25); }
.button--primary:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(242,90,150,.32); }
.button--secondary { color: var(--blue); background: #fff; border: 1px solid #a8c6ee; }
.button--secondary:hover { background: var(--blue-soft); }
.category-shortcuts { grid-column: 1 / -1; min-width: 0; padding-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid #e4edf7; }
.category-shortcuts > span { margin-right: 3px; color: #6f8097; font-size: .74rem; font-weight: 850; }
.category-shortcuts a { min-height: 44px; padding: 7px 13px; display: inline-flex; align-items: center; color: #315783; background: #f7faff; border: 1px solid #d7e5f5; border-radius: 999px; font-size: .76rem; font-weight: 800; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.category-shortcuts a:hover,
.category-shortcuts a:focus-visible,
.category-shortcuts a.is-active { color: #fff; background: var(--blue); border-color: var(--blue); }

.results-section { padding: clamp(42px, 5vw, 68px) 0 82px; }
.results-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.results-header h2 { margin: 0; color: var(--navy); font-size: clamp(1.65rem, 2.6vw, 2.25rem); letter-spacing: -.04em; }
.result-count { margin: 0; display: flex; align-items: baseline; gap: 7px; color: var(--muted); }
.result-count strong { color: var(--pink); font-size: clamp(1.85rem, 3vw, 2.6rem); line-height: 1; }
.result-count span { font-size: .88rem; font-weight: 750; }
.active-conditions { min-height: 42px; padding: 14px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.condition-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 12px; color: var(--blue); background: var(--blue-soft); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.loading-state { padding: 56px 12px; color: var(--muted); text-align: center; }
.challenge-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.challenge-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.challenge-card:hover { transform: translateY(-4px); border-color: #bdd2ec; box-shadow: var(--shadow-hover); }
.challenge-card__visual { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #dceeff; }
.challenge-card__visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .35s ease; }
.challenge-card:hover .challenge-card__visual img { transform: scale(1.025); }
.challenge-card__category { position: absolute; left: 14px; bottom: 14px; min-height: 30px; padding: 4px 12px; display: inline-flex; align-items: center; color: #fff; background: rgba(16,41,87,.88); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; backdrop-filter: blur(7px); font-size: .75rem; font-weight: 850; }
.challenge-card__content { flex: 1; min-width: 0; padding: 20px 20px 18px; display: flex; flex-direction: column; }
.challenge-card__id { margin: 0 0 7px; color: #8a9aaf; font-size: .7rem; font-weight: 800; letter-spacing: .07em; }
.challenge-card__title { margin: 0; min-height: calc(1.45em * 3); color: var(--navy); font-size: clamp(1.04rem, 1.25vw, 1.16rem); line-height: 1.45; letter-spacing: -.025em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.challenge-card__organizer { margin: 11px 0 0; min-height: calc(1.55em * 2); color: var(--muted); font-size: .82rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.challenge-card__organizer strong { color: #53677f; font-weight: 800; }
.challenge-card__meta { margin: 17px 0 0; padding: 15px 0 0; display: grid; gap: 10px; border-top: 1px solid #e8eef6; }
.meta-row { min-width: 0; display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 9px; align-items: start; font-size: .8rem; }
.meta-row dt { margin: 0; color: #8493a7; font-weight: 800; }
.meta-row dd { margin: 0; min-width: 0; color: #3c4f68; font-weight: 650; overflow-wrap: anywhere; }
.meta-row--deadline dd { color: var(--pink-dark); font-weight: 850; }
.challenge-card__fee { margin: 14px 0 0; padding: 10px 12px; color: #5b6072; background: #f7f9fc; border-radius: 11px; font-size: .76rem; line-height: 1.5; }
.challenge-card__footer { margin-top: auto; padding: 0 20px 20px; }
.detail-link { width: 100%; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--blue); border-radius: 999px; font-size: .88rem; font-weight: 850; box-shadow: 0 9px 19px rgba(57,120,232,.2); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.detail-link::after { content: "→"; font-size: 1.05rem; }
.detail-link:hover { transform: translateY(-2px); background: #2d69d4; box-shadow: 0 12px 24px rgba(57,120,232,.27); }

.empty-state,
.error-state { margin-top: 8px; padding: clamp(42px, 7vw, 76px) 22px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-card); }
.empty-state__visual { position: relative; width: 108px; height: 90px; margin: 0 auto 18px; }
.empty-state__visual span { position: absolute; border-radius: 50%; }
.empty-state__visual span:nth-child(1) { width: 76px; height: 76px; left: 0; top: 10px; background: var(--blue-soft); }
.empty-state__visual span:nth-child(2) { width: 42px; height: 42px; right: 0; top: 0; background: var(--pink-soft); }
.empty-state__visual span:nth-child(3) { width: 24px; height: 24px; right: 7px; bottom: 0; background: #fff1b8; }
.empty-state__visual svg { position: absolute; left: 22px; top: 20px; width: 58px; height: 58px; fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; }
.empty-state h3,
.error-state h3 { margin: 0; color: var(--navy); font-size: clamp(1.18rem, 2vw, 1.5rem); }
.empty-state p,
.error-state p { margin: 9px auto 0; max-width: 560px; color: var(--muted); }
.empty-state__button { margin-top: 22px; min-width: 190px; }

.site-footer { padding: 52px 0 32px; color: #e9eefb; background: #121a30; }
.footer-grid { display: flex; justify-content: space-between; gap: 36px; align-items: flex-start; }
.footer-grid strong { letter-spacing: .03em; }
.footer-grid p { margin: 8px 0 0; color: #aebbd1; font-size: .86rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; color: #c8d0e2; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; }
.footer-note { margin-top: 30px; padding-top: 24px; color: #8f9ab2; border-top: 1px solid rgba(255,255,255,.12); font-size: .86rem; }

[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .search-panel { grid-template-columns: minmax(260px,1fr) minmax(190px,240px); }
  .search-actions { grid-column: 1 / -1; grid-template-columns: minmax(160px, 230px) 120px; justify-content: end; }
  .challenge-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .header-inner { min-height: 68px; gap: 14px; }
  .brand-logo { width: 168px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .search-hero { padding: 42px 0 36px; }
  .search-hero h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .search-hero__copy > p:last-child { margin-top: 14px; }
  .search-panel { margin-top: 26px; padding: 15px; grid-template-columns: 1fr; border-radius: 20px; }
  .search-actions { grid-column: auto; grid-template-columns: 1fr; }
  .category-shortcuts { padding-top: 12px; }
  .category-shortcuts > span { width: 100%; }
  .search-field input,
  .search-field select,
  .button { min-height: 50px; }
  .results-section { padding: 38px 0 60px; }
  .results-header { align-items: flex-start; gap: 12px; }
  .result-count { flex: 0 0 auto; }
  .result-count span { max-width: 74px; line-height: 1.25; }
  .active-conditions { min-height: 36px; padding-top: 11px; }
  .challenge-grid { grid-template-columns: 1fr; gap: 18px; }
  .challenge-card__title { min-height: 0; -webkit-line-clamp: 3; }
  .challenge-card__organizer { min-height: 0; }
  .challenge-card__content { padding: 18px 18px 16px; }
  .challenge-card__footer { padding: 0 18px 18px; }
  .detail-link { min-height: 50px; }
  .footer-grid { display: grid; gap: 20px; }
  .footer-links { gap: 6px 16px; }
}

@media (max-width: 390px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .brand-logo { width: 154px; }
  .search-hero h1 { font-size: 2.18rem; line-height: 1.16; }
  .search-panel { padding: 14px; }
  .results-header { flex-direction: column; }
  .result-count span { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.recommendation-entry{padding:42px 0;background:#fff;border-bottom:1px solid var(--line)}.recommendation-entry__intro{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:28px 32px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,#f8fbff,#fff8fb);box-shadow:var(--shadow-card)}.recommendation-entry__intro h2,.normal-search-heading h2{margin:0;color:var(--navy);font-size:clamp(1.5rem,2.5vw,2.25rem);line-height:1.35}.recommendation-entry__intro p:last-child{margin:8px 0 0;color:var(--muted)}.recommendation-toggle{flex:0 0 auto;min-width:220px}.recommendation-embed{margin-top:22px;border:1px solid var(--line);border-radius:24px;background:#fff;overflow:hidden}.recommendation-embed iframe{display:block;width:100%;height:1500px;border:0;background:#fff}.normal-search-section{padding:42px 0 0;background:var(--page)}.normal-search-heading{margin-bottom:18px}.normal-search-section .search-panel{margin-top:0}@media(max-width:1024px){.recommendation-entry__intro{align-items:flex-start;flex-direction:column}.recommendation-toggle{min-width:0;width:100%}.recommendation-embed iframe{height:1740px}}@media(max-width:760px){.recommendation-entry{padding:28px 0}.recommendation-entry__intro{padding:20px;border-radius:20px}.recommendation-embed{border-radius:20px}.recommendation-embed iframe{height:2650px}.normal-search-section{padding-top:30px}}
