body {
    font-family: sans-serif;
    padding: 20px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"],
select {
    padding: 6px;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.card {
    border: 1px solid #ccc;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 200px;
}

.card:hover {
    transform: scale(1.03);
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination button {
    padding: 5px 10px;
    margin: 0 5px;
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 500px;
    text-align: center;
    position: relative;
    overflow: auto;
    top: 50px;
}

.modal-content img {
    max-width: 100%;
    border-radius: 10px;
}

.modal-content2 {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    overflow: auto;
    max-width: 80%;
    max-height: 60%;
}

.close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.category-item {
    background: #eee;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin: 0.25rem;
    display: inline-block;
}

.category-item.active {
    background: #007bff;
    color: white;
}

.ttl_balloon2 {
  font-weight: bold;
  padding: 0.5em 1em;
  border: 3px solid #777e81;
  box-shadow: 3px 3px 0 0 #777e81;
  position: relative;
  margin: 12px auto;
  width: 70%;
  text-align: center;
}
.ttl_balloon2::before, .ttl_balloon2::after {
  content: '';
  height: 0;
  width: 0;
  border: solid transparent;
  position: absolute;
  left: 30px;
}
.ttl_balloon2::before {
  border-color: transparent;
  border-top-color: #777e81;
  border-right-color: #777e81;
  border-width: 10px;
  top: 100%;
  left: 26px;
}
.ttl_balloon2::after {
  border-color: transparent;
  border-top-color: #fff;
  border-right-color: #fff;
  border-width: 6.5px;
  top: 99%;
}