/* --- 一覧画面：タイル状に綺麗に並べる設定 --- */
.animal-grid {
    display: block;
    overflow: hidden;
    padding: 10px 0;
}
.animal-card {
    float: left;
    width: 30%; /* パソコン時は横に3つ並ぶ */
    margin: 1.6%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    box-sizing: border-box;
}
.animal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.card-thumb {
    width: 100%;
    height: 140px; /* 写真の高さを統一 */
    overflow: hidden;
    border-radius: 7px 7px 0 0;
    background: #f5f5f5;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 縦横比を崩さずに正方形・長方形に綺麗に収める */
}
.card-name {
    margin: 0;
    padding: 10px;
    font-weight: bold;
    font-size: 9pt;
    color: #333;
}

/* --- ポップアップ（モーダル）のスタイル --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 背景を暗く */
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto; /* ポップアップ自体が長い場合にスクロール可能に */
    padding: 20px;
    box-sizing: border-box;
}
.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    box-sizing: border-box;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}
.modal-close:hover {
    color: #333;
}
.modal-content h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #7cb342; /* 福山動物園らしい緑のアクセント */
    color: #333;
    font-size: 14pt;
}
.modal-img {
    width: 100%;
    max-height: 350px;
    object-fit: contain; /* 写真全体を綺麗に見せる */
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 15px;
}
.modal-desc {
    font-size: 10pt;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}