/* ========================================
   鳥スコア UI Redesign (Rough Sketch Version)
   手描きラフに基づくシンプルなグリッドレイアウト
   ======================================== */

.tori-score-main {
    padding: 20px 10px;
    max-width: 600px;
    /* スマホ・タブレット想定 */
    margin: 0 auto;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
}

/* 共通タイトル */
.view-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* === 1. 統計グリッド (中央円形配置) === */
.stats-rough-grid {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
    border: 2px solid #333;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    /* 白背景を明示 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* グリッドセルの配置 */
.grid-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.top-left {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

.top-center {
    /* ラフ画では中央上部にも項目があるように見えるが、構造上は円が被る */
    /* ここでは円の裏に配置するか、円の上に配置するか */
    display: none;
}

.top-right {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    border-bottom: 1px solid #eee;
    border-left: 1px solid #eee;
}

.bottom-left {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    border-right: 1px solid #eee;
}

.bottom-right {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    border-left: 1px solid #eee;
}

/* 中央の円形要素 (絶対配置で真ん中に置く) */
.main-circle-stat {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    width: 130px;
    height: 130px;
    background: white;
    border: 3px solid #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* テキストスタイル */
.rough-label {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 4px;
    font-weight: 700;
}

.rough-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: #333;
}

.rough-unit {
    font-size: 0.8rem;
    margin-left: 2px;
    font-weight: normal;
    color: #777;
}

.circle-label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.circle-value {
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1;
    color: #333;
}

.circle-unit {
    font-size: 1rem;
    font-weight: normal;
    margin-left: 2px;
}

/* 投稿ボタン (シンプル) */
.tori-score-upload-btn {
    background: #333;
    color: white;
    border: 2px solid white;
    /* 白枠追加 */
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.tori-score-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* === 2. ランキング (横スクロール) === */
.ranking-section-rough {
    margin-bottom: 30px;
    background: white;
    /* 白背景追加 */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #333;
}

.section-header-rough {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 8px;
}

.section-header-rough h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-more-btn-rough {
    background: #f0f0f0;
    border: 1px solid #999;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #555;
    font-weight: bold;
}

.ranking-grid-rough {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    /* スクロールバー用 */
    /* スクロールバー装飾 (Webkit) */
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.rank-card-rough {
    flex: 0 0 80px;
    /* 固定幅 */
    text-align: center;
    cursor: pointer;
}

.rough-img-frame {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    border-radius: 4px;
    /* ラフ画では四角い */
    overflow: hidden;
    margin-bottom: 5px;
    background: #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rough-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.rank-card-rough:hover img {
    transform: scale(1.1);
}

.rough-score {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

/* === 3. 採点待ち (横スクロール) === */
.pending-section-rough,
.my-submissions-section-v3 {
    margin-bottom: 30px;
    background: white;
    /* 白背景追加 */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #333;
}

.pending-grid-rough,
.my-submissions-grid-v3 {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* 共通の見出しスタイル (v3もroughと同じにする) */
.section-header-v3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 8px;
}

.section-header-v3 h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pending-card-v3 {
    flex: 0 0 80px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.pending-card-v3 img {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.pending-card-v3:hover img {
    transform: scale(1.1);
}

.vote-badge-v3 {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    margin-top: 4px;
}

.pending-card-rough {
    flex: 0 0 80px;
    text-align: center;
}

.pending-card-rough.votable-card {
    cursor: pointer;
}

.rough-img-box {
    width: 80px;
    height: 80px;
    border: 2px solid #999;
    /* 未確定はグレー枠 */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
    background: #f0f0f0;
}

.votable-card .rough-img-box {
    border-color: #333;
    /* 投票可能なら黒枠 */
}

.rough-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.votable-card .rough-img-box img {
    opacity: 1;
}

.rough-vote-status {
    font-size: 0.9rem;
    font-weight: bold;
}

/* === 4. 投票モーダル (カードデザイン化) === */

/* モーダル全体背景 */
.tori-score-voting-form {
    background: #f5f7fa;
    /* 薄いブルーグレー */
    padding: 20px;
    border-radius: 16px;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

/* 投票カテゴリ (白いカード) */
.vote-cat {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e4e8;
}

/* カテゴリタイトル */
.vote-cat h4 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-pts {
    font-size: 0.9rem;
    color: #7f8c8d;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 投票項目 */
.vote-item-v2 {
    margin-bottom: 20px;
}

.vote-item-v2:last-child {
    margin-bottom: 0;
}

.vote-label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

/* ID確認チェックボックス */
.id-check-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.id-check-box label {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #92400e;
}

/* 合計点バナー */
.total-banner {
    position: sticky;
    bottom: -20px;
    /* パディング相殺 */
    margin: 20px -20px -20px -20px;
    /* カードの外に広げる */
    background: #2e7d32;
    /* メインカラー */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}