@charset "UTF-8";
/* CSS Document */
/* 小学校受験：かならず覚える「ものの数え方50選」 */
/* 2026/02/16 */

/* --- 50選セクション専用スタイル（4列最適化版） --- */

#count50-section {
    box-sizing: border-box;
    border: darkorange 4px solid;
    border-radius: 10px;
    margin: 0;
    width: auto; 
    background: #f6f7fb; /* 背景色を追加して視認性を向上 */
}

/* ヘッダー・統計バーは変更なし */
.count50-header {
    background: linear-gradient(135deg,#ffda6b,#ff9f7a);
    padding: 25px 15px;
    text-align: center;
    border-radius: 6px 6px 0 0; /* 境界線に合わせて少し調整 */
}

.count50-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #222;
}

.count50-header p {
    margin: 8px 0 15px;
    font-size: 0.95rem;
}

.count50-stats {
    display: inline-block;
    background: #fff;
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #d04b00;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.count50-group-title {
    margin: 25px 15px 10px;
    font-size: 1.1rem; /* 少しだけサイズダウン */
    font-weight: bold;
    border-left: 5px solid #ff9f7a;
    padding-left: 12px;
    color: #333;
}

/* --- グリッド設定：PCで4列を狙う --- */
.count50-grid {
    display: grid;
    /* 160pxに下げることで、750px付近で4列（160*4 + 余白）になります */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px; /* 少し隙間を詰めました */
    padding: 12px;
}

/* カードのデザイン */
.count50-card {
    background: #fff;
    border-radius: 15px; /* 少し角丸を抑えてシャープに */
    padding: 15px 10px; /* 上下左右の余白を少し削減 */
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    text-align: center;
}

.count50-card.is-checked {
    background: #fffef0;
    border-color: #ff9f7a;
}

.count50-card.is-checked::after {
    content: "✓"; /* 正解のチェック */
    position: absolute;
    top: 8px;
    right: 10px;
    color: #ff9f7a;
    font-size: 1.5rem; /* サイズを大きくする */
    font-weight: 900;  /* 太さを最大にする */
    line-height: 1;
}

/* 内部要素：カード縮小に合わせて微調整 */
.count50-card .emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
    /* --- 追記：ガタつき防止 --- */
    display: inline-block;
    min-height: 1em; 
    min-width: 1em;
}

.count50-card img.emoji {
    width: 1.4em; /* 1.5 -> 1.4 */
    height: 1.4em;
    vertical-align: -0.15em;
}

.count50-card .thing {
    margin: 5px 0;
    font-size: 1.1rem; /* 1.2 -> 1.05 小さめのカードに合わせる */
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.count50-card .count {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: center; /* 中央揃えを明示 */
    align-items: baseline;
    gap: 4px;
}

/* ひらがな部分 */
.count50-card .count b {
    font-size: 1.3rem; /* 読みを大きく */
    color: #d04b00;
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* モバイル対応：2列固定 */
@media screen and (max-width: 480px) {
    .count50-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }
    .count50-card .thing {
        font-size: 1.1rem; /* モバイルでは2列なので少し大きめを維持 */
    }
    .count50-card .count b:nth-of-type(2) {
        font-size: 1.3rem;
    }
}
