/* ===== Character Select Screen ===== */
#screen-character-select {
    background: linear-gradient(180deg, #1a0a2e 0%, #0d0d1a 100%);
    padding: 20px;
}

.select-header {
    margin-bottom: 32px;
    text-align: center;
}

.select-header h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: var(--color-gold);
    letter-spacing: 0.1em;
}

.character-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1000px;
    width: 100%;
}

.character-card {
    position: relative;
    width: 280px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.character-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--card-color);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 30px color-mix(in srgb, var(--card-color) 30%, transparent);
}

.character-card:hover::before {
    opacity: 1;
}

/* キャラ画像プレースホルダー（MVP用） */
.character-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.character-placeholder.chisa {
    background: linear-gradient(135deg, #fff8f8, #F8C8DC);
    color: #d4708a;
}

.character-placeholder.yogami {
    background: linear-gradient(135deg, #2d1b4e, #6B3FA0);
    color: #D4AF37;
}

.character-placeholder.suzune {
    background: linear-gradient(135deg, #E63946, #ff6b7a);
    color: #fff;
}

.card-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.1em;
}

.card-reading {
    font-size: 0.8rem;
    color: rgba(240, 230, 211, 0.5);
    margin-top: -10px;
}

.card-catch {
    font-size: 0.85rem;
    color: rgba(240, 230, 211, 0.7);
    text-align: center;
    line-height: 1.6;
}

.card-fortunes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.card-fortune-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-fortune-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--card-color, rgba(240, 230, 211, 0.9));
}

.card-fortune-desc {
    font-size: 0.7rem;
    color: rgba(240, 230, 211, 0.5);
    line-height: 1.4;
}

/* ===== Character Images ===== */
.character-img-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #screen-character-select {
        padding-top: max(24px, env(safe-area-inset-top, 24px));
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    .select-header {
        margin-bottom: 20px;
        flex-shrink: 0;
    }

    .character-cards {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        flex-shrink: 0;
    }

    .character-card {
        width: 90%;
        max-width: 320px;
        flex-direction: row;
        padding: 16px;
        gap: 16px;
    }

    .character-img-wrapper {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .character-placeholder {
        width: 80px;
        height: 80px;
        font-size: 36px;
        flex-shrink: 0;
    }

    .card-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-align: left;
    }

    .card-catch {
        text-align: left;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #screen-character-select {
        padding: 16px 12px;
    }
    .select-header {
        margin-bottom: 20px;
    }
    .character-cards {
        gap: 12px;
    }
    .character-card {
        width: 95%;
        padding: 12px;
        gap: 12px;
    }
    .character-img-wrapper {
        width: 64px;
        height: 64px;
    }
    .character-placeholder {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
    .card-name {
        font-size: 1.1rem;
    }
    .card-catch {
        font-size: 0.75rem;
    }
    .card-fortune-tag {
        font-size: 0.75rem;
    }
    .card-fortune-desc {
        font-size: 0.65rem;
    }
    .card-fortune-item {
        padding: 6px 10px;
    }
}
