body {
  line-height: 1.6;
  margin: 0;
  background-color: #fcfaf5;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
a:hover,
a:focus,
a:focus-visible {
  outline: 2px solid #1a4d1b !important;
  outline-offset: 2px;
}
a img {
  display: block;
  margin: auto;
}

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}
.logo_area .wrapTitle img {
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
  padding: 0;
}
/* breadcrumb */
.breadcrumb {
	margin: 10px 8px
}
.breadcrumb ol {
	margin: 0;
	padding: 1px 0
}
.breadcrumb ol li {
	list-style: none;
	margin-right: 0.5em;
	font-size: 80%;
	font-weight: bold;
	float: left;
	line-height: 1.3;
	white-space: normal
}
.breadcrumb ol li+li:before {
  content: ">";
  margin-right: 0.5em;
  color: #999
}
.breadcrumb ol li a {
  color: #00218C;
  text-decoration: underline;
}
main {
  background-color: #fcfaf5;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
}
.container header {
  border-bottom: none;
  background-color: #fcfaf5;
}
.page-title {
	color: #736357;
	font-weight: lighter;
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.6rem);
  border-left: none;
	line-height: 2;
	padding: 1rem 0 1rem 2rem;
	vertical-align: bottom;
}
.page-title::before{
  border: 2px solid #ea6025;
	content: '';
  display: block;
  position: relative;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  box-sizing: border-box;
  left: -1.5rem;
  top: 2rem;
}
.search-description {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: #333;
  padding-left: 0
}
.search-section {
  background-color: #fff;
  padding: 12px 20px 8px;
  margin: 20px 0;
  border-radius: 8px;
}
.search-title {
  font-size: clamp(1rem, 0.92rem + 0.5vw, 1.1rem);
  font-weight: 600;
  color: #736357;
  margin-bottom: 8px;
  border: none;
}
.category-group {
  position: relative;
  margin: 8px 0;
  padding: 8px 12px;
  padding-left: calc(8px + 8em + 8px);
  background: #fff;
  border: 1px solid #999;
  border-left: 12px solid;
  border-radius: 10px;
  display: block;
}
.category-group legend {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 4px 10px;
  max-width: 8em;
  white-space: nowrap;
  font-weight: 700;
  font-size: clamp(0.8rem, 0.7rem + 0.5vw, 1rem);
  line-height: 1.4;
}
.check-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  align-items: center;
  min-height: 24px;
}
.check-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}
.check-wrap label:hover {
  background: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.check-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
}
.check-wrap input[type="checkbox"]:focus-visible + span {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.check-wrap input[type="checkbox"]:checked + span {
  font-weight: 700;
}
@media (max-width: 640px) {
  .category-group {
    padding-left: 12px;
    padding-top: 12px;
  }
  .category-group legend {
    position: static;
    transform: none;
    max-width: none;
    margin-bottom: 4px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
  }
  .check-wrap {
    min-height: 0;
  }
}
.check-wrap input[type="checkbox"]:focus-visible,
.check-wrap input[type="checkbox"]:focus {
  outline: 2px solid #1a4d1b;
  outline-offset: 2px;
}
.check-wrap input[type="checkbox"]:focus + span {
  text-decoration: underline;
}
.category-group[data-category="target"] {
  background-color: #C8E6C9;
  border-color: #2E7D32;
}
.category-group[data-category="creator"] {
  background-color: #BBDEFB;
  border-color: #1565C0;
}
.category-group[data-category="field"] {
  background-color: #FFE0B2;
  border-color: #E65100;
}
.category-group[data-category="type"] {
  background-color: #E1BEE7;
  border-color: #6A1B9A;
}
.grid-box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 12px;
}
.img-box {
  cursor: default;
  position: relative;
  background: white;
  border: 1px solid #999;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s; /* all から絞る */
}
.img-box:has(a.image:hover) {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.img-box h3 {
  margin: 0;
}
.img-box a.image {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.img-box a:hover,
.img-box a.image:focus,
.img-box a.image:focus-visible {
  outline: none !important;
}
.img-box::after {
  content: "";
  position: absolute;
  inset: 2px; 
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  border: 3px solid #1a4d1b;
}
.img-box:focus-within::after {
  opacity: 1;
}
.img-box a.image:hover .h.text {
  text-decoration: none;
  opacity: 0.85;
}
.img-box .img-wrap {
  display: block;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #fff;
}
.img-box .img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.img-box .h.text {
  display: block;
  padding: 15px;
  font-size: clamp(1rem, 0.92rem + 0.5vw, 1.1rem);
  font-weight: bold;
  color: #1a4d1b;
}
.img-box p {
  padding: 0 15px 15px;
  margin: 0;
  font-size: clamp(0.9rem, 0.83rem + 0.35vw, 0.95rem);
  color: #333;
  line-height: 1.5;
}
.img-box .creator {
  margin: 0;
  font-size: clamp(0.7rem, 1.5vw, 0.8rem); 
  font-weight: 600;
  color: #1a4d1b;
  line-height: 1.5;
}
.options {
  padding: 0 15px 15px;
}
.tags {
  margin: 0;
}
.tags dt {
  font-weight: bold;
  color: #333;
  font-size: clamp(0.8rem, 0.74rem + 0.3vw, 0.85rem); 
  margin-top: 8px;
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.tags dt:first-child {
  margin-top: 0;
}
.tags dd {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  margin: 3px 5px 3px 0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
}
/* カテゴリー別のタグ色 */
.tag-target {
  background: #C8E6C9;
  color: #1B5E20;
  border: 1px solid #66BB6A;
}
.tag-creator {
  background: #BBDEFB;
  color: #0D47A1;
  border: 1px solid #42A5F5;
}
.tag-field {
  background: #FFE0B2;
  color: #7A2A00;
  border: 1px solid #F57C00;
}
.tag-type {
  background: #E1BEE7;
  color: #4A148C;
  border: 1px solid #AB47BC;
}
.result-count {
  text-align: center;
  margin: 12px 0 4px;
  font-size: clamp(1rem, 0.92rem + 0.5vw, 1.1rem);
  color: #333;
}
.result-count span {
  display: inline-block;
  padding: 0 8px;
  font-weight: bold;
}
.img-box[hidden] {
  display: none !important;
  visibility: hidden;
}
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: clamp(1rem, 0.92rem + 0.5vw, 1.1rem);
}
.note {
  font-size: clamp(0.7rem, 2vw, 0.8rem);
  color: #333;
  word-wrap: break-word;
  }
  .bottom-txt-wrap {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    line-height: 1.7;
    color: #333;
  } 
@media (prefers-contrast: high) {
  .category-group {
    border: 2px solid #000;
  }
  .tag-target,
  .tag-creator,
  .tag-field,
  .tag-type {
    border: 2px solid #000;
  }
}
@media (prefers-reduced-motion: reduce) {
  .img-box,
  .check-wrap label {
    transition: none;
  }
  .img-box:hover {
    transform: none;
  }
}
/* はぐクン配置 */
.page-header {
  position: relative;
  padding-right: 36px;
}
.page-mascot {
  position: absolute;
  top: 24px;
  right: 0;
  width: clamp(80px, 16vw, 160px);
  height: auto;
  pointer-events: none;
  opacity: 0;
  animation: fadein 1s ease forwards;
  
}
@keyframes fadein {
  to { opacity: 1; }
}
@media (max-width: 1050px) {
  .page-header {
    padding-right: 0;
  }
}

@media (max-width: 678px) {
  .page-header {
    padding-right: 0;
  }
  .page-mascot {
    top: 80px;
  }
}